Re: rq_bc_pa_list manipulated under incorrect lock?

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

 



On Fri, Feb 13, 2015 at 11:30 AM, Chuck Lever <chuck.lever@xxxxxxxxxx> wrote:
>
> Hi Trond-
>
> While reviewing xprt_complete_bc_request(), I noticed this:
>
> 326         spin_lock(&bc_serv->sv_cb_lock);
>
> 327         list_del(&req->rq_bc_pa_list);   <<<<<<<
>
> 328         list_add(&req->rq_bc_list, &bc_serv->sv_cb_list);
> 329         wake_up(&bc_serv->sv_cb_waitq);
> 330         spin_unlock(&bc_serv->sv_cb_lock);
>
> Other places in the code hold xprt->bc_pa_lock when updating
> rq_bc_pa_list. Maybe not a big deal because xprt->transport_lock is
> held across the lookup and complete calls?
>
> Introduced by commit 2ea24497a1b3 ("SUNRPC: RPC callbacks
> may be split across several TCP segments”).
>

Ack. That looks like a bug. It's not an actual problem as long as we
only have 1 entry on that list, but it will bite us if we ever decide
to grow the slot table...

Can you send a patch?

-- 
Trond Myklebust
Linux NFS client maintainer, PrimaryData
trond.myklebust@xxxxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux