Received: by 10.192.165.148 with SMTP id m20csp2521812imm; Sun, 22 Apr 2018 08:46:34 -0700 (PDT) X-Google-Smtp-Source: AIpwx49Sln29daX6Y2AnMx8HRHoBzv5T9XxHhuD9Cy79RyAz2s3+I8zgrWGUGWrkZl1tpYcxHCXX X-Received: by 2002:a17:902:a8:: with SMTP id a37-v6mr15795088pla.238.1524411994572; Sun, 22 Apr 2018 08:46:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524411994; cv=none; d=google.com; s=arc-20160816; b=T+/w2XEKptZVkb1tdlcOOZ4PG+ChJaKHIX0ZLOdtlNWTR6zhAeenFa9TuFP16X6qti CNet/tXCi63DytpERCF+2Oyo338tFRTJJuhQJvmdL25dhzLoslRAihfojhstQaNHjwws aXwKqCKLPOD+t6ykPL1HV2cJpwgm1O9Z0LObH2BnlHZc5C4douGUF53r+6oOubEa64zq HP9QXj7yNKZswYpNwKXSLqfRDbPy4iCTB+2QjsiwoNRxODOSCEsmW+KquuLnYHCR3/BT pshplx90L/j1PxWb7hwp0ffitHObUJHV9pQoXA/CA9X0rvetnZh5614LKlAk7JvHgXrf X1wQ== 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=o/Yk9BARfwitab1PdLUFa9oqdKAI6E163OxlZku/p8c=; b=uMweyeN0CpAuQ475DKj2JROjqQKRiKn6oM55NySoXsKpVGh74X12MJqvhm2Y3QKrxR jOxi90TOCBx71JPhTFW01gbsT7mIX9GAXGeQTNUrrkh0zXstdQmj1z0nKD0gXr+OQhdp PB0VkwPArq275EZh7x3RngDAMxYmP0fUbF89koUKxu3NB+v2TsjXTP0bkl8QF+EVwUQI 6SZCHHr82kfBoU0PnUTzlUE1RUmH8ORodYHZcs5mQ1HKlrKaD2LAvBEVxJgUra7UTAf6 Mp1tjh1D49rT/e65hb3oFBcWXGC4fJPU3nR/PzMgPHmi4JregyyuuzzCGPO5vlgG/HcO 7Bgw== 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 d9si6966149pge.290.2018.04.22.08.46.20; Sun, 22 Apr 2018 08:46:34 -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 S1755260AbeDVPom (ORCPT + 99 others); Sun, 22 Apr 2018 11:44:42 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:48842 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754921AbeDVOCu (ORCPT ); Sun, 22 Apr 2018 10:02:50 -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 5B864CB7; Sun, 22 Apr 2018 14:02:49 +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.16 187/196] orangefs_kill_sb(): deal with allocation failures Date: Sun, 22 Apr 2018 15:53:27 +0200 Message-Id: <20180422135113.929812421@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135104.278511750@linuxfoundation.org> References: <20180422135104.278511750@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.16-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 @@ -579,6 +579,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