All of lore.kernel.org
 help / color / mirror / Atom feed
* A potential data race in drivers/scsi/mvumi.ko
@ 2016-08-12 12:39 Pavel Andrianov
  0 siblings, 0 replies; only message in thread
From: Pavel Andrianov @ 2016-08-12 12:39 UTC (permalink / raw)
  To: James E.J. Bottomley
  Cc: Martin K. Petersen, linux-scsi, linux-kernel, Vaishali Thakkar,
	ldv-project

Hi!

There is a potential data race in drivers/scsi/mvumi.ko.
Regard such case:

Thread 1					Thread 2
...
-> mvumi_reset_host_9500 -
    is called without any locking
   -> mvumi_wait_for_outstanding
     ->mvumi_start
       ->mvumi_check_handshake
         -> mvumi_handshake_event
           -> mvumi_handshake
             ->mvumi_hs_build_page

			   interrupt comes
					      -> mvumi_isr_handler
						-> mvumi_handshake
						  -> mvumi_hs_build_page

In this case the same data mhba->handshake_page is modified from two 
threads. Likely the first thread should acquire the same spinlock 
mhba->shost->host_lock as the second thread.

-- 
Pavel Andrianov
Linux Verification Center, ISPRAS
web: http://linuxtesting.org
e-mail: andrianov@ispras.ru

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-08-12 12:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-12 12:39 A potential data race in drivers/scsi/mvumi.ko Pavel Andrianov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.