Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 May 2021 09:25:33 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 209d4919c527 - main - Make sure all tasklets are drained before unloading the LinuxKPI. Else use-after-free may happen.
Message-ID:  <202105210925.14L9PXkO070752@gitrepo.freebsd.org>

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

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

commit 209d4919c5270fe9e3c1d809cf91355d222dc2f3
Author:     Hans Petter Selasky <hselasky@FreeBSD.org>
AuthorDate: 2021-05-21 06:52:59 +0000
Commit:     Hans Petter Selasky <hselasky@FreeBSD.org>
CommitDate: 2021-05-21 09:21:32 +0000

    Make sure all tasklets are drained before unloading the LinuxKPI.
    Else use-after-free may happen.
    
    MFC after:      1 week
    Sponsored by:   Mellanox Technologies // NVIDIA Networking
---
 sys/compat/linuxkpi/common/src/linux_tasklet.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/compat/linuxkpi/common/src/linux_tasklet.c b/sys/compat/linuxkpi/common/src/linux_tasklet.c
index 9a4c01737466..26e7bb75cf19 100644
--- a/sys/compat/linuxkpi/common/src/linux_tasklet.c
+++ b/sys/compat/linuxkpi/common/src/linux_tasklet.c
@@ -128,6 +128,8 @@ tasklet_subsystem_uninit(void *arg __unused)
 	struct tasklet_worker *tw;
 	int i;
 
+	taskqgroup_drain_all(qgroup_softirq);
+
 	CPU_FOREACH(i) {
 		if (CPU_ABSENT(i))
 			continue;



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