Received: by 10.192.165.148 with SMTP id m20csp2478741imm; Sun, 22 Apr 2018 07:54:17 -0700 (PDT) X-Google-Smtp-Source: AIpwx485F2C2xoEPDLY2uQMn2BbDC1/jP/vxS5a3xiRXDS/ngWxCphkvjys/9d7NKAPQu96e+DOE X-Received: by 10.101.67.203 with SMTP id n11mr7346089pgp.287.1524408857191; Sun, 22 Apr 2018 07:54:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524408857; cv=none; d=google.com; s=arc-20160816; b=wPkA62jXwSexyA7gwuyhmTyQ4ymIOpC8JfY7GFTz3/7EJafZ+TqiuKWWV8piAJfwYF 2V31j7k4lweqENk2EGWrlyaQd8ctUPBNVu2Yz5AS0UK2BhQxcAsC500RtxdsFBrcVmGt Pi/52xvJVdL38gx8bCFlebeTDNbGoOURNIdnRGD+VIqYvDi1RINrDh1j52lQdqy7vKzM U6XQEBl3XniAJ8gBc+nlvdLV3WxC2KWGp7HQUORZPuwEuilO60eJbEmqru9w6NfeXGSY 044WYMtyM5VqqKg8zHNfOH4+areOrvQ28jV/gfpWYzktLq29hNdSGKIphgIBjloq8p43 S+6Q== 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=MQN15W2D1Aty2AY9piK6SMLSxj/2DZuYB1iDaJ4Wgvc=; b=ZIE5C+kCq1NQuHLPSE35ZyhtUdiRNH66VlxVRf3OJSEjHcde83fGsA+k4HGUlDF19Y lgOMc0QHXUKJ/yXqi+U9EccHmBIdLTXlNYn624rhOX+i94ISUnBr09jy/gX6/QYWA6HJ FJXJcdcype121Ir9gzYXb/WhLBTahN4ESWfRUR5Tjh/207awnlFnsUk4PJIq0JbX6HtU BqYELh0lI92hhpZoUauuGDaZ4ozo19+aAE8NjuzVwLYjbKbK7Uw2bZBWPc1ywFEQemRU AHwLb4aLo7PErO9GDCK8Y9ipm6FHE6nkDZcxnYsbq6upPOIXsVeEmEOO45fR/jhtbORK enrw== 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 e16si8190838pgr.502.2018.04.22.07.54.03; Sun, 22 Apr 2018 07:54:17 -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 S1757108AbeDVOxA (ORCPT + 99 others); Sun, 22 Apr 2018 10:53:00 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:56534 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757061AbeDVOOo (ORCPT ); Sun, 22 Apr 2018 10:14:44 -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 A1966904; Sun, 22 Apr 2018 14:14:43 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, stable@kernel.org, Al Viro Subject: [PATCH 4.9 88/95] orangefs_kill_sb(): deal with allocation failures Date: Sun, 22 Apr 2018 15:53:57 +0200 Message-Id: <20180422135214.031110159@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135210.432103639@linuxfoundation.org> References: <20180422135210.432103639@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.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Al Viro commit 659038428cb43a66e3eff71e2c845c9de3611a98 upstream. orangefs_fill_sb() might've failed to allocate ORANGEFS_SB(s); don't oops in that case. Cc: stable@kernel.org Signed-off-by: Al Viro Signed-off-by: Greg Kroah-Hartman --- fs/orangefs/super.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/fs/orangefs/super.c +++ b/fs/orangefs/super.c @@ -559,6 +559,11 @@ void orangefs_kill_sb(struct super_block /* provided sb cleanup */ kill_anon_super(sb); + if (!ORANGEFS_SB(sb)) { + mutex_lock(&orangefs_request_mutex); + mutex_unlock(&orangefs_request_mutex); + return; + } /* * issue the unmount to userspace to tell it to remove the * dynamic mount info it has for this superblock