From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:43240 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932301AbcHNQAW (ORCPT ); Sun, 14 Aug 2016 12:00:22 -0400 Subject: Patch "scsi: ignore errors from scsi_dh_add_device()" has been added to the 4.4-stable tree To: hare@suse.de, gregkh@linuxfoundation.org, hch@lst.de, jthumshirn@suse.com, labbott@redhat.com, martin.petersen@oracle.com Cc: , From: Date: Sun, 14 Aug 2016 18:00:11 +0200 Message-ID: <147119041121872@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled scsi: ignore errors from scsi_dh_add_device() to the 4.4-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: scsi-ignore-errors-from-scsi_dh_add_device.patch and it can be found in the queue-4.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 221255aee67ec1c752001080aafec0c4e9390d95 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Tue, 1 Dec 2015 10:16:42 +0100 Subject: scsi: ignore errors from scsi_dh_add_device() From: Hannes Reinecke commit 221255aee67ec1c752001080aafec0c4e9390d95 upstream. device handler initialisation might fail due to a number of reasons. But as device_handlers are optional this shouldn't cause us to disable the device entirely. So just ignore errors from scsi_dh_add_device(). Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen Cc: Laura Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/scsi_sysfs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c @@ -1058,11 +1058,12 @@ int scsi_sysfs_add_sdev(struct scsi_devi } error = scsi_dh_add_device(sdev); - if (error) { + if (error) + /* + * device_handler is optional, so any error can be ignored + */ sdev_printk(KERN_INFO, sdev, "failed to add device handler: %d\n", error); - return error; - } device_enable_async_suspend(&sdev->sdev_dev); error = device_add(&sdev->sdev_dev); Patches currently in stable-queue which might be from hare@suse.de are queue-4.4/scsi-ignore-errors-from-scsi_dh_add_device.patch