[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1365434194.3887.13.camel@edumazet-glaptop>
Date: Mon, 08 Apr 2013 08:16:34 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: dingtianhong <dingtianhong@...wei.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Alexander Duyck <alexander.h.duyck@...el.com>,
Netdev <netdev@...r.kernel.org>, Li Zefan <lizefan@...wei.com>,
Xinwei Hu <huxinwei@...wei.com>
Subject: Re: [PATCH] net: add checks if dev->netdev_ops is NULL in
register_netdevice()
On Mon, 2013-04-08 at 17:43 +0800, dingtianhong wrote:
> In some cases netdev->netdev_ops could be NULL in the register_netdevice(),
> thus a NULL point deference happens and lead to oops:
> /* Init, if this function is available */
> - if (dev->netdev_ops->ndo_init) {
> + if (dev->netdev_ops && dev->netdev_ops->ndo_init) {
> ret = dev->netdev_ops->ndo_init(dev);
> if (ret) {
> if (ret > 0)
> -- 1.8.0
>
Seriously ?
This patch is not needed, and not complete anyway.
Fix the driver instead, we don't want this to happen.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists