]> git.ipfire.org Git - thirdparty/linux.git/commit
fix a leak in fcntl_dirnotify()
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 12 Jul 2025 17:18:43 +0000 (18:18 +0100)
committerChristian Brauner <brauner@kernel.org>
Mon, 14 Jul 2025 08:13:31 +0000 (10:13 +0200)
commitfdfe0133473a528e3f5da69c35419ce6711d6b89
treead0203cd8b9d6623521ccee9777e5cc01082b928
parent177bb4cba97aae951b910d8ca248480715d09009
fix a leak in fcntl_dirnotify()

[into #fixes, unless somebody objects]

Lifetime of new_dn_mark is controlled by that of its ->fsn_mark,
pointed to by new_fsn_mark.  Unfortunately, a failure exit had
been inserted between the allocation of new_dn_mark and the
call of fsnotify_init_mark(), ending up with a leak.

Fixes: 1934b212615d "file: reclaim 24 bytes from f_owner"
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Link: https://lore.kernel.org/20250712171843.GB1880847@ZenIV
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/notify/dnotify/dnotify.c