From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8628EECAAD3 for ; Fri, 9 Sep 2022 20:06:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231859AbiIIUG2 (ORCPT ); Fri, 9 Sep 2022 16:06:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230487AbiIIUGZ (ORCPT ); Fri, 9 Sep 2022 16:06:25 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 134A0C6FDE for ; Fri, 9 Sep 2022 13:06:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=m1FQBJi+9cTNBW64KCAuDcrszWntI0Tejqb5xg2lU9o=; b=T0r+NEU5sUM7CiYLhXDU7Bn+Ya iMYFMcJXgAH+87uMSpQ1tC9T4Anrnzsp1SFX0oERFOaZ6tS54kfoAykYzC3ZQFcuDF4HtCuXwoa9H v7Z/oJxkEE8LC6faGm9ZKAEirhzAPOVYsW6t/4MeUfe1SPLClg4aKl8sX5eebqHbGE9bkeOceI9mP QicdY2mlQIjTxwFi5p62xNuCQzhbHifZeQggwDk1xzoNCxnTXp4Zpj/FcWYmXIv9F/hvWIxSX+suk 58w6ujvEDI1YwRYD2REXsUvJKwwfaTRsZhvDw7fbD39C5kge5HSPT1W2MZcrZDw06NKPrAYInWoHN rqfIvV3A==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWkGR-00DX6F-LU; Fri, 09 Sep 2022 20:06:11 +0000 Date: Fri, 9 Sep 2022 21:06:11 +0100 From: Matthew Wilcox To: "Vlastimil Babka (SUSE)" Cc: Muchun Song , Chao Yu , Linux MM , Andrew Morton , linux-kernel@vger.kernel.org, jaegeuk@kernel.org, Chao Yu , stable@kernel.org, syzbot+81684812ea68216e08c5@syzkaller.appspotmail.com, David Rientjes , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Christoph Lameter Subject: Re: [PATCH] mm/slub: fix to return errno if kmalloc() fails Message-ID: References: <20220830141009.150075-1-chao@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 08, 2022 at 11:25:08PM +0200, Vlastimil Babka (SUSE) wrote: > > I tend to agree with you. A mount operation shouldn’t panic the > > kernel. > > Hmm kmalloc(64) shouldn't normally due that due to the the underlying page > allocation falling into the "too small to fail" category, wonder if > syzkaller was doing anything special here? Here's the repro: https://syzkaller.appspot.com/x/repro.c?x=17cd7fa3080000 you can see it does: fd = open("/proc/thread-self/fail-nth", O_RDWR); if (fd == -1) exit(1); char buf[16]; sprintf(buf, "%d", nth); if (write(fd, buf, strlen(buf)) != (ssize_t)strlen(buf)) so this is the kind of stupid nitpicky bug that we shouldn't be reporting, let alone fixing, IMO.