e6db818a3f
running kernel with CONFIG_DEBUG_LOCKS_ALLOC enabled will below warning:
BUG: key ffff502e09807098 has not been registered!
DEBUG_LOCKS_WARN_ON(1)
WARNING: CPU: 5 PID: 129 at kernel/locking/lockdep.c:4623
lockdep_init_map_waits+0xe8/0x250
Modules linked in:
CPU: 5 PID: 129 Comm: kworker/5:1 Tainted: G
W 5.10.0-rc1-00277-ged49f224ca3f-dirty #1210
Hardware name: Qualcomm Technologies, Inc. Robotics RB5 (DT)
Workqueue: events deferred_probe_work_func
pstate: 80c00005 (Nzcv daif +PAN +UAO -TCO BTYPE=--)
pc : lockdep_init_map_waits+0xe8/0x250
lr : lockdep_init_map_waits+0xe8/0x250
[ Trimmed ]
Call trace:
lockdep_init_map_waits+0xe8/0x250
__kernfs_create_file+0x78/0x180
sysfs_add_file_mode_ns+0x94/0x1c8
internal_create_group+0x110/0x3e0
sysfs_create_group+0x18/0x28
devm_device_add_group+0x4c/0xb0
add_all_attributes+0x438/0x490
sdw_slave_sysfs_dpn_init+0x128/0x138
sdw_slave_sysfs_init+0x80/0xa0
sdw_drv_probe+0x94/0x170
really_probe+0x118/0x3e0
driver_probe_device+0x5c/0xc0
[ Trimmed ]
CPU: 5 PID: 129 Comm: kworker/5:1 Tainted: G
W 5.10.0-rc1-00277-ged49f224ca3f-dirty #1210
Hardware name: Qualcomm Technologies, Inc. Robotics RB5 (DT)
Workqueue: events deferred_probe_work_func
Call trace:
dump_backtrace+0x0/0x1c0
show_stack+0x18/0x68
dump_stack+0xd8/0x134
__warn+0xa0/0x158
report_bug+0xc8/0x178
bug_handler+0x20/0x78
brk_handler+0x70/0xc8
[ Trimmed ]
Fix this by initializing dynamically allocated sysfs attribute to keep lockdep happy!
Fixes:
|
||
---|---|---|
Documentation | ||
LICENSES | ||
arch | ||
block | ||
certs | ||
crypto | ||
drivers | ||
fs | ||
include | ||
init | ||
ipc | ||
kernel | ||
lib | ||
mm | ||
net | ||
samples | ||
scripts | ||
security | ||
sound | ||
tools | ||
usr | ||
virt | ||
.clang-format | ||
.cocciconfig | ||
.get_maintainer.ignore | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
COPYING | ||
CREDITS | ||
Kbuild | ||
Kconfig | ||
MAINTAINERS | ||
Makefile | ||
README |
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.