[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250203200233.GE1003@redhat.com>
Date: Mon, 3 Feb 2025 21:02:34 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Mateusz Guzik <mjguzik@...il.com>
Cc: ebiederm@...ssion.com, brauner@...nel.org, akpm@...ux-foundation.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 5/6] pid: perform free_pid() calls outside of
tasklist_lock
On 02/03, Mateusz Guzik wrote:
>
> On Mon, Feb 3, 2025 at 7:49 PM Oleg Nesterov <oleg@...hat.com> wrote:
> >
> > To avoid the confusion, my question and a note are absolutely offtopic.
> >
> > On 02/01, Mateusz Guzik wrote:
> > >
> > > @@ -1085,6 +1085,7 @@ SYSCALL_DEFINE2(setpgid, pid_t, pid, pid_t, pgid)
> > > {
> > > struct task_struct *p;
> > > struct task_struct *group_leader = current->group_leader;
> > > + struct pid *pids[PIDTYPE_MAX] = { 0 };
> >
> > Could you remind me why
> >
> > struct pid *pids[PIDTYPE_MAX] = {};
> >
> > is not right? I seem to knew it some time before, but can't recall...
> >
>
> as far as I know this is merely a matter of convention, fwiw a naive grep:
> $ git grep '= { }' | wc -l
> 1273
> $ git grep '= { 0 }' | wc -l
> 2031
> $ git grep '= {}' | wc -l
> 5626
OK... but I still have a vague feeling that it was explained somewhere
that '{ 0 }' should be preferred... Nevermind.
> that said i can change it to whatever you see fit
No, please do whatever looks better to you.
Oleg.
Powered by blists - more mailing lists