Tetsuo Handa 78d2978874 CRED: Fix kernel panic upon security_file_alloc() failure.
In get_empty_filp() since 2.6.29, file_free(f) is called with f->f_cred == NULL
when security_file_alloc() returned an error.  As a result, kernel will panic()
due to put_cred(NULL) call within RCU callback.

Fix this bug by assigning f->f_cred before calling security_file_alloc().

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-02-04 10:40:29 -08:00
..
2011-01-12 20:03:43 -05:00
2011-01-12 20:02:45 -05:00
2011-01-12 20:03:42 -05:00
2011-01-07 17:50:26 +11:00
2011-01-31 22:35:37 +00:00
2010-10-29 04:16:28 -04:00
2010-10-29 04:16:28 -04:00
2011-01-16 21:22:37 +00:00
2011-01-07 17:50:26 +11:00
2011-01-07 17:50:26 +11:00
2011-01-14 09:23:36 -08:00
2011-01-12 20:02:44 -05:00
2011-01-12 20:02:45 -05:00
2011-01-12 20:03:42 -05:00
2011-01-07 17:50:26 +11:00
2011-01-07 17:50:26 +11:00
2011-01-12 20:02:43 -05:00
2011-01-12 20:02:44 -05:00
2011-01-28 13:41:35 -05:00
2010-10-29 04:16:13 -04:00
2011-01-07 17:50:26 +11:00
2011-01-07 17:50:26 +11:00
2010-10-29 04:16:31 -04:00
2011-01-07 17:50:26 +11:00
2011-01-12 20:02:44 -05:00
2011-01-07 17:50:26 +11:00
2011-01-07 17:50:26 +11:00
2011-01-13 08:03:12 -08:00
2010-10-29 04:16:28 -04:00
2011-02-02 16:03:19 -08:00
2011-02-02 16:03:19 -08:00
2010-10-15 15:53:27 +02:00
2011-01-07 17:50:27 +11:00
2011-01-17 01:47:59 -05:00
2010-10-28 09:44:56 -07:00
2011-01-13 17:32:32 -08:00
2011-01-17 01:47:59 -05:00
2011-01-17 02:25:31 -05:00
2011-01-07 17:50:33 +11:00
2010-08-09 16:48:44 -04:00
2011-01-16 13:47:07 -05:00
2010-08-09 16:47:43 -04:00