]> git.baikalelectronics.ru Git - kernel.git/commit
ipc/msg.c: fix percpu_counter use after free
authorAndrew Morton <akpm@linux-foundation.org>
Fri, 21 Oct 2022 04:19:22 +0000 (21:19 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 28 Oct 2022 20:37:22 +0000 (13:37 -0700)
commit23c36d0a8d814e9853f364ab01f69a77bda26b07
tree878e60cfde45dea3ee6379d66b5a55c934947e24
parent8a7e81fdc86bd5b4440ec55689dc5447bb72ed82
ipc/msg.c: fix percpu_counter use after free

These percpu counters are referenced in free_ipcs->freeque, so destroy
them later.

Fixes: e119ff979a8c ("ipc/msg: mitigate the lock contention with percpu counter")
Reported-by: syzbot+96e659d35b9d6b541152@syzkaller.appspotmail.com
Tested-by: Mark Rutland <mark.rutland@arm.com>
Cc: Jiebin Sun <jiebin.sun@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
ipc/msg.c