]> git.baikalelectronics.ru Git - kernel.git/commit
fix a leak in replace_fd() users
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 16 Oct 2012 17:30:07 +0000 (13:30 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 16 Oct 2012 17:36:50 +0000 (13:36 -0400)
commit457f0f4f204f9599e8a8f1316cb5beeeb4f9d0d7
tree9064f045ef433e4d74d281daa995ee3c082e806e
parent7dc01ecf4df626fee14396b0d5049be247ff7065
fix a leak in replace_fd() users

replace_fd() began with "eats a reference, tries to insert into
descriptor table" semantics; at some point I'd switched it to
much saner current behaviour ("try to insert into descriptor
table, grabbing a new reference if inserted; caller should do
fput() in any case"), but forgot to update the callers.
Mea culpa...

[Spotted by Pavel Roskin, who has really weird system with pipe-fed
coredumps as part of what he considers a normal boot ;-)]

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/coredump.c
security/selinux/hooks.c