[lkml]   [2016]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectA potential race in drivers/scsi/megaraid.ko

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

 \ /
  Last update: 2016-09-17 09:56    [W:0.053 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site