From: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: madhuparnabhowmik10@gmail.com, peterz@infradead.org,
mingo@kernel.org, christian.brauner@ubuntu.com,
paulmck@kernel.org, linux-kernel@vger.kernel.org,
joel@joelfernandes.org,
linux-kernel-mentees@lists.linuxfoundation.org,
rcu@vger.kernel.org
Subject: Re: [PATCH] exit.c: Fix Sparse errors and warnings
Date: Wed, 29 Jan 2020 21:32:04 +0530 [thread overview]
Message-ID: <20200129160204.GA15449@madhuparna-HP-Notebook> (raw)
In-Reply-To: <20200129123046.GA1726@redhat.com>
On Wed, Jan 29, 2020 at 01:30:47PM +0100, Oleg Nesterov wrote:
> On 01/28, madhuparnabhowmik10@gmail.com wrote:
> >
> > kernel/exit.c:626:40: warning: incorrect type in assignment
> >
> > Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
> > ---
> > kernel/exit.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/kernel/exit.c b/kernel/exit.c
> > index bcbd59888e67..c5a9d6360440 100644
> > --- a/kernel/exit.c
> > +++ b/kernel/exit.c
> > @@ -623,8 +623,8 @@ static void forget_original_parent(struct task_struct *father,
> > reaper = find_new_reaper(father, reaper);
> > list_for_each_entry(p, &father->children, sibling) {
> > for_each_thread(p, t) {
> > - t->real_parent = reaper;
> > - BUG_ON((!t->ptrace) != (t->parent == father));
> > + rcu_assign_pointer(t->real_parent, reaper);
>
> Another case when RCU_INIT_POINTER() makes more sense (although to me it
> too looks confusing). We didn't modify the new parent.
>
Alright, I will resend this patch with RCU_INIT_POINTER().
Thank you,
Madhuparna
> Oleg.
>
next prev parent reply other threads:[~2020-01-29 16:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-28 17:20 madhuparnabhowmik10
2020-01-28 18:01 ` Christian Brauner
2020-01-29 12:30 ` Oleg Nesterov
2020-01-29 16:02 ` Madhuparna Bhowmik [this message]
2020-01-30 6:20 madhuparnabhowmik10
2020-01-30 10:31 ` Christian Brauner
2020-01-30 11:33 ` Oleg Nesterov
2020-01-30 11:45 ` Christian Brauner
2020-01-30 15:20 ` Christian Brauner
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=20200129160204.GA15449@madhuparna-HP-Notebook \
--to=madhuparnabhowmik10@gmail.com \
--cc=christian.brauner@ubuntu.com \
--cc=joel@joelfernandes.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=rcu@vger.kernel.org \
/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
all inboxes | Powered by JetHome®