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:	Fri, 08 Oct 2010 10:18:40 +0200
From:	Andi Kleen <andi@...stfloor.org>
To:	Dave Chinner <david@...morbit.com>
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 01/18] kernel: add bl_list

Dave Chinner <david@...morbit.com> writes:

> +static inline void __hlist_bl_del(struct hlist_bl_node *n)
> +{
> +	struct hlist_bl_node *next = n->next;
> +	struct hlist_bl_node **pprev = n->pprev;
> +
> +	LIST_BL_BUG_ON((unsigned long)n & LIST_BL_LOCKMASK);
> +
> +	/* pprev may be `first`, so be careful not to lose the lock bit */
> +	*pprev = (struct hlist_bl_node *)
> +			((unsigned long)next |
> +			 ((unsigned long)*pprev & LIST_BL_LOCKMASK));
> +	if (next)
> +		next->pprev = pprev;
> +}

Should this set n->pprev to NULL so that unhashed returns true
afterwards?


> +
> +static inline void hlist_bl_del(struct hlist_bl_node *n)
> +{
> +	__hlist_bl_del(n);
> +	n->next = BL_LIST_POISON1;
> +	n->pprev = BL_LIST_POISON2;
> +}

Ok so unhashed only works once. Seems unsymmetric.

Other than that looks good to me.

Reviewed-by: Andi Kleen <ak@...ux.intel.com>

-Andi

-- 
ak@...ux.intel.com -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ