diff options
-rw-r--r-- | net/batman-adv/bridge_loop_avoidance.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c index fad47853ad3c..20b548ea5a0a 100644 --- a/net/batman-adv/bridge_loop_avoidance.c +++ b/net/batman-adv/bridge_loop_avoidance.c | |||
@@ -2161,22 +2161,25 @@ batadv_bla_claim_dump_bucket(struct sk_buff *msg, u32 portid, u32 seq, | |||
2161 | { | 2161 | { |
2162 | struct batadv_bla_claim *claim; | 2162 | struct batadv_bla_claim *claim; |
2163 | int idx = 0; | 2163 | int idx = 0; |
2164 | int ret = 0; | ||
2164 | 2165 | ||
2165 | rcu_read_lock(); | 2166 | rcu_read_lock(); |
2166 | hlist_for_each_entry_rcu(claim, head, hash_entry) { | 2167 | hlist_for_each_entry_rcu(claim, head, hash_entry) { |
2167 | if (idx++ < *idx_skip) | 2168 | if (idx++ < *idx_skip) |
2168 | continue; | 2169 | continue; |
2169 | if (batadv_bla_claim_dump_entry(msg, portid, seq, | 2170 | |
2170 | primary_if, claim)) { | 2171 | ret = batadv_bla_claim_dump_entry(msg, portid, seq, |
2172 | primary_if, claim); | ||
2173 | if (ret) { | ||
2171 | *idx_skip = idx - 1; | 2174 | *idx_skip = idx - 1; |
2172 | goto unlock; | 2175 | goto unlock; |
2173 | } | 2176 | } |
2174 | } | 2177 | } |
2175 | 2178 | ||
2176 | *idx_skip = idx; | 2179 | *idx_skip = 0; |
2177 | unlock: | 2180 | unlock: |
2178 | rcu_read_unlock(); | 2181 | rcu_read_unlock(); |
2179 | return 0; | 2182 | return ret; |
2180 | } | 2183 | } |
2181 | 2184 | ||
2182 | /** | 2185 | /** |