lkml.org 
[lkml]   [2015]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH linux-next 3/4] macvlan: fix possible NULL pointer dereference in macvlan_dev_get_iflink
On Tue, Apr 14, 2015 at 05:35:12PM +0200, Nicolas Dichtel wrote:
> Le 14/04/2015 17:26, Patrick McHardy a écrit :
> >On 14.04, Honggang Li wrote:
> [snip]
> >>- return vlan->lowerdev->ifindex;
> >>+ if (vlan && vlan->lowerdev)
> >>+ return vlan->lowerdev->ifindex;
> >
> >That is completely useless. vlan (=netdev_priv) can not be NULL as
> >netdev_priv() never returns NULL and vlan->lowerdev is always valid
> >because a macvlan wouldn't make much sense otherwise.
> >
> And I suspect that it is the same for ipvlan and dsa.

I agree about DSA. I don't see any way this could happen.

Andrew


\
 
 \ /
  Last update: 2015-04-14 18:21    [W:0.060 / U:5.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site