Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp2409083rwn; Fri, 9 Sep 2022 13:17:31 -0700 (PDT) X-Google-Smtp-Source: AA6agR6P74vJARuqwTxu34lGmmgLuNP3UmrlJjxRE/AkQEsKN5WZ4pelmbN43tALIo87iFjezrnn X-Received: by 2002:a17:902:b098:b0:176:86b4:68d4 with SMTP id p24-20020a170902b09800b0017686b468d4mr15271471plr.161.1662754651642; Fri, 09 Sep 2022 13:17:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662754651; cv=none; d=google.com; s=arc-20160816; b=OnvyxmijMnpT4UmBOpg8RiJeve741YgLk5tUpdt1qnDW/L9u1YcyjE4bPXFaf83epV 4QzEJbcS6DT0iCLTPUoFxeLnvwj/b0wptO6mGhqYeV00YyvVP3rqZGFK7AkX7sb+GeG3 /vojRdwMqPmO5oe5qwf3zfmvoBhmldCta6O302LibNteQ5LRQwdzldYRyEFFG0HxaGIF zA7pF51yAKL+HaXsFBDSQuGrjCoH/74dY8zvuRlYkM3mKLiiE8XUemVQhkOv/64zcNh6 BB3a7dngPSRjIphlVWYCDPhCQ13WmjsLQX1gjL/mmTvMeP6QUHc2dVl0EJGvCzHffGC7 Zbmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=m1FQBJi+9cTNBW64KCAuDcrszWntI0Tejqb5xg2lU9o=; b=K3OMk59HMkMcW1zoPU6VCde0BpYvhwHH4+gVAK8wsv0gxuBRevbeLHQubkuyz/Tni5 lBPgQFXbNoAh0InT5goc7uWBdzw0MAuwwoDVNmiXv1QpaRIvR1ozyljZteZgw5BVN4ZR zDyk8G30rwRZ1jAsKlsr8yimRvFVTfJk3ThPtizVc771D0NGBpxkJNH9TcO2GDkFYboD NeZy6t0/Q5XOoN7DKzVEIYUVxccp6CsqniOBncgf3DGyYECymedg8t1CgsAqexEBT8aR IijkGsil9C7odtjwuWOZn4/+UrEKS8qk0vBUpqcDFviQLOpsxDgeFIuOOWsKoMb1G/zc TI/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=T0r+NEU5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i16-20020a170902cf1000b00176cbe4c8d4si1434015plg.96.2022.09.09.13.17.20; Fri, 09 Sep 2022 13:17:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=T0r+NEU5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231799AbiIIUG1 (ORCPT + 99 others); Fri, 9 Sep 2022 16:06:27 -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: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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.