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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C41A6ECAAA1 for ; Fri, 9 Sep 2022 20:06:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1B64E8D0002; Fri, 9 Sep 2022 16:06:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 167358D0001; Fri, 9 Sep 2022 16:06:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 005BF8D0002; Fri, 9 Sep 2022 16:06:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id E11C78D0001 for ; Fri, 9 Sep 2022 16:06:21 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id B5E97AAD4F for ; Fri, 9 Sep 2022 20:06:21 +0000 (UTC) X-FDA: 79893628962.03.DD1DA34 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf31.hostedemail.com (Postfix) with ESMTP id CC29F2009A for ; Fri, 9 Sep 2022 20:06:20 +0000 (UTC) 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: ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662753981; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=m1FQBJi+9cTNBW64KCAuDcrszWntI0Tejqb5xg2lU9o=; b=ggn0OuAwqZCrfm93Ycb1mjqU3NghttA9Yl+1jWIUyzWKr/6SXX3aYbUdCQe3cHISZZtIKm Z+F1AHy9RWdTUZUn4VE7VBaybSQfIXx+GDmnGhKftxybYC5ZK7MslsPtkMgbPCkwL005K9 o/MjlMekk+qH0W4OVUq3EZrbuG0gBWI= ARC-Authentication-Results: i=1; imf31.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=T0r+NEU5; spf=none (imf31.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1662753981; a=rsa-sha256; cv=none; b=wvY4bbehAqanpeVd75AayIza+/sdPGE7+u+9QaWwWK1JcE8CAPzjwnxokGbg9bzLVZr66U 5xUDRKKgdjAby3ODqGOoCbL5NYAarc8CGp3YELCK3Sb8bLlL267N5Mpb6Gqutw73/d0Q+q 2gxjp7h6Q6K4PXOIC3ZLQVNWsnL43v4= X-Rspam-User: Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=T0r+NEU5; spf=none (imf31.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Rspamd-Server: rspam06 X-Stat-Signature: aeg3mprf4466kijwb9yyzo7pfyura1fx X-Rspamd-Queue-Id: CC29F2009A X-HE-Tag: 1662753980-525814 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.