linux/net
Sebastian Andrzej Siewior 6967cfe198 Bluetooth: Acquire sk_lock.slock without disabling interrupts
[ Upstream commit e6da0edc24 ]

There was a lockdep which led to commit
   fad003b6c8 ("Bluetooth: Fix inconsistent lock state with RFCOMM")

Lockdep noticed that `sk->sk_lock.slock' was acquired without disabling
the softirq while the lock was also used in softirq context.
Unfortunately the solution back then was to disable interrupts before
acquiring the lock which however made lockdep happy.
It would have been enough to simply disable the softirq. Disabling
interrupts before acquiring a spinlock_t is not allowed on PREEMPT_RT
because these locks are converted to 'sleeping' spinlocks.

Use spin_lock_bh() in order to acquire the `sk_lock.slock'.

Cc: stable-rt@vger.kernel.org
Reported-by: Luis Claudio R. Goncalves <lclaudio@uudg.org>
Reported-by: kbuild test robot <lkp@intel.com> [missing unlock]
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2023-03-25 04:21:36 +03:00
..
6lowpan
9p
802
8021q
appletalk
atm
ax25 ax25: Fix UAF bugs in ax25 timers 2022-04-20 09:19:40 +02:00
batman-adv ipv6: make mc_forwarding atomic 2022-04-15 14:18:32 +02:00
bluetooth Bluetooth: Acquire sk_lock.slock without disabling interrupts 2023-03-25 04:21:36 +03:00
bpf bpf/tests: Use migrate disable instead of preempt disable 2023-03-25 04:21:31 +03:00
bpfilter
bridge
caif
can
ceph
core bpf: Use bpf_prog_run_pin_on_cpu() at simple call sites. 2023-03-25 04:21:31 +03:00
dcb
dccp tcp: fix race condition when creating child sockets from syncookies 2022-04-27 13:50:45 +02:00
decnet
dns_resolver
dsa
ethernet
hsr
ieee802154
ife
ipv4 tcp: make sure treq->af_specific is initialized 2022-05-12 12:23:50 +02:00
ipv6 tcp: make sure treq->af_specific is initialized 2022-05-12 12:23:50 +02:00
iucv
kcm bpf: Use bpf_prog_run_pin_on_cpu() at simple call sites. 2023-03-25 04:21:31 +03:00
key
l2tp
l3mdev l3mdev: l3mdev_master_upper_ifindex_by_index_rcu should be using netdev_master_upper_dev_get_rcu 2022-04-27 13:50:47 +02:00
lapb
llc
mac80211
mac802154
mpls
ncsi
netfilter netfilter: nft_socket: only do sk lookups when indev is available 2022-05-09 09:03:27 +02:00
netlabel netlabel: fix out-of-bounds memory accesses 2022-04-15 14:18:35 +02:00
netlink netlink: reset network and mac headers in netlink_dump() 2022-04-27 13:50:47 +02:00
netrom
nfc NFC: netlink: fix sleep in atomic bug when firmware download timeout 2022-05-12 12:23:44 +02:00
nsh
openvswitch openvswitch: fix OOB access in reserve_sfa_size() 2022-04-27 13:50:49 +02:00
packet net: Use cpu_chill() instead of cpu_relax() 2023-03-25 04:21:28 +03:00
phonet
psample
qrtr
rds
rfkill
rose
rxrpc rxrpc: Restore removed timer deletion 2022-04-27 13:50:46 +02:00
sched net/Qdisc: use a seqlock instead seqcount 2023-03-25 04:21:20 +03:00
sctp sctp: check asoc strreset_chunk in sctp_generate_reconf_event 2022-05-09 09:03:24 +02:00
smc net/smc: sync err code when tcp connection was refused 2022-05-09 09:03:25 +02:00
strparser
sunrpc sunrpc: Make svc_xprt_do_enqueue() use get_cpu_light() 2023-03-25 04:21:28 +03:00
switchdev
tipc
tls tls: Skip tls_append_frag on zero copy size 2022-05-09 09:03:26 +02:00
unix
vmw_vsock
wimax
wireless cfg80211: hold bss_lock while updating nontrans_list 2022-04-20 09:19:35 +02:00
x25
xdp
xfrm
compat.c
Kconfig net/core: disable NET_RX_BUSY_POLL on RT 2023-03-25 04:21:21 +03:00
Makefile
socket.c
sysctl_net.c