From 6d2b685564ba417f4c6d80c3661f0dfee13fff85 Mon Sep 17 00:00:00 2001 From: KaiGai Kohei Date: Wed, 7 Nov 2007 01:17:16 +0900 Subject: [PATCH] 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 --- security/selinux/ss/ebitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.30.2