kernel_optimize_test/drivers/s390
Julian Wiedmann d251193d17 scsi: zfcp: Clarify access to erp_action in zfcp_fsf_req_complete()
While reviewing commit 936e6b85da ("scsi: zfcp: Fix panic on ERP timeout
for previously dismissed ERP action"), I stumbled over
zfcp_fsf_req_complete() and wondered whether it has similar issues wrt
concurrent modification of req->erp_action by
zfcp_erp_strategy_check_fsfreq().

But a closer look shows that both its two callers [zfcp_fsf_reqid_check(),
zfcp_fsf_req_dismiss_all()] remove the request from the adapter's req_list
under the req_list's lock.  Hence we can trust that if
zfcp_erp_strategy_check_fsfreq() concurrently looks up the corresponding
req_id, it won't find this request and is thus unable to modify it while
it's being processed by zfcp_fsf_req_complete().

Add a code comment that hopefully makes this easier for future readers, and
condense the two accesses to ->erp_action that made me trip over this code
path in the first place.

Link: https://lore.kernel.org/r/c500eac301fcbba5af942bbd200f2d6b14e46994.1599765652.git.bblock@linux.ibm.com
Reviewed-by: Steffen Maier <maier@linux.ibm.com>
Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Benjamin Block <bblock@linux.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-09-15 18:01:58 -04:00
..
block s390/dasd: Use struct_size() helper 2020-07-15 08:47:11 -06:00
char s390/tty3270: remove function callback casts 2020-07-01 20:00:55 +02:00
cio - Add support for function error injection. 2020-08-03 13:58:10 -07:00
crypto s390/pkey: remove redundant variable initialization 2020-08-11 18:16:31 +02:00
net s390/qeth: use all configured RX buffers 2020-07-31 16:44:36 -07:00
scsi scsi: zfcp: Clarify access to erp_action in zfcp_fsf_req_complete() 2020-09-15 18:01:58 -04:00
virtio s390/virtio: remove unused pm callbacks 2020-06-16 13:44:04 +02:00
Makefile s390: remove pointless drivers-y in drivers/s390/Makefile 2019-09-16 13:21:51 +02:00