Forwarded: [syzbot] [kernel?] general protection fault in put_ipc_ns

syzbot posted 1 patch 1 week, 6 days ago
Forwarded: [syzbot] [kernel?] general protection fault in put_ipc_ns
Posted by syzbot 1 week, 6 days ago
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.

***

Subject: [syzbot] [kernel?] general protection fault in put_ipc_ns
Author: hellouser819@gmail.com

#syz test
diff --git a/ipc/namespace.c b/ipc/namespace.c
index 535f16e..ea3015c 100644
--- a/ipc/namespace.c
+++ b/ipc/namespace.c
@@ -201,7 +201,7 @@ static void free_ipc(struct work_struct *unused)
  */
 void put_ipc_ns(struct ipc_namespace *ns)
 {
-       if (ns_ref_put_and_lock(ns, &mq_lock)) {
+       if (ns != NULL && ns_ref_put_and_lock(ns, &mq_lock)) {
                mq_clear_sbinfo(ns);
                spin_unlock(&mq_lock);