Skip to content

Commit 4389891

Browse files
siddhpantkuba-moo
authored andcommitted
netlink: Unset cb_running when terminating dump on release
When we terminated the dump, the callback isn't running, so cb_running should be set to false to be logically consistent. cb_running signifies whether a dump is ongoing. It is set to true in cb->start(), and is checked in netlink_dump() to be true initially. After the dump, it is set to false in the same function. This is just a cleanup, no path should access this field on a closed socket. Signed-off-by: Siddh Raman Pant <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent d5b595d commit 4389891

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/netlink/af_netlink.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,7 @@ static int netlink_release(struct socket *sock)
771771
nlk->cb.done(&nlk->cb);
772772
module_put(nlk->cb.module);
773773
kfree_skb(nlk->cb.skb);
774+
WRITE_ONCE(nlk->cb_running, false);
774775
}
775776

776777
module_put(nlk->module);

0 commit comments

Comments
 (0)