Received: by 10.192.165.148 with SMTP id m20csp2435491imm; Sun, 22 Apr 2018 07:04:13 -0700 (PDT) X-Google-Smtp-Source: AIpwx48cl4qAMriQqCDukRwPCW5ibAR8hR46szRUX6E7dHe2WAxFWaxhyIuqpemPt5uHVr0wTjqt X-Received: by 2002:a17:902:71c2:: with SMTP id t2-v6mr6883681plm.243.1524405853315; Sun, 22 Apr 2018 07:04:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524405853; cv=none; d=google.com; s=arc-20160816; b=l44C+oe49yfGfEJduB3IoHkfDQNFnUCrPhIB3efAR3xg3sHX9lR3GHC26N5K0DgAgO EdZDaRofwE3pgDbNVUDc1c3mgchqQ+LsKWAJDgVxA9V1o98XAUgWv9D8nRgjL0vzpvQh dWpzDqn5aIlw9Uzs4bGFnrFurdPZ8cZeH3zmPEQWsbnjByjL274ehCKc2q+wRqxqLMrs NmUpb40rbQcCo2Vktb4pYb8VD76Vu85+vwYZuF1GWqLcm8yFSmRFF52uJ9EUg6/ZnrdU FqNqbfb/qidlUR+FnsZOPm6eX8DJAklZ2YVFwPsJDgYxxjJo/6dml7VMiEM+NdVKAven mwVA== 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=jIQ4j+2fivIVxSJ+XKJ4MxPhGHhhhqnl48Yh9zJFLhY=; b=sPgqAKwPeutSFA5v4fb/NV0T2L2Flu/TLzYy0uUv7l3674OMkfj2FwrXpS9NyR7e3I PAl5VoCxIvvP53YDYT67CqxlrMQuxS7nDdQu16GcoilkBW8Zlf/CtbUIL3RVkCKTaAgs 3Gj1uDnMl9o2ZSJOZDWryeWI9Y1YyPjwJr60MW7ylxtUu204iLHLNBsCRvsxU0HsAO2o 0gfogn8wUtJFzBdRjy6U9r6LilykD3rMGw/zAlGGU3qZ+eSvMZXBBIKLhu++/I4nm+rB qQZEIBxhQAHuJFA3p6evuAOlehig4Yc0GIfQQyL85uPIL6+uauq41D/0MNOgXDGssq39 mluw== 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 i4si3635310pgq.664.2018.04.22.07.03.59; Sun, 22 Apr 2018 07:04: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 S1754935AbeDVOCw (ORCPT + 99 others); Sun, 22 Apr 2018 10:02:52 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:48806 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754865AbeDVOCr (ORCPT ); Sun, 22 Apr 2018 10:02:47 -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 AB43FCC2; Sun, 22 Apr 2018 14:02:46 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Al Viro Subject: [PATCH 4.16 186/196] hypfs_kill_super(): deal with failed allocations Date: Sun, 22 Apr 2018 15:53:26 +0200 Message-Id: <20180422135113.878389697@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 a24cd490739586a7d2da3549a1844e1d7c4f4fc4 upstream. hypfs_fill_super() might fail to allocate sbi; hypfs_kill_super() should not oops on that. Cc: stable@vger.kernel.org Signed-off-by: Al Viro Signed-off-by: Greg Kroah-Hartman --- arch/s390/hypfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/s390/hypfs/inode.c +++ b/arch/s390/hypfs/inode.c @@ -320,7 +320,7 @@ static void hypfs_kill_super(struct supe if (sb->s_root) hypfs_delete_tree(sb->s_root); - if (sb_info->update_file) + if (sb_info && sb_info->update_file) hypfs_remove(sb_info->update_file); kfree(sb->s_fs_info); sb->s_fs_info = NULL;