Hi...

On Wed, May 7, 2008 at 2:23 AM, Enrico Weigelt <[EMAIL PROTECTED]> wrote:
>
>  Hi folks,
>
>  here's a patch which allows changing process' privileges via
>  procfs.
>
>  Suggestions and testing appreciated.

The idea is interesting for me :) Anyway, I think proc_pid_##FIELD
could be made as static inline, and instead of putting "switch" into
it, maybe you can split it as proc_pid_##FIELD_{read,write}. Thus the
function is smaller and the code path can be made faster (no branch,
no call)

BTW, isn't "page" in proc_tasklv_read() should be written as" struct
page *page" instead?

Also, get_proc_task should be put after __get_free_pages, thus if
somehow the functions must sleep, it does so without holding
task_struct's lock. Don't you guys agree?

That's all so far, I hope my suggestion is useful...

regards,

Mulyadi.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to