Skip to content

bcm2835-v4l2-isp: Add missing lock initialization - #4800

Merged
pelwell merged 1 commit into
raspberrypi:rpi-5.10.yfrom
treasure4paddy:rpi-5.10.y
Jan 6, 2022
Merged

pelwell merged 1 commit into
raspberrypi:rpi-5.10.yfrom
treasure4paddy:rpi-5.10.y

Conversation

@treasure4paddy

Copy link
Copy Markdown
Contributor

ISP device allocation is dynamic hence the locks too.
struct mutex queue_lock is not initialized which result in bug.

Fixing same by initializing it.

[ 29.847138] INFO: trying to register non-static key.
[ 29.847156] The code is fine but needs lockdep annotation, or maybe
[ 29.847159] you didn't initialize this object before use?
[ 29.847161] turning off the locking correctness validator.
[ 29.847167] CPU: 1 PID: 343 Comm: v4l_id Tainted: G C 5.15.11-rt24-v8+ #8
[ 29.847187] Hardware name: Raspberry Pi 4 Model B Rev 1.4 (DT)
[ 29.847194] Call trace:
[ 29.847197] dump_backtrace+0x0/0x1b8
[ 29.847227] show_stack+0x20/0x30
[ 29.847240] dump_stack_lvl+0x8c/0xb8
[ 29.847254] dump_stack+0x18/0x34
[ 29.847263] register_lock_class+0x494/0x4a0
[ 29.847278] __lock_acquire+0x80/0x1680
[ 29.847289] lock_acquire+0x214/0x3a0
[ 29.847300] mutex_lock_nested+0x70/0xc8
[ 29.847312] _vb2_fop_release+0x3c/0xa8 [videobuf2_v4l2]
[ 29.847346] vb2_fop_release+0x34/0x60 [videobuf2_v4l2]
[ 29.847367] v4l2_release+0xc8/0x108 [videodev]
[ 29.847453] __fput+0x8c/0x258
[ 29.847476] ____fput+0x18/0x28
[ 29.847487] task_work_run+0x98/0x180
[ 29.847502] do_notify_resume+0x228/0x3f8
[ 29.847515] el0_svc+0xec/0xf0
[ 29.847523] el0t_64_sync_handler+0x90/0xb8
[ 29.847531] el0t_64_sync+0x180/0x184

Signed-off-by: Padmanabha Srinivasaiah treasure4paddy@gmail.com

ISP device allocation is dynamic hence the locks too.
struct mutex queue_lock is not initialized which result in bug.

Fixing same by initializing it.

[   29.847138] INFO: trying to register non-static key.
[   29.847156] The code is fine but needs lockdep annotation, or maybe
[   29.847159] you didn't initialize this object before use?
[   29.847161] turning off the locking correctness validator.
[   29.847167] CPU: 1 PID: 343 Comm: v4l_id Tainted: G         C        5.15.11-rt24-v8+ #8
[   29.847187] Hardware name: Raspberry Pi 4 Model B Rev 1.4 (DT)
[   29.847194] Call trace:
[   29.847197]  dump_backtrace+0x0/0x1b8
[   29.847227]  show_stack+0x20/0x30
[   29.847240]  dump_stack_lvl+0x8c/0xb8
[   29.847254]  dump_stack+0x18/0x34
[   29.847263]  register_lock_class+0x494/0x4a0
[   29.847278]  __lock_acquire+0x80/0x1680
[   29.847289]  lock_acquire+0x214/0x3a0
[   29.847300]  mutex_lock_nested+0x70/0xc8
[   29.847312]  _vb2_fop_release+0x3c/0xa8 [videobuf2_v4l2]
[   29.847346]  vb2_fop_release+0x34/0x60 [videobuf2_v4l2]
[   29.847367]  v4l2_release+0xc8/0x108 [videodev]
[   29.847453]  __fput+0x8c/0x258
[   29.847476]  ____fput+0x18/0x28
[   29.847487]  task_work_run+0x98/0x180
[   29.847502]  do_notify_resume+0x228/0x3f8
[   29.847515]  el0_svc+0xec/0xf0
[   29.847523]  el0t_64_sync_handler+0x90/0xb8
[   29.847531]  el0t_64_sync+0x180/0x184

Signed-off-by: Padmanabha Srinivasaiah <treasure4paddy@gmail.com>
@pelwell
pelwell merged commit e9bc4a4 into raspberrypi:rpi-5.10.y Jan 6, 2022
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Jan 13, 2022
kernel: arm: Fix custom rpi __memset32 and __memset64
See: raspberrypi/linux#4820

kernel: drm/vc4: Disable Gamma control on HVS5 due to issues writing the table
See: raspberrypi/linux#4825

kernel: drm/vc4: hdmi: Fix clock value used for validating hdmi modes
See: raspberrypi/linux#4826

kernel: overlays: Add vl805 overlay
See: https://forums.raspberrypi.com/viewtopic.php?t=326088

kernel: configs: add CONFIG_LEDS_TRIGGER_PATTERN=m
See: raspberrypi/linux#4789

kernel: Add overlay for Azoteq IQS550
See: raspberrypi/linux#4813

kernel: dtoverlays: Add backlight-gpio parameter to vc4-kms-dpi-generic
See: raspberrypi/linux#4815

kernel: bcm2835-v4l2-isp: Add missing lock initialization
See: raspberrypi/linux#4800

kernel: media: i2c: ov9281: Increase diff between VTS and max exposure
See: raspberrypi/linux#4807
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Jan 13, 2022
kernel: arm: Fix custom rpi __memset32 and __memset64
See: raspberrypi/linux#4820

kernel: drm/vc4: Disable Gamma control on HVS5 due to issues writing the table
See: raspberrypi/linux#4825

kernel: drm/vc4: hdmi: Fix clock value used for validating hdmi modes
See: raspberrypi/linux#4826

kernel: overlays: Add vl805 overlay
See: https://forums.raspberrypi.com/viewtopic.php?t=326088

kernel: configs: add CONFIG_LEDS_TRIGGER_PATTERN=m
See: raspberrypi/linux#4789

kernel: Add overlay for Azoteq IQS550
See: raspberrypi/linux#4813

kernel: dtoverlays: Add backlight-gpio parameter to vc4-kms-dpi-generic
See: raspberrypi/linux#4815

kernel: bcm2835-v4l2-isp: Add missing lock initialization
See: raspberrypi/linux#4800

kernel: media: i2c: ov9281: Increase diff between VTS and max exposure
See: raspberrypi/linux#4807
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants