linux-next/Documentation
David Howells 8f92054e7c CRED: Fix __task_cred()'s lockdep check and banner comment
Fix __task_cred()'s lockdep check by removing the following validation
condition:

	lockdep_tasklist_lock_is_held()

as commit_creds() does not take the tasklist_lock, and nor do most of the
functions that call it, so this check is pointless and it can prevent
detection of the RCU lock not being held if the tasklist_lock is held.

Instead, add the following validation condition:

	task->exit_state >= 0

to permit the access if the target task is dead and therefore unable to change
its own credentials.

Fix __task_cred()'s comment to:

 (1) discard the bit that says that the caller must prevent the target task
     from being deleted.  That shouldn't need saying.

 (2) Add a comment indicating the result of __task_cred() should not be passed
     directly to get_cred(), but rather than get_task_cred() should be used
     instead.

Also put a note into the documentation to enforce this point there too.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-07-29 15:16:18 -07:00
..
2009-10-01 21:17:49 +02:00
2010-05-27 09:12:43 -07:00
2010-02-24 13:51:32 +01:00
2008-02-14 00:16:13 -05:00
2008-10-16 11:21:30 -07:00
2008-02-03 15:54:28 +02:00
2010-06-03 11:33:50 +02:00
2009-12-09 14:21:36 -08:00
2008-01-11 18:22:30 -06:00
2010-05-10 10:23:17 +02:00
2009-06-18 13:04:04 -07:00
2006-11-30 04:58:40 +01:00
2010-04-08 11:34:34 +02:00
2008-12-03 16:09:53 -07:00
2008-07-25 10:53:30 -07:00
2009-10-15 07:25:20 -06:00
2010-04-22 15:24:56 -07:00
2008-03-24 19:22:19 -07:00
2009-07-01 22:36:22 +02:00
2009-08-28 15:21:12 -04:00
2009-04-27 12:00:27 -07:00
2009-04-27 12:00:27 -07:00
2008-11-12 17:17:17 -08:00
2010-03-10 17:09:33 -05:00
2006-06-27 17:32:47 -07:00
2010-04-27 22:59:07 +02:00
2010-03-16 11:47:56 +01:00