Bluetooth: Acquire sk_lock.slock without disabling interrupts
Sebastian Andrzej Siewior authored
There was a lockdep which led to commit
   fad003b6

 ("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'.
Reported-by: default avatarLuis Claudio R. Goncalves <lclaudio@uudg.org>
Reported-by: kbuild test robot <lkp@intel.com> [missing unlock]
Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
e6da0edc
Name Last commit Last update
Documentation netns: enable to inherit devconf from current netns
LICENSES LICENSES: Rename other to deprecated
arch Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
block bdi: use bdi_dev_name() to get device name
certs .gitignore: add SPDX License Identifier
crypto gcc-10: avoid shadowing standard library 'free()' in crypto
drivers Bluetooth: btmtkuart: Improve exception handling in btmtuart_probe()
fs Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
include Bluetooth: Consolidate encryption handling in hci_encrypt_cfm
init Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
ipc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
kernel Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
lib Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
mm Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
net Bluetooth: Acquire sk_lock.slock without disabling interrupts
samples Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
scripts Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
security bpf, capability: Introduce CAP_BPF
sound Merge tag 'sound-5.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
tools selftests: Drop 'pref medium' in route checks
usr kbuild: fix comment about missing include guard detection
virt KVM: arm64: Fix 32bit PC wrap-around
.clang-format clang-format: Update with the latest for_each macro list
.cocciconfig scripts: add Linux .cocciconfig for coccinelle
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.