summaryrefslogtreecommitdiff
path: root/net/can/raw.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2023-08-24 09:27:21 +0200
committerTakashi Iwai <tiwai@suse.de>2023-08-24 09:27:21 +0200
commita057efde80453c68c60e156803578a654b52c39f (patch)
tree51c312e95de536b6a29d18a12cfdba72029e09ad /net/can/raw.c
parent17a1eab7b70d85fc5711f37bb6e530b771736bb7 (diff)
parenta4a6eed851bb661477654d772807d0e5aee5629c (diff)
Merge branch 'for-linus' into for-next
Back-merge the 6.5-devel branch for the clean patch application for 6.6 and resolving merge conflicts. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'net/can/raw.c')
-rw-r--r--net/can/raw.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/can/raw.c b/net/can/raw.c
index 2302e48829677..ba6b52b1d7767 100644
--- a/net/can/raw.c
+++ b/net/can/raw.c
@@ -386,9 +386,9 @@ static int raw_release(struct socket *sock)
list_del(&ro->notifier);
spin_unlock(&raw_notifier_lock);
+ rtnl_lock();
lock_sock(sk);
- rtnl_lock();
/* remove current filters & unregister */
if (ro->bound) {
if (ro->dev)
@@ -405,12 +405,13 @@ static int raw_release(struct socket *sock)
ro->dev = NULL;
ro->count = 0;
free_percpu(ro->uniq);
- rtnl_unlock();
sock_orphan(sk);
sock->sk = NULL;
release_sock(sk);
+ rtnl_unlock();
+
sock_put(sk);
return 0;