Re: [PATCH] qla2xxx: Fix dpc_thread race on the module unload

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gal Rosen wrote:
Andrew,

Add checking of the flag online still does not answer the race that Vlad
stated before,

Yes, that's true.

And, since ha->flags.online set to 0 not only on shutdown, I'm afraid you could introduce a new set of subtle bugs, if not for the moment, but in the future, because with your patch it gets impossible to wake up the DPC thread if HA is offline.

Vlad

unless you thought about another way without lock to
protect this thread.

Nope, taking only one that hunk from this patch isn't sufficient.
Around dpc_thread there is pretty simple and classical race. You can't do

if (x != NULL)
y = *x;

without any protection, if x can be set to NULL by another thread. It can happen exactly between "if" and "*x" and hence lead to a crash,
correct?

Gal.


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux