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 X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8BEB2C32771 for ; Mon, 27 Jan 2020 08:42:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5751D2071E for ; Mon, 27 Jan 2020 08:42:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=unikie-com.20150623.gappssmtp.com header.i=@unikie-com.20150623.gappssmtp.com header.b="GE4NNOB0" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729268AbgA0ImW (ORCPT ); Mon, 27 Jan 2020 03:42:22 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:33433 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729267AbgA0ImV (ORCPT ); Mon, 27 Jan 2020 03:42:21 -0500 Received: by mail-lj1-f194.google.com with SMTP id y6so9762725lji.0 for ; Mon, 27 Jan 2020 00:42:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unikie-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=MzyRcxue6yjRTY/bsxuSjERm4XTh8vYxPrOpGhEyNzU=; b=GE4NNOB0RtsaSVq35OM2g+7Ru31Cosnv8xj7IIwpyF6JMX3nUX2v4EUkqokAfN+MPa ODFfrSEhw+QrxpHOfW30ebsoi4zvFdusMREDaqSZLy/cPOMcBlj398Dn+T2XuRBoPlcl rlE2Y1xWuZgwiRZDNQ+EHfCBHCkERjlOqhz7IGBjMZmwu8iYQvNO4abktTcKUabUaBLQ PcC4WvpOLt4eUXXDb7wB84GRxrdV2ezF5wBP3edLZV5cAp17907HMrJIB1BeMO+zJAja AtOqUOINiLwja+HbiQXMo8JcxDvX4ZMLHegbb+wmduAZM/pruCk6PQGSDnz+ZSpfhnZu v0NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=MzyRcxue6yjRTY/bsxuSjERm4XTh8vYxPrOpGhEyNzU=; b=MKBvowMI826sWVF/DwCbXsMFTmGpkY9iJXaC496oZzvMiNBFWofCn15n9QTdKA+IgP 1HSznNyWNpADVXOdUG1RsWL2/4wJIh8JFYYn7R8UbCzniSvcONDcfTf1fwoLp8NksIEc Q34IXd6/YR/orv8N/FIrIZTansEum38kak/lVx4UIYFV1aITSjrziCykMSRKkoMmjFgU GKb5fGo1r1XEXo+nvbq+pGV852Pwafug0AIQEkPLdLS1AyIuQtYaARbm6/4dqL+E/DJX tXrLU8AMYp5c59spPKKe9mJcg0HoJMaTEOvJPFBdKHGELNdBHM7Fd3vXvh13ZrTRun25 sj3w== X-Gm-Message-State: APjAAAWv3ufiS9o2MUi24vTO1nkIRz244Exgd5QYO9cuTZYIQwxoolky mI41vwhh5aOsEkAg9HS84wcG6A== X-Google-Smtp-Source: APXvYqxnj9br9Mg1/EsRuO8SEA91vWzMOxUEGZY5/ukHuE4YcujoiqiQKblp2ea//ooFnKway8udOw== X-Received: by 2002:a05:651c:111a:: with SMTP id d26mr9512082ljo.153.1580114538132; Mon, 27 Jan 2020 00:42:18 -0800 (PST) Received: from GL-434 ([109.204.235.119]) by smtp.gmail.com with ESMTPSA id y7sm754860ljy.92.2020.01.27.00.42.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Jan 2020 00:42:17 -0800 (PST) From: jouni.hogander@unikie.com (Jouni =?utf-8?Q?H=C3=B6gander?=) To: Lukas Bulwahn Cc: Greg Kroah-Hartman , open list , Andrew Morton , Ben Hutchings , linux- stable , Netdev , Al Viro , linux-fsdevel@vger.kernel.org, Eric Dumazet , "David S. Miller" , syzkaller@googlegroups.com Subject: Re: [PATCH 4.19 000/306] 4.19.87-stable review References: <20191127203114.766709977@linuxfoundation.org> <20191128073623.GE3317872@kroah.com> <20191129085800.GF3584430@kroah.com> <87sgk8szhc.fsf@unikie.com> Date: Mon, 27 Jan 2020 10:42:16 +0200 In-Reply-To: (Lukas Bulwahn's message of "Sun, 26 Jan 2020 12:54:42 +0100 (CET)") Message-ID: <87h80h2suv.fsf@unikie.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org Lukas Bulwahn writes: > On Wed, 22 Jan 2020, Jouni H=C3=B6gander wrote: > >> Greg Kroah-Hartman writes: >> >> > Now queued up, I'll push out -rc2 versions with this fix. >> >> > >> >> > greg k-h >> >>=20 >> >> We have also been informed about another regression these two commits >> >> are causing: >> >>=20 >> >> https://lore.kernel.org/lkml/ace19af4-7cae-babd-bac5-cd3505dcd874@I-l= ove.SAKURA.ne.jp/ >> >>=20 >> >> I suggest to drop these two patches from this queue, and give us a >> >> week to shake out the regressions of the change, and once ready, we >> >> can include the complete set of fixes to stable (probably in a week or >> >> two). >> > >> > Ok, thanks for the information, I've now dropped them from all of the >> > queues that had them in them. >> > >> > greg k-h >>=20 >> I have now run more extensive Syzkaller testing on following patches: >>=20 >> cb626bf566eb net-sysfs: Fix reference count leak >> ddd9b5e3e765 net-sysfs: Call dev_hold always in rx_queue_add_kobject >> e0b60903b434 net-sysfs: Call dev_hold always in netdev_queue_add_kobje >> 48a322b6f996 net-sysfs: fix netdev_queue_add_kobject() breakage >> b8eb718348b8 net-sysfs: Fix reference count leak in rx|netdev_queue_add_= kobject >>=20 >> These patches are fixing couple of memory leaks including this one found >> by Syzbot: https://syzkaller.appspot.com/bug?extid=3Dad8ca40ecd77896d51e2 >>=20 >> I can reproduce these memory leaks in following stable branches: 4.14, >> 4.19, and 5.4. >>=20 >> These are all now merged into net/master tree and based on my testing >> they are ready to be taken into stable branches as well. >> > > + syzkaller list > Jouni et. al, please drop Linus in further responses; Linus, it was wrong= =20 > to add you to this thread in the first place (reason is explained below) > > Jouni, thanks for investigating. > > It raises the following questions and comments: > > - Does the memory leak NOT appear on 4.9 and earlier LTS branches (or did= =20 > you not check that)? If it does not appear, can you bisect it with the=20 > reproducer to the commit between 4.14 and 4.9? I tested and these memory leaks are not reproucible in 4.9 and earlier. > > - Do the reproducers you found with your syzkaller testing show the same= =20 > behaviour (same bisection) as the reproducers from syzbot? Yes, they are same. > > - I fear syzbot's automatic bisection on is wrong, and Linus' commit=20 > 0e034f5c4bc4 ("iwlwifi: fix mis-merge that breaks the driver") is not to= =20 > blame here; that commit did not cause the memory leak, but fixed some=20 > unrelated issue that simply confuses syzbot's automatic bisection. > > Just FYI: Dmitry Vyukov's evaluation of the syzbot bisection shows that=20 > about 50% are wrong, e.g., due to multiple bugs being triggered with one= =20 > reproducer and the difficulty of automatically identifying them of being= =20 > different due to different root causes (despite the smart heuristics of=20 > syzkaller & syzbot). So, to identify the actual commit on which the memor= y=20 > leak first appeared, you need to bisect manually with your own judgement= =20 > if the reported bug stack trace fits to the issue you investigating. Or=20 > you use syzbot's automatic bisection but then with a reduced kernel confi= g=20 > that cannot be confused by other issues. You might possibly also hit a=20 > "beginning of time" in your bisection, where KASAN was simply not=20 > supported, then the initially causing commit can simply not determined by= =20 > bisection with the reproducer and needs some code inspection and=20 > archaeology with git. Can you go ahead try to identify the correct commit= =20 > for this issue? These two commits (that are not in 4.9 and earlier) are intorducing these l= eaks: commit e331c9066901dfe40bea4647521b86e9fb9901bb Author: YueHaibing Date: Tue Mar 19 10:16:53 2019 +0800 net-sysfs: call dev_hold if kobject_init_and_add success =20=20=20=20 [ Upstream commit a3e23f719f5c4a38ffb3d30c8d7632a4ed8ccd9e ] =20=20=20=20 In netdev_queue_add_kobject and rx_queue_add_kobject, if sysfs_create_group failed, kobject_put will call netdev_queue_release to decrease dev refcont, however dev_hold has not be called. So we will see this while unregistering dev: =20=20=20=20 unregister_netdevice: waiting for bcsh0 to become free. Usage count =3D= -1 =20=20=20=20 Reported-by: Hulk Robot Fixes: d0d668371679 ("net: don't decrement kobj reference count on init= fail ure") Signed-off-by: YueHaibing Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman commit d0d6683716791b2a2761a1bb025c613eb73da6c3 Author: stephen hemminger Date: Fri Aug 18 13:46:19 2017 -0700 net: don't decrement kobj reference count on init failure =20=20=20=20 If kobject_init_and_add failed, then the failure path would decrement the reference count of the queue kobject whose reference count was already zero. =20=20=20=20 Fixes: 114cf5802165 ("bql: Byte queue limits") Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller > > > Lukas BR, Jouni H=C3=B6gander