From: chas williams - CONTRACTOR Date: Tue, 12 Aug 2014 13:00:36 +0000 (-0400) Subject: lec: Fix bug introduced by b67bfe0d42cac56c512dd5da4b1b347a23f4b70a X-Git-Tag: v3.17-rc1~16^2~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8356f9d564ed3da4f98e8c44cbd9f397ff9c49a5;p=platform%2Fkernel%2Flinux-stable.git lec: Fix bug introduced by b67bfe0d42cac56c512dd5da4b1b347a23f4b70a b67bfe0d42cac56c512dd5da4b1b347a23f4b70a (hlist: drop the node parameter from iterators) dropped the node parameter from iterators which lec_tbl_walk() was using to iterate the list. Signed-off-by: Chas Williams Signed-off-by: David S. Miller --- diff --git a/net/atm/lec.c b/net/atm/lec.c index 4c5b8ba..e4853b5 100644 --- a/net/atm/lec.c +++ b/net/atm/lec.c @@ -833,7 +833,6 @@ static void *lec_tbl_walk(struct lec_state *state, struct hlist_head *tbl, loff_t *l) { struct hlist_node *e = state->node; - struct lec_arp_table *tmp; if (!e) e = tbl->first; @@ -842,9 +841,7 @@ static void *lec_tbl_walk(struct lec_state *state, struct hlist_head *tbl, --*l; } - tmp = container_of(e, struct lec_arp_table, next); - - hlist_for_each_entry_from(tmp, next) { + for (; e; e = e->next) { if (--*l < 0) break; }