suspicious RCU usage?

Mulyadi Santosa mulyadi.santosa at gmail.com
Tue Mar 6 10:30:29 EST 2012


Hi.... :)

On Sun, Mar 4, 2012 at 20:16, Peter Senna Tschudin
<peter.senna at gmail.com> wrote:
> [  858.634435] kernel/pid.c:425 find_task_by_pid_ns() needs
> rcu_read_lock() protection!

hmm....ok....kernel said that.... so...

> int yfkm2_is_pid_running(pid_t pid)
> {
>        struct task_struct *q;
>
>        q = find_task_by_vpid(pid);

I think this section that makes kernel barf. It wants you to grab
rcu_read_lock(), right before you do find_task_by_vpid().

What do you think? :)

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com



More information about the Kernelnewbies mailing list