RE: [PATCH v2] scsi: ufs: core: Ensure clk_gating.lock is used only after initialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> >
> > To fix this issue, ensure that the spinlock is only used after it has
> > been properly initialized before using it in `ufshcd_setup_clocks`.
> >
> > Fixes: 209f4e43b806 ("scsi: ufs: core: Introduce a new clock_gating
> > lock")
> > Reported-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
> > Signed-off-by: Avri Altman <avri.altman@xxxxxxx>
> >
> > ---
> > Changes since v1:
> >  - move the spin_lock_init(&hba->clk_gating.lock) call from
> >    ufshcd_init_clk_gating() just before the ufshcd_hba_init() call in
> >    ufshcd_init() (Bart)
> 
> Thanks for the update!
> 
> On Renesas R-Car S4 Starter Kit:
Thanks.  This is not happening on my RB5.
I need some time to get a Renesas R-Car platform.
Meanwhile, let me revert the offending patch.
Will do that on Sunday after some more testing.

Thanks,
Avri

> 
>     BUG: spinlock bad magic on CPU#6, swapper/0/1
>      lock: 0xffffff84443014e8, .magic: 00000000, .owner: <none>/-1,
> .owner_cpu: 0
>     CPU: 6 UID: 0 PID: 1 Comm: swapper/0 Not tainted
> 6.13.0-rcar3-initrd-08318-g75abbef32a94 #896
>     Hardware name: R-Car S4 Starter Kit board (DT)
>     Call trace:
>      show_stack+0x18/0x24 (C)
>      dump_stack_lvl+0x60/0x80
>      dump_stack+0x18/0x24
>      spin_bug+0x7c/0xa0
>      do_raw_spin_lock+0x34/0xb4
>      _raw_spin_lock_irqsave+0x1c/0x30
>      class_spinlock_irqsave_constructor+0x18/0x30
>      ufshcd_setup_clocks+0x98/0x23c
>      ufshcd_init+0x288/0xd38
>      ufshcd_pltfrm_init+0x618/0x738
>      ufs_renesas_probe+0x18/0x24
>      platform_probe+0x68/0xb8
>      really_probe+0x138/0x268
>      __driver_probe_device+0xf4/0x10c
>      driver_probe_device+0x3c/0xf8
>      __driver_attach+0xf0/0x100
>      bus_for_each_dev+0x84/0xdc
>      driver_attach+0x24/0x30
>      bus_add_driver+0xe8/0x1dc
>      driver_register+0xbc/0xf8
>      __platform_driver_register+0x24/0x30
>      ufs_renesas_platform_init+0x1c/0x28
>      do_one_initcall+0x84/0x1f4
>      kernel_init_freeable+0x238/0x23c
>      kernel_init+0x20/0x120
>      ret_from_fork+0x10/0x20
> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-
> m68k.org
> 
> In personal conversations with technical people, I call myself a hacker. But when
> I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux