Received: by 10.192.165.156 with SMTP id m28csp67415imm; Tue, 10 Apr 2018 16:34:13 -0700 (PDT) X-Google-Smtp-Source: AIpwx48z2xgIpj9KuA2n3gXFwiv96hM9wc2r0J6n3DWtyWr4NEZyltW5d/+JAaKK9mZGaxDzx5l/ X-Received: by 2002:a17:902:9a96:: with SMTP id w22-v6mr2409954plp.209.1523403253849; Tue, 10 Apr 2018 16:34:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523403253; cv=none; d=google.com; s=arc-20160816; b=nyfrZDRlt39e1XsX/yzU10kyGLUOc5HjV6HtRFQmTAW11AoO0bSih2hDnB21VkWbba xCCsfGrU4XY3TWeF0dq1Bi6NwlDTSrnorQFSSPwBxaWE5BTeQH6J9gxL3W+5xWXki5Tq MovppvDzKP/p1UUEUOyn1O/mBnEPG1CNdL2MxXC9FBSYWT4gzBhAdPDuL7UafglSFwag 71Xe2PD81ogv4wiZFyYlLMhnEhmncYszY0/vNwjmgPCUZKxdnmL9d5qaKcJf9D+79OJm 04+HicGZTSEfgtO9U69+RrIykwg7zj8Maj9XCxiqQqXfjY5ryKr7UOWq7ffJgg9UpiSr 2gvw== 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:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=YNdCF8nxpHafpNJAD/UClDJVlNiDlTb3OfT7ZPEKde4=; b=s456Nob7r7Ur1Z0U6XDwUohOf39kWfMtukd/gGbFiyOpcCZZuw00VldNkZ5+Kzg8Lv lC+julufjpDYoEaAA8EL3PBno7koKLap6AzoSW6ZcBV2i47gk92P3qb062AJBEEepU7Z lDLtnKPnJPVqdXCGRfIZIuXLgxM8gxhiw53737eJf+uivbO0ZLQ1O245VdHOoxl/EZj/ wy/rIxMGgau7Ze1C8XWqn2U40clAcCdu5QYwy5tmQvipDYHT0ZuqeuZzdEygOcD4rzp9 OsNWfsUIXgFlhRB/SffdCVZinAFBbxy9r9eoR9yB2JWH4R0Tlx1zATGX8tZFZs/Xikes MeKA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t3si2325160pgc.87.2018.04.10.16.33.37; Tue, 10 Apr 2018 16:34:13 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754225AbeDJW3J (ORCPT + 99 others); Tue, 10 Apr 2018 18:29:09 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:39324 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754193AbeDJW3H (ORCPT ); Tue, 10 Apr 2018 18:29:07 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 2A480D4F; Tue, 10 Apr 2018 22:29:06 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christoph Hellwig , Sagi Grimberg , Johannes Thumshirn , Keith Busch Subject: [PATCH 4.15 056/168] nvme-fabrics: dont check for non-NULL module in nvmf_register_transport Date: Wed, 11 Apr 2018 00:23:18 +0200 Message-Id: <20180410212802.601450885@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180410212800.144079021@linuxfoundation.org> References: <20180410212800.144079021@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Christoph Hellwig commit 5a1e59533380a3fd04593e4ab2d4633ebf7745c1 upstream. THIS_MODULE evaluates to NULL when used from code built into the kernel, thus breaking built-in transport modules. Remove the bogus check. Fixes: 0de5cd36 ("nvme-fabrics: protect against module unload during create_ctrl") Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Johannes Thumshirn Signed-off-by: Keith Busch Signed-off-by: Greg Kroah-Hartman --- drivers/nvme/host/fabrics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/nvme/host/fabrics.c +++ b/drivers/nvme/host/fabrics.c @@ -493,7 +493,7 @@ EXPORT_SYMBOL_GPL(nvmf_should_reconnect) */ int nvmf_register_transport(struct nvmf_transport_ops *ops) { - if (!ops->create_ctrl || !ops->module) + if (!ops->create_ctrl) return -EINVAL; down_write(&nvmf_transports_rwsem);