lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190814141956.GC11595@redhat.com>
Date:   Wed, 14 Aug 2019 16:19:57 +0200
From:   Oleg Nesterov <oleg@...hat.com>
To:     Christian Brauner <christian.brauner@...ntu.com>
Cc:     linux-kernel@...r.kernel.org, libc-alpha@...rceware.org,
        alistair23@...il.com, ebiederm@...ssion.com, arnd@...db.de,
        dalias@...c.org, torvalds@...ux-foundation.org,
        adhemerval.zanella@...aro.org, fweimer@...hat.com,
        palmer@...ive.com, macro@....com, zongbox@...il.com,
        akpm@...ux-foundation.org, viro@...iv.linux.org.uk, hpa@...or.com
Subject: Re: [PATCH v2 1/1] waitid: Add support for waiting for the current
 process group

On 08/14, Christian Brauner wrote:
>
> +static struct pid *find_get_pgrp(pid_t nr)
> +{
> +	struct pid *pid;
> +
> +	if (nr)
> +		return find_get_pid(nr);
> +
> +	rcu_read_lock();
> +	pid = get_pid(task_pgrp(current));
> +	rcu_read_unlock();
> +
> +	return pid;
> +}

I can't say I like this helper... even its name doesn't look good to me.

I forgot that we already have get_task_pid() when I replied to the previous
version... How about

	case P_PGID:

		if (upid)
			pid = find_get_pid(upid);
		else
			pid = get_task_pid(current, PIDTYPE_PGID);

?

Oleg.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ