[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <201105080037.GFD90166.HFMQVLOSFOtFJO@I-love.SAKURA.ne.jp>
Date: Sun, 8 May 2011 00:37:34 +0900
From: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To: akpm@...ux-foundation.org
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
john.stultz@...aro.org
Subject: Re: [PATCH 1/1] coredump: use task comm instead of (unknown)
Andrew Morton wrote:
> PR_SET_NAME uses set_task_comm() which has appropriate locking to
> protect against get_task_comm().
>
> If kernel code directly accesses task->comm without taking task_lock()
> then yes, it's racy.
I see. Well,
grep -r -- '->comm[,;)]' .
in 2.6.39-rc6 shows so many users directly reading/updating, including
case 'e':
err = cn_printf(cn, "%s", current->comm);
break;
in format_corename().
> Hopefully John Stultz will soon be presenting us with a %p modifier for
> displaying task_struct.comm.
That will be nice. But caller might by error call printk() with that modifier
between task_lock() and task_unlock().
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists