lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <14930227-aca0-89a0-25ea-727d263f8bf8@acm.org>
Date:   Fri, 15 Oct 2021 14:14:35 -0700
From:   Bart Van Assche <bvanassche@....org>
To:     miles.chen@...iatek.com
Cc:     jejb@...ux.ibm.com, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org, linux-mediatek@...ts.infradead.org,
        linux-scsi@...r.kernel.org, martin.petersen@...cle.com,
        martink@...teo.de, matthias.bgg@...il.com,
        stanley.chu@...iatek.com, wsd_upstream@...iatek.com
Subject: Re: [PATCH] scsi: sd: fix crashes in sd_resume_runtime

On 10/15/21 13:11, miles.chen@...iatek.com wrote:
> I hit this in v5.15-rc1 merge, I can still reproduce this with v5.15-rc5.
> I found two ways to avoid the crash:
> 1) revert commit ed4246d37f3b ("scsi: sd: REQUEST SENSE for
> BLIST_IGN_MEDIA_CHANGE devices in runtime_resume()") works for me.
> 2) adding the NULL point check in this patch.
> 
>>>From the backtrace, dev_set_drvdata() is called after sd_resume_runtime()
> is called.
> 
> sd_probe()
> {
>   scsi_autopm_get_device()
>     pm_runtime_get_sync()
>       __pm_runtime_resume()
>         rpm_resume()
>          ...
> 	 sd_resume_runtime() // crash here
> 
>    dev_set_drvdata(dev, sdkp); // sdkp is set later
> }
> 
> [    4.861395][  T151]  sd_resume_runtime+0x20/0x14c
> [    4.862025][  T151]  scsi_runtime_resume+0x84/0xe4
> [    4.862667][  T151]  __rpm_callback+0x1f4/0x8cc
> [    4.863275][  T151]  rpm_resume+0x7e8/0xaa4
> [    4.863836][  T151]  __pm_runtime_resume+0xa0/0x110
> [    4.864489][  T151]  sd_probe+0x30/0x428
> [    4.865016][  T151]  really_probe+0x14c/0x500

Thanks for the clarification. Given this clarification I'm fine with 
your patch.

Bart.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ