Re: [PATCH v2 1/1] scsi: ufs: core: add device level exception support

From: Bart Van Assche
Date: Tue Mar 18 2025 - 17:22:06 EST


On 3/14/25 3:55 PM, Bao D. Nguyen wrote:
+ if (status & hba->ee_drv_mask & MASK_EE_DEV_LVL_EXCEPTION) {
+ hba->dev_lvl_exception_count++;
+ sysfs_notify(&hba->dev->kobj, NULL, "device_lvl_exception_count");
+ }
This increment can race with the code in device_lvl_exception_count_store() for clearing
hba->dev_lvl_exception_count. Shouldn't the clearing code and the
code for incrementing hba->dev_lvl_exception_count be serialized in
some way?

Thanks,

Bart.