From: KaiGai Kohei Date: Tue, 6 Nov 2007 16:17:16 +0000 (+0900) Subject: SELinux: fix bug in new ebitmap code. X-Git-Tag: v2.6.24-rc3~181^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6d2b685564ba417f4c6d80c3661f0dfee13fff85;p=profile%2Fivi%2Fkernel-x86-ivi.git SELinux: fix bug in new ebitmap code. The "e_iter = e_iter->next;" statement in the inner for loop is primally bug. It should be moved to outside of the for loop. Signed-off-by: KaiGai Kohei Acked-by: Stephen Smalley Signed-off-by: James Morris --- diff --git a/security/selinux/ss/ebitmap.c b/security/selinux/ss/ebitmap.c index c1a6b22..920b5e3 100644 --- a/security/selinux/ss/ebitmap.c +++ b/security/selinux/ss/ebitmap.c @@ -129,8 +129,8 @@ int ebitmap_netlbl_export(struct ebitmap *ebmap, cmap_sft = delta % NETLBL_CATMAP_MAPSIZE; c_iter->bitmap[cmap_idx] |= e_iter->maps[cmap_idx] << cmap_sft; - e_iter = e_iter->next; } + e_iter = e_iter->next; } return 0;