]> git.hungrycats.org Git - linux/commitdiff
[PATCH] task_lock commentary fixes
authorAndrew Morton <akpm@digeo.com>
Wed, 9 Apr 2003 04:31:53 +0000 (21:31 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Wed, 9 Apr 2003 04:31:53 +0000 (21:31 -0700)
From: Manfred Spraul <manfred@colorfullife.com>

Update and clarify the incorrect commentary around task_lock()

include/linux/sched.h

index f3b4c5891898bc2c99b533c9a01fc6f1fa045b4b..bbc51fac0cf66ade81f3219f09e7591c075c0f61 100644 (file)
@@ -686,7 +686,11 @@ static inline int thread_group_empty(task_t *p)
 
 extern void unhash_process(struct task_struct *p);
 
-/* Protects ->fs, ->files, ->mm, and synchronises with wait4().  Nests inside tasklist_lock */
+/* Protects ->fs, ->files, ->mm, and synchronises with wait4().
+ * Nests both inside and outside of read_lock(&tasklist_lock).
+ * It must not be nested with write_lock_irq(&tasklist_lock),
+ * neither inside nor outside.
+ */
 static inline void task_lock(struct task_struct *p)
 {
        spin_lock(&p->alloc_lock);