Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1460665

Re: Potential race condition in drivers/ata/sata_mv.ko

From Tejun Heo <tj@kernel.org>
Newsgroups linux.kernel
Subject Re: Potential race condition in drivers/ata/sata_mv.ko
Date 2016-08-11 18:30 +0200
Message-ID <s511N-6al-73@gated-at.bofh.it> (permalink)
References <s2MJA-7zE-13@gated-at.bofh.it> <s4sQp-8kn-1@gated-at.bofh.it> <s4YZX-4Uf-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: Potential race condition in drivers/ata/sata_mv.ko Pavel Andrianov <andrianov@ispras.ru> - 2016-08-11 16:20 +0200
  Re: Potential race condition in drivers/ata/sata_mv.ko Tejun Heo <tj@kernel.org> - 2016-08-11 18:30 +0200

csiph-web