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]
Date:   Mon, 25 Sep 2017 16:12:58 +0200
From:   Oleg Nesterov <oleg@...hat.com>
To:     Gargi Sharma <gs051095@...il.com>
Cc:     linux-kernel@...r.kernel.org, riel@...riel.com,
        julia.lawall@...6.fr, akpm@...ux-foundation.org, mingo@...nel.org,
        pasha.tatashin@...cle.com, ktkhai@...tuozzo.com
Subject: Re: [PATCH 2/4] idr: Add a function idr_get()

On 09/25, Gargi Sharma wrote:
>
> idr_get(namespace, id) returns a NULL if id is not present
> in the idr tree or returns the pointer to the struct if id is
> present in the idr tree. With this function in the idr library,
> code for pid allocation can be simplified by calling this function
> instead of looking through the pidhash.

Could you explain why find_pid_ns() can't use idr_find() ?

> +void * idr_get(struct idr *idr, int *id)
> +{
> +	struct radix_tree_node *node;
> +	void __rcu **slot = NULL;
> +
> +	__radix_tree_lookup(&idr->idr_rt, *id, &node, &slot);

so why it takes "int *", not just "int" ?

Oleg.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ