Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp21773570ybl; Mon, 6 Jan 2020 10:59:24 -0800 (PST) X-Google-Smtp-Source: APXvYqw566q1ScB2x7HaefzpGAqfuN7X1HRs/epFlYG/ez9/SL7+KBj+6jG1GONlb8ONrVDGDsMX X-Received: by 2002:a05:6830:114f:: with SMTP id x15mr113528339otq.291.1578337163804; Mon, 06 Jan 2020 10:59:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578337163; cv=none; d=google.com; s=arc-20160816; b=dyDklxfMllZIPIrVM9p5HYnfFTVlYCdX8JE+B2ObCLrHzrjNBAAsp8qEClxCY3aBsZ d9sAOIvOoCArmKvhC9rHWnsb8FTkIMRiPBwOVjn+0FnjfpNzVOriChvhQUciyQVQxcEn /HmbooToGrRL7MISok2oHcJb5jvILB4WNiDbijVNJoZLjqvGKjEPJEQoRhgFEd/fdRvO gaRpUoCjWzN3KBnvyhbwS8hQMw8+UvjlDDYyBMTazCXT1aPoUyQ09DXX7ZWKrrtY5lWB CSdyfUlQ242BGNc+fqGntP5weidyw/aV8BAC/2JsxEAKxfw6uXPKIQQHiee6JyzVpzyY cWSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=3LUxbbv9oMjGQWYNO1GAk2gz2g6i7YbuQPZvOhwhLvc=; b=c6PTXWlWoWZzQFT89o/1CqapSYVtKIz0GffagJYvdmQu5NkIka4aRIZvp2AGdlalB1 7XHAeWCN6ugJBwEUmhGLnFe0BwlTRGvpv3Zls07ZeoQVQjumeADrFIt5ujz9DNRBz8s/ BgjKIrQXleOVX/lcvVTdSkb7t9CjRBnGcOJuEBtWNljw+ormh+DhowP6AKZF42IwT+C8 fB3INLca8EcGWjNK0jOvEe5b4igiuBXJWm/shu6HzMl3tXBuSgXTRd1lFJjpdlhMiCbW EvSvC6LowcKJu4SmwUE8b1x3cuJekA0TAuHAM6dpg5dEZKawMOhm+Ufisq7jZGbR5CxF wSRw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z11si28420827oic.176.2020.01.06.10.59.12; Mon, 06 Jan 2020 10:59:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726760AbgAFS62 (ORCPT + 99 others); Mon, 6 Jan 2020 13:58:28 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:35892 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726569AbgAFS61 (ORCPT ); Mon, 6 Jan 2020 13:58:27 -0500 Received: from localhost (unknown [IPv6:2610:98:8005::147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: krisman) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 1EA22291166; Mon, 6 Jan 2020 18:58:26 +0000 (GMT) From: Gabriel Krisman Bertazi To: gregkh@linuxfoundation.org Cc: rafael@kernel.org, lduncan@suse.com, cleech@redhat.com, jejb@linux.ibm.com, martin.petersen@oracle.com, open-iscsi@googlegroups.com, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, Gabriel Krisman Bertazi , kernel@collabora.com Subject: [PATCH 0/3] drivers base: transport component error propagation Date: Mon, 6 Jan 2020 13:58:14 -0500 Message-Id: <20200106185817.640331-1-krisman@collabora.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This small series improves error propagation on the transport component to prevent an inconsistent state in the iscsi module. The bug that motivated this patch results in a hanging iscsi connection that cannot be used or removed by userspace, since the session is in an inconsistent state. That said, I tested it using the TCP iscsi transport (and forcing errors on the triggered function), which doesn't require a particularly complex container structure, so it is not the best test for finding corner cases on the atomic attribute_container_device trigger version. Please let me know what you think. Gabriel Krisman Bertazi (3): drivers: base: Support atomic version of attribute_container_device_trigger drivers: base: Propagate errors through the transport component iscsi: Fail session and connection on transport registration failure drivers/base/attribute_container.c | 103 ++++++++++++++++++++++++++++ drivers/base/transport_class.c | 11 ++- drivers/scsi/scsi_transport_iscsi.c | 18 ++++- include/linux/attribute_container.h | 7 ++ include/linux/transport_class.h | 6 +- 5 files changed, 137 insertions(+), 8 deletions(-) -- 2.24.1