Skip to content

Commit

Permalink
SELinux: use do_each_thread as a proper do/while block
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
James Morris committed Jul 14, 2008
1 parent e399f98 commit 2baf06d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions security/selinux/hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -5196,12 +5196,12 @@ static int selinux_setprocattr(struct task_struct *p,
struct task_struct *g, *t;
struct mm_struct *mm = p->mm;
read_lock(&tasklist_lock);
do_each_thread(g, t)
do_each_thread(g, t) {
if (t->mm == mm && t != p) {
read_unlock(&tasklist_lock);
return -EPERM;
}
while_each_thread(g, t);
} while_each_thread(g, t);
read_unlock(&tasklist_lock);
}

Expand Down

0 comments on commit 2baf06d

Please sign in to comment.