Re: [PATCH net 1/3] sctp: move rcu_read_lock from __sctp_lookup_association to sctp_lookup_association

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

 



On Thu, Feb 18, 2016 at 12:11 AM, Neil Horman <nhorman@xxxxxxxxxxxxx> wrote:
> On Mon, Feb 15, 2016 at 02:28:03PM +0800, Xin Long wrote:
>> __sctp_lookup_association() is only invoked by sctp_v4_err() and
>> sctp_rcv(), both which run on the rx BH, and it has been protected
>> by rcu_read_lock [see ip_local_deliver_finish() / ipv6_rcv()].
>>
>> So we can move it to sctp_lookup_association, only let
>> sctp_lookup_association use rcu_read_lock.
>>
>> Signed-off-by: Xin Long <lucien.xin@xxxxxxxxx>
>
> Not that it was right before if this is true, but if we're using rcu in a bottom
> half path, shouldn't rcu_read_lock_bh be used instead here?
>
the resource is also accessed in threads, not only in BH, so we cannot
use rcu_read_lock_bh here.

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



[Index of Archives]     [Linux Networking Development]     [Linux OMAP]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux