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


Groups > linux.kernel > #1461080 > unrolled thread

A potential race in drivers/scsi/megaraid.ko

Started byPavel Andrianov <andrianov@ispras.ru>
First post2016-08-12 13:00 +0200
Last post2016-08-12 13:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  A potential race in drivers/scsi/megaraid.ko Pavel Andrianov <andrianov@ispras.ru> - 2016-08-12 13:00 +0200

#1461080 — A potential race in drivers/scsi/megaraid.ko

FromPavel Andrianov <andrianov@ispras.ru>
Date2016-08-12 13:00 +0200
SubjectA potential race in drivers/scsi/megaraid.ko
Message-ID<s5ilY-yH-13@gated-at.bofh.it>
Hi!

There is a potential data race in drivers/scsi/megaraid.ko
Regards such case:

Thread 1					Thread 2
...						...
-> megaraid_probe_one				
    -> request_irq    - now an interrupt may arise
    -> mega_query_adapter
      -> issue_scb_block
			interrupt comes 	
						-> megaraid_isr_iomapped
						  -> mega_runpendq
						    -> __mega_runpendq
						      -> issue_skb

In this case the structure 'mbox' is modified from two threads 
simultaneously. Or, more correct, the first modification is interrupted 
by the second one. Likely, the first thread should acquire the same 
spinlock adapter->lock as the second one.

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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web