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

2016-08-11 Thread Tejun Heo
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 -> > >

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

2016-08-11 Thread Tejun Heo
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 -> > >

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

2016-08-11 Thread Pavel Andrianov
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

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

2016-08-11 Thread Pavel Andrianov
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

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

2016-08-09 Thread Tejun Heo
Hello, On Fri, Aug 05, 2016 at 03:43:30PM +0300, Pavel Andrianov wrote: > In drivers/ata/sata_mv.ko function mv_set_main_irq_mask is called several > times. Twice with a spinlock, twice from init function and once without any > protection. The call without protection rises to several handlers

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

2016-08-09 Thread Tejun Heo
Hello, On Fri, Aug 05, 2016 at 03:43:30PM +0300, Pavel Andrianov wrote: > In drivers/ata/sata_mv.ko function mv_set_main_irq_mask is called several > times. Twice with a spinlock, twice from init function and once without any > protection. The call without protection rises to several handlers

Potential race condition in drivers/ata/sata_mv.ko

2016-08-05 Thread Pavel Andrianov
Hi! In drivers/ata/sata_mv.ko function mv_set_main_irq_mask is called several times. Twice with a spinlock, twice from init function and once without any protection. The call without protection rises to several handlers from ata_port_operations. The structure with the ata_port_operations is

Potential race condition in drivers/ata/sata_mv.ko

2016-08-05 Thread Pavel Andrianov
Hi! In drivers/ata/sata_mv.ko function mv_set_main_irq_mask is called several times. Twice with a spinlock, twice from init function and once without any protection. The call without protection rises to several handlers from ata_port_operations. The structure with the ata_port_operations is