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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3c289f786dd09d84bc1a8b0b3d855784@codeaurora.org>
Date:   Mon, 16 Dec 2019 13:46:00 +0800
From:   cang@...eaurora.org
To:     Bart Van Assche <bvanassche@....org>
Cc:     asutoshd@...eaurora.org, nguyenb@...eaurora.org,
        rnayak@...eaurora.org, linux-scsi@...r.kernel.org,
        kernel-team@...roid.com, saravanak@...gle.com, salyzyn@...gle.com,
        Alim Akhtar <alim.akhtar@...sung.com>,
        Avri Altman <avri.altman@....com>,
        Pedro Sousa <pedrom.sousa@...opsys.com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        Stanley Chu <stanley.chu@...iatek.com>,
        Bean Huo <beanhuo@...ron.com>,
        Venkat Gopalakrishnan <venkatg@...eaurora.org>,
        Tomas Winkler <tomas.winkler@...el.com>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] scsi: ufs: Put SCSI host after remove it

On 2019-12-16 11:12, cang@...eaurora.org wrote:
> On 2019-12-16 10:39, Bart Van Assche wrote:
>> On 2019-12-15 17:34, cang@...eaurora.org wrote:
>>> This is applied to 5.5/scsi-queue. The two changes I patsed from you 
>>> are
>>> not merged yet, I am still doing code review to them, so there is no
>>> blk_cleanup_queue() calls in my code base. I am just saying you may 
>>> move
>>> your blk_cleanup_queue() calls below cancel_work_sync(&hba->eh_work) 
>>> if
>>> my change applies. How do you think?
>>> 
>>> scsi_host_put() was there before but explicitly removed by
>>> afa3dfd42d205b106787476647735aa1de1a5d02. I agree with you, without 
>>> this
>>> change, there is memory leak.
>> 
>> Hi Can,
>> 
>> Since your patch restores a call that was removed earlier, please
>> consider adding a Fixes: tag to your patch.
>> 
>> Please also have a look at
>> https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git/log/?h=5.6/scsi-queue.
>> As one can see my patches that introduce blk_cleanup_queue() and
>> blk_mq_free_tag_set() calls have already been queued on Martin's
>> 5.6/scsi-queue branch.
>> 
>> Bart.
> 
> Hi Bart,
> 
> Sure, I will add the Fixes tag and rebase my changes. How about the 
> logic
> part of this change? Does it look good to you?
> 
> Sorry I was not aware of that your changes have been applied to 
> 5.6/scsi-queue.
> I am still trying to get it tested on my setups...
> Anyways, aside of hba->cmd_queue, tearing down hba->tmf_queue before
> scsi_remove_host() may be problem too. Requests can still be
> sent before and during scsi_remove_host(). If a request timed out,
> task abort will be invoked to abort the request, during which
> hba->tmf_queue is expected to be present. Please correct me if I am 
> wrong.
> 
> Thanks,
> 
> Can Guo.

Hi Bart

Just found that I should also remove the ufshcd_dealloc_host() called
in ufshcd_pci_remove() to make sure the deallocation is only handled by
ufshcd_remove().

Thanks,

Can Guo.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ