[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160811162650.GB2695@mtj.duckdns.org>
Date: Thu, 11 Aug 2016 12:26:50 -0400
From: Tejun Heo <tj@...nel.org>
To: Pavel Andrianov <andrianov@...ras.ru>
Cc: linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org,
ldv-project@...uxtesting.org,
Vaishali Thakkar <vaishali.thakkar@...cle.com>
Subject: Re: Potential race condition in drivers/ata/sata_mv.ko
On Thu, Aug 11, 2016 at 05:18:31PM +0300, Pavel Andrianov wrote:
> Hi!
>
> I have found such example:
>
> ... ->
>
> ata_exec_internal_sg ->
>
> ata_qc_issue ->
>
> mv_qc_issue ->
>
> mv_clear_and_enable_port_irqs ->
>
> mv_enable_port_irqs ->
>
> mv_set_main_irq_mask
>
>
> ata_exec_internal_sg acquires spin_lock(ap->lock) and call of the last
> function mv_set_main_irq_mask is with this lock. mv_interrupt acquires
> spin_lock(host->lock) before call of the same function. I am not sure is it
> correct to add one more spin_lock or move a call of request_irq in
> ata_host_activate, thus I can not easily fix the issue.
ap->lock and host->lock point to the the same lock. The only reason
ap->lock is a pointer is for SAS.
Thanks.
--
tejun
Powered by blists - more mailing lists