This is a note to let you know that I've just added the patch titled s390/pci: remove superfluous zdev->zbus check to the 5.11-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: s390-pci-remove-superfluous-zdev-zbus-check.patch and it can be found in the queue-5.11 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From e1bff843cde62a45a287b7f9b4cd5e824e8e49e2 Mon Sep 17 00:00:00 2001 From: Niklas Schnelle <schnelle@xxxxxxxxxxxxx> Date: Tue, 19 Jan 2021 08:49:37 +0100 Subject: s390/pci: remove superfluous zdev->zbus check From: Niklas Schnelle <schnelle@xxxxxxxxxxxxx> commit e1bff843cde62a45a287b7f9b4cd5e824e8e49e2 upstream. Checking zdev->zbus for NULL in __zpci_event_availability() is superfluous as it can never be NULL at this point. While harmless this check causes smatch warnings because we later access zdev->zbus with only having checked zdev != NULL which is sufficient. The reason zdev->zbus can never be NULL is since with zdev != NULL given we know the zdev came from get_zdev_by_fid() and thus the zpci_list. Now on first glance at zpci_create_device() one may assume that there is a window where the zdev is in the list without a zdev, however this window can't overlap with __zpci_event_availability() as zpci_create_device() either runs on the same kthread as part of availability events, or during the initial CLP List PCI at which point the __zpci_event_availability() is not yet called as zPCI is not yet initialized. Reported-by: kernel test robot <lkp@xxxxxxxxx> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Signed-off-by: Niklas Schnelle <schnelle@xxxxxxxxxxxxx> Signed-off-by: Vasily Gorbik <gor@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/s390/pci/pci_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/s390/pci/pci_event.c +++ b/arch/s390/pci/pci_event.c @@ -80,7 +80,7 @@ static void __zpci_event_availability(st enum zpci_state state; int ret; - if (zdev && zdev->zbus && zdev->zbus->bus) + if (zdev && zdev->zbus->bus) pdev = pci_get_slot(zdev->zbus->bus, zdev->devfn); zpci_err("avail CCDF:\n"); Patches currently in stable-queue which might be from schnelle@xxxxxxxxxxxxx are queue-5.11/s390-pci-fix-leak-of-pci-device-structure.patch queue-5.11/s390-pci-remove-superfluous-zdev-zbus-check.patch queue-5.11/s390-pci-refactor-zpci_create_device.patch