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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 7 Oct 2008 19:14:09 +0100
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Richard Holden <aciddeath@...il.com>
Cc:	linux-kernel@...r.kernel.org, mingo@...e.hu
Subject: Re: BKL still required for what functions?

> -	lock_kernel();
> +	
>   	mutex_lock(&phone_lock);
>   	p = phone_device[minor];
>   	if (p)
>   		new_fops = fops_get(p->f_op);
>   	if (!new_fops) {
>   		mutex_unlock(&phone_lock);
> +		lock_kernel();
>   		request_module("char-major-%d-%d", PHONE_MAJOR, minor);
> +		unlock_kernel();
>   		mutex_lock(&phone_lock);
>   		p = phone_device[minor];
>   		if (p == NULL || (new_fops = fops_get(p->f_op)) == NULL)
> @@ -81,7 +83,6 @@ static int phone_open(struct inode *inode, struct  
> file *file)
>   	fops_put(old_fops);
>   end:
>   	mutex_unlock(&phone_lock);
> -	unlock_kernel();
>   	return err;
>   }

Looks like the BKL can go entirely there providing phone_device[] is
always rechecked back in the phone mutex, request_module is happy nowdays
without the BKL
--
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