s390/cio: check the subchannel validity for dev_busid
authorVineeth Vijayan <vneethv@linux.ibm.com>
Fri, 5 Nov 2021 15:44:51 +0000 (16:44 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:17:17 +0000 (19:17 +0100)
commitf33bf6015eaff631456e172b3836a622fa01306b
treec6c900d602b0465a039a3fe371584dc5079bc398
parent32f71f36808612dd829bc20957b802dd698c2e27
s390/cio: check the subchannel validity for dev_busid

commit a4751f157c194431fae9e9c493f456df8272b871 upstream.

Check the validity of subchanel before reading other fields in
the schib.

Fixes: d3683c055212 ("s390/cio: add dev_busid sysfs entry for each subchannel")
CC: <stable@vger.kernel.org>
Reported-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Link: https://lore.kernel.org/r/20211105154451.847288-1-vneethv@linux.ibm.com
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/s390/cio/css.c