From e4ded64e88e3b5b0fcf704e10f229504db9f806c Mon Sep 17 00:00:00 2001 From: Shubhi Garg Date: Thu, 28 Nov 2024 16:11:19 +0530 Subject: [PATCH] oot: fix mutex unlocking in vrs rtc Kernel throws a dump trace upon setting wakealarm time on VRS RTC. We are unlocking mutex twice in a single API call. Delete one instance which is not required. [ 590.301592] Call trace: [ 590.304035] __mutex_unlock_slowpath.isra.0+0x1d4/0x2d0 [ 590.309274] mutex_unlock+0x60/0x80 [ 590.312766] 0xffff80007ce0e6ec [ 590.315909] __rtc_set_alarm+0x100/0x200 [ 590.319751] rtc_timer_enqueue+0x168/0x2e8 [ 590.331275] dev_attr_store+0x20/0x601e8 [ 590.335117] sysfs_kf_write+0x4c/0x88 [ 590.338609] kernfs_fop_write_iter+0x144/0x1d8 [ 590.343149] vfs_write+0x254/0x398 [ 590.353626] invoke_syscall+0x50/0x14040 [ 590.357468] el0_svc_common.constprop.0+0x48/0x100 [ 590.362357] do_el0_svc+0x24/0x40 [ 590.365501] el0_svc+0x34/0xc8 [ 590.372835] el0t_64_sync+0x194/0x19830/0x140 [ 590.376679] ---[ end trace 0000000000000000 ]--- Bug 4715238 Change-Id: I7e070772c81474eb22859f2a00934211e6dad834 Signed-off-by: Shubhi Garg Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3258911 GVS: buildbot_gerritrpt Reviewed-by: svcacv Reviewed-by: Bibek Basu Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3502098 --- drivers/rtc/nvvrs-pseq-rtc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/rtc/nvvrs-pseq-rtc.c b/drivers/rtc/nvvrs-pseq-rtc.c index d7beefd5..1e10abe2 100644 --- a/drivers/rtc/nvvrs-pseq-rtc.c +++ b/drivers/rtc/nvvrs-pseq-rtc.c @@ -144,7 +144,6 @@ static int nvvrs_rtc_update_alarm_reg(struct i2c_client *client, } out: - mutex_unlock(&info->lock); return ret; }