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:	Sat, 21 Mar 2009 11:29:10 +0900
From:	Mattia Dongili <malattia@...ux.it>
To:	Alessio Igor Bogani <abogani@...ware.it>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	ACPI Devel Mailing List <linux-acpi@...r.kernel.org>
Subject: Re: [PATCH] sony-laptop: Kill the BKL

On Fri, Mar 20, 2009 at 07:02:45PM +0100, Alessio Igor Bogani wrote:
> Signed-off-by: Alessio Igor Bogani <abogani@...ware.it>

Applied, thanks. Will send together with my patch set for .30 soon.

> ---
>  drivers/platform/x86/sony-laptop.c |   12 ++++++++----
>  1 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
> index 537959d..15f940b 100644
> --- a/drivers/platform/x86/sony-laptop.c
> +++ b/drivers/platform/x86/sony-laptop.c
> @@ -46,7 +46,6 @@
>  #include <linux/module.h>
>  #include <linux/moduleparam.h>
>  #include <linux/init.h>
> -#include <linux/smp_lock.h>
>  #include <linux/types.h>
>  #include <linux/backlight.h>
>  #include <linux/platform_device.h>
> @@ -1934,10 +1933,15 @@ static int sonypi_misc_release(struct inode *inode, struct file *file)
>  static int sonypi_misc_open(struct inode *inode, struct file *file)
>  {
>  	/* Flush input queue on first open */
> -	lock_kernel();
> +	unsigned long flags;
> +
> +	spin_lock_irqsave(sonypi_compat.fifo->lock, flags);
> +
>  	if (atomic_inc_return(&sonypi_compat.open_count) == 1)
> -		kfifo_reset(sonypi_compat.fifo);
> -	unlock_kernel();
> +		__kfifo_reset(sonypi_compat.fifo);
> +
> +	spin_unlock_irqrestore(sonypi_compat.fifo->lock, flags);
> +
>  	return 0;
>  }
>  
> -- 
> 1.6.0.4
> 
> --
> 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/
> 
-- 
mattia
:wq!
--
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