From: Alexander Viro <email@example.com>
Date: Sat, 14 Jan 2006 20:29:55 +0000 (-0500)
Subject: [PATCH] Fix double decrement of mqueue_mnt->mnt_count in sys_mq_open
[PATCH] Fix double decrement of mqueue_mnt->mnt_count in sys_mq_open
Fixed the refcounting on failure exits in sys_mq_open() and
cleaned the logics up. Rules are actually pretty simple - dentry_open()
expects vfsmount and dentry to be pinned down and it either transfers
them into created struct file or drops them. Old code had been very
confused in that area - if dentry_open() had failed either in do_open()
or do_create(), we ended up dentry and mqueue_mnt dropped twice, once
by dentry_open() cleanup and then by sys_mq_open().
Fix consists of making the rules for do_create() and do_open()
same as for dentry_open() and updating the sys_mq_open() accordingly;
that actually leads to more straightforward code and less work on
Signed-off-by: Al Viro <firstname.lastname@example.org>
Signed-off-by: Linus Torvalds <email@example.com>
Created attachment 77224 [details, diff]
Patch. Applies against 2.6.14 and 2.6.15 (not sure about earlier versions).
Created attachment 77226 [details, diff]
fix-double-decrement-in-sys_mq_open.patch (inc. git header)
Revision. Exactly the same, just added the git header stuff and commit message at the top.
hppa-sources-126.96.36.199_p4 in CVS.
Fixed in gentoo-sources-2.6.15-r2 (genpatches-2.6.15-4) and Linux 188.8.131.52
Fixed in hardened-sources-2.6.15-r5 and genpatches-2.6.14-10.
Fixed in suspend2-sources-2.6.15-r5.
All fixed now, thanks!