Re: [PATCH] ib_srpt: Add missing ioctx->buf + ->dma alloc_session_cb init

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

 



On Thu, 2016-04-07 at 15:48 -0700, Bart Van Assche wrote:
> On 04/07/2016 03:31 PM, Nicholas A. Bellinger wrote:
> >> I will have a look myself into the percpu_ida conversion.
> >
> > I found a pair of old ConnectX2 in IB mode and I'll be fixing this up
> > for v4.6-rc, so don't even bother.
> 
> Please make sure that you understand the ib_srpt driver before you try 
> to make further modifications to that driver. The patch for percpu_ida 
> allocation that is already in v4.6-rc1 introduces namely a severe race 
> condition next to the bugs that I had already explained. The proper 
> order for session setup is to allocate the send ioctx buffers first and 
> after these buffers have been allocated to transition to RTR. You 
> changed that order to transition first to RTR and next to allocate the 
> send ioctx buffers. By making this change you introduced a race window 
> during which any command that is received by the ib_srpt driver will try 
> to allocate a send ioctx from a not yet initialized send ioctx ring.
> 

Great, then I'll move srpt_ch_qp_rtr() into the alloc_session callback
as well.

Really, given SRP has no security at all doing all of this allocation
and setup before the target even knows if the initiator is allowed to
login makes zero sense to me.

--
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