Re: [PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-28 Thread Sagi Grimberg
On 4/27/2014 3:37 PM, Chuck Lever wrote: Why not first create a new id+qp and assign them - and then destroy the old id+qp? see SRP related section: ib_srp.x:srp_create_target_ib() Anyway it is indeed important to guarantee that no xmit flows happens concurrently to that, and cleanups are p

Re: [PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-27 Thread Chuck Lever
On Apr 27, 2014, at 6:12 AM, Sagi Grimberg wrote: > On 4/24/2014 6:01 PM, Chuck Lever wrote: >> On Apr 24, 2014, at 3:12 AM, Sagi Grimberg wrote: >> >>> On 4/24/2014 2:30 AM, Devesh Sharma wrote: Hi Chuck Following is the complete call trace of a typical NFS-RDMA transaction >

Re: [PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-27 Thread Sagi Grimberg
On 4/24/2014 6:01 PM, Chuck Lever wrote: On Apr 24, 2014, at 3:12 AM, Sagi Grimberg wrote: On 4/24/2014 2:30 AM, Devesh Sharma wrote: Hi Chuck Following is the complete call trace of a typical NFS-RDMA transaction while mounting a share. It is unavoidable to stop calling post-send in case i

Re: [PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-24 Thread Chuck Lever
half Of Chuck Lever >> Sent: Thursday, April 24, 2014 8:31 PM >> To: Sagi Grimberg >> Cc: Devesh Sharma; Linux NFS Mailing List; linux-rdma@vger.kernel.org; >> Trond Myklebust >> Subject: Re: [PATCH V1] NFS-RDMA: fix qp pointer validation checks >> >> >> O

RE: [PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-24 Thread Devesh Sharma
rg > Cc: Devesh Sharma; Linux NFS Mailing List; linux-rdma@vger.kernel.org; > Trond Myklebust > Subject: Re: [PATCH V1] NFS-RDMA: fix qp pointer validation checks > > > On Apr 24, 2014, at 3:12 AM, Sagi Grimberg > wrote: > > > On 4/24/2014 2:30 AM, Devesh Sharma wr

Re: [PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-24 Thread Chuck Lever
On Apr 24, 2014, at 3:12 AM, Sagi Grimberg wrote: > On 4/24/2014 2:30 AM, Devesh Sharma wrote: >> Hi Chuck >> >> Following is the complete call trace of a typical NFS-RDMA transaction while >> mounting a share. >> It is unavoidable to stop calling post-send in case it is not created. >> There

Re: [PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-24 Thread Sagi Grimberg
On 4/24/2014 2:30 AM, Devesh Sharma wrote: Hi Chuck Following is the complete call trace of a typical NFS-RDMA transaction while mounting a share. It is unavoidable to stop calling post-send in case it is not created. Therefore, applying checks to the connection state is a must While registeri

RE: [PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-23 Thread Devesh Sharma
vent rep 88046230ef30 status 0 opcode 7 length 48 --->>>>> New Task Initialised<<<<<<<<<--- Apr 23 20:00:34 neo03-el64 kernel: RPC: new task initialized, procpid 3491 > -----Original Message- > From: linux-rdma-ow...

RE: [PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-15 Thread Devesh Sharma
> -Original Message- > From: Chuck Lever [mailto:chuck.le...@oracle.com] > Sent: Tuesday, April 15, 2014 6:10 AM > To: Devesh Sharma > Cc: Linux NFS Mailing List; linux-rdma@vger.kernel.org; Trond Myklebust > Subject: Re: [PATCH V1] NFS-RDMA: fix qp pointer validation

Re: [PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-14 Thread Chuck Lever
rnel.org; Trond Myklebust >> Subject: Re: [PATCH V1] NFS-RDMA: fix qp pointer validation checks >> >> Hi Devesh- >> >> >> On Apr 13, 2014, at 12:01 AM, Chuck Lever wrote: >> >>> >>> On Apr 11, 2014, at 7:51 PM, Devesh Sharma >>

RE: [PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-14 Thread Devesh Sharma
pc] > > <4> [] ? printk+0x41/0x48 <4> [] ? > > bit_waitqueue+0x17/0xd0 <4> [] > rpc_execute+0x61/0xa0 > > [sunrpc] <4> [] rpc_run_task+0x75/0x90 [sunrpc] <4> > > [] rpc_call_sync+0x42/0x70 [sunrpc] <4> > > [] ? handle_pte_fault+0x487/0xb5

RE: [PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-14 Thread Devesh Sharma
Hi Chuck > -Original Message- > From: Chuck Lever [mailto:chuck.le...@oracle.com] > Sent: Tuesday, April 15, 2014 2:24 AM > To: Devesh Sharma > Cc: Linux NFS Mailing List; linux-rdma@vger.kernel.org; Trond Myklebust > Subject: Re: [PATCH V1] NFS-RDMA: fix qp pointer

Re: [PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-14 Thread Chuck Lever
Hi Devesh- On Apr 13, 2014, at 12:01 AM, Chuck Lever wrote: > > On Apr 11, 2014, at 7:51 PM, Devesh Sharma wrote: > >> Hi Chuck, >> Yes that is the case, Following is the trace I got. >> >> <4>RPC: 355 setting alarm for 6 ms >> <4>RPC: 355 sync task going to sleep >> <4>RPC:

Re: [PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-12 Thread Chuck Lever
> <4> [] vfs_getattr+0x51/0x80 > <4> [] vfs_fstatat+0x60/0x80 > <4> [] vfs_stat+0x1b/0x20 > <4> [] sys_newstat+0x24/0x50 > <4> [] ? audit_syscall_entry+0x1d7/0x200 > <4> [] system_call_fastpath+0x16/0x1b > <4>Code: 48 89 85 78 ff ff ff

RE: [PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-11 Thread Devesh Sharma
15/0x20 [sunrpc] <4> > > [] ? rpcauth_lookupcred+0x70/0xc0 [sunrpc] <4> > > [] nfs_permission+0xa8/0x1e0 [nfs] <4> > > [] __link_path_walk+0xad/0x1030 <4> > > [] ? handle_pte_fault+0x487/0xb50 <4> > > [] ? copy_termios+0x6a/0x80 <4&g

Re: [PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-10 Thread Chuck Lever
ystem_call_fastpath+0x16/0x1b > <4>Code: 48 89 85 78 ff ff ff 48 8b 40 08 8b 40 1c 89 45 94 b8 ff ff ff ff f0 > 41 0f c1 85 e0 05 00 00 49 8b 04 24 48 8d 55 d8 48 8b 78 10 <48> 8b 07 ff 90 > b0 01 00 00 85 c0 89 c3 74 09 80 3d 56 8d 05 00 > <1>RIP [] rpcrdma_deregister_frmr

RE: [PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-10 Thread Steve Wise
> -Original Message- > From: Chuck Lever [mailto:chuck.le...@oracle.com] > Sent: Thursday, April 10, 2014 12:44 PM > To: Steve Wise > Cc: Devesh Sharma; Linux NFS Mailing List; linux-rdma@vger.kernel.org; Trond > Myklebust > Subject: Re: [PATCH V1] NFS-RDMA: fix

RE: [PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-10 Thread Devesh Sharma
x1b <4>Code: 48 89 85 78 ff ff ff 48 8b 40 08 8b 40 1c 89 45 94 b8 ff ff ff ff f0 41 0f c1 85 e0 05 00 00 49 8b 04 24 48 8d 55 d8 48 8b 78 10 <48> 8b 07 ff 90 b0 01 00 00 85 c0 89 c3 74 09 80 3d 56 8d 05 00 <1>RIP [] rpcrdma_deregister_frmr_external+0x9c/0xe0 [xprtrdma] &

Re: [PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-10 Thread Chuck Lever
On Apr 10, 2014, at 1:42 PM, Devesh Sharma wrote: >> However it seems to me the new (!ia->ri_id->qp) checks outside the connect >> logic are unnecessary. >> >> Clearly, as you noticed, the ib_post_{send,recv} verbs do not check that >> their >> "qp" argument is NULL before dereferencing it. >>

Re: [PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-10 Thread Chuck Lever
post_send(). Thus it is correct to DECR_CQCOUNT >> twice in that case because each WR will trigger a separate completion event. >> >> >>> -Original Message- >>> From: Chuck Lever [mailto:chuck.le...@oracle.com] >>> Sent: Thursday, April 10, 2

RE: [PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-10 Thread Devesh Sharma
> -Original Message- > From: Chuck Lever [mailto:chuck.le...@oracle.com] > Sent: Thursday, April 10, 2014 5:56 AM > To: Devesh Sharma > Cc: Linux NFS Mailing List; linux-rdma@vger.kernel.org; Trond Myklebust > Subject: Re: [PATCH V1] NFS-RDMA: fix qp pointer validation

Re: [PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-10 Thread Steve Wise
Message- From: Chuck Lever [mailto:chuck.le...@oracle.com] Sent: Thursday, April 10, 2014 1:57 AM To: Devesh Sharma Cc: Linux NFS Mailing List; linux-rdma@vger.kernel.org; Trond Myklebust Subject: Re: [PATCH V1] NFS-RDMA: fix qp pointer validation checks On Apr 9, 2014, at 4:22 PM, Trond Myklebust wr

Re: [PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-09 Thread Chuck Lever
CQCOUNT twice in that case because each WR will trigger a separate completion event. > -Original Message- > From: Chuck Lever [mailto:chuck.le...@oracle.com] > Sent: Thursday, April 10, 2014 1:57 AM > To: Devesh Sharma > Cc: Linux NFS Mailing List; linux-rdma@vger.kerne

RE: [PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-09 Thread Devesh Sharma
Trond Myklebust Subject: Re: [PATCH V1] NFS-RDMA: fix qp pointer validation checks On Apr 9, 2014, at 4:22 PM, Trond Myklebust wrote: > Hi Devesh, > > This looks a lot better. I still have a couple of small suggestions, though. > > On Apr 9, 2014, at 14:40, Devesh Sharma

Re: [PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-09 Thread Chuck Lever
On Apr 9, 2014, at 4:22 PM, Trond Myklebust wrote: > Hi Devesh, > > This looks a lot better. I still have a couple of small suggestions, though. > > On Apr 9, 2014, at 14:40, Devesh Sharma wrote: > >> If the rdma_create_qp fails to create qp due to device firmware being in >> invalid state

Re: [PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-09 Thread Trond Myklebust
Hi Devesh, This looks a lot better. I still have a couple of small suggestions, though. On Apr 9, 2014, at 14:40, Devesh Sharma wrote: > If the rdma_create_qp fails to create qp due to device firmware being in > invalid state > xprtrdma still tries to destroy the non-existant qp and ends up in

[PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-09 Thread Devesh Sharma
If the rdma_create_qp fails to create qp due to device firmware being in invalid state xprtrdma still tries to destroy the non-existant qp and ends up in a NULL pointer reference crash. Adding proper checks for vaidating QP pointer avoids this to happen. Signed-off-by: Devesh Sharma --- net/su