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  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:	Fri, 8 Jan 2010 15:18:47 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Stefani Seibold <stefani@...bold.net>
Cc:	linux-kernel <linux-kernel@...r.kernel.org>,
	Johan Hovold <jhovold@...il.com>,
	Pete Zaitcev <zaitcev@...hat.com>
Subject: Re: [tip:urgent] fix kfifo_out_locked race bug

On Tue, 05 Jan 2010 14:38:35 +0100
Stefani Seibold <stefani@...bold.net> wrote:

> This patch fix a wrong optimization in include/linux/kfifo.h which could
> cause a race in kfifo_out_locked.
> 
> Please apply it to the 2.6.33-rc* tree.
> 
> Signed-off-by: Stefani Seibold <stefani@...bold.net>
> ---
>  kfifo.h |    7 -------
>  1 file changed, 7 deletions(-)
> 
> --- linux-2.6.33-rc2.orig/include/linux/kfifo.h	2009-12-27
> 23:37:04.921185257 +0100
> +++ kfifo.h	2010-01-05 14:32:31.414316321 +0100
> @@ -228,13 +228,6 @@ static inline __must_check unsigned int 
>  
>  	ret = kfifo_out(fifo, to, n);
>  
> -	/*
> -	 * optimization: if the FIFO is empty, set the indices to 0
> -	 * so we don't wrap the next time
> -	 */
> -	if (kfifo_is_empty(fifo))
> -		kfifo_reset(fifo);
> -
>  	spin_unlock_irqrestore(lock, flags);
>  
>  	return ret;
> 

Thanks.  Some nits:

- the patch is wordwrapped.  I fixed that up.

- you removed the cc's of the particpants in the earlier dicsussion. 
  I restored them here.

- the changelog didn't describe the bug - what was the race??

- I added "Reported-by: Johan Hovold <jhovold@...il.com>" to the changelog

- the "[tip:urgent]" tag in the Subject: line is something which
  Ingo's patch tools add to outgoing email notifications and wasn't
  appropriate here.  Plain old "[patch]" would be typical.

--
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