Message ID | 20200128135811.014435471@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=oJ2n=3R=vger.kernel.org=stable-owner@kernel.org> 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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 0861FC33CB2 for <stable@archiver.kernel.org>; Tue, 28 Jan 2020 14:32:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C988324686 for <stable@archiver.kernel.org>; Tue, 28 Jan 2020 14:32:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580221946; bh=ry1w5+wOxDp6nob0N2laByzLXUOzRwsg+mF825EiCfI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ydPQ1ESv80vuvVH05cXGamS1nzCgEJJPVbwMiMu9Ti5tZ4uSX0pUiyHcyopm7ZVGU rE+cXV2iDPcPFEkJp41ui1UBo+CS8/SvBnkrIV9FrtTqO/L0jxI4SwBxBIWsp83Exh bDUOMhdZ1WParuxpUx2Nn40HFbipyB1qPn3LzJYM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732698AbgA1O0j (ORCPT <rfc822;stable@archiver.kernel.org>); Tue, 28 Jan 2020 09:26:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:54128 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733200AbgA1O0i (ORCPT <rfc822;stable@vger.kernel.org>); Tue, 28 Jan 2020 09:26:38 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6FC9224686; Tue, 28 Jan 2020 14:26:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580221597; bh=ry1w5+wOxDp6nob0N2laByzLXUOzRwsg+mF825EiCfI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wcAgr5/CKIOBpx7IdqCW8IxQLpQji8BlL4X/dBYys79qDymIBg9loNR9lXGYium8I U1dwLZWul6G88juZBOd3XdYN+VYtRuEAdMHHGAILSePzopRDTBlCmkyp8ibJQK8CI2 C7NNjO1kRSyrhkjsoLnTjESPPr9SOdrmFgmYmK1w= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Hulk Robot <hulkci@huawei.com>, Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>, David Miller <davem@davemloft.net>, Lukas Bulwahn <lukas.bulwahn@gmail.com> Subject: [PATCH 4.19 14/92] net-sysfs: Call dev_hold always in netdev_queue_add_kobject Date: Tue, 28 Jan 2020 15:07:42 +0100 Message-Id: <20200128135811.014435471@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200128135809.344954797@linuxfoundation.org> References: <20200128135809.344954797@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -1469,14 +1469,17 @@ static int netdev_queue_add_kobject(stru struct kobject *kobj = &queue->kobj; int error = 0; + /* Kobject_put later will trigger netdev_queue_release call + * which decreases dev refcount: Take that reference here + */ + dev_hold(queue->dev); + kobj->kset = dev->queues_kset; error = kobject_init_and_add(kobj, &netdev_queue_ktype, NULL, "tx-%u", index); if (error) goto err; - dev_hold(queue->dev); - #ifdef CONFIG_BQL error = sysfs_create_group(kobj, &dql_group); if (error)