linux/drivers/s390
Julian Wiedmann e54e4785cb s390/qdio: (re-)initialize tiqdio list entries
When tiqdio_remove_input_queues() removes a queue from the tiq_list as
part of qdio_shutdown(), it doesn't re-initialize the queue's list entry
and the prev/next pointers go stale.

If a subsequent qdio_establish() fails while sending the ESTABLISH cmd,
it calls qdio_shutdown() again in QDIO_IRQ_STATE_ERR state and
tiqdio_remove_input_queues() will attempt to remove the queue entry a
second time. This dereferences the stale pointers, and bad things ensue.
Fix this by re-initializing the list entry after removing it from the
list.

For good practice also initialize the list entry when the queue is first
allocated, and remove the quirky checks that papered over this omission.
Note that prior to
commit e521813468 ("s390/qdio: fix access to uninitialized qdio_q fields"),
these checks were bogus anyway.

setup_queues_misc() clears the whole queue struct, and thus needs to
re-init the prev/next pointers as well.

Fixes: 779e6e1c72 ("[S390] qdio: new qdio driver.")
Cc: <stable@vger.kernel.org>
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2019-07-02 16:00:27 +02:00
..
block s390/dasd: Fix a precision vs width bug in dasd_feature_list() 2019-07-02 16:00:26 +02:00
char s390/sclp: remove call home support 2019-06-19 17:54:27 +02:00
cio s390/qdio: (re-)initialize tiqdio list entries 2019-07-02 16:00:27 +02:00
crypto s390/pkey: Use -ENODEV instead of -EOPNOTSUPP 2019-06-15 12:24:36 +02:00
net s390/Kconfig: pedantic cleanups 2019-06-04 15:03:46 +02:00
scsi scsi: zfcp: fix to prevent port_remove with pure auto scan LUNs (only sdevs) 2019-05-29 21:52:31 -04:00
virtio virtio/s390: make airq summary indicators DMA 2019-06-15 12:25:41 +02:00
Makefile kbuild: rename built-in.o to built-in.a 2018-03-26 02:01:19 +09:00