All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: [PATCHv1] RDMA/core: Check error status of rdma_find_ndev_for_src_ip_rcu
       [not found] <1537542022-4451-1-git-send-email-parav@mellanox.com>
@ 2018-10-04  2:28 ` Parav Pandit
  2018-10-04  2:48   ` Jason Gunthorpe
  0 siblings, 1 reply; 3+ messages in thread
From: Parav Pandit @ 2018-10-04  2:28 UTC (permalink / raw)
  To: Parav Pandit, linux-rdma@vger.kernel.org,
	linux-kernel@vger.kernel.org, leon@kernel.org, jgg@ziepe.ca,
	syzkaller-bugs@googlegroups.com, Daniel Jurgens,
	dledford@redhat.com

Hi Doug, Jason,

> -----Original Message-----
> From: Parav Pandit <parav@mellanox.com>
> Sent: Friday, September 21, 2018 10:00 AM
> To: linux-rdma@vger.kernel.org; linux-kernel@vger.kernel.org;
> leon@kernel.org; jgg@ziepe.ca; syzkaller-bugs@googlegroups.com; Daniel
> Jurgens <danielj@mellanox.com>; dledford@redhat.com
> Cc: Parav Pandit <parav@mellanox.com>
> Subject: [PATCHv1] RDMA/core: Check error status of
> rdma_find_ndev_for_src_ip_rcu
> 
> rdma_find_ndev_for_src_ip_rcu() returns either valid netdev pointer or
> ERR_PTR().
> Instead of checking for NULL, check for error.
> 
> Fixes: caf1e3ae9fa6 ("RDMA/core Introduce and use
> rdma_find_ndev_for_src_ip_rcu")
> Reported-by: syzbot+20c32fa6ff84a2d28c36@syzkaller.appspotmail.com
> Signed-off-by: Parav Pandit <parav@mellanox.com>
> ---
>  drivers/infiniband/core/addr.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c
> index c2ca9e4..3c07eeb 100644
> --- a/drivers/infiniband/core/addr.c
> +++ b/drivers/infiniband/core/addr.c
> @@ -513,8 +513,8 @@ static int rdma_set_src_addr_rcu(struct
> rdma_dev_addr *dev_addr,
>  		 * loopback IP address.
>  		 */
>  		ndev = rdma_find_ndev_for_src_ip_rcu(dev_net(ndev),
> dst_in);
> -		if (!ndev)
> -			return -ENODEV;
> +		if (IS_ERR(ndev))
> +			return PTR_ERR(ndev);
>  	}
> 
>  	return copy_src_l2_addr(dev_addr, dst_in, dst, ndev);
> --
> 1.8.3.1

Can you please review this fix?
I got below report from syzbot that it tested the patch and reproducer didn't trigger.

Report:

syzbot has tested the proposed patch and the reproducer did not trigger  
crash:

Reported-and-tested-by:  
syzbot+20c32fa6ff84a2d28c36@syzkaller.appspotmail.com

Tested on:

commit:         41ab1cb7d1cd RDMA/cma: Introduce and use cma_ib_acquire_de..
git tree:       git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git  
for-next
kernel config:  https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsyzkaller.appspot.com%2Fx%2F.config%3Fx%3D112cc1aec8b19ba4&amp;data=02%7C01%7Cparav%40mellanox.com%7Ce0a5662bb6aa4fdee43508d6298c9e60%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636742081267605003&amp;sdata=XiJ9F0gNuDvCWt0m2qzS6SbocXbFXIdWEHe%2BaJuvvcM%3D&amp;reserved=0
compiler:       gcc (GCC) 8.0.1 20180413 (experimental)
patch:          https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsyzkaller.appspot.com%2Fx%2Fpatch.diff%3Fx%3D10558231400000&amp;data=02%7C01%7Cparav%40mellanox.com%7Ce0a5662bb6aa4fdee43508d6298c9e60%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636742081267605003&amp;sdata=da0p6AW3YnXmFVrSaR%2FxSrB%2Bj%2Bml%2B5AXx%2B%2FKG4Kjb1M%3D&amp;reserved=0

Note: testing is done by a robot and is best-effort only.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCHv1] RDMA/core: Check error status of rdma_find_ndev_for_src_ip_rcu
  2018-10-04  2:28 ` [PATCHv1] RDMA/core: Check error status of rdma_find_ndev_for_src_ip_rcu Parav Pandit
@ 2018-10-04  2:48   ` Jason Gunthorpe
  2018-10-04  3:34     ` Parav Pandit
  0 siblings, 1 reply; 3+ messages in thread
From: Jason Gunthorpe @ 2018-10-04  2:48 UTC (permalink / raw)
  To: Parav Pandit
  Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
	leon@kernel.org, Daniel Jurgens, dledford@redhat.com

On Thu, Oct 04, 2018 at 02:28:54AM +0000, Parav Pandit wrote:
> Hi Doug, Jason,
> 
> > From: Parav Pandit <parav@mellanox.com>
> > Sent: Friday, September 21, 2018 10:00 AM
> > To: linux-rdma@vger.kernel.org; linux-kernel@vger.kernel.org;
> > leon@kernel.org; jgg@ziepe.ca; syzkaller-bugs@googlegroups.com; Daniel
> > Jurgens <danielj@mellanox.com>; dledford@redhat.com
> > Cc: Parav Pandit <parav@mellanox.com>
> > Subject: [PATCHv1] RDMA/core: Check error status of
> > rdma_find_ndev_for_src_ip_rcu
> > 
> > rdma_find_ndev_for_src_ip_rcu() returns either valid netdev pointer or
> > ERR_PTR().
> > Instead of checking for NULL, check for error.
> > 
> > Fixes: caf1e3ae9fa6 ("RDMA/core Introduce and use
> > rdma_find_ndev_for_src_ip_rcu")
> > Reported-by: syzbot+20c32fa6ff84a2d28c36@syzkaller.appspotmail.com
> > Signed-off-by: Parav Pandit <parav@mellanox.com>
> >  drivers/infiniband/core/addr.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c
> > index c2ca9e4..3c07eeb 100644
> > +++ b/drivers/infiniband/core/addr.c
> > @@ -513,8 +513,8 @@ static int rdma_set_src_addr_rcu(struct
> > rdma_dev_addr *dev_addr,
> >  		 * loopback IP address.
> >  		 */
> >  		ndev = rdma_find_ndev_for_src_ip_rcu(dev_net(ndev),
> > dst_in);
> > -		if (!ndev)
> > -			return -ENODEV;
> > +		if (IS_ERR(ndev))
> > +			return PTR_ERR(ndev);
> >  	}
> > 
> >  	return copy_src_l2_addr(dev_addr, dst_in, dst, ndev);
> 
> Can you please review this fix?  I got below report from syzbot that
> it tested the patch and reproducer didn't trigger.

It is very strange, but this patch does not show up in rdma's patch
works.

This happened to Dennis as well for one patch, I'm afraid as a general
rule, people will need to check that patchworks has thier patches, and
maybe talk to LF IT about why things have gone missing. 

I would guess it is some spam filter issue?

I have applied this patch from my email.

Jason

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCHv1] RDMA/core: Check error status of rdma_find_ndev_for_src_ip_rcu
  2018-10-04  2:48   ` Jason Gunthorpe
@ 2018-10-04  3:34     ` Parav Pandit
  0 siblings, 0 replies; 3+ messages in thread
From: Parav Pandit @ 2018-10-04  3:34 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
	leon@kernel.org, Daniel Jurgens, dledford@redhat.com



> -----Original Message-----
> From: linux-rdma-owner@vger.kernel.org <linux-rdma-
> owner@vger.kernel.org> On Behalf Of Jason Gunthorpe
> Sent: Wednesday, October 3, 2018 9:48 PM
> To: Parav Pandit <parav@mellanox.com>
> Cc: linux-rdma@vger.kernel.org; linux-kernel@vger.kernel.org;
> leon@kernel.org; Daniel Jurgens <danielj@mellanox.com>;
> dledford@redhat.com
> Subject: Re: [PATCHv1] RDMA/core: Check error status of
> rdma_find_ndev_for_src_ip_rcu
> 
> On Thu, Oct 04, 2018 at 02:28:54AM +0000, Parav Pandit wrote:
> > Hi Doug, Jason,
> >
> > > From: Parav Pandit <parav@mellanox.com>
> > > Sent: Friday, September 21, 2018 10:00 AM
> > > To: linux-rdma@vger.kernel.org; linux-kernel@vger.kernel.org;
> > > leon@kernel.org; jgg@ziepe.ca; syzkaller-bugs@googlegroups.com;
> > > Daniel Jurgens <danielj@mellanox.com>; dledford@redhat.com
> > > Cc: Parav Pandit <parav@mellanox.com>
> > > Subject: [PATCHv1] RDMA/core: Check error status of
> > > rdma_find_ndev_for_src_ip_rcu
> > >
> > > rdma_find_ndev_for_src_ip_rcu() returns either valid netdev pointer
> > > or ERR_PTR().
> > > Instead of checking for NULL, check for error.
> > >
> > > Fixes: caf1e3ae9fa6 ("RDMA/core Introduce and use
> > > rdma_find_ndev_for_src_ip_rcu")
> > > Reported-by: syzbot+20c32fa6ff84a2d28c36@syzkaller.appspotmail.com
> > > Signed-off-by: Parav Pandit <parav@mellanox.com>
> > > drivers/infiniband/core/addr.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/infiniband/core/addr.c
> > > b/drivers/infiniband/core/addr.c index c2ca9e4..3c07eeb 100644
> > > +++ b/drivers/infiniband/core/addr.c
> > > @@ -513,8 +513,8 @@ static int rdma_set_src_addr_rcu(struct
> > > rdma_dev_addr *dev_addr,
> > >  		 * loopback IP address.
> > >  		 */
> > >  		ndev = rdma_find_ndev_for_src_ip_rcu(dev_net(ndev),
> > > dst_in);
> > > -		if (!ndev)
> > > -			return -ENODEV;
> > > +		if (IS_ERR(ndev))
> > > +			return PTR_ERR(ndev);
> > >  	}
> > >
> > >  	return copy_src_l2_addr(dev_addr, dst_in, dst, ndev);
> >
> > Can you please review this fix?  I got below report from syzbot that
> > it tested the patch and reproducer didn't trigger.
> 
> It is very strange, but this patch does not show up in rdma's patch works.
> 
> This happened to Dennis as well for one patch, I'm afraid as a general rule,
> people will need to check that patchworks has thier patches, and maybe talk
> to LF IT about why things have gone missing.
> 
> I would guess it is some spam filter issue?
Not sure, may be something wrong in my mail client configuration.
Most patches are through Leon so I will continue it that way for now.

> 
> I have applied this patch from my email.
Thanks a lot.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-04  3:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1537542022-4451-1-git-send-email-parav@mellanox.com>
2018-10-04  2:28 ` [PATCHv1] RDMA/core: Check error status of rdma_find_ndev_for_src_ip_rcu Parav Pandit
2018-10-04  2:48   ` Jason Gunthorpe
2018-10-04  3:34     ` Parav Pandit

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.