2009-04-29 22:45:35

by Hartley Sweeten

[permalink] [raw]
Subject: Q: about struct task_struct

Hello all,

In struct task_struck, should set_child_tid and clear_child_tid
be int __user * or u32 __user *?

In include/linux/sched.h they are both int __user * but in
kernel/fork.c there is the following line:

u32 __user * tidptr = tsk->clear_child_tid;

This is causing a sparse warning:

warning: incorrect type in initializer (different signedness)
expected unsigned int [noderef] [usertype] <asn:1>*tidptr
got int [noderef] <asn:1>*clear_child_tid

It seems the struct should have them as u32 __user * since the
clone_flags are defined up to 0x80000000 (CLONE_IO).

Thanks,
Hartley