Re: [PATCH] bpf: Call rcu_read_unlock() before copy_to_user()

From: Alexei Starovoitov
Date: Thu Jan 22 2015 - 13:03:36 EST


On Thu, Jan 22, 2015 at 9:54 AM, Michael Holzheu
<holzheu@xxxxxxxxxxxxxxxxxx> wrote:
>> > So call rcu_read_unlock() before copy_to_user(). We can
>> > release the lock earlier because it is not needed for copy_to_user().
>>
>> we cannot move the rcu unlock this way, since it protects the value.
>> So we need to copy the value while still under rcu.
>
> Ok, right. I assume you will provide the correct fix.

sure :) will do.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/