netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Anjali Kulkarni <anjali.k.kulkarni@oracle.com>
Cc: davem@davemloft.net, Liam.Howlett@oracle.com,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	mingo@redhat.com, juri.lelli@redhat.com,
	vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
	rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
	vschneid@redhat.com, jiri@resnulli.us,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	akpm@linux-foundation.org, shuah@kernel.org,
	linux-kselftest@vger.kernel.org, peili.io@oracle.com
Subject: Re: [PATCH net-next v1 1/3] connector/cn_proc: Add hash table for threads
Date: Mon, 14 Oct 2024 10:27:45 +0200	[thread overview]
Message-ID: <20241014082745.GT17263@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20241013170617.2139204-2-anjali.k.kulkarni@oracle.com>

On Sun, Oct 13, 2024 at 10:06:15AM -0700, Anjali Kulkarni wrote:

> +	if (unlikely(task->flags & PF_EXIT_NOTIFY)) {
> +		task_lock(task);
> +		task->flags &= ~PF_EXIT_NOTIFY;
> +		task_unlock(task);
> +

> @@ -413,6 +440,15 @@ static void cn_proc_mcast_ctl(struct cn_msg *msg,
>  	if (msg->len == sizeof(*pinput)) {
>  		pinput = (struct proc_input *)msg->data;
>  		mc_op = pinput->mcast_op;
> +		if (mc_op == PROC_CN_MCAST_NOTIFY) {
> +			pr_debug("%s: Received PROC_CN_MCAST_NOTIFY, pid %d\n",
> +					__func__, current->pid);
> +			task_lock(current);
> +			current->flags |= PF_EXIT_NOTIFY;
> +			task_unlock(current);
> +			err = cn_add_elem(pinput->uexit_code, current->pid);
> +			return;
> +		}

You seem to think that task_lock protects task->flags ? Why?

  reply	other threads:[~2024-10-14  8:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-13 17:06 [PATCH net-next v1 0/3] Threads support in proc connector Anjali Kulkarni
2024-10-13 17:06 ` [PATCH net-next v1 1/3] connector/cn_proc: Add hash table for threads Anjali Kulkarni
2024-10-14  8:27   ` Peter Zijlstra [this message]
2024-10-14 15:52     ` Anjali Kulkarni
2024-10-13 17:06 ` [PATCH net-next v1 2/3] connector/cn_proc: Kunit tests for threads hash table Anjali Kulkarni
2024-10-13 17:06 ` [PATCH net-next v1 3/3] connector/cn_proc: Selftest for threads Anjali Kulkarni
2024-10-15 16:01 ` [PATCH net-next v1 0/3] Threads support in proc connector Jakub Kicinski
2024-10-15 16:22   ` Anjali Kulkarni
2024-10-15 16:48     ` Jakub Kicinski
2024-10-15 16:53       ` Anjali Kulkarni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241014082745.GT17263@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=anjali.k.kulkarni@oracle.com \
    --cc=bsegall@google.com \
    --cc=davem@davemloft.net \
    --cc=dietmar.eggemann@arm.com \
    --cc=edumazet@google.com \
    --cc=jiri@resnulli.us \
    --cc=juri.lelli@redhat.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=peili.io@oracle.com \
    --cc=rostedt@goodmis.org \
    --cc=shuah@kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).