linux-stable/drivers/s390/cio
Eric Farman d33c0c5637 vfio/ccw: remove WARN_ON during shutdown
[ Upstream commit 1c06bb87af ]

The logic in vfio_ccw_sch_shutdown() always assumed that the input
subchannel would point to a vfio_ccw_private struct, without checking
that one exists. The blamed commit put in a check for this scenario,
to prevent the possibility of a missing private.

The trouble is that check was put alongside a WARN_ON(), presuming
that such a scenario would be a cause for concern. But this can be
triggered by binding a subchannel to vfio-ccw, and rebooting the
system before starting the mdev (via "mdevctl start" or similar)
or after stopping it. In those cases, shutdown doesn't need to
worry because either the private was never allocated, or it was
cleaned up by vfio_ccw_mdev_remove().

Remove the WARN_ON() piece of this check, since there are plausible
scenarios where private would be NULL in this path.

Fixes: 9e6f07cd1e ("vfio/ccw: create a parent struct")
Signed-off-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Link: https://lore.kernel.org/r/20230210174227.2256424-1-farman@linux.ibm.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-10 09:28:21 +01:00
..
airq.c s390/airq: allow for airq structure that uses an input vector 2022-07-11 09:54:15 +02:00
blacklist.c s390/cio: avoid excessive path-verification requests 2021-09-27 13:54:38 +02:00
blacklist.h
ccwgroup.c s390/qeth: fix deadlock during failing recovery 2021-09-21 20:02:24 -07:00
ccwreq.c
chp.c s390: replace snprintf in show functions with sysfs_emit 2021-11-16 12:29:19 +01:00
chp.h
chsc.c s390/stp: clock_delta should be signed 2022-05-11 14:40:57 +02:00
chsc.h
chsc_sch.c s390/cio: sort out physical vs virtual pointers usage 2022-12-01 10:58:04 +01:00
chsc_sch.h
cio.c s390/cio: sort out physical vs virtual pointers usage 2022-12-01 10:58:04 +01:00
cio.h s390/cio: Use driver_set_override() instead of open-coding 2022-04-22 17:13:54 +02:00
cio_debug.h
cio_debugfs.c
cio_inject.c
cio_inject.h
cmf.c s390/cmf: get rid of register asm 2021-06-28 11:18:28 +02:00
crw.c s390: remove invalid email address of Heiko Carstens 2022-02-06 23:31:29 +01:00
css.c s390/cio: fix out-of-bounds access on cio_ignore free 2022-10-26 14:47:31 +02:00
css.h s390/cio: avoid excessive path-verification requests 2021-09-27 13:54:38 +02:00
device.c s390/cio: sort out physical vs virtual pointers usage 2022-12-01 10:58:04 +01:00
device.h
device_fsm.c s390/cio: sort out physical vs virtual pointers usage 2022-12-01 10:58:04 +01:00
device_id.c s390/cio: sort out physical vs virtual pointers usage 2022-12-01 10:58:04 +01:00
device_ops.c s390/cio: make ccw_device_dma_* more robust 2021-10-26 15:21:30 +02:00
device_pgid.c s390/cio: sort out physical vs virtual pointers usage 2022-12-01 10:58:04 +01:00
device_status.c s390/cio: sort out physical vs virtual pointers usage 2022-12-01 10:58:04 +01:00
eadm_sch.c s390/cio: sort out physical vs virtual pointers usage 2022-12-01 10:58:04 +01:00
eadm_sch.h
fcx.c s390/cio: sort out physical vs virtual pointers usage 2022-12-01 10:58:04 +01:00
idset.c
idset.h
io_sch.h
ioasm.c s390/extable: move EX_TABLE define to asm-extable.h 2022-03-08 00:33:00 +01:00
ioasm.h
isc.c
itcw.c s390/cio: sort out physical vs virtual pointers usage 2022-12-01 10:58:04 +01:00
Makefile
orb.h
qdio.h s390/qdio: clarify handler logic for qdio_handle_activate_check() 2021-12-06 14:42:25 +01:00
qdio_debug.c s390: move from strlcpy with unused retval to strscpy 2022-08-30 22:00:33 +02:00
qdio_debug.h
qdio_main.c s390/qdio: remove unneeded sanity check in qdio_do_sqbs() 2021-12-06 14:42:26 +01:00
qdio_setup.c s390/qdio: clarify handler logic for qdio_handle_activate_check() 2021-12-06 14:42:25 +01:00
qdio_thinint.c s390/airq: pass more TPI info to airq handlers 2022-07-11 09:54:10 +02:00
scm.c bus: Make remove callback return void 2021-07-21 11:53:42 +02:00
trace.c
trace.h s390: use struct tpi_info in lowcore.h 2021-06-07 17:07:01 +02:00
vfio_ccw_async.c vfio/ccw: Remove private->mdev 2022-07-07 14:06:12 -06:00
vfio_ccw_chp.c vfio/ccw: remove private->sch 2022-11-10 11:11:25 -07:00
vfio_ccw_cp.c vfio/ccw: identify CCW data addresses as physical 2022-12-05 15:01:36 +01:00
vfio_ccw_cp.h vfio/ccw: Add length to DMA_UNMAP checks 2022-08-01 13:36:46 -06:00
vfio_ccw_drv.c vfio/ccw: remove WARN_ON during shutdown 2023-03-10 09:28:21 +01:00
vfio_ccw_fsm.c VFIO updates for v6.2-rc1 2022-12-15 13:12:15 -08:00
vfio_ccw_ops.c VFIO updates for v6.2-rc1 2022-12-15 13:12:15 -08:00
vfio_ccw_private.h vfio/ccw: replace vfio_init_device with _alloc_ 2022-11-10 11:30:23 -07:00
vfio_ccw_trace.c
vfio_ccw_trace.h