Skip to contentSkip to conversation

netlabel: correctly list all the static label mappings

PATCH In review Paul Moore 2 participants 3 messages Mar 6, 2013 – Mar 7, 2013

Subsystems (3)
lore
Share & tools
lore

Paul Moore

author
#0 lore raw

PATCH 1/1 netlabel: correctly list all the static label mappings

When we have a large number of static label mappings that spill across the netlink message boundary we fail to properly save our state in the netlink_callback struct which causes us to repeat the same listings. This patch fixes this problem by saving the state correctly between calls to the NetLabel static label netlink "dumpit" routines.

---
 net/netlabel/netlabel_unlabeled.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
net/netlabel/netlabel_unlabeled.c +6 -6
index 847d495..85742b7 100644
@@ -1250,10 +1250,10 @@ static int netlbl_unlabel_staticlist(struct sk_buff *skb,
 
 unlabel_staticlist_return:
 	rcu_read_unlock();
-	cb->args[0] = skip_bkt;
-	cb->args[1] = skip_chain;
-	cb->args[2] = skip_addr4;
-	cb->args[3] = skip_addr6;
+	cb->args[0] = iter_bkt;
+	cb->args[1] = iter_chain;
+	cb->args[2] = iter_addr4;
+	cb->args[3] = iter_addr6;
 	return skb->len;
 }
 
@@ -1320,8 +1320,8 @@ static int netlbl_unlabel_staticlistdef(struct sk_buff *skb,
 
 unlabel_staticlistdef_return:
 	rcu_read_unlock();
-	cb->args[0] = skip_addr4;
-	cb->args[1] = skip_addr6;
+	cb->args[0] = iter_addr4;
+	cb->args[1] = iter_addr6;
 	return skb->len;
 }
 
maintainer
#1 lore raw

From: Paul Moore <[email protected]>
Date: Wed, 06 Mar 2013 16:45:24 -0500

Quoted 7 lines

When we have a large number of static label mappings that spill across the netlink message boundary we fail to properly save our state in the netlink_callback struct which causes us to repeat the same listings. This patch fixes this problem by saving the state correctly between calls to the NetLabel static label netlink "dumpit" routines.

Applied and queued up for -stable, thanks.

Quoted 1 line

Please just ask me to queue up networking fixes for stable, rather than CC:'ing it to stable.

Thanks.

author
#2 lore raw
Quoted 9 lines · David Miller

From: Paul Moore <[email protected]>
Date: Wed, 06 Mar 2013 16:45:24 -0500

Quoted 6 lines

When we have a large number of static label mappings that spill across the netlink message boundary we fail to properly save our state in the netlink_callback struct which causes us to repeat the same listings. This patch fixes this problem by saving the state correctly between calls to the NetLabel static label netlink "dumpit" routines.

Quoted 8 lines
Quoted 1 line

Applied and queued up for -stable, thanks.

Quoted 1 line

Please just ask me to queue up networking fixes for stable, rather than CC:'ing it to stable.

No problem, I'll do that in the future.

Thanks.

Signature · 2 lines
paul moore
security and virtualization @ redhat