linux_dsm_epyc7002/drivers/s390
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
..
block s390/dasd: fix null pointer dereference for ERP requests 2020-11-16 08:28:02 -07:00
char s390 updates for the 5.10 merge window 2020-10-16 12:36:38 -07:00
cio s390/cio: fix use-after-free in ccw_device_destroy_console 2020-12-30 11:53:46 +01:00
crypto s390/pkey: fix paes selftest failure with paes and pkey static build 2020-11-03 15:12:16 +01:00
net s390/qeth: fix tear down of async TX buffers 2020-11-20 18:59:48 -08:00
scsi s390 updates for the 5.10 merge window 2020-10-16 12:36:38 -07:00
virtio s390/virtio: remove unused pm callbacks 2020-06-16 13:44:04 +02:00
Makefile s390: remove pointless drivers-y in drivers/s390/Makefile 2019-09-16 13:21:51 +02:00