Message ID | 20231120073522.34180-1-dlemoal@kernel.org |
---|---|
Headers | show |
Series | Fix runtime suspended device resume | expand |
On 11/19/23 23:35, Damien Le Moal wrote: > diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h > index 10480eb582b2..1fb460dfca0c 100644 > --- a/include/scsi/scsi_device.h > +++ b/include/scsi/scsi_device.h > @@ -167,19 +167,19 @@ struct scsi_device { > * power state for system suspend/resume (suspend to RAM and > * hibernation) operations. > */ > - bool manage_system_start_stop; > + unsigned manage_system_start_stop:1; > > /* > * If true, let the high-level device driver (sd) manage the device > * power state for runtime device suspand and resume operations. > */ > - bool manage_runtime_start_stop; > + unsigned manage_runtime_start_stop:1; > > /* > * If true, let the high-level device driver (sd) manage the device > * power state for system shutdown (power off) operations. > */ > - bool manage_shutdown; > + unsigned manage_shutdown:1; > > unsigned removable:1; > unsigned changed:1; /* Data invalid due to media change */ Is there any code that modifies the above flags from different threads simultaneously? I'm wondering whether this patch introduces one or more race conditions related to changing these flags. Thanks, Bart.