[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190917023623.798-1-shikemeng@huawei.com>
Date: Mon, 16 Sep 2019 22:36:23 -0400
From: KeMeng Shi <shikemeng@...wei.com>
To: <will@...nel.org>, <akpm@...ux-foundation.org>,
<james.morris@...rosoft.com>, <gregkh@...uxfoundation.org>,
<mortonm@...omium.org>, <will.deacon@....com>,
<kristina.martsenko@....com>, <yuehaibing@...wei.com>,
<malat@...ian.org>, <j.neuschaefer@....net>
CC: <linux-kernel@...r.kernel.org>
Subject: Re: Re: [PATCH] connector: report comm change event when modifying /proc/pid/task/tid/comm
>(2) What prevents proc_comm_connector(p) running concurrently with itself
> via the prctl()? The locking seems to be confined to set_task_comm().
To be honest, I did not consider the concurrence problem at beginning. And
some comm change events may lost or are reported repeatly as follows:
set name via procfs set name via prctl
set_task_comm
set_task_comm
proc_comm_connector
proc_comm_connector
Comm change event belong to procfs losts and the fresh comm change belong
to prctl is reported twice. Actually, there is also concurrence problem
without this update as follows:
set name via procfs set name via prctl
set_task_comm
set_task_comm
proc_comm_connector
Comm change event from procfs is reported instead of prctl, this may
bothers user who only care the comm change via prctl.
There is no matter if user only care the latest comm change otherwise, put
setting name and reporting event in crtical region may be the only answer.
Thanks for review.
KeMeng Shi
Powered by blists - more mailing lists