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-next>] [day] [month] [year] [list]
Date:	Thu, 22 May 2008 21:30:20 +0100
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	maxk@...lcomm.com, linux-kernel@...r.kernel.org
Subject: [PATCH] hci_vhci: Elimiate BKL from ioctl handling

Switch to unlocked_ioctl and fix the return value to be -ENOTTY as it
should be.

Signed-off-by: Alan Cox <alan@...hat.com>

diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c
index 0638730..41002ef 100644
--- a/drivers/bluetooth/hci_vhci.c
+++ b/drivers/bluetooth/hci_vhci.c
@@ -245,10 +245,9 @@ static unsigned int vhci_poll(struct file *file, poll_table *wait)
 	return POLLOUT | POLLWRNORM;
 }
 
-static int vhci_ioctl(struct inode *inode, struct file *file,
-					unsigned int cmd, unsigned long arg)
+static long vhci_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
-	return -EINVAL;
+	return -ENOTTY;
 }
 
 static int vhci_open(struct inode *inode, struct file *file)
@@ -332,7 +331,7 @@ static const struct file_operations vhci_fops = {
 	.read		= vhci_read,
 	.write		= vhci_write,
 	.poll		= vhci_poll,
-	.ioctl		= vhci_ioctl,
+	.unlocked_ioctl	= vhci_ioctl,
 	.open		= vhci_open,
 	.release	= vhci_release,
 	.fasync		= vhci_fasync,
--
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