linux-stable/drivers/s390
Benjamin Block 106d45f350 scsi: zfcp: fix request object use-after-free in send path causing wrong traces
When tracing instances where we open and close WKA ports, we also pass the
request-ID of the respective FSF command.

But after successfully sending the FSF command we must not use the
request-object anymore, as this might result in an use-after-free (see
"zfcp: fix request object use-after-free in send path causing seqno
errors" ).

To fix this add a new variable that caches the request-ID before sending
the request. This won't change during the hand-off to the FCP channel,
and so it's safe to trace this cached request-ID later, instead of using
the request object.

Signed-off-by: Benjamin Block <bblock@linux.ibm.com>
Fixes: d27a7cb919 ("zfcp: trace on request for open and close of WKA port")
Cc: <stable@vger.kernel.org> #2.6.38+
Reviewed-by: Steffen Maier <maier@linux.ibm.com>
Reviewed-by: Jens Remus <jremus@linux.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-07-11 21:04:22 -04:00
..
block s390/dasd: fix build warning in dasd_eckd_build_cp_raw 2019-05-09 08:10:21 -06:00
char stream_open related patches for Linux 5.2 2019-05-07 12:15:13 -07:00
cio s390/qdio: optimize state inspection of HW-owned SBALs 2019-05-08 15:01:23 +02:00
crypto stream_open related patches for Linux 5.2 2019-05-07 12:15:13 -07:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-05-07 22:03:58 -07:00
scsi scsi: zfcp: fix request object use-after-free in send path causing wrong traces 2019-07-11 21:04:22 -04:00
virtio virtio: fixes, features 2019-05-14 14:12:59 -07:00
Makefile kbuild: rename built-in.o to built-in.a 2018-03-26 02:01:19 +09:00