aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2021-03-10 12:26:09 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2021-03-10 12:27:40 +0000
commitdfb33cb0ef48084da84072244e8ca486dfcf3a96 (patch)
tree5fcd86303d6206e8cfe38d1ca74bb655f820076c
parent6eb60f5b7f7df1a59de139260aebfa0aa5f6d79e (diff)
downloadsrc-dfb33cb0ef48084da84072244e8ca486dfcf3a96.tar.gz
src-dfb33cb0ef48084da84072244e8ca486dfcf3a96.zip
Allocating the LinuxKPI current structure from a software interrupt thread
must be done using the M_NOWAIT flag after 1ae20f7c70ea . MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking
-rw-r--r--sys/compat/linuxkpi/common/src/linux_compat.c10
1 files 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 707c5e47512e..5f7e2664bee1 100644
--- a/sys/compat/linuxkpi/common/src/linux_compat.c
+++ b/sys/compat/linuxkpi/common/src/linux_compat.c
@@ -1913,9 +1913,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);
}