Re: [PATCH linux-next 1/4] infiniband/ipoib: fix possible NULL pointer dereference in ipoib_get_iflink

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le 14/04/2015 18:30, Erez Shitrit a écrit :
On Tue, Apr 14, 2015 at 6:20 PM, Honggang Li <honli@xxxxxxxxxx> wrote:
[snip]
This will make parent interface to return 0 instead of its own ifindex.
I would suggest write something like that:

+       /* parent interface */
+       if (!test_bit(IPOIB_FLAG_SUBINTERFACE, &priv->flags))
+               return dev->ifindex;
+
+       /* child/vlan interface */
+       if (!priv->parent)
+               return -1;
'return 0' here.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux