Re: [PATCH 9/9] ib_srpt: Convert srpt_sq_size into per port configfs attribute

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

 



On Mon, 2011-10-24 at 20:32 +0200, Bart Van Assche wrote:
> On Mon, Oct 24, 2011 at 7:33 AM, Nicholas A. Bellinger
> <nab@xxxxxxxxxxxxxxx> wrote:
> > @@ -2144,11 +2140,11 @@ static int srpt_create_ch_ib(struct srpt_rdma_ch *ch)
> >                goto out;
> >
> >        ch->cq = ib_create_cq(sdev->device, srpt_completion, NULL, ch,
> > -                             ch->rq_size + srpt_sq_size, 0);
> > +                             ch->rq_size + sport->port_attrib.srp_sq_size, 0);
> >        if (IS_ERR(ch->cq)) {
> >                ret = PTR_ERR(ch->cq);
> >                printk(KERN_ERR "failed to create CQ cqe= %d ret= %d\n",
> > -                      ch->rq_size + srpt_sq_size, ret);
> > +                      ch->rq_size + sport->port_attrib.srp_sq_size, ret);
> >                goto out;
> >        }
> >
> > @@ -2160,7 +2156,7 @@ static int srpt_create_ch_ib(struct srpt_rdma_ch *ch)
> >        qp_init->srq = sdev->srq;
> >        qp_init->sq_sig_type = IB_SIGNAL_REQ_WR;
> >        qp_init->qp_type = IB_QPT_RC;
> > -       qp_init->cap.max_send_wr = srpt_sq_size;
> > +       qp_init->cap.max_send_wr = sport->port_attrib.srp_sq_size;
> >        qp_init->cap.max_send_sge = SRPT_DEF_SG_PER_WQE;
> 
> This patch introduces a race condition: if
> sport->port_attrib.srp_sq_size is modified from user space while an
> SRP login is ongoing then different values of that parameter can be
> used in each of the above statements that read that parameter while
> they all should use the same value.
> 

Fair point.  Fixing this up now.

Also, please stop dropping relevant list CC'ed from my patches.

Thanks, 

--nab

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux