linux-stable/drivers/s390/cio
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
..
airq.c s390/airq: use DMA memory for adapter interrupts 2019-06-15 12:25:05 +02:00
blacklist.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
blacklist.h s390: add a few more SPDX identifiers 2017-12-05 07:51:09 +01:00
ccwgroup.c s390/ccwgroup: add get_ccwgroupdev_by_busid() 2018-10-08 09:09:59 +02:00
ccwreq.c s390/cio: add basic protected virtualization support 2019-06-15 12:25:00 +02:00
chp.c s390/cio: ensure that a chpid is registered only once 2018-07-17 07:27:51 +02:00
chp.h s390/chsc: query utility strings via fmt3 channel path descriptor 2018-03-26 16:13:16 +02:00
chsc.c s390/cio: move struct node_descriptor to cio.h 2019-06-19 17:54:27 +02:00
chsc.h s390/cio: add function chsc_sgib() 2019-02-05 14:29:23 +01:00
chsc_sch.c compat: Move compat_timespec/ timeval to compat_time.h 2018-04-19 13:29:54 +02:00
chsc_sch.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cio.c s390: show statistics for MSI IRQs 2019-04-29 10:47:01 +02:00
cio.h s390/cio: introduce driver_override on the css bus 2019-07-02 16:00:26 +02:00
cio_debug.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-11-13 11:47:01 -08:00
cmf.c mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
crw.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
css.c s390/cio: introduce driver_override on the css bus 2019-07-02 16:00:26 +02:00
css.h s390/css: reduce stsch calls 2018-07-17 07:27:55 +02:00
device.c s390/cio: add basic protected virtualization support 2019-06-15 12:25:00 +02:00
device.h s390/cio: Convert timers to use timer_setup() 2017-11-14 11:01:36 +01:00
device_fsm.c s390/cio: add basic protected virtualization support 2019-06-15 12:25:00 +02:00
device_id.c s390/cio: add basic protected virtualization support 2019-06-15 12:25:00 +02:00
device_ops.c s390/cio: add basic protected virtualization support 2019-06-15 12:25:00 +02:00
device_pgid.c s390/cio: add basic protected virtualization support 2019-06-15 12:25:00 +02:00
device_status.c s390/cio: add basic protected virtualization support 2019-06-15 12:25:00 +02:00
eadm_sch.c s390: cio: add SPDX identifiers to the remaining files 2017-11-24 14:28:41 +01:00
eadm_sch.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fcx.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
idset.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
idset.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
io_sch.h s390/cio: add basic protected virtualization support 2019-06-15 12:25:00 +02:00
ioasm.c s390/cio: export hsch to modules 2019-04-24 14:18:51 +02:00
ioasm.h s390: assume diag308 set always works 2018-04-10 07:38:59 +02:00
isc.c s390: cio: add SPDX identifiers to the remaining files 2017-11-24 14:28:41 +01:00
itcw.c s390/cio: fix kernel-doc usage 2018-02-05 07:34:52 +01:00
Makefile vfio-ccw: add handling for async channel instructions 2019-04-24 14:18:51 +02:00
orb.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
qdio.h s390/qdio: eliminate queue's last_move cursor 2019-04-10 17:47:26 +02:00
qdio_debug.c s390/qdio: eliminate queue's last_move cursor 2019-04-10 17:47:26 +02:00
qdio_debug.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-11-13 11:47:01 -08:00
qdio_main.c s390/qdio: handle PENDING state for QEBSM devices 2019-06-07 10:10:15 +02:00
qdio_setup.c s390/qdio: (re-)initialize tiqdio list entries 2019-07-02 16:00:27 +02:00
qdio_thinint.c s390/qdio: (re-)initialize tiqdio list entries 2019-07-02 16:00:27 +02:00
scm.c s390: cio: add SPDX identifiers to the remaining files 2017-11-24 14:28:41 +01:00
trace.c s390/cio: Remove tracing for rchp instruction 2019-05-08 15:01:22 +02:00
trace.h s390/cio: Remove tracing for rchp instruction 2019-05-08 15:01:22 +02:00
vfio_ccw_async.c vfio-ccw: add handling for async channel instructions 2019-04-24 14:18:51 +02:00
vfio_ccw_cp.c vfio-ccw: make convert_ccw0_to_ccw1 static 2019-06-24 17:05:16 +02:00
vfio_ccw_cp.h vfio-ccw: Move guest_cp storage into common struct 2019-06-21 14:12:19 +02:00
vfio_ccw_drv.c vfio-ccw: Move guest_cp storage into common struct 2019-06-21 14:12:19 +02:00
vfio_ccw_fsm.c vfio-ccw: add handling for async channel instructions 2019-04-24 14:18:51 +02:00
vfio_ccw_ops.c vfio-ccw: Release any channel program when releasing/removing vfio-ccw mdev 2019-04-24 14:18:51 +02:00
vfio_ccw_private.h vfio-ccw: add handling for async channel instructions 2019-04-24 14:18:51 +02:00
vfio_ccw_trace.h vfio: ccw: add tracepoints for interesting error paths 2018-05-29 09:27:42 +02:00