Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp291097imu; Wed, 19 Dec 2018 18:49:44 -0800 (PST) X-Google-Smtp-Source: AFSGD/X3Z7gfRQslhp4MLWlb73lb2ZPrSZYqFxY0cn5Fj8QjRREFQ3MTCEzaYedQwpO02bM4tDvK X-Received: by 2002:a63:6984:: with SMTP id e126mr8747241pgc.143.1545274184313; Wed, 19 Dec 2018 18:49:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545274184; cv=none; d=google.com; s=arc-20160816; b=xbZAcgfXz5nXfmHSnYPQfZaCE6e5fL/l2A6N8PvP5SkJihUIeabxmJll3rS5K4Nc98 RvOb/Q2aZIvRRII6WacA7FSYT4Mb777SSgqoNV3+IO10MF8h+Nj6ztdFVoyQkDD040nY QTmZSBM846dtsMrwJRqxN+nsApx5euB7nygW3UkpmwID0NVLgwQEJg65Nif/JWE+KgFK sPG217xl+cTJWI5FrCSSB/nEQNQHMPHvUQJS9mlkrXYU+tmDIpTGiu/v+h81nkwsGnwC vsAXawhigRwA0QjcvxkmcUOxO+0cXTZ0/wO6nvGS4/UhpNiP9n/U8FMwYLtc/5D6N2Nm Jy3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:organization:from:subject:cc:to :dkim-signature; bh=o5iGTFxA5g8Re3ZZntSs8KQDE7E+b68NdNeBVWWHcRk=; b=cPJ2wFctuHxreeYlaWUwTCwXe2jc8wJUliY3aOWBCXp+LTXBZtoJEyaCx/XwO0PNlX +kRnuUnymYQAmmFVzwybiqj8EqDIHfUYjPTg04Om+bDcCcc9buobVtyr9Wdn0PMHYPOZ vqCHZYitKBY+5TTJ3h2HydAdWZT1XdLEB0klmwu+clZ+wY4tVufiztxxknbmeAxC2y4z Hi2Y4JUmTSujScHNUNJvxm5KoL4mCiQ2NpRw6QAlGn1qRWKK2saJN0RuLaMQ8ia/uFkz pwj6aLqBbrrAzH5zqBBJDIkVeZ9NVJ23K8ewiD7uHK7xfEJHO3avsqcfut6gesJcOaxg E9xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=w7bhqmdz; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d8si17419056pgh.505.2018.12.19.18.49.27; Wed, 19 Dec 2018 18:49:44 -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; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=w7bhqmdz; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730086AbeLTC1k (ORCPT + 99 others); Wed, 19 Dec 2018 21:27:40 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:60642 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729488AbeLTC1k (ORCPT ); Wed, 19 Dec 2018 21:27:40 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wBK2O1Lh048527; Thu, 20 Dec 2018 02:27:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=to : cc : subject : from : references : date : in-reply-to : message-id : mime-version : content-type; s=corp-2018-07-02; bh=o5iGTFxA5g8Re3ZZntSs8KQDE7E+b68NdNeBVWWHcRk=; b=w7bhqmdz7B5u6sphdfZfxXCFik74wQyG3xDDHbNd1ULskVhqOfL4Pwy3he/5zULEnO6f bmm+ct4oEUTo1TAv5EvTHFmGYreSo8Tn0ranHrj5+cv6guPUJwbd6W4rrcm2PhnSMOkb o4QBM2CGW+g6ElMsIi9H3CXIgrIzoTpfAreFtQI7D40LqCTWwQcTxh0+l4v8O8ynVawP MOfV45nKnsDQFOE9rbLpStwYnogBOe1BoQrpyYw+soKeTJE6ucNLLL08vT/UnJvOI9BO gQyJNzjWKDz70w2jJ9BdicgSD0WL0U2EaHu2mooOt7lvFjWyxjTjmcdXLka1n4mFCTk+ yg== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2pfn1yuqca-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 20 Dec 2018 02:27:32 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id wBK2RQGS019599 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 20 Dec 2018 02:27:26 GMT Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id wBK2RQMK011108; Thu, 20 Dec 2018 02:27:26 GMT Received: from ca-mkp.ca.oracle.com (/10.159.214.123) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 19 Dec 2018 18:27:25 -0800 To: Anatoliy Glagolev Cc: aglagolev@purestorage.com, adailey@purestorage.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, hch@lst.de, qla2xxx-upstream@qlogic.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] scsi: qla2xxx: deadlock by configfs_depend_item From: "Martin K. Petersen" Organization: Oracle Corporation References: <1544140125-3060-1-git-send-email-glagolig@gmail.com> Date: Wed, 19 Dec 2018 21:27:23 -0500 In-Reply-To: <1544140125-3060-1-git-send-email-glagolig@gmail.com> (Anatoliy Glagolev's message of "Thu, 6 Dec 2018 16:48:45 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9112 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812200017 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Anatoliy, > The intent of invoking configfs_depend_item in commit 7474f52a82d51 > ("tcm_qla2xxx: Perform configfs depend/undepend for base_tpg") was to > prevent a physical Fibre Channel port removal when virtual (NPIV) > ports announced through that physical port are active. The change > does not work as expected: it makes enabled physical port dependent on > target configfs subsystem (the port's parent), something the configfs > guarantees anyway. > > Besides, scheduling work in a worker thread and waiting for the work's > completion is not really a valid workaround for the requirement not to > call configfs_depend_item from a configfs callback: the call > occasionally deadlocks. > > Thus, removing configfs_depend_item calls does not break anything and > fixes the deadlock problem. Applied to 4.21/scsi-queue, thank you! -- Martin K. Petersen Oracle Linux Engineering