From: Michal Kubecek <mkubecek@suse.cz>
To: netdev@vger.kernel.org
Cc: Saeed Mahameed <saeedm@mellanox.com>,
"liudongxu3@huawei.com" <liudongxu3@huawei.com>,
"eric.dumazet@gmail.com" <eric.dumazet@gmail.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net: Adding parameter detection in __ethtool_get_link_ksettings.
Date: Thu, 29 Aug 2019 08:01:38 +0200 [thread overview]
Message-ID: <20190829060138.GL29594@unicorn.suse.cz> (raw)
In-Reply-To: <0db9e18a4dd81d9a6025a2d8cda343b585d91fc4.camel@mellanox.com>
On Tue, Aug 27, 2019 at 07:01:41PM +0000, Saeed Mahameed wrote:
> On Mon, 2019-08-26 at 17:47 +0800, Dongxu Liu wrote:
>
> > Maybe "if (!dev->ethtool_ops)" is more accurate for this bug.
> >
>
> Also i am not sure about this, could be a bug in the device driver your
> enslaving.
>
> alloc_netdev_mqs will assign &default_ethtool_ops to dev->ethtool_ops ,
> if user provided setup callback didn't assign the driver specific
> ethtool_ops.
Dongxu said he encountered the null pointer dereference in a 3.10
kernel, not current mainline. But commit 2c60db037034 ("net: provide a
default dev->ethtool_ops") which introduced default_ethtool_ops came in
3.7-rc1 so 3.10 should have it already. There is indeed something wrong.
I don't think we should add either check unless we positively know that
dev->ethtool_ops can be null with current mainline kernel. And even
then, it would probably be more appropriate to fix the code which caused
it.
Michal
prev parent reply other threads:[~2019-08-29 6:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-26 7:23 [PATCH] net: Adding parameter detection in __ethtool_get_link_ksettings Dongxu Liu
2019-08-26 8:16 ` Eric Dumazet
2019-08-26 9:47 ` Dongxu Liu
2019-08-27 19:01 ` Saeed Mahameed
2019-08-29 6:01 ` Michal Kubecek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190829060138.GL29594@unicorn.suse.cz \
--to=mkubecek@suse.cz \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liudongxu3@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox