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

2015-04-16 Thread Erez Shitrit
On Wed, Apr 15, 2015 at 7:06 PM, Jason Gunthorpe wrote: > On Wed, Apr 15, 2015 at 09:17:14AM +0300, Erez Shitrit wrote: >> >>+ /* parent interface */ >> >>+ if (!test_bit(IPOIB_FLAG_SUBINTERFACE, >flags)) >> >>+ return dev->ifindex; >> >>+ >> >>+ /* child/vlan

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

2015-04-16 Thread Erez Shitrit
On Wed, Apr 15, 2015 at 7:06 PM, Jason Gunthorpe jguntho...@obsidianresearch.com wrote: On Wed, Apr 15, 2015 at 09:17:14AM +0300, Erez Shitrit wrote: + /* parent interface */ + if (!test_bit(IPOIB_FLAG_SUBINTERFACE, priv-flags)) + return dev-ifindex; + + /*

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

2015-04-15 Thread Jason Gunthorpe
On Wed, Apr 15, 2015 at 09:17:14AM +0300, Erez Shitrit wrote: > >>+ /* parent interface */ > >>+ if (!test_bit(IPOIB_FLAG_SUBINTERFACE, >flags)) > >>+ return dev->ifindex; > >>+ > >>+ /* child/vlan interface */ > >>+ if (!priv->parent) > >>+

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

2015-04-15 Thread Honggang LI
On Tue, Apr 14, 2015 at 07:30:03PM +0300, Erez Shitrit wrote: > > @@ -846,7 +846,10 @@ static int ipoib_get_iflink(const struct net_device > > *dev) > > { > > struct ipoib_dev_priv *priv = netdev_priv(dev); > > > > - return priv->parent->ifindex; > > + if (priv &&

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

2015-04-15 Thread Honggang LI
There was network accident in the office. I can't find this email in public mailing list. So, I reset it. If you had recived this, please ignore it. thanks On Wed, Apr 15, 2015 at 01:16:40PM +0800, Honggang LI wrote: > On Tue, Apr 14, 2015 at 07:30:03PM +0300, Erez Shitrit wrote: > > > @@

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

2015-04-15 Thread Erez Shitrit
On 4/14/2015 11:41 PM, Jason Gunthorpe wrote: On Tue, Apr 14, 2015 at 07:30:03PM +0300, Erez Shitrit wrote: diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 657b89b..11ea6e2 100644 +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@

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

2015-04-15 Thread Jason Gunthorpe
On Wed, Apr 15, 2015 at 09:17:14AM +0300, Erez Shitrit wrote: + /* parent interface */ + if (!test_bit(IPOIB_FLAG_SUBINTERFACE, priv-flags)) + return dev-ifindex; + + /* child/vlan interface */ + if (!priv-parent) + return -1; Like was

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

2015-04-15 Thread Honggang LI
There was network accident in the office. I can't find this email in public mailing list. So, I reset it. If you had recived this, please ignore it. thanks On Wed, Apr 15, 2015 at 01:16:40PM +0800, Honggang LI wrote: On Tue, Apr 14, 2015 at 07:30:03PM +0300, Erez Shitrit wrote: @@ -846,7

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

2015-04-15 Thread Erez Shitrit
On 4/14/2015 11:41 PM, Jason Gunthorpe wrote: On Tue, Apr 14, 2015 at 07:30:03PM +0300, Erez Shitrit wrote: diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 657b89b..11ea6e2 100644 +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@

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

2015-04-15 Thread Honggang LI
On Tue, Apr 14, 2015 at 07:30:03PM +0300, Erez Shitrit wrote: @@ -846,7 +846,10 @@ static int ipoib_get_iflink(const struct net_device *dev) { struct ipoib_dev_priv *priv = netdev_priv(dev); - return priv-parent-ifindex; + if (priv priv-parent) +

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

2015-04-14 Thread Or Gerlitz
On 4/14/2015 11:41 PM, Jason Gunthorpe wrote: Erez, you basically rewrote this, please make a proper patch with the Fixes and Reported-By credit for Honggang. Lets merge this through Dave M's tree right away. Agree, Erez, add proper Fixes: XXX note and send a patch to netdev against

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

2015-04-14 Thread Jason Gunthorpe
On Tue, Apr 14, 2015 at 07:30:03PM +0300, Erez Shitrit wrote: > > diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c > > b/drivers/infiniband/ulp/ipoib/ipoib_main.c > > index 657b89b..11ea6e2 100644 > > +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c > > @@ -846,7 +846,10 @@ static int

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

2015-04-14 Thread Nicolas Dichtel
Le 14/04/2015 18:30, Erez Shitrit a écrit : On Tue, Apr 14, 2015 at 6:20 PM, Honggang Li 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

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

2015-04-14 Thread Nicolas Dichtel
Le 14/04/2015 18:01, Yann Droneaud a écrit : [snip] Here is the tag: Fixes: 5aa7add8f14b ("infiniband/ipoib: implement ndo_get_iflink") Pardon me, but this patch was never submitted to linux-r...@vger.kernel.org for review !? Sorry for that, I missed it. Only Roland Dreier was CCed. -- To

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

2015-04-14 Thread Erez Shitrit
On Tue, Apr 14, 2015 at 6:20 PM, Honggang Li wrote: > [...] Hi, > diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c > b/drivers/infiniband/ulp/ipoib/ipoib_main.c > index 657b89b..11ea6e2 100644 > --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c > +++

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

2015-04-14 Thread Eric Dumazet
On Tue, 2015-04-14 at 23:53 +0800, Honggang LI wrote: > On Tue, Apr 14, 2015 at 05:49:55PM +0200, Nicolas Dichtel wrote: > > Le 14/04/2015 17:44, Honggang LI a écrit : > > >On Tue, Apr 14, 2015 at 08:34:33AM -0700, Eric Dumazet wrote: > > >>On Tue, 2015-04-14 at 23:20 +0800, Honggang Li wrote: > >

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

2015-04-14 Thread Yann Droneaud
Hi Nicolas, Le mardi 14 avril 2015 à 17:49 +0200, Nicolas Dichtel a écrit : > Le 14/04/2015 17:44, Honggang LI a écrit : > > On Tue, Apr 14, 2015 at 08:34:33AM -0700, Eric Dumazet wrote: > >> On Tue, 2015-04-14 at 23:20 +0800, Honggang Li wrote: > >>> Starting monitoring for VG vg_rdma01: 3

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

2015-04-14 Thread Honggang LI
On Tue, Apr 14, 2015 at 05:49:55PM +0200, Nicolas Dichtel wrote: > Le 14/04/2015 17:44, Honggang LI a écrit : > >On Tue, Apr 14, 2015 at 08:34:33AM -0700, Eric Dumazet wrote: > >>On Tue, 2015-04-14 at 23:20 +0800, Honggang Li wrote: > >>>Starting monitoring for VG vg_rdma01: 3 logical volume(s)

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

2015-04-14 Thread Nicolas Dichtel
Le 14/04/2015 17:44, Honggang LI a écrit : On Tue, Apr 14, 2015 at 08:34:33AM -0700, Eric Dumazet wrote: On Tue, 2015-04-14 at 23:20 +0800, Honggang Li wrote: Starting monitoring for VG vg_rdma01: 3 logical volume(s) in volume group "vg_rdma01" monitored [ OK ] CR2: 0120

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

2015-04-14 Thread Honggang LI
On Tue, Apr 14, 2015 at 08:34:33AM -0700, Eric Dumazet wrote: > On Tue, 2015-04-14 at 23:20 +0800, Honggang Li wrote: > > Starting monitoring for VG vg_rdma01: 3 logical volume(s) in volume > > group "vg_rdma01" monitored > > [ OK ] > > > > CR2: 0120 > > ---[ end trace

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

2015-04-14 Thread Eric Dumazet
On Tue, 2015-04-14 at 23:20 +0800, Honggang Li wrote: > Starting monitoring for VG vg_rdma01: 3 logical volume(s) in volume > group "vg_rdma01" monitored > [ OK ] > CR2: 0120 > ---[ end trace a8610f6e9640eb85 ]--- > > Signed-off-by: Honggang Li When was this bug added ?

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

2015-04-14 Thread Honggang Li
Starting monitoring for VG vg_rdma01: 3 logical volume(s) in volume group "vg_rdma01" monitored [ OK ] Starting cgconfig service: Failed to parse /etc/cgconfig.conf or /etc/cgconfig.d[FAILED] Loading OpenIB kernel modules: BUG: unable to handle kernel NULL pointer dereference at

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

2015-04-14 Thread Erez Shitrit
On Tue, Apr 14, 2015 at 6:20 PM, Honggang Li ho...@redhat.com wrote: [...] Hi, diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 657b89b..11ea6e2 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++

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

2015-04-14 Thread Nicolas Dichtel
Le 14/04/2015 18:01, Yann Droneaud a écrit : [snip] Here is the tag: Fixes: 5aa7add8f14b (infiniband/ipoib: implement ndo_get_iflink) Pardon me, but this patch was never submitted to linux-r...@vger.kernel.org for review !? Sorry for that, I missed it. Only Roland Dreier was CCed. -- To

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

2015-04-14 Thread Nicolas Dichtel
Le 14/04/2015 18:30, Erez Shitrit a écrit : On Tue, Apr 14, 2015 at 6:20 PM, Honggang Li ho...@redhat.com 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

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

2015-04-14 Thread Yann Droneaud
Hi Nicolas, Le mardi 14 avril 2015 à 17:49 +0200, Nicolas Dichtel a écrit : Le 14/04/2015 17:44, Honggang LI a écrit : On Tue, Apr 14, 2015 at 08:34:33AM -0700, Eric Dumazet wrote: On Tue, 2015-04-14 at 23:20 +0800, Honggang Li wrote: Starting monitoring for VG vg_rdma01: 3 logical

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

2015-04-14 Thread Eric Dumazet
On Tue, 2015-04-14 at 23:20 +0800, Honggang Li wrote: Starting monitoring for VG vg_rdma01: 3 logical volume(s) in volume group vg_rdma01 monitored [ OK ] CR2: 0120 ---[ end trace a8610f6e9640eb85 ]--- Signed-off-by: Honggang Li ho...@redhat.com When was this bug added ?

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

2015-04-14 Thread Honggang LI
On Tue, Apr 14, 2015 at 08:34:33AM -0700, Eric Dumazet wrote: On Tue, 2015-04-14 at 23:20 +0800, Honggang Li wrote: Starting monitoring for VG vg_rdma01: 3 logical volume(s) in volume group vg_rdma01 monitored [ OK ] CR2: 0120 ---[ end trace a8610f6e9640eb85 ]---

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

2015-04-14 Thread Honggang LI
On Tue, Apr 14, 2015 at 05:49:55PM +0200, Nicolas Dichtel wrote: Le 14/04/2015 17:44, Honggang LI a écrit : On Tue, Apr 14, 2015 at 08:34:33AM -0700, Eric Dumazet wrote: On Tue, 2015-04-14 at 23:20 +0800, Honggang Li wrote: Starting monitoring for VG vg_rdma01: 3 logical volume(s) in volume

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

2015-04-14 Thread Nicolas Dichtel
Le 14/04/2015 17:44, Honggang LI a écrit : On Tue, Apr 14, 2015 at 08:34:33AM -0700, Eric Dumazet wrote: On Tue, 2015-04-14 at 23:20 +0800, Honggang Li wrote: Starting monitoring for VG vg_rdma01: 3 logical volume(s) in volume group vg_rdma01 monitored [ OK ] CR2: 0120 ---[

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

2015-04-14 Thread Eric Dumazet
On Tue, 2015-04-14 at 23:53 +0800, Honggang LI wrote: On Tue, Apr 14, 2015 at 05:49:55PM +0200, Nicolas Dichtel wrote: Le 14/04/2015 17:44, Honggang LI a écrit : On Tue, Apr 14, 2015 at 08:34:33AM -0700, Eric Dumazet wrote: On Tue, 2015-04-14 at 23:20 +0800, Honggang Li wrote: Starting

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

2015-04-14 Thread Honggang Li
Starting monitoring for VG vg_rdma01: 3 logical volume(s) in volume group vg_rdma01 monitored [ OK ] Starting cgconfig service: Failed to parse /etc/cgconfig.conf or /etc/cgconfig.d[FAILED] Loading OpenIB kernel modules: BUG: unable to handle kernel NULL pointer dereference at 0120

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

2015-04-14 Thread Or Gerlitz
On 4/14/2015 11:41 PM, Jason Gunthorpe wrote: Erez, you basically rewrote this, please make a proper patch with the Fixes and Reported-By credit for Honggang. Lets merge this through Dave M's tree right away. Agree, Erez, add proper Fixes: XXX note and send a patch to netdev against

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

2015-04-14 Thread Jason Gunthorpe
On Tue, Apr 14, 2015 at 07:30:03PM +0300, Erez Shitrit wrote: diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 657b89b..11ea6e2 100644 +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -846,7 +846,10 @@ static int