linux_dsm_epyc7002/drivers/s390/cio
Qinglang Miao 1b4f4a160b s390/cio: fix use-after-free in ccw_device_destroy_console
[ Upstream commit 14d4c4fa46eeaa3922e8e1c4aa727eb0a1412804 ]

Use of sch->dev reference after the put_device() call could trigger
the use-after-free bugs.

Fix this by simply adjusting the position of put_device.

Fixes: 37db8985b2 ("s390/cio: add basic protected virtualization support")
Reported-by: Hulk Robot <hulkci@huawei.com>
Suggested-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Vineeth Vijayan <vneethv@linux.ibm.com>
[vneethv@linux.ibm.com: Slight modification in the commit-message]
Signed-off-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-30 11:53:46 +01:00
..
airq.c
blacklist.c
blacklist.h
ccwgroup.c
ccwreq.c
chp.c
chp.h
chsc_sch.c driver_find_device: Unify the match function with class_find_device() 2019-06-24 05:22:31 +02:00
chsc_sch.h
chsc.c s390 updates for the 5.10 merge window 2020-10-16 12:36:38 -07:00
chsc.h s390/cio: Helper functions to read CSSID, IID, and CHID 2020-09-15 13:21:46 -07:00
cio_debug.h
cio.c
cio.h
cmf.c
crw.c
css.c s390 updates for the 5.10 merge window 2020-10-16 12:36:38 -07:00
css.h s390/cio: Helper functions to read CSSID, IID, and CHID 2020-09-15 13:21:46 -07:00
device_fsm.c
device_id.c s390/cio: add basic protected virtualization support 2019-06-15 12:25:00 +02:00
device_ops.c s390/cio: Helper functions to read CSSID, IID, and CHID 2020-09-15 13:21:46 -07:00
device_pgid.c s390/cio: add basic protected virtualization support 2019-06-15 12:25:00 +02:00
device_status.c
device.c s390/cio: fix use-after-free in ccw_device_destroy_console 2020-12-30 11:53:46 +01:00
device.h s390: remove orphaned function declarations 2020-09-30 12:09:54 +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
fcx.c
idset.c
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
ioasm.c s390/cio: export hsch to modules 2019-04-24 14:18:51 +02:00
ioasm.h
isc.c s390: cio: add SPDX identifiers to the remaining files 2017-11-24 14:28:41 +01:00
itcw.c
Makefile vfio-ccw: Introduce a new schib region 2020-06-02 13:14:08 +02:00
orb.h
qdio_debug.c s390/qdio: fix statistics for 128 SBALs 2020-07-20 10:55:18 +02:00
qdio_debug.h
qdio_main.c s390/qdio: always use dev_name() for device name in QIB 2020-09-14 10:30:07 +02:00
qdio_setup.c s390/qdio: always use dev_name() for device name in QIB 2020-09-14 10:30:07 +02:00
qdio_thinint.c s390/qdio: consolidate thinint init/exit 2020-04-28 13:49:47 +02:00
qdio.h s390/qdio: remove internal polling in non-thinint path 2020-07-20 10:55:26 +02:00
scm.c
trace.c
trace.h s390/cio: Remove tracing for rchp instruction 2019-05-08 15:01:22 +02:00
vfio_ccw_async.c
vfio_ccw_chp.c vfio-ccw: Fix a build error due to missing include of linux/slab.h 2020-07-03 11:41:31 +02:00
vfio_ccw_cp.c
vfio_ccw_cp.h
vfio_ccw_drv.c vfio-ccw: Add trace for CRW event 2020-06-03 11:28:19 +02:00
vfio_ccw_fsm.c
vfio_ccw_ops.c vfio-ccw: Introduce a new CRW region 2020-06-03 11:27:43 +02:00
vfio_ccw_private.h vfio-ccw: Wire up the CRW irq and CRW region 2020-06-03 11:28:19 +02:00
vfio_ccw_trace.c vfio-ccw: Add trace for CRW event 2020-06-03 11:28:19 +02:00
vfio_ccw_trace.h vfio-ccw: Add trace for CRW event 2020-06-03 11:28:19 +02:00