David Howells
3d8dcf278b
watch_queue: Actually free the watch
free_watch() does everything barring actually freeing the watch object. Fix
this by adding the missing kfree.
kmemleak produces a report something like the following. Note that as an
address can be seen in the first word, the watch would appear to have gone
through call_rcu().
BUG: memory leak
unreferenced object 0xffff88810ce4a200 (size 96):
comm "syz-executor352", pid 3605, jiffies 4294947473 (age 13.720s)
hex dump (first 32 bytes):
e0 82 48 0d 81 88 ff ff 00 00 00 00 00 00 00 00 ..H.............
80 a2 e4 0c 81 88 ff ff 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff8214e6cc>] kmalloc include/linux/slab.h:581 [inline]
[<ffffffff8214e6cc>] kzalloc include/linux/slab.h:714 [inline]
[<ffffffff8214e6cc>] keyctl_watch_key+0xec/0x2e0 security/keys/keyctl.c:1800
[<ffffffff8214ec84>] __do_sys_keyctl+0x3c4/0x490 security/keys/keyctl.c:2016
[<ffffffff84493a25>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
[<ffffffff84493a25>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
[<ffffffff84600068>] entry_SYSCALL_64_after_hwframe+0x44/0xae
Fixes: c73be61ced ("pipe: Add general notification queue support")
Reported-and-tested-by: syzbot+6e2de48f06cdb2884bfc@syzkaller.appspotmail.com
Signed-off-by: David Howells <dhowells@redhat.com>
2022-03-21 12:48:32 +00:00
..
2022-02-17 10:48:26 -08:00
2022-02-22 16:14:35 -08:00
2022-03-17 11:02:13 -07:00
2021-11-03 17:21:37 +00:00
2022-03-07 11:26:02 -08:00
2021-12-01 00:06:43 +01:00
2022-02-06 22:37:27 +01:00
2022-01-17 05:49:30 +02:00
2021-12-02 17:25:21 +09:00
2022-01-22 08:33:37 +02:00
2022-01-11 09:51:26 -08:00
2022-01-16 10:08:13 +02:00
2022-02-11 23:30:02 +01:00
2022-02-07 21:02:31 +01:00
2022-02-03 11:27:38 -08:00
2022-01-26 13:04:05 -08:00
2022-02-19 11:11:05 +01:00
2022-01-23 06:20:44 +02:00
2022-03-10 17:23:08 -08:00
2021-10-18 06:17:01 -06:00
2022-02-03 11:20:34 -08:00
2021-10-27 12:32:34 +02:00
2021-12-14 17:39:42 -05:00
2021-11-06 16:43:20 -07:00
2022-01-25 13:22:51 -05:00
2021-11-01 21:17:39 -07:00
2022-01-11 13:08:21 -08:00
2022-02-09 16:04:26 -05:00
2021-08-11 13:11:12 -07:00
2021-09-08 15:32:35 -07:00
2021-08-16 18:55:32 +02:00
2021-11-24 12:20:27 +01:00
2021-12-25 12:20:55 -08:00
2022-02-17 09:11:02 -06:00
2022-01-20 08:52:55 +02:00
2022-01-08 12:43:57 -06:00
2021-11-09 10:02:51 -08:00
2022-03-05 11:08:32 -08:00
2021-06-18 11:43:08 +02:00
2021-05-27 04:01:50 +09:00
2022-01-22 08:33:34 +02:00
2021-10-15 11:25:18 +02:00
2021-07-05 10:46:20 +02:00
2022-01-16 10:08:13 +02:00
2021-08-17 17:50:51 +02:00
2021-11-11 13:09:33 +01:00
2021-11-09 10:02:52 -08:00
2021-12-13 12:04:45 -06:00
2021-11-06 13:30:42 -07:00
2021-09-08 15:32:34 -07:00
2022-01-22 08:33:36 +02:00
2022-01-20 10:41:01 +02:00
2022-01-11 18:45:02 -08:00
2022-02-16 12:51:32 -08:00
2022-01-11 18:45:02 -08:00
2022-02-03 11:20:34 -08:00
2021-12-29 10:37:33 +01:00
2021-09-03 09:58:12 -07:00
2021-08-27 16:30:18 +08:00
2022-01-20 08:52:55 +02:00
2021-12-28 11:26:18 +01:00
2021-09-03 09:58:12 -07:00
2021-10-14 13:29:18 +02:00
2022-01-08 12:43:57 -06:00
2022-01-08 12:43:57 -06:00
2021-11-12 11:53:16 -08:00
2022-01-22 08:33:37 +02:00
2021-09-22 10:24:01 -04:00
2021-12-07 16:36:17 -08:00
2021-09-30 09:37:27 +01:00
2022-02-10 19:09:12 -08:00
2022-02-10 19:08:54 -08:00
2021-10-22 15:32:46 +02:00
2021-08-10 14:57:42 +02:00
2021-12-02 15:07:22 +01:00
2022-02-03 17:02:21 -08:00
2021-11-06 13:30:43 -07:00
2021-07-05 10:46:33 +02:00
2022-01-15 16:30:30 +02:00
2022-03-05 11:08:32 -08:00
2021-06-23 16:41:24 -06:00
2022-02-21 10:21:47 +01:00
2021-12-07 16:36:17 -08:00
2021-08-16 11:39:51 -04:00
2022-01-08 12:43:57 -06:00
2022-02-17 09:11:57 -06:00
2022-02-25 10:40:14 -06:00
2021-09-08 11:50:27 -07:00
2021-07-03 11:41:14 -07:00
2022-03-21 12:48:32 +00:00
2022-01-22 08:33:34 +02:00
2021-08-17 07:49:10 -10:00
2022-01-10 07:54:04 -10:00