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] [day] [month] [year] [list]
Date:	Tue, 29 Jul 2008 12:02:01 +1000
From:	Nick Piggin <nickpiggin@...oo.com.au>
To:	Jack Steiner <steiner@....com>
Cc:	akpm@...ux-foundation.org, npiggin@...e.de, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] - GRU Driver V3 fixes to resolve code review comments

On Tuesday 29 July 2008 06:05, Jack Steiner wrote:

> Index: linux/drivers/misc/sgi-gru/grutlbpurge.c
> ===================================================================
> --- linux.orig/drivers/misc/sgi-gru/grutlbpurge.c	2008-07-28
> 14:52:26.000000000 -0500 +++
> linux/drivers/misc/sgi-gru/grutlbpurge.c	2008-07-28 14:52:54.000000000
> -0500 @@ -242,7 +242,9 @@ static void gru_invalidate_range_end(str
>  	struct gru_mm_struct *gms = container_of(mn, struct gru_mm_struct,
>  						 ms_notifier);
>
> -	atomic_dec(&gms->ms_range_active);
> +	/* ..._and_test() provides needed barrier */
> +	(void)atomic_dec_and_test(&gms->ms_range_active);
> +
>  	wake_up_all(&gms->ms_wait_queue);

What about

if (atomic_dec_and_test())
    wake_up_all()
?

Also, I would prefer either a comment to say why the increment of
ms_range_active is safe, or an smp_mb__after_atomic_inc() for it too.
--
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