af_netlink.c (c8c76f1550b96e83036f2a0d36814bd4c1b1bd2c) | af_netlink.c (ba5366b87c0dc3b15463495598737e28015559cd) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * NETLINK Kernel-user communication protocol. 4 * 5 * Authors: Alan Cox <alan@lxorguk.ukuu.org.uk> 6 * Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> 7 * Patrick McHardy <kaber@trash.net> 8 * --- 2249 unchanged lines hidden (view full) --- 2258 2259 netlink_skb_set_owner_r(skb, sk); 2260 2261 if (nlk->dump_done_errno > 0) { 2262 struct mutex *extra_mutex = nlk->dump_cb_mutex; 2263 2264 cb->extack = &extack; 2265 | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * NETLINK Kernel-user communication protocol. 4 * 5 * Authors: Alan Cox <alan@lxorguk.ukuu.org.uk> 6 * Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> 7 * Patrick McHardy <kaber@trash.net> 8 * --- 2249 unchanged lines hidden (view full) --- 2258 2259 netlink_skb_set_owner_r(skb, sk); 2260 2261 if (nlk->dump_done_errno > 0) { 2262 struct mutex *extra_mutex = nlk->dump_cb_mutex; 2263 2264 cb->extack = &extack; 2265 |
2266 if (cb->flags & RTNL_FLAG_DUMP_UNLOCKED) 2267 extra_mutex = NULL; |
|
2266 if (extra_mutex) 2267 mutex_lock(extra_mutex); 2268 nlk->dump_done_errno = cb->dump(skb, cb); 2269 if (extra_mutex) 2270 mutex_unlock(extra_mutex); 2271 2272 cb->extack = NULL; 2273 } --- 78 unchanged lines hidden (view full) --- 2352 cb = &nlk->cb; 2353 memset(cb, 0, sizeof(*cb)); 2354 cb->dump = control->dump; 2355 cb->done = control->done; 2356 cb->nlh = nlh; 2357 cb->data = control->data; 2358 cb->module = control->module; 2359 cb->min_dump_alloc = control->min_dump_alloc; | 2268 if (extra_mutex) 2269 mutex_lock(extra_mutex); 2270 nlk->dump_done_errno = cb->dump(skb, cb); 2271 if (extra_mutex) 2272 mutex_unlock(extra_mutex); 2273 2274 cb->extack = NULL; 2275 } --- 78 unchanged lines hidden (view full) --- 2354 cb = &nlk->cb; 2355 memset(cb, 0, sizeof(*cb)); 2356 cb->dump = control->dump; 2357 cb->done = control->done; 2358 cb->nlh = nlh; 2359 cb->data = control->data; 2360 cb->module = control->module; 2361 cb->min_dump_alloc = control->min_dump_alloc; |
2362 cb->flags = control->flags; |
|
2360 cb->skb = skb; 2361 2362 cb->strict_check = nlk_test_bit(STRICT_CHK, NETLINK_CB(skb).sk); 2363 2364 if (control->start) { 2365 cb->extack = control->extack; 2366 ret = control->start(cb); 2367 cb->extack = NULL; --- 589 unchanged lines hidden --- | 2363 cb->skb = skb; 2364 2365 cb->strict_check = nlk_test_bit(STRICT_CHK, NETLINK_CB(skb).sk); 2366 2367 if (control->start) { 2368 cb->extack = control->extack; 2369 ret = control->start(cb); 2370 cb->extack = NULL; --- 589 unchanged lines hidden --- |