Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Mar 2021 11:47:31 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: af3a80bcdd20 - stable/12 - MFC dfb33cb0ef48: Allocating the LinuxKPI current structure from a software interrupt thread must be done using the M_NOWAIT flag after 1ae20f7c70ea .
Message-ID:  <202103231147.12NBlVhX050850@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by hselasky:

URL: https://cgit.FreeBSD.org/src/commit/?id=af3a80bcdd204aaf9e9b7642cf81e4dfdb5a789e

commit af3a80bcdd204aaf9e9b7642cf81e4dfdb5a789e
Author:     Hans Petter Selasky <hselasky@FreeBSD.org>
AuthorDate: 2021-03-10 12:26:09 +0000
Commit:     Hans Petter Selasky <hselasky@FreeBSD.org>
CommitDate: 2021-03-23 11:46:02 +0000

    MFC dfb33cb0ef48:
    Allocating the LinuxKPI current structure from a software interrupt thread
    must be done using the M_NOWAIT flag after 1ae20f7c70ea .
    
    Sponsored by:   Mellanox Technologies // NVIDIA Networking
    
    (cherry picked from commit dfb33cb0ef48084da84072244e8ca486dfcf3a96)
---
 sys/compat/linuxkpi/common/src/linux_compat.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c
index f120856dd23d..e758a5590bc9 100644
--- a/sys/compat/linuxkpi/common/src/linux_compat.c
+++ b/sys/compat/linuxkpi/common/src/linux_compat.c
@@ -1901,9 +1901,15 @@ linux_timer_callback_wrapper(void *context)
 {
 	struct timer_list *timer;
 
-	linux_set_current(curthread);
-
 	timer = context;
+
+	if (linux_set_current_flags(curthread, M_NOWAIT)) {
+		/* try again later */
+		callout_reset(&timer->callout, 1,
+		    &linux_timer_callback_wrapper, timer);
+		return;
+	}
+
 	timer->function(timer->data);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103231147.12NBlVhX050850>