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:	Tue, 13 Jul 2010 09:27:51 +0100
From:	Martyn Welch <martyn.welch@...com>
To:	Arnd Bergmann <arnd@...db.de>
CC:	linux-kernel@...r.kernel.org, John Kacur <jkacur@...hat.com>,
	Greg Kroah-Hartman <gregkh@...e.de>, devel@...verdev.osuosl.org
Subject: Re: [PATCH 01/12] staging: autoconvert trivial BKL users to private
 mutex

Arnd Bergmann wrote:

<snip>


> diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c
> index bc16fc0..73a67a8 100644
> --- a/drivers/staging/vme/devices/vme_user.c
> +++ b/drivers/staging/vme/devices/vme_user.c
> @@ -31,7 +31,7 @@
>  #include <linux/slab.h>
>  #include <linux/spinlock.h>
>  #include <linux/syscalls.h>
> -#include <linux/smp_lock.h>
> +#include <linux/mutex.h>
>  #include <linux/types.h>
>  
>  #include <asm/io.h>
> @@ -40,6 +40,7 @@
>  #include "../vme.h"
>  #include "vme_user.h"
>  
> +static DEFINE_MUTEX(vme_user_mutex);
>  static char driver_name[] = "vme_user";
>  
>  static int bus[USER_BUS_MAX];
> @@ -560,9 +561,9 @@ vme_user_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
>  {
>  	int ret;
>  
> -	lock_kernel();
> +	mutex_lock(&vme_user_mutex);
>  	ret = vme_user_ioctl(file->f_path.dentry->d_inode, file, cmd, arg);
> -	unlock_kernel();
> +	mutex_unlock(&vme_user_mutex);
>   

Wha!, where'd that come from!!??

Ah, OK - "Staging: push down BKL into ioctl functions", missed that,
looks fine.
<http://git.kernel.org/gitweb.cgi?p=linux/kernel/git/sfr/linux-next.git;a=commitdiff;h=b1f2ac07636aadee5cb077fc7e830908b00fcaae>

Martyn
<http://git.kernel.org/gitweb.cgi?p=linux/kernel/git/sfr/linux-next.git;a=commitdiff;h=b1f2ac07636aadee5cb077fc7e830908b00fcaae>


>  
>  	return ret;
>  }
>   


-- 
Martyn Welch (Principal Software Engineer)   |   Registered in England and
GE Intelligent Platforms                     |   Wales (3828642) at 100
T +44(0)127322748                            |   Barbirolli Square, Manchester,
E martyn.welch@...com                        |   M2 3AB  VAT:GB 927559189

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