From: KaiGai Kohei Date: Tue, 6 Nov 2007 16:17:16 +0000 (+0900) Subject: SELinux: fix bug in new ebitmap code. X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=6d2b685564ba417f4c6d80c3661f0dfee13fff85;p=deliverable%2Flinux.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 c1a6b22d48d9..920b5e36a1af 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;