]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
bsdacct: fix access to invalid filp in acct_on()
authorRenaud Lottiaux <renaud.lottiaux@kerlabs.com>
Tue, 30 Jun 2009 18:41:34 +0000 (11:41 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 2 Jul 2009 23:32:11 +0000 (16:32 -0700)
commit339d06aaa1aff1ac0d73987ec4f90836aac62d76
tree92e852bbc7c1bb833fe38a89530fba5e757d068d
parent9fad9f263a7065be94bf77519346d0d854ff3b92
bsdacct: fix access to invalid filp in acct_on()

commit df279ca8966c3de83105428e3391ab17690802a9 upstream.

The file opened in acct_on and freshly stored in the ns->bacct struct can
be closed in acct_file_reopen by a concurrent call after we release
acct_lock and before we call mntput(file->f_path.mnt).

Record file->f_path.mnt in a local variable and use this variable only.

Signed-off-by: Renaud Lottiaux <renaud.lottiaux@kerlabs.com>
Signed-off-by: Louis Rilling <louis.rilling@kerlabs.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/acct.c