aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2008-06-11 11:42:35 -0400
committerJames Morris <jmorris@namei.org>2008-07-14 01:02:02 -0400
commit2baf06df85b27c1d64867883a0692519594f1ef2 (patch)
treeb4f8f2ba2c4175983fea740a607d7cc3cfef26ec
parente399f98224a03d2e85fb45eacba367c47173f6f9 (diff)
SELinux: use do_each_thread as a proper do/while block
Use do_each_thread as a proper do/while block. Sparse complained. Signed-off-by: James Morris <jmorris@namei.org> Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
-rw-r--r--security/selinux/hooks.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 6e8d0e91c0ca..4130d64359a3 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -5196,12 +5196,12 @@ static int selinux_setprocattr(struct task_struct *p,
5196 struct task_struct *g, *t; 5196 struct task_struct *g, *t;
5197 struct mm_struct *mm = p->mm; 5197 struct mm_struct *mm = p->mm;
5198 read_lock(&tasklist_lock); 5198 read_lock(&tasklist_lock);
5199 do_each_thread(g, t) 5199 do_each_thread(g, t) {
5200 if (t->mm == mm && t != p) { 5200 if (t->mm == mm && t != p) {
5201 read_unlock(&tasklist_lock); 5201 read_unlock(&tasklist_lock);
5202 return -EPERM; 5202 return -EPERM;
5203 } 5203 }
5204 while_each_thread(g, t); 5204 } while_each_thread(g, t);
5205 read_unlock(&tasklist_lock); 5205 read_unlock(&tasklist_lock);
5206 } 5206 }
5207 5207