diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-02-10 17:29:56 -0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-02-10 17:29:56 -0800 |
commit | 5b91c5cc0e7be4e41567cb2a6e21a8bb682c7cc5 (patch) | |
tree | ed284edec0db783dfa80366ae8df078b02f35be9 /net/ax25 | |
parent | 4f5e483b8c7a644733db941a1ae00173baa7b463 (diff) | |
parent | f1baf68e1383f6ed93eb9cff2866d46562607a43 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
No conflicts.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ax25')
-rw-r--r-- | net/ax25/af_ax25.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index 3e49d28824ed..d53cbb4e2503 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c @@ -91,9 +91,10 @@ again: spin_unlock_bh(&ax25_list_lock); lock_sock(sk); s->ax25_dev = NULL; + dev_put_track(ax25_dev->dev, &ax25_dev->dev_tracker); ax25_dev_put(ax25_dev); - release_sock(sk); ax25_disconnect(s, ENETUNREACH); + release_sock(sk); spin_lock_bh(&ax25_list_lock); sock_put(sk); /* The entry could have been deleted from the @@ -1116,8 +1117,10 @@ static int ax25_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) } } - if (ax25_dev != NULL) + if (ax25_dev) { ax25_fillin_cb(ax25, ax25_dev); + dev_hold_track(ax25_dev->dev, &ax25_dev->dev_tracker, GFP_ATOMIC); + } done: ax25_cb_add(ax25); |