Re: [PATCH] infiniband: fix a subtle race condition

2018-06-14 Thread Leon Romanovsky
On Wed, Jun 13, 2018 at 11:21:54PM -0700, Cong Wang wrote: > On Wed, Jun 13, 2018 at 10:34 PM, Leon Romanovsky wrote: > > > > Hi Cong, > > > > If the compiler optimizes the first line (mutex_lock) as you wrote, > > it will reuse "f" for the seco

Re: [PATCH] infiniband: fix a subtle race condition

2018-06-14 Thread Leon Romanovsky
On Wed, Jun 13, 2018 at 11:21:54PM -0700, Cong Wang wrote: > On Wed, Jun 13, 2018 at 10:34 PM, Leon Romanovsky wrote: > > > > Hi Cong, > > > > If the compiler optimizes the first line (mutex_lock) as you wrote, > > it will reuse "f" for the seco

Re: [PATCH] infiniband: fix a subtle race condition

2018-06-14 Thread Leon Romanovsky
On Wed, Jun 13, 2018 at 04:49:47PM -0700, Cong Wang wrote: > In ucma_event_handler() we lock the mutex like this: > > mutex_lock(>file->mut); > ... > mutex_unlock(>file->mut); > > which seems correct, but we could translate it into this: > > f = ctx->file; > mutex_lock(>mut); > ... > f =

Re: [PATCH] infiniband: fix a subtle race condition

2018-06-14 Thread Leon Romanovsky
On Wed, Jun 13, 2018 at 04:49:47PM -0700, Cong Wang wrote: > In ucma_event_handler() we lock the mutex like this: > > mutex_lock(>file->mut); > ... > mutex_unlock(>file->mut); > > which seems correct, but we could translate it into this: > > f = ctx->file; > mutex_lock(>mut); > ... > f =

Re: [PATCH 2/2] IB/mad: Use IDR for agent IDs

2018-06-13 Thread Leon Romanovsky
On Tue, Jun 12, 2018 at 05:07:39PM -0700, Matthew Wilcox wrote: > On Tue, Jun 12, 2018 at 02:33:22PM -0600, Jason Gunthorpe wrote: > > > @@ -377,13 +378,24 @@ struct ib_mad_agent *ib_register_mad_agent(struct > > > ib_device *device, > > > goto error4; > > > } > > > > > > -

Re: [PATCH 2/2] IB/mad: Use IDR for agent IDs

2018-06-13 Thread Leon Romanovsky
On Tue, Jun 12, 2018 at 05:07:39PM -0700, Matthew Wilcox wrote: > On Tue, Jun 12, 2018 at 02:33:22PM -0600, Jason Gunthorpe wrote: > > > @@ -377,13 +378,24 @@ struct ib_mad_agent *ib_register_mad_agent(struct > > > ib_device *device, > > > goto error4; > > > } > > > > > > -

Re: [PATCH 2/2] IB/mad: Use IDR for agent IDs

2018-06-10 Thread Leon Romanovsky
On Sun, Jun 10, 2018 at 02:30:27PM -0600, Jason Gunthorpe wrote: > On Sun, Jun 10, 2018 at 03:25:05PM +0300, Leon Romanovsky wrote: > > On Sun, Jun 10, 2018 at 03:43:05AM -0700, Matthew Wilcox wrote: > > > On Sun, Jun 10, 2018 at 09:30:28AM +0300, Leon Romanovsky wrote: &g

Re: [PATCH 2/2] IB/mad: Use IDR for agent IDs

2018-06-10 Thread Leon Romanovsky
On Sun, Jun 10, 2018 at 02:30:27PM -0600, Jason Gunthorpe wrote: > On Sun, Jun 10, 2018 at 03:25:05PM +0300, Leon Romanovsky wrote: > > On Sun, Jun 10, 2018 at 03:43:05AM -0700, Matthew Wilcox wrote: > > > On Sun, Jun 10, 2018 at 09:30:28AM +0300, Leon Romanovsky wrote: &g

Re: [PATCH 2/2] IB/mad: Use IDR for agent IDs

2018-06-10 Thread Leon Romanovsky
On Sun, Jun 10, 2018 at 03:43:05AM -0700, Matthew Wilcox wrote: > On Sun, Jun 10, 2018 at 09:30:28AM +0300, Leon Romanovsky wrote: > > 1. IBTA spec doesn't talk at all about the size of TransactionID, more > > on that in section "13.4.6.4 TRANSACTION ID USAGE", t

Re: [PATCH 2/2] IB/mad: Use IDR for agent IDs

2018-06-10 Thread Leon Romanovsky
On Sun, Jun 10, 2018 at 03:43:05AM -0700, Matthew Wilcox wrote: > On Sun, Jun 10, 2018 at 09:30:28AM +0300, Leon Romanovsky wrote: > > 1. IBTA spec doesn't talk at all about the size of TransactionID, more > > on that in section "13.4.6.4 TRANSACTION ID USAGE", t

Re: [PATCH 2/2] IB/mad: Use IDR for agent IDs

2018-06-10 Thread Leon Romanovsky
On Fri, Jun 08, 2018 at 10:42:18AM -0700, Matthew Wilcox wrote: > From: Matthew Wilcox > > Allocate agent IDs from a global IDR instead of an atomic variable. > This eliminates the possibility of reusing an ID which is already in > use after 4 billion registrations, and we can also limit the

Re: [PATCH 2/2] IB/mad: Use IDR for agent IDs

2018-06-10 Thread Leon Romanovsky
On Fri, Jun 08, 2018 at 10:42:18AM -0700, Matthew Wilcox wrote: > From: Matthew Wilcox > > Allocate agent IDs from a global IDR instead of an atomic variable. > This eliminates the possibility of reusing an ID which is already in > use after 4 billion registrations, and we can also limit the

Re: [PATCH] IB/mad: Use ID allocator routines to allocate agent number

2018-05-29 Thread Leon Romanovsky
On Tue, May 29, 2018 at 11:54:59AM +0300, Leon Romanovsky wrote: > On Tue, May 29, 2018 at 09:38:08AM +0200, Hans Westgaard Ry wrote: > > The agent TID is a 64 bit value split in two dwords. The least > > significant dword is the TID running counter. The most significant > &g

Re: [PATCH] IB/mad: Use ID allocator routines to allocate agent number

2018-05-29 Thread Leon Romanovsky
On Tue, May 29, 2018 at 11:54:59AM +0300, Leon Romanovsky wrote: > On Tue, May 29, 2018 at 09:38:08AM +0200, Hans Westgaard Ry wrote: > > The agent TID is a 64 bit value split in two dwords. The least > > significant dword is the TID running counter. The most significant > &g

Re: [PATCH] IB/mad: Use ID allocator routines to allocate agent number

2018-05-29 Thread Leon Romanovsky
On Tue, May 29, 2018 at 09:38:08AM +0200, Hans Westgaard Ry wrote: > The agent TID is a 64 bit value split in two dwords. The least > significant dword is the TID running counter. The most significant > dword is the agent number. In the CX-3 shared port model, the mlx4 > driver uses the most

Re: [PATCH] IB/mad: Use ID allocator routines to allocate agent number

2018-05-29 Thread Leon Romanovsky
On Tue, May 29, 2018 at 09:38:08AM +0200, Hans Westgaard Ry wrote: > The agent TID is a 64 bit value split in two dwords. The least > significant dword is the TID running counter. The most significant > dword is the agent number. In the CX-3 shared port model, the mlx4 > driver uses the most

Re: [PATCH V3 rdma-next 3/4] RDMA/uverbs: Hoist the common process of disassociate_ucontext into ib core

2018-05-27 Thread Leon Romanovsky
ct. > + */ > + if (owning_process) > + put_task_struct(owning_process); > + return; > + } > + } > + } > + > + /* need to protect from a ra

Re: [PATCH V3 rdma-next 3/4] RDMA/uverbs: Hoist the common process of disassociate_ucontext into ib core

2018-05-27 Thread Leon Romanovsky
t; + */ > + if (owning_process) > + put_task_struct(owning_process); > + return; > + } > + } > + } > + > + /* need to protect from a race on closing the vma as par

Re: [PATCH] IB: Revert "remove redundant INFINIBAND kconfig dependencies"

2018-05-25 Thread Leon Romanovsky
On Fri, May 25, 2018 at 11:29:59PM +0200, Arnd Bergmann wrote: > Several subsystems depend on INFINIBAND_ADDR_TRANS, which in turn depends > on INFINIBAND. However, when with CONFIG_INIFIBAND=m, this leads to a > link error when another driver using it is built-in. The > INFINIBAND_ADDR_TRANS

Re: [PATCH] IB: Revert "remove redundant INFINIBAND kconfig dependencies"

2018-05-25 Thread Leon Romanovsky
On Fri, May 25, 2018 at 11:29:59PM +0200, Arnd Bergmann wrote: > Several subsystems depend on INFINIBAND_ADDR_TRANS, which in turn depends > on INFINIBAND. However, when with CONFIG_INIFIBAND=m, this leads to a > link error when another driver using it is built-in. The > INFINIBAND_ADDR_TRANS

Re: [PATCH rdma-next 2/5] RDMA/hns: Modify uar allocation algorithm to avoid bitmap exhaust

2018-05-23 Thread Leon Romanovsky
On Wed, May 23, 2018 at 03:12:45PM +0800, Wei Hu (Xavier) wrote: > > > On 2018/5/23 15:00, Leon Romanovsky wrote: > > On Wed, May 23, 2018 at 02:49:35PM +0800, Wei Hu (Xavier) wrote: > >> > >> On 2018/5/23 14:05, Leon Romanovsky wrote: > >>> On Thu, May

Re: [PATCH rdma-next 2/5] RDMA/hns: Modify uar allocation algorithm to avoid bitmap exhaust

2018-05-23 Thread Leon Romanovsky
On Wed, May 23, 2018 at 03:12:45PM +0800, Wei Hu (Xavier) wrote: > > > On 2018/5/23 15:00, Leon Romanovsky wrote: > > On Wed, May 23, 2018 at 02:49:35PM +0800, Wei Hu (Xavier) wrote: > >> > >> On 2018/5/23 14:05, Leon Romanovsky wrote: > >>> On Thu, May

Re: [PATCH rdma-next 2/5] RDMA/hns: Modify uar allocation algorithm to avoid bitmap exhaust

2018-05-23 Thread Leon Romanovsky
On Wed, May 23, 2018 at 02:49:35PM +0800, Wei Hu (Xavier) wrote: > > > On 2018/5/23 14:05, Leon Romanovsky wrote: > > On Thu, May 17, 2018 at 04:02:50PM +0800, Wei Hu (Xavier) wrote: > >> This patch modified uar allocation algorithm in hns_roce_uar_alloc > >>

Re: [PATCH rdma-next 2/5] RDMA/hns: Modify uar allocation algorithm to avoid bitmap exhaust

2018-05-23 Thread Leon Romanovsky
On Wed, May 23, 2018 at 02:49:35PM +0800, Wei Hu (Xavier) wrote: > > > On 2018/5/23 14:05, Leon Romanovsky wrote: > > On Thu, May 17, 2018 at 04:02:50PM +0800, Wei Hu (Xavier) wrote: > >> This patch modified uar allocation algorithm in hns_roce_uar_alloc > >>

Re: [PATCH rdma-next 3/5] RDMA/hns: Increase checking CMQ status timeout value

2018-05-23 Thread Leon Romanovsky
On Wed, May 23, 2018 at 02:15:48PM +0800, Wei Hu (Xavier) wrote: > > > On 2018/5/23 14:09, Wei Hu (Xavier) wrote: > > > > On 2018/5/23 13:49, Leon Romanovsky wrote: > >> On Thu, May 17, 2018 at 04:02:51PM +0800, Wei Hu (Xavier) wrote: > >>> This patch i

Re: [PATCH rdma-next 3/5] RDMA/hns: Increase checking CMQ status timeout value

2018-05-23 Thread Leon Romanovsky
On Wed, May 23, 2018 at 02:15:48PM +0800, Wei Hu (Xavier) wrote: > > > On 2018/5/23 14:09, Wei Hu (Xavier) wrote: > > > > On 2018/5/23 13:49, Leon Romanovsky wrote: > >> On Thu, May 17, 2018 at 04:02:51PM +0800, Wei Hu (Xavier) wrote: > >>> This patch i

Re: [PATCH rdma-next 5/5] RDMA/hns: Fix the illegal memory operation when cross page

2018-05-23 Thread Leon Romanovsky
On Thu, May 17, 2018 at 04:02:53PM +0800, Wei Hu (Xavier) wrote: > This patch fixed the potential illegal operation when using the > extend sge buffer cross page in post send operation. The bug > will cause the calltrace. > > Reported-by: Jie Chen > Reported-by: Xiping

Re: [PATCH rdma-next 5/5] RDMA/hns: Fix the illegal memory operation when cross page

2018-05-23 Thread Leon Romanovsky
On Thu, May 17, 2018 at 04:02:53PM +0800, Wei Hu (Xavier) wrote: > This patch fixed the potential illegal operation when using the > extend sge buffer cross page in post send operation. The bug > will cause the calltrace. > > Reported-by: Jie Chen > Reported-by: Xiping Zhang (Francis) > Fixes:

Re: [PATCH rdma-next 2/5] RDMA/hns: Modify uar allocation algorithm to avoid bitmap exhaust

2018-05-23 Thread Leon Romanovsky
On Thu, May 17, 2018 at 04:02:50PM +0800, Wei Hu (Xavier) wrote: > This patch modified uar allocation algorithm in hns_roce_uar_alloc > function to avoid bitmap exhaust. > > Signed-off-by: Wei Hu (Xavier) > --- > drivers/infiniband/hw/hns/hns_roce_device.h | 1 + >

Re: [PATCH rdma-next 2/5] RDMA/hns: Modify uar allocation algorithm to avoid bitmap exhaust

2018-05-23 Thread Leon Romanovsky
On Thu, May 17, 2018 at 04:02:50PM +0800, Wei Hu (Xavier) wrote: > This patch modified uar allocation algorithm in hns_roce_uar_alloc > function to avoid bitmap exhaust. > > Signed-off-by: Wei Hu (Xavier) > --- > drivers/infiniband/hw/hns/hns_roce_device.h | 1 + >

Re: [PATCH rdma-next 3/5] RDMA/hns: Increase checking CMQ status timeout value

2018-05-22 Thread Leon Romanovsky
On Thu, May 17, 2018 at 04:02:51PM +0800, Wei Hu (Xavier) wrote: > This patch increases checking CMQ status timeout value and > uses the same value with NIC driver to avoid deficiency of > time. > > Signed-off-by: Wei Hu (Xavier) > --- >

Re: [PATCH rdma-next 3/5] RDMA/hns: Increase checking CMQ status timeout value

2018-05-22 Thread Leon Romanovsky
On Thu, May 17, 2018 at 04:02:51PM +0800, Wei Hu (Xavier) wrote: > This patch increases checking CMQ status timeout value and > uses the same value with NIC driver to avoid deficiency of > time. > > Signed-off-by: Wei Hu (Xavier) > --- > drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 2 +- > 1

Re: [PATCH v2] net/mlx4_core: Fix error handling in mlx4_init_port_info.

2018-05-14 Thread Leon Romanovsky
neral cleanup exit point is needed in this function (goto ...), but your fix is good enough too. Thanks for doing it. Reviewed-by: Leon Romanovsky <leo...@mellanox.com> signature.asc Description: PGP signature

Re: [PATCH v2] net/mlx4_core: Fix error handling in mlx4_init_port_info.

2018-05-14 Thread Leon Romanovsky
neral cleanup exit point is needed in this function (goto ...), but your fix is good enough too. Thanks for doing it. Reviewed-by: Leon Romanovsky signature.asc Description: PGP signature

Re: [PATCH] IB/umem: use tgid instead of pid in ib_umem structure

2018-05-04 Thread Leon Romanovsky
On Fri, May 04, 2018 at 04:32:38PM +0800, 858585 jemmy wrote: > On Fri, May 4, 2018 at 6:01 AM, Jason Gunthorpe <j...@ziepe.ca> wrote: > > On Thu, May 03, 2018 at 09:43:01PM +0300, Leon Romanovsky wrote: > >> On Thu, May 03, 2018 at 12:26:56PM -0600, Jason Gunthorpe wrot

Re: [PATCH] IB/umem: use tgid instead of pid in ib_umem structure

2018-05-04 Thread Leon Romanovsky
On Fri, May 04, 2018 at 04:32:38PM +0800, 858585 jemmy wrote: > On Fri, May 4, 2018 at 6:01 AM, Jason Gunthorpe wrote: > > On Thu, May 03, 2018 at 09:43:01PM +0300, Leon Romanovsky wrote: > >> On Thu, May 03, 2018 at 12:26:56PM -0600, Jason Gunthorpe wrote: > >> >

Re: [PATCH] IB/umem: use tgid instead of pid in ib_umem structure

2018-05-03 Thread Leon Romanovsky
On Thu, May 03, 2018 at 12:26:56PM -0600, Jason Gunthorpe wrote: > On Thu, May 03, 2018 at 09:12:35PM +0300, Leon Romanovsky wrote: > > On Thu, May 03, 2018 at 09:33:10AM -0600, Jason Gunthorpe wrote: > > > On Thu, May 03, 2018 at 10:04:34PM +0800, Lidong Chen wrote: > &g

Re: [PATCH] IB/umem: use tgid instead of pid in ib_umem structure

2018-05-03 Thread Leon Romanovsky
On Thu, May 03, 2018 at 12:26:56PM -0600, Jason Gunthorpe wrote: > On Thu, May 03, 2018 at 09:12:35PM +0300, Leon Romanovsky wrote: > > On Thu, May 03, 2018 at 09:33:10AM -0600, Jason Gunthorpe wrote: > > > On Thu, May 03, 2018 at 10:04:34PM +0800, Lidong Chen wrote: > &g

Re: [PATCH] IB/umem: use tgid instead of pid in ib_umem structure

2018-05-03 Thread Leon Romanovsky
On Thu, May 03, 2018 at 09:33:10AM -0600, Jason Gunthorpe wrote: > On Thu, May 03, 2018 at 10:04:34PM +0800, Lidong Chen wrote: > > The userspace may invoke ibv_reg_mr and ibv_dereg_mr by different threads. > > If when ibv_dereg_mr invoke and the thread which invoked ibv_reg_mr has > > exited,

Re: [PATCH] IB/umem: use tgid instead of pid in ib_umem structure

2018-05-03 Thread Leon Romanovsky
On Thu, May 03, 2018 at 09:33:10AM -0600, Jason Gunthorpe wrote: > On Thu, May 03, 2018 at 10:04:34PM +0800, Lidong Chen wrote: > > The userspace may invoke ibv_reg_mr and ibv_dereg_mr by different threads. > > If when ibv_dereg_mr invoke and the thread which invoked ibv_reg_mr has > > exited,

Re: linux-next: manual merge of the rdma tree with the rdma-fixes tree

2018-05-02 Thread Leon Romanovsky
On Mon, Apr 30, 2018 at 08:55:35PM -0400, Doug Ledford wrote: > On Tue, 2018-05-01 at 10:10 +1000, Stephen Rothwell wrote: > > Hi all, > > > > Today's linux-next merge of the rdma tree got a conflict in: > > > > drivers/infiniband/sw/rxe/rxe_resp.c > > > > between commit: > > > > 9fd4350ba895

Re: linux-next: manual merge of the rdma tree with the rdma-fixes tree

2018-05-02 Thread Leon Romanovsky
On Mon, Apr 30, 2018 at 08:55:35PM -0400, Doug Ledford wrote: > On Tue, 2018-05-01 at 10:10 +1000, Stephen Rothwell wrote: > > Hi all, > > > > Today's linux-next merge of the rdma tree got a conflict in: > > > > drivers/infiniband/sw/rxe/rxe_resp.c > > > > between commit: > > > > 9fd4350ba895

Re: [PATCH] IB/ipoib: fix ipoib_start_xmit()'s return type

2018-04-25 Thread Leon Romanovsky
this driver too. > > Signed-off-by: Luc Van Oostenryck <luc.vanoostenr...@gmail.com> > --- > drivers/infiniband/ulp/ipoib/ipoib_main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Thanks, Reviewed-by: Leon Romanovsky <leo...@mellanox.com> signature.asc Description: PGP signature

Re: [PATCH] IB/ipoib: fix ipoib_start_xmit()'s return type

2018-04-25 Thread Leon Romanovsky
this driver too. > > Signed-off-by: Luc Van Oostenryck > --- > drivers/infiniband/ulp/ipoib/ipoib_main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Thanks, Reviewed-by: Leon Romanovsky signature.asc Description: PGP signature

Re: [PATCH] IB/nes: fix nes_netdev_start_xmit()'s return type

2018-04-25 Thread Leon Romanovsky
On Tue, Apr 24, 2018 at 08:36:12PM +0300, Leon Romanovsky wrote: > On Tue, Apr 24, 2018 at 03:15:45PM +0200, Luc Van Oostenryck wrote: > > The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', > > which is a typedef for an enum type, but the implementation in

Re: [PATCH] IB/nes: fix nes_netdev_start_xmit()'s return type

2018-04-25 Thread Leon Romanovsky
On Tue, Apr 24, 2018 at 08:36:12PM +0300, Leon Romanovsky wrote: > On Tue, Apr 24, 2018 at 03:15:45PM +0200, Luc Van Oostenryck wrote: > > The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', > > which is a typedef for an enum type, but the implementation in

Re: [PATCH] IB/nes: fix nes_netdev_start_xmit()'s return type

2018-04-24 Thread Leon Romanovsky
On Tue, Apr 24, 2018 at 03:15:45PM +0200, Luc Van Oostenryck wrote: > The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', > which is a typedef for an enum type, but the implementation in this > driver returns an 'int'. > > Fix this by returning 'netdev_tx_t' in this driver too. >

Re: [PATCH] IB/nes: fix nes_netdev_start_xmit()'s return type

2018-04-24 Thread Leon Romanovsky
On Tue, Apr 24, 2018 at 03:15:45PM +0200, Luc Van Oostenryck wrote: > The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', > which is a typedef for an enum type, but the implementation in this > driver returns an 'int'. > > Fix this by returning 'netdev_tx_t' in this driver too. >

Re: KASAN: stack-out-of-bounds Read in rdma_bind_addr (2)

2018-04-04 Thread Leon Romanovsky
#syz dup: kernel BUG at lib/string.c:LINE! (3) On Thu, Mar 29, 2018 at 03:01:02PM -0700, syzbot wrote: > Hello, > > syzbot hit the following crash on upstream commit > 0b412605ef5f5c64b31f19e2910b1d5eba9929c3 (Thu Mar 29 01:07:23 2018 +) > Merge tag 'drm-fixes-for-v4.16-rc8' of >

Re: KASAN: stack-out-of-bounds Read in rdma_bind_addr (2)

2018-04-04 Thread Leon Romanovsky
#syz dup: kernel BUG at lib/string.c:LINE! (3) On Thu, Mar 29, 2018 at 03:01:02PM -0700, syzbot wrote: > Hello, > > syzbot hit the following crash on upstream commit > 0b412605ef5f5c64b31f19e2910b1d5eba9929c3 (Thu Mar 29 01:07:23 2018 +) > Merge tag 'drm-fixes-for-v4.16-rc8' of >

Re: WARNING: ODEBUG bug in process_one_req

2018-03-22 Thread Leon Romanovsky
On Thu, Mar 22, 2018 at 05:13:58PM +0200, Leon Romanovsky wrote: > On Thu, Mar 22, 2018 at 03:47:41PM +0100, Dmitry Vyukov wrote: > > On Thu, Mar 22, 2018 at 3:29 PM, Leon Romanovsky <leo...@mellanox.com> > > wrote: > > > On Thu, Mar 22, 2018 at 02:36:5

Re: WARNING: ODEBUG bug in process_one_req

2018-03-22 Thread Leon Romanovsky
On Thu, Mar 22, 2018 at 05:13:58PM +0200, Leon Romanovsky wrote: > On Thu, Mar 22, 2018 at 03:47:41PM +0100, Dmitry Vyukov wrote: > > On Thu, Mar 22, 2018 at 3:29 PM, Leon Romanovsky > > wrote: > > > On Thu, Mar 22, 2018 at 02:36:55PM +0100, Dmitry Vyukov wrote: > >

Re: WARNING: ODEBUG bug in process_one_req

2018-03-22 Thread Leon Romanovsky
On Thu, Mar 22, 2018 at 03:47:41PM +0100, Dmitry Vyukov wrote: > On Thu, Mar 22, 2018 at 3:29 PM, Leon Romanovsky <leo...@mellanox.com> wrote: > > On Thu, Mar 22, 2018 at 02:36:55PM +0100, Dmitry Vyukov wrote: > >> On Thu, Mar 22, 2018 at 2:20 PM, Leon Romanovsky <leo..

Re: WARNING: ODEBUG bug in process_one_req

2018-03-22 Thread Leon Romanovsky
On Thu, Mar 22, 2018 at 03:47:41PM +0100, Dmitry Vyukov wrote: > On Thu, Mar 22, 2018 at 3:29 PM, Leon Romanovsky wrote: > > On Thu, Mar 22, 2018 at 02:36:55PM +0100, Dmitry Vyukov wrote: > >> On Thu, Mar 22, 2018 at 2:20 PM, Leon Romanovsky > >> wrote: > >>

Re: WARNING: ODEBUG bug in process_one_req

2018-03-22 Thread Leon Romanovsky
On Thu, Mar 22, 2018 at 02:36:55PM +0100, Dmitry Vyukov wrote: > On Thu, Mar 22, 2018 at 2:20 PM, Leon Romanovsky <leo...@mellanox.com> wrote: > > On Thu, Mar 22, 2018 at 02:10:21PM +0100, Dmitry Vyukov wrote: > >> This bug is actively happening several times per day, if

Re: WARNING: ODEBUG bug in process_one_req

2018-03-22 Thread Leon Romanovsky
On Thu, Mar 22, 2018 at 02:36:55PM +0100, Dmitry Vyukov wrote: > On Thu, Mar 22, 2018 at 2:20 PM, Leon Romanovsky wrote: > > On Thu, Mar 22, 2018 at 02:10:21PM +0100, Dmitry Vyukov wrote: > >> This bug is actively happening several times per day, if such bug is > >&

Re: WARNING: ODEBUG bug in process_one_req

2018-03-22 Thread Leon Romanovsky
On Thu, Mar 22, 2018 at 02:10:21PM +0100, Dmitry Vyukov wrote: > This bug is actively happening several times per day, if such bug is > closed syzbot will open another bug on the next crash. > This bug has a reproducer, why do you think it is invalid? I tried to reproduce it on latest rdma-next

Re: WARNING: ODEBUG bug in process_one_req

2018-03-22 Thread Leon Romanovsky
On Thu, Mar 22, 2018 at 02:10:21PM +0100, Dmitry Vyukov wrote: > This bug is actively happening several times per day, if such bug is > closed syzbot will open another bug on the next crash. > This bug has a reproducer, why do you think it is invalid? I tried to reproduce it on latest rdma-next

Re: linux-next: Signed-off-by missing for commit in the rdma-fixes tree

2018-03-08 Thread Leon Romanovsky
On Thu, Mar 08, 2018 at 08:28:45AM -0500, Doug Ledford wrote: > On Thu, 2018-03-08 at 08:09 +0200, Leon Romanovsky wrote: > > On Thu, Mar 08, 2018 at 04:40:58PM +1100, Stephen Rothwell wrote: > > > Hi all, > > > > > > Commit > > > > > >

Re: linux-next: Signed-off-by missing for commit in the rdma-fixes tree

2018-03-08 Thread Leon Romanovsky
On Thu, Mar 08, 2018 at 08:28:45AM -0500, Doug Ledford wrote: > On Thu, 2018-03-08 at 08:09 +0200, Leon Romanovsky wrote: > > On Thu, Mar 08, 2018 at 04:40:58PM +1100, Stephen Rothwell wrote: > > > Hi all, > > > > > > Commit > > > > > >

Re: linux-next: Signed-off-by missing for commit in the rdma-fixes tree

2018-03-07 Thread Leon Romanovsky
On Thu, Mar 08, 2018 at 04:40:58PM +1100, Stephen Rothwell wrote: > Hi all, > > Commit > > aa0de36a40f4 ("RDMA/mlx5: Fix integer overflow while resizing CQ") > > is missing a Signed-off-by from its author. Doug, something went wrong with your scripts In patchworks it is with SOB and lengthy

Re: linux-next: Signed-off-by missing for commit in the rdma-fixes tree

2018-03-07 Thread Leon Romanovsky
On Thu, Mar 08, 2018 at 04:40:58PM +1100, Stephen Rothwell wrote: > Hi all, > > Commit > > aa0de36a40f4 ("RDMA/mlx5: Fix integer overflow while resizing CQ") > > is missing a Signed-off-by from its author. Doug, something went wrong with your scripts In patchworks it is with SOB and lengthy

Re: WARNING: kmalloc bug in memdup_user

2018-03-07 Thread Leon Romanovsky
On Wed, Mar 07, 2018 at 09:44:23AM +0100, Dmitry Vyukov wrote: > On Wed, Mar 7, 2018 at 8:23 AM, Leon Romanovsky <l...@kernel.org> wrote: > > On Tue, Mar 06, 2018 at 10:59:02PM -0800, syzbot wrote: > >> Hello, > >> > >> syzbot

Re: WARNING: kmalloc bug in memdup_user

2018-03-07 Thread Leon Romanovsky
On Wed, Mar 07, 2018 at 09:44:23AM +0100, Dmitry Vyukov wrote: > On Wed, Mar 7, 2018 at 8:23 AM, Leon Romanovsky wrote: > > On Tue, Mar 06, 2018 at 10:59:02PM -0800, syzbot wrote: > >> Hello, > >> > >> syzbot hit the following crash on upstream commit > >

Re: WARNING: kmalloc bug in memdup_user

2018-03-06 Thread Leon Romanovsky
On Tue, Mar 06, 2018 at 10:59:02PM -0800, syzbot wrote: > Hello, > > syzbot hit the following crash on upstream commit > ce380619fab99036f5e745c7a865b21c59f005f6 (Tue Mar 6 04:31:14 2018 +) > Merge tag 'please-pull-ia64_misc' of > git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux > > So

Re: WARNING: kmalloc bug in memdup_user

2018-03-06 Thread Leon Romanovsky
On Tue, Mar 06, 2018 at 10:59:02PM -0800, syzbot wrote: > Hello, > > syzbot hit the following crash on upstream commit > ce380619fab99036f5e745c7a865b21c59f005f6 (Tue Mar 6 04:31:14 2018 +) > Merge tag 'please-pull-ia64_misc' of > git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux > > So

Re: [PATCH] RDMA/nldev: Fix multiple potential NULL pointer dereferences

2018-02-09 Thread Leon Romanovsky
On Fri, Feb 09, 2018 at 09:56:00AM -0600, Gustavo A. R. Silva wrote: > > Quoting Leon Romanovsky <l...@kernel.org>: > > > On Fri, Feb 09, 2018 at 07:36:49AM -0600, Gustavo A. R. Silva wrote: > > > Hi Leon, > > > > > > Quoting Leon Romanovsky <l

Re: [PATCH] RDMA/nldev: Fix multiple potential NULL pointer dereferences

2018-02-09 Thread Leon Romanovsky
On Fri, Feb 09, 2018 at 09:56:00AM -0600, Gustavo A. R. Silva wrote: > > Quoting Leon Romanovsky : > > > On Fri, Feb 09, 2018 at 07:36:49AM -0600, Gustavo A. R. Silva wrote: > > > Hi Leon, > > > > > > Quoting Leon Romanovsky : > > > > > &

Re: [PATCH] RDMA/nldev: Fix multiple potential NULL pointer dereferences

2018-02-09 Thread Leon Romanovsky
On Fri, Feb 09, 2018 at 07:36:49AM -0600, Gustavo A. R. Silva wrote: > Hi Leon, > > Quoting Leon Romanovsky <l...@kernel.org>: > > > On Fri, Feb 09, 2018 at 12:37:02AM -0600, Gustavo A. R. Silva wrote: > > > In case the message header and payload cannot be stored,

Re: [PATCH] RDMA/nldev: Fix multiple potential NULL pointer dereferences

2018-02-09 Thread Leon Romanovsky
On Fri, Feb 09, 2018 at 07:36:49AM -0600, Gustavo A. R. Silva wrote: > Hi Leon, > > Quoting Leon Romanovsky : > > > On Fri, Feb 09, 2018 at 12:37:02AM -0600, Gustavo A. R. Silva wrote: > > > In case the message header and payload cannot be stored, function &

Re: [PATCH] RDMA/nldev: Fix multiple potential NULL pointer dereferences

2018-02-09 Thread Leon Romanovsky
On Fri, Feb 09, 2018 at 12:37:02AM -0600, Gustavo A. R. Silva wrote: > In case the message header and payload cannot be stored, function > nlmsg_put returns null. > > Fix this by adding multiple sanity checks and avoid a potential > null dereference on _nlh_ when calling nlmsg_end. > >

Re: [PATCH] RDMA/nldev: Fix multiple potential NULL pointer dereferences

2018-02-09 Thread Leon Romanovsky
On Fri, Feb 09, 2018 at 12:37:02AM -0600, Gustavo A. R. Silva wrote: > In case the message header and payload cannot be stored, function > nlmsg_put returns null. > > Fix this by adding multiple sanity checks and avoid a potential > null dereference on _nlh_ when calling nlmsg_end. > >

Re: [PATCH] IB/mthca: remove mthca_user.h

2018-01-28 Thread Leon Romanovsky
nfiniband/hw/mthca/mthca_user.h | 112 > --- > 1 file changed, 112 deletions(-) > delete mode 100644 drivers/infiniband/hw/mthca/mthca_user.h > Thanks, Reviewed-by: Leon Romanovsky <leo...@mellanox.com> signature.asc Description: PGP signature

Re: [PATCH] IB/mthca: remove mthca_user.h

2018-01-28 Thread Leon Romanovsky
and/hw/mthca/mthca_user.h | 112 > --- > 1 file changed, 112 deletions(-) > delete mode 100644 drivers/infiniband/hw/mthca/mthca_user.h > Thanks, Reviewed-by: Leon Romanovsky signature.asc Description: PGP signature

Re: linux-next: build failure after merge of the rdma tree

2018-01-25 Thread Leon Romanovsky
On Thu, Jan 25, 2018 at 06:22:59PM +1100, Stephen Rothwell wrote: > Hi all, > > After merging the rdma tree, today's linux-next build (x86_64 > allmodconfig) failed like this: > > ERROR: "init_rcu_head" [drivers/infiniband/ulp/srpt/ib_srpt.ko] undefined! > > Caused by commit > > a11253142e6d

Re: linux-next: build failure after merge of the rdma tree

2018-01-25 Thread Leon Romanovsky
On Thu, Jan 25, 2018 at 06:22:59PM +1100, Stephen Rothwell wrote: > Hi all, > > After merging the rdma tree, today's linux-next build (x86_64 > allmodconfig) failed like this: > > ERROR: "init_rcu_head" [drivers/infiniband/ulp/srpt/ib_srpt.ko] undefined! > > Caused by commit > > a11253142e6d

Re: [PATCH] RDS: Fix rds-ping inducing kernel panic

2018-01-22 Thread Leon Romanovsky
On Mon, Jan 22, 2018 at 03:24:15AM -0800, Kees Cook wrote: > As described in: https://bugzilla.redhat.com/show_bug.cgi?id=822754 > > Attempting an RDS connection from the IP address of an IPoIB interface > to itself causes a kernel panic due to a BUG_ON() being triggered. > Making the test less

Re: [PATCH] RDS: Fix rds-ping inducing kernel panic

2018-01-22 Thread Leon Romanovsky
On Mon, Jan 22, 2018 at 03:24:15AM -0800, Kees Cook wrote: > As described in: https://bugzilla.redhat.com/show_bug.cgi?id=822754 > > Attempting an RDS connection from the IP address of an IPoIB interface > to itself causes a kernel panic due to a BUG_ON() being triggered. > Making the test less

Re: linux-next: manual merge of the rdma tree with the net tree

2018-01-15 Thread Leon Romanovsky
On Mon, Jan 15, 2018 at 11:53:21AM +1100, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the rdma tree got a conflict in: > > drivers/infiniband/hw/mlx5/main.c > > between commits: > > 8978cc921fc7 ("{net,ib}/mlx5: Don't disable local loopback multicast > traffic when

Re: linux-next: manual merge of the rdma tree with the net tree

2018-01-15 Thread Leon Romanovsky
On Mon, Jan 15, 2018 at 11:53:21AM +1100, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the rdma tree got a conflict in: > > drivers/infiniband/hw/mlx5/main.c > > between commits: > > 8978cc921fc7 ("{net,ib}/mlx5: Don't disable local loopback multicast > traffic when

Re: [PATCH] IB/cma: use strlcpy() instead of strncpy()

2018-01-12 Thread Leon Romanovsky
ed, 1 insertion(+), 1 deletion(-) > Thanks, Reviewed-by: Leon Romanovsky <leo...@mellanox.com> signature.asc Description: PGP signature

Re: [PATCH] IB/cma: use strlcpy() instead of strncpy()

2018-01-12 Thread Leon Romanovsky
tion size [-Wstringop-truncation] > > We need to use strlcpy() to make sure the string is nul-terminated. > > Signed-off-by: Xiongfeng Wang > --- > drivers/infiniband/core/cma_configfs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Thanks, Reviewed-by: Leon

Re: [PATCH][next] IB/mlx5: remove redundant assignment of mdev

2018-01-09 Thread Leon Romanovsky
hanged, 1 insertion(+), 1 deletion(-) > Thanks, Acked-by: Leon Romanovsky <leo...@mellanox.com> signature.asc Description: PGP signature

Re: [PATCH][next] IB/mlx5: remove redundant assignment of mdev

2018-01-09 Thread Leon Romanovsky
t; drivers/infiniband/hw/mlx5/main.c:359:24: warning: Value stored > to 'mdev' during its initialization is never read > > Signed-off-by: Colin Ian King > --- > drivers/infiniband/hw/mlx5/main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Thanks, Acked-by: Leon

Re: [PATCH] ethernet: mlx4: Delete an error message for a failed memory allocation in five functions

2018-01-03 Thread Leon Romanovsky
On Wed, Jan 03, 2018 at 01:24:59PM +0200, Tariq Toukan wrote: > > > On 03/01/2018 10:06 AM, Julia Lawall wrote: > > > > > > On Wed, 3 Jan 2018, Tariq Toukan wrote: > > > > > > > > > > > On 01/01/2018 10:46 PM, SF Markus Elfring wrote: > > > > From: Markus Elfring >

Re: [PATCH] ethernet: mlx4: Delete an error message for a failed memory allocation in five functions

2018-01-03 Thread Leon Romanovsky
On Wed, Jan 03, 2018 at 01:24:59PM +0200, Tariq Toukan wrote: > > > On 03/01/2018 10:06 AM, Julia Lawall wrote: > > > > > > On Wed, 3 Jan 2018, Tariq Toukan wrote: > > > > > > > > > > > On 01/01/2018 10:46 PM, SF Markus Elfring wrote: > > > > From: Markus Elfring > > > > Date: Mon, 1 Jan 2018

Re: [PATCH] IB/ocrdma: Use zeroing memory allocator than allocator/memset

2017-12-31 Thread Leon Romanovsky
; drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 8 +++- > 3 files changed, 12 insertions(+), 21 deletions(-) > Thanks, Reviewed-by: Leon Romanovsky <leo...@mellanox.com> signature.asc Description: PGP signature

Re: [PATCH] IB/ocrdma: Use zeroing memory allocator than allocator/memset

2017-12-31 Thread Leon Romanovsky
gt; 3 files changed, 12 insertions(+), 21 deletions(-) > Thanks, Reviewed-by: Leon Romanovsky signature.asc Description: PGP signature

Re: [PATCH] i40iw: Replace mdelay with msleep in i40iw_wait_pe_ready

2017-12-24 Thread Leon Romanovsky
com> > --- > drivers/infiniband/hw/i40iw/i40iw_main.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Thanks, Reviewed-by: Leon Romanovsky <leo...@mellanox.com> signature.asc Description: PGP signature

Re: [PATCH] i40iw: Replace mdelay with msleep in i40iw_wait_pe_ready

2017-12-24 Thread Leon Romanovsky
vers/infiniband/hw/i40iw/i40iw_main.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Thanks, Reviewed-by: Leon Romanovsky signature.asc Description: PGP signature

Re: [PATCH] hw: Fix permissions for OCRDMA_RESET_STATS

2017-12-20 Thread Leon Romanovsky
On Tue, Dec 19, 2017 at 11:14:03PM +0530, Selvin Xavier wrote: > On Tue, Dec 19, 2017 at 6:00 PM, Leon Romanovsky <l...@kernel.org> wrote: > >> status = ocrdma_nonemb_mbx_cmd(dev, mqe, dev->stats_mem.va); > > > > It still doesn't make a lot of sense to me: > >

Re: [PATCH] hw: Fix permissions for OCRDMA_RESET_STATS

2017-12-20 Thread Leon Romanovsky
On Tue, Dec 19, 2017 at 11:14:03PM +0530, Selvin Xavier wrote: > On Tue, Dec 19, 2017 at 6:00 PM, Leon Romanovsky wrote: > >> status = ocrdma_nonemb_mbx_cmd(dev, mqe, dev->stats_mem.va); > > > > It still doesn't make a lot of sense to me: > > > > ocrdma_mbx_

Re: [PATCH] hw: Fix permissions for OCRDMA_RESET_STATS

2017-12-19 Thread Leon Romanovsky
On Tue, Dec 19, 2017 at 03:59:30PM +0530, Selvin Xavier wrote: > On Wed, Aug 16, 2017 at 12:01 AM, Leon Romanovsky <l...@kernel.org> wrote: > > On Tue, Aug 08, 2017 at 06:56:37PM +0300, Anton Vasilyev wrote: > >> Debugfs file reset_stats is created

Re: [PATCH] hw: Fix permissions for OCRDMA_RESET_STATS

2017-12-19 Thread Leon Romanovsky
On Tue, Dec 19, 2017 at 03:59:30PM +0530, Selvin Xavier wrote: > On Wed, Aug 16, 2017 at 12:01 AM, Leon Romanovsky wrote: > > On Tue, Aug 08, 2017 at 06:56:37PM +0300, Anton Vasilyev wrote: > >> Debugfs file reset_stats is created with S_IRUSR permissions, > >> but ocrd

Re: RDMA/bnxt_re: Remove redundant bnxt_qplib_disable_nq() call

2017-12-19 Thread Leon Romanovsky
On Tue, Dec 19, 2017 at 04:40:42PM +0530, Devesh Sharma wrote: > However delayed ack but still..thanks for supplying this fix. > > Acked-by: Devesh Sharma > Devesh, What should we do in order to stop you to answer in top-posting format? Thanks > > On Wed, Dec 13,

Re: RDMA/bnxt_re: Remove redundant bnxt_qplib_disable_nq() call

2017-12-19 Thread Leon Romanovsky
On Tue, Dec 19, 2017 at 04:40:42PM +0530, Devesh Sharma wrote: > However delayed ack but still..thanks for supplying this fix. > > Acked-by: Devesh Sharma > Devesh, What should we do in order to stop you to answer in top-posting format? Thanks > > On Wed, Dec 13, 2017 at 11:07 PM, Jason

Re: [PATCH v2 0/5] Support for generalized use of make C={1,2} via a wrapper program

2017-12-18 Thread Leon Romanovsky
On Mon, Dec 18, 2017 at 07:39:50PM +0100, Knut Omang wrote: > On Mon, 2017-12-18 at 17:56 +, Bart Van Assche wrote: > > On Mon, 2017-12-18 at 10:46 -0700, Jason Gunthorpe wrote: > > > On Sun, Dec 17, 2017 at 10:00:17PM -0800, Joe Perches wrote: > > > > > > > > Today when we run checkers we get

Re: [PATCH v2 0/5] Support for generalized use of make C={1,2} via a wrapper program

2017-12-18 Thread Leon Romanovsky
On Mon, Dec 18, 2017 at 07:39:50PM +0100, Knut Omang wrote: > On Mon, 2017-12-18 at 17:56 +, Bart Van Assche wrote: > > On Mon, 2017-12-18 at 10:46 -0700, Jason Gunthorpe wrote: > > > On Sun, Dec 17, 2017 at 10:00:17PM -0800, Joe Perches wrote: > > > > > > > > Today when we run checkers we get

Re: [PATCH v2 5/5] RDMA/core: Add runchecks.cfg for drivers/infiniband/core

2017-12-18 Thread Leon Romanovsky
On Mon, Dec 18, 2017 at 11:03:51AM -0800, Joe Perches wrote: > On Mon, 2017-12-18 at 13:36 +0100, Knut Omang wrote: > > On Mon, 2017-12-18 at 10:02 +0200, Leon Romanovsky wrote: > [] > > > Also, I agree with other reviewers, there is no excuse for adding > > > chec

Re: [PATCH v2 5/5] RDMA/core: Add runchecks.cfg for drivers/infiniband/core

2017-12-18 Thread Leon Romanovsky
On Mon, Dec 18, 2017 at 11:03:51AM -0800, Joe Perches wrote: > On Mon, 2017-12-18 at 13:36 +0100, Knut Omang wrote: > > On Mon, 2017-12-18 at 10:02 +0200, Leon Romanovsky wrote: > [] > > > Also, I agree with other reviewers, there is no excuse for adding > > > chec

<    3   4   5   6   7   8   9   10   11   12   >