Pull request: bluetooth-next-2.6 2010-02-27
Subsystems (4)
Marcel Holtmann
maintainerI was hoping to get the Enhanced L2CAP updates ready for this merge window, but in the end they were not stable enough. So I removed all the L2CAP changes out of this merge request.
The leftovers are small updates and bug fixes. The only bigger change is a patch that adds per controller debugfs. That way drivers don't have to deal with it on their own. This avoids clashes with multiple controllers attached to the same system. The Marvell driver is one of the examples where this is needed. Their debugfs support and multiple controllers was not done properly.
Regards
Marcel
Please pull from
git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-next-2.6.git master
This will update the following files:
drivers/bluetooth/ath3k.c | 2 + drivers/bluetooth/bcm203x.c | 2 +- drivers/bluetooth/bfusb.c | 2 +- drivers/bluetooth/bluecard_cs.c | 2 +- drivers/bluetooth/bpa10x.c | 2 +- drivers/bluetooth/bt3c_cs.c | 2 +- drivers/bluetooth/btmrvl_debugfs.c | 14 ++-- drivers/bluetooth/btmrvl_main.c | 2 +- drivers/bluetooth/btmrvl_sdio.c | 4 +- drivers/bluetooth/btsdio.c | 2 +- drivers/bluetooth/btuart_cs.c | 2 +- drivers/bluetooth/btusb.c | 2 +- drivers/bluetooth/dtl1_cs.c | 2 +- drivers/bluetooth/hci_ldisc.c | 2 +- drivers/bluetooth/hci_vhci.c | 2 +- include/net/bluetooth/hci.h | 6 ++- include/net/bluetooth/hci_core.h | 5 +- net/bluetooth/hci_core.c | 12 +++- net/bluetooth/hci_event.c | 1 + net/bluetooth/hci_sock.c | 2 +- net/bluetooth/hci_sysfs.c | 122 +++++++++++++++++++++++++---------- 21 files changed, 129 insertions(+), 63 deletions(-)
through these ChangeSets:
Dan Carpenter (1):
Bluetooth: Add missing kfree() on error path in Atheros driver
Johann Felix Soden (1):
Bluetooth: Fix out of scope variable access in hci_sock_cmsg()
Marcel Holtmann (4):
Bluetooth: Convert controller hdev->type to hdev->bus
Bluetooth: Convert inquiry cache to use debugfs instead of sysfs
Bluetooth: Convert Marvell driver to use per adapter debugfs
Bluetooth: Add controller types for BR/EDR and 802.11 AMP
Márton Németh (1):
Bluetooth: Make USB device id constant
Peter Huewe (1):
Bluetooth: Add __init/__exit macros to Marvell SDIO driver
Stephen Coe (1):
Bluetooth: Add SCO fallback for unsupported feature error
Marcel Holtmann
maintainerPATCH 1/9 Bluetooth: Add __init/__exit macros to Marvell SDIO driver
From: Peter Huewe <[email protected]>
Trivial patch which adds the __init/__exit macros to the module_init/ module_exit functions of btmrvl_sdio.c driver.
--- drivers/bluetooth/btmrvl_sdio.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/bluetooth/btmrvl_sdio.c +2 -2
@@ -976,7 +976,7 @@ static struct sdio_driver bt_mrvl_sdio = { .remove = btmrvl_sdio_remove, }; -static int btmrvl_sdio_init_module (void ) +static int __init btmrvl_sdio_init_module (void ) {if (sdio_register_driver (&bt_mrvl_sdio) !=0 ) {BT_ERR ("SDIO Driver Registration Failed" );
@@ -989,7 +989,7 @@ static int btmrvl_sdio_init_module(void)return 0 ; } -static void btmrvl_sdio_exit_module (void ) +static void __exit btmrvl_sdio_exit_module(void) {/* Set the flag as user is removing this module. */ user_rmmod =1 ;
Signature · 1 line
1.6.6
Marcel Holtmann
maintainerPATCH 2/9 Bluetooth: Make USB device id constant
From: Márton Németh <[email protected]>
The id_table field of the struct usb_device_id is constant in <linux/usb.h> so it is worth to make bcm203x_table also constant.
The semantic match that finds this kind of pattern is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@r@
disable decl_init,const_decl_init;
identifier I1, I2, x;
@@
struct I1 {
...
const struct I2 *x;
...
};@s@
identifier r.I1, y;
identifier r.x, E;
@@
struct I1 y = {
.x = E,
};@c@
identifier r.I2;
identifier s.E;
@@
const struct I2 E[] = ... ;
@depends on !c@
identifier r.I2;
identifier s.E;
@@
+ const
struct I2 E[] = ...;
// </smpl>
--- drivers/bluetooth/bcm203x.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/bluetooth/bcm203x.c +1 -1
@@ -39,7 +39,7 @@#define VERSION "1.2" -static struct usb_device_id bcm203x_table[] = { +static const struct usb_device_id bcm203x_table[] = {/* Broadcom Blutonium (BCM2033) */ {USB_DEVICE (0x0a5c ,0x2033 ) },
Signature · 1 line
1.6.6
Marcel Holtmann
maintainerPATCH 3/9 Bluetooth: Add missing kfree() on error path in Atheros driver
From: Dan Carpenter <[email protected]>
Add a couple kfree() calls on an error path.
--- drivers/bluetooth/ath3k.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/bluetooth/ath3k.c +2 -0
@@ -143,6 +143,8 @@ static int ath3k_probe(struct usb_interface *intf,usb_set_intfdata (intf, data);if (ath3k_load_firmware (data, data->fw_data, data->fw_size)) {usb_set_intfdata (intf,NULL ); +kfree (data->fw_data); +kfree (data);return -EIO ; }
Signature · 1 line
1.6.6
Marcel Holtmann
maintainerPATCH 4/9 Bluetooth: Convert controller hdev->type to hdev->bus
The hdev->type is misnamed and should be actually hdev->bus instead. So convert it now.
--- drivers/bluetooth/bfusb.c | 2 +- drivers/bluetooth/bluecard_cs.c | 2 +- drivers/bluetooth/bpa10x.c | 2 +- drivers/bluetooth/bt3c_cs.c | 2 +- drivers/bluetooth/btmrvl_main.c | 2 +- drivers/bluetooth/btsdio.c | 2 +- drivers/bluetooth/btuart_cs.c | 2 +- drivers/bluetooth/btusb.c | 2 +- drivers/bluetooth/dtl1_cs.c | 2 +- drivers/bluetooth/hci_ldisc.c | 2 +- drivers/bluetooth/hci_vhci.c | 2 +- include/net/bluetooth/hci.h | 2 +- include/net/bluetooth/hci_core.h | 2 +- net/bluetooth/hci_core.c | 8 ++++---- net/bluetooth/hci_sysfs.c | 16 ++++++++-------- 15 files changed, 25 insertions(+), 25 deletions(-)
drivers/bluetooth/bfusb.c +1 -1
@@ -703,7 +703,7 @@ static int bfusb_probe(struct usb_interface *intf, const struct usb_device_id *i data->hdev = hdev; - hdev->type =HCI_USB ; + hdev->bus =HCI_USB ; hdev->driver_data = data;SET_HCIDEV_DEV (hdev, &intf->dev);
drivers/bluetooth/bluecard_cs.c +1 -1
@@ -736,7 +736,7 @@ static int bluecard_open(bluecard_info_t *info) info->hdev = hdev; - hdev->type =HCI_PCCARD ; + hdev->bus =HCI_PCCARD ; hdev->driver_data = info;SET_HCIDEV_DEV (hdev, &info->p_dev->dev);
drivers/bluetooth/bpa10x.c +1 -1
@@ -469,7 +469,7 @@ static int bpa10x_probe(struct usb_interface *intf, const struct usb_device_id *return -ENOMEM ; } - hdev->type =HCI_USB ; + hdev->bus =HCI_USB ; hdev->driver_data = data; data->hdev = hdev;
drivers/bluetooth/bt3c_cs.c +1 -1
@@ -582,7 +582,7 @@ static int bt3c_open(bt3c_info_t *info) info->hdev = hdev; - hdev->type =HCI_PCCARD ; + hdev->bus =HCI_PCCARD ; hdev->driver_data = info;SET_HCIDEV_DEV (hdev, &info->p_dev->dev);
drivers/bluetooth/btmrvl_main.c +1 -1
@@ -563,7 +563,7 @@ struct btmrvl_private *btmrvl_add_card(void *card) priv->btmrvl_dev.tx_dnld_rdy = true; - hdev->type =HCI_SDIO ; + hdev->bus =HCI_SDIO ; hdev->open = btmrvl_open; hdev->close = btmrvl_close; hdev->flush = btmrvl_flush;
drivers/bluetooth/btsdio.c +1 -1
@@ -326,7 +326,7 @@ static int btsdio_probe(struct sdio_func *func,return -ENOMEM ; } - hdev->type =HCI_SDIO ; + hdev->bus =HCI_SDIO ; hdev->driver_data = data; data->hdev = hdev;
drivers/bluetooth/btuart_cs.c +1 -1
@@ -500,7 +500,7 @@ static int btuart_open(btuart_info_t *info) info->hdev = hdev; - hdev->type =HCI_PCCARD ; + hdev->bus =HCI_PCCARD ; hdev->driver_data = info;SET_HCIDEV_DEV (hdev, &info->p_dev->dev);
drivers/bluetooth/btusb.c +1 -1
@@ -939,7 +939,7 @@ static int btusb_probe(struct usb_interface *intf,return -ENOMEM ; } - hdev->type =HCI_USB ; + hdev->bus =HCI_USB ; hdev->driver_data = data; data->hdev = hdev;
drivers/bluetooth/dtl1_cs.c +1 -1
@@ -485,7 +485,7 @@ static int dtl1_open(dtl1_info_t *info) info->hdev = hdev; - hdev->type =HCI_PCCARD ; + hdev->bus =HCI_PCCARD ; hdev->driver_data = info;SET_HCIDEV_DEV (hdev, &info->p_dev->dev);
drivers/bluetooth/hci_ldisc.c +1 -1
@@ -383,7 +383,7 @@ static int hci_uart_register_dev(struct hci_uart *hu) hu->hdev = hdev; - hdev->type =HCI_UART ; + hdev->bus =HCI_UART ; hdev->driver_data = hu; hdev->open = hci_uart_open;
drivers/bluetooth/hci_vhci.c +1 -1
@@ -236,7 +236,7 @@ static int vhci_open(struct inode *inode, struct file *file) data->hdev = hdev; - hdev->type =HCI_VIRTUAL ; + hdev->bus =HCI_VIRTUAL ; hdev->driver_data = data; hdev->open = vhci_open_dev;
include/net/bluetooth/hci.h +1 -1
@@ -43,7 +43,7 @@#define HCI_NOTIFY_CONN_DEL 2#define HCI_NOTIFY_VOICE_SETTING 3 -/* HCI device types */ +/* HCI bus types */ #define HCI_VIRTUAL 0#define HCI_USB 1#define HCI_PCCARD 2
include/net/bluetooth/hci_core.h +1 -1
@@ -70,7 +70,7 @@ struct hci_dev {char name[8 ];unsigned long flags;__u16 id; -__u8 type; +__u8 bus;bdaddr_t bdaddr;__u8 dev_name[248 ];__u8 dev_class[3 ];
net/bluetooth/hci_core.c +4 -4
@@ -797,7 +797,7 @@ int hci_get_dev_info(void __user *arg)strcpy (di.name, hdev->name); di.bdaddr = hdev->bdaddr; - di.type = hdev->type; + di.type = hdev->bus; di.flags = hdev->flags; di.pkt_type = hdev->pkt_type; di.acl_mtu = hdev->acl_mtu;
@@ -869,8 +869,8 @@ int hci_register_dev(struct hci_dev *hdev)struct list_head *head = &hci_dev_list, *p;int i, id =0 ; -BT_DBG ("%p name %s type %d owner %p" , hdev, hdev->name, - hdev->type, hdev->owner); +BT_DBG ("%p name %s bus %d owner %p" , hdev, hdev->name, + hdev->bus, hdev->owner);if (!hdev->open || !hdev->close || !hdev->destruct)return -EINVAL ;
@@ -946,7 +946,7 @@ int hci_unregister_dev(struct hci_dev *hdev) {int i; -BT_DBG ("%p name %s type %d" , hdev, hdev->name, hdev->type); +BT_DBG ("%p name %s bus %d" , hdev, hdev->name, hdev->bus);write_lock_bh (&hci_dev_list_lock);list_del (&hdev->list);
net/bluetooth/hci_sysfs.c +8 -8
@@ -166,9 +166,9 @@ void hci_conn_del_sysfs(struct hci_conn *conn)queue_work (bt_workq, &conn->work_del); } -static inline char *host_typetostr (int type) +static inline char *host_bustostr (int bus) { -switch (type) { +switch (bus) {case HCI_VIRTUAL :return "VIRTUAL" ;case HCI_USB :
@@ -188,10 +188,10 @@ static inline char *host_typetostr(int type) } } -static ssize_t show_type (struct device *dev,struct device_attribute *attr,char *buf) +static ssize_t show_bus (struct device *dev,struct device_attribute *attr,char *buf) {struct hci_dev *hdev =dev_get_drvdata (dev); -return sprintf (buf,"%s\n" ,host_typetostr (hdev->type)); +return sprintf (buf,"%s\n" ,host_bustostr (hdev->bus)); }static ssize_t show_name (struct device *dev,struct device_attribute *attr,char *buf)
@@ -355,7 +355,7 @@ static ssize_t store_sniff_min_interval(struct device *dev, struct device_attribreturn count; } -static DEVICE_ATTR(type, S_IRUGO, show_type, NULL); +static DEVICE_ATTR(bus, S_IRUGO, show_bus, NULL); static DEVICE_ATTR(name, S_IRUGO, show_name, NULL); static DEVICE_ATTR(class, S_IRUGO, show_class, NULL); static DEVICE_ATTR(address, S_IRUGO, show_address, NULL);
@@ -373,7 +373,7 @@ static DEVICE_ATTR(sniff_min_interval, S_IRUGO | S_IWUSR, show_sniff_min_interval, store_sniff_min_interval);static struct attribute *bt_host_attrs[] = { - &dev_attr_type.attr, + &dev_attr_bus.attr, &dev_attr_name.attr, &dev_attr_class.attr, &dev_attr_address.attr,
@@ -414,7 +414,7 @@ int hci_register_sysfs(struct hci_dev *hdev)struct device *dev = &hdev->dev;int err; -BT_DBG ("%p name %s type %d" , hdev, hdev->name, hdev->type); +BT_DBG ("%p name %s bus %d" , hdev, hdev->name, hdev->bus); dev->type = &bt_host; dev->class = bt_class;
@@ -433,7 +433,7 @@ int hci_register_sysfs(struct hci_dev *hdev)void hci_unregister_sysfs (struct hci_dev *hdev) { -BT_DBG ("%p name %s type %d" , hdev, hdev->name, hdev->type); +BT_DBG ("%p name %s bus %d" , hdev, hdev->name, hdev->bus);device_del (&hdev->dev); }
Signature · 1 line
1.6.6
Marcel Holtmann
maintainerPATCH 5/9 Bluetooth: Convert inquiry cache to use debugfs instead of sysfs
The output of the inquiry cache is only useful for debugging purposes and so move it into debugfs.
--- include/net/bluetooth/hci_core.h | 2 + net/bluetooth/hci_sysfs.c | 92 +++++++++++++++++++++++++------------ 2 files changed, 64 insertions(+), 30 deletions(-)
include/net/bluetooth/hci_core.h +2 -0
@@ -134,6 +134,8 @@ struct hci_dev {atomic_t promisc; +struct dentry *debugfs; +struct device *parent;struct device dev;
net/bluetooth/hci_sysfs.c +62 -30
151 lines not on this page · raw message
Signature · 1 line
1.6.6
Marcel Holtmann
maintainerPATCH 6/9 Bluetooth: Convert Marvell driver to use per adapter debugfs
The debugfs support of the Marvell driver is buggy. It is limited to one controller per system. Fix this by using the controller specific debugfs directory as parent.
--- drivers/bluetooth/btmrvl_debugfs.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-)
drivers/bluetooth/btmrvl_debugfs.c +7 -7
@@ -26,7 +26,8 @@#include "btmrvl_drv.h" struct btmrvl_debugfs_data { -struct dentry *root_dir, *config_dir, *status_dir; +struct dentry *config_dir; +struct dentry *status_dir;/* config */ struct dentry *psmode;
@@ -363,6 +364,9 @@ void btmrvl_debugfs_init(struct hci_dev *hdev)struct btmrvl_private *priv = hdev->driver_data;struct btmrvl_debugfs_data *dbg; +if (!hdev->debugfs) +return ; + dbg =kzalloc (sizeof (*dbg),GFP_KERNEL ); priv->debugfs_data = dbg;
@@ -371,9 +375,7 @@ void btmrvl_debugfs_init(struct hci_dev *hdev)return ; } - dbg->root_dir =debugfs_create_dir ("btmrvl" ,NULL ); - - dbg->config_dir =debugfs_create_dir ("config" , dbg->root_dir); + dbg->config_dir =debugfs_create_dir ("config" , hdev->debugfs); dbg->psmode =debugfs_create_file ("psmode" ,0644 , dbg->config_dir, hdev->driver_data, &btmrvl_psmode_fops);
@@ -388,7 +390,7 @@ void btmrvl_debugfs_init(struct hci_dev *hdev) dbg->hscfgcmd =debugfs_create_file ("hscfgcmd" ,0644 , dbg->config_dir, hdev->driver_data, &btmrvl_hscfgcmd_fops); - dbg->status_dir =debugfs_create_dir ("status" , dbg->root_dir); + dbg->status_dir =debugfs_create_dir ("status" , hdev->debugfs); dbg->curpsmode = debugfs_create_file("curpsmode", 0444, dbg->status_dir, hdev->driver_data,
@@ -425,7 +427,5 @@ void btmrvl_debugfs_remove(struct hci_dev *hdev)debugfs_remove (dbg->txdnldready);debugfs_remove (dbg->status_dir); -debugfs_remove (dbg->root_dir); -kfree (dbg); }
Signature · 1 line
1.6.6
Marcel Holtmann
maintainerPATCH 7/9 Bluetooth: Add controller types for BR/EDR and 802.11 AMP
With the Bluetooth 3.0 specification and the introduction of alternate MAC/PHY (AMP) support, it is required to differentiate between primary BR/EDR controllers and 802.11 AMP controllers. So introduce a special type inside HCI device for differentiation.
For now all AMP controllers will be treated as raw devices until an AMP manager has been implemented.
--- include/net/bluetooth/hci.h | 4 ++++ include/net/bluetooth/hci_core.h | 1 + net/bluetooth/hci_core.c | 6 +++++- net/bluetooth/hci_sysfs.c | 20 ++++++++++++++++++++ 4 files changed, 30 insertions(+), 1 deletions(-)
include/net/bluetooth/hci.h +4 -0
@@ -52,6 +52,10 @@#define HCI_PCI 5#define HCI_SDIO 6 +/* HCI controller types */ +#define HCI_BREDR 0x00 +#define HCI_80211 0x01 +/* HCI device quirks */ enum {HCI_QUIRK_NO_RESET ,
include/net/bluetooth/hci_core.h +1 -0
@@ -71,6 +71,7 @@ struct hci_dev {unsigned long flags;__u16 id;__u8 bus; +__u8 dev_type;bdaddr_t bdaddr;__u8 dev_name[248 ];__u8 dev_class[3 ];
net/bluetooth/hci_core.c +5 -1
@@ -491,6 +491,10 @@ int hci_dev_open(__u16 dev)if (test_bit (HCI_QUIRK_RAW_DEVICE , &hdev->quirks))set_bit (HCI_RAW , &hdev->flags); +/* Treat all non BR/EDR controllers as raw devices for now */ +if (hdev->dev_type !=HCI_BREDR ) +set_bit (HCI_RAW , &hdev->flags); +if (hdev->open (hdev)) { ret = -EIO ; goto done;
@@ -797,7 +801,7 @@ int hci_get_dev_info(void __user *arg)strcpy (di.name, hdev->name); di.bdaddr = hdev->bdaddr; - di.type = hdev->bus; + di.type = (hdev->bus &0x0f ) | (hdev->dev_type <<4 ); di.flags = hdev->flags; di.pkt_type = hdev->pkt_type; di.acl_mtu = hdev->acl_mtu;
net/bluetooth/hci_sysfs.c +20 -0
@@ -192,12 +192,30 @@ static inline char *host_bustostr(int bus) } } +static inline char *host_typetostr (int type) +{ +switch (type) { +case HCI_BREDR : +return "BR/EDR" ; +case HCI_80211 : +return "802.11" ; +default : +return "UNKNOWN" ; + } +} +static ssize_t show_bus (struct device *dev,struct device_attribute *attr,char *buf) {struct hci_dev *hdev =dev_get_drvdata (dev);return sprintf (buf,"%s\n" ,host_bustostr (hdev->bus)); } +static ssize_t show_type (struct device *dev,struct device_attribute *attr,char *buf) +{ +struct hci_dev *hdev =dev_get_drvdata (dev); +return sprintf (buf,"%s\n" ,host_typetostr (hdev->dev_type)); +} +static ssize_t show_name (struct device *dev,struct device_attribute *attr,char *buf) {struct hci_dev *hdev =dev_get_drvdata (dev);
@@ -334,6 +352,7 @@ static ssize_t store_sniff_min_interval(struct device *dev, struct device_attrib } static DEVICE_ATTR(bus, S_IRUGO, show_bus, NULL); +static DEVICE_ATTR(type, S_IRUGO, show_type, NULL); static DEVICE_ATTR(name, S_IRUGO, show_name, NULL); static DEVICE_ATTR(class, S_IRUGO, show_class, NULL); static DEVICE_ATTR(address, S_IRUGO, show_address, NULL);
@@ -351,6 +370,7 @@ static DEVICE_ATTR(sniff_min_interval, S_IRUGO | S_IWUSR,static struct attribute *bt_host_attrs[] = { &dev_attr_bus.attr, + &dev_attr_type.attr, &dev_attr_name.attr, &dev_attr_class.attr, &dev_attr_address.attr,
Signature · 1 line
1.6.6
Marcel Holtmann
maintainerPATCH 8/9 Bluetooth: Add SCO fallback for unsupported feature error
From: Stephen Coe <[email protected]>
The Bluetooth SIG PTS test case: TC_AG_ACS_BV_10_I, rejects eSCO with "Unsupported Feature or Parameter Value" (0x11). This patch adds case for SCO fallback.
2007-09-20 12:20:37.787747 > HCI Event: Number of Completed Packets (0x13) plen 5
handle 38 packets 1
2007-09-20 12:20:37.842154 < HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17
handle 38 voice setting 0x0060
2007-09-20 12:20:37.847037 > HCI Event: Command Status (0x0f) plen 4
Setup Synchronous Connection (0x01|0x0028) status 0x00 ncmd 1
2007-09-20 12:20:37.855233 > HCI Event: Max Slots Change (0x1b) plen 3
handle 38 slots 1
2007-09-20 12:20:39.913354 > HCI Event: Synchronous Connect Complete (0x2c) plen 17
status 0x11 handle 38 bdaddr 00:16:93:01:01:7A type eSCO
Error: Unsupported Feature or Parameter Value
2007-09-20 12:20:39.922629 > HCI Event: Max Slots Change (0x1b) plen 3
handle 38 slots 5
2007-09-20 12:20:58.126886 < ACL data: handle 38 flags 0x02 dlen 8
L2CAP(d): cid 0x0041 len 4 [psm 0]
0000: 0b 53 01 b8 .S..
2007-09-20 12:20:58.130138 > HCI Event: Number of Completed Packets (0x13) plen 5
handle 38 packets 1--- net/bluetooth/hci_event.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
net/bluetooth/hci_event.c +1 -0
@@ -1698,6 +1698,7 @@ static inline void hci_sync_conn_complete_evt(struct hci_dev *hdev, struct sk_buhci_conn_add_sysfs (conn);break ; +case 0x11 :/* Unsupported Feature or Parameter Value */ case 0x1c :/* SCO interval rejected */ case 0x1a :/* Unsupported Remote Feature */ case 0x1f :/* Unspecified error */
Signature · 1 line
1.6.6
Marcel Holtmann
maintainerPATCH 9/9 Bluetooth: Fix out of scope variable access in hci_sock_cmsg()
From: Johann Felix Soden <[email protected]>
The pointer data can point to the variable ctv. Access to data happens when ctv is already out of scope.
--- net/bluetooth/hci_sock.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
net/bluetooth/hci_sock.c +1 -1
@@ -338,8 +338,8 @@ static inline void hci_sock_cmsg(struct sock *sk, struct msghdr *msg, struct sk_ data = &tv; len =sizeof (tv);#ifdef CONFIG_COMPAT +struct compat_timeval ctv;if (msg->msg_flags &MSG_CMSG_COMPAT ) { -struct compat_timeval ctv; ctv.tv_sec = tv.tv_sec; ctv.tv_usec = tv.tv_usec; data = &ctv;
Signature · 1 line
1.6.6
David Miller
maintainerFrom: Marcel Holtmann <[email protected]>
Date: Sat, 27 Feb 2010 23:38:29 +0100
Quoted 3 lines
Please pull from
git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-next-2.6.gitmaster
There are no new changes in that tree. Either you forgot to push or you gave me the wrong URL. :-)
davem@sunset:~/src/GIT/net-next-2.6$ git pull git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-next-2.6.git master
Quoted 1 line
From
git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-next-2.6
* branch master -> FETCH_HEAD
Already up-to-date.
davem@sunset:~/src/GIT/net-next-2.6$
Marcel Holtmann
maintainerHi Dave,
Quoted 4 lines
Quoted 3 lines
Please pull from
git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-next-2.6.gitmaster
Quoted 8 lines
There are no new changes in that tree. Either you forgot to push or you gave me the wrong URL. :-)
davem@sunset:~/src/GIT/net-next-2.6$ git pull git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-next-2.6.git master From git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-next-2.6 * branch master -> FETCH_HEAD Already up-to-date. davem@sunset:~/src/GIT/net-next-2.6$
that is embarrassing. I indeed just forgot to call git push after updating the tree. Sorry about that. Try again, they should show up now.
Regards
Marcel
David Miller
maintainerFrom: Marcel Holtmann <[email protected]>
Date: Sun, 28 Feb 2010 00:33:16 -0800
Quoted 2 lines
that is embarrassing. I indeed just forgot to call git push after updating the tree. Sorry about that. Try again, they should show up now.
Ok thanks.
But I just noticed that patch #9 is bogus, it ends up mixing code and variable declarations in the function. Please fix this and resend your pull request.
Marcel Holtmann
maintainerHi Dave,
Quoted 8 lines
Quoted 2 lines
that is embarrassing. I indeed just forgot to call git push after updating the tree. Sorry about that. Try again, they should show up now.
Ok thanks.
But I just noticed that patch #9 is bogus, it ends up mixing code and variable declarations in the function. Please fix this and resend your pull request.
makes it more ugly, but you are right. I updated the tree with a proper fix for that one now. Please pull again.
Regards
Marcel
David Miller
maintainerFrom: Marcel Holtmann <[email protected]>
Date: Sun, 28 Feb 2010 00:52:41 -0800
Quoted 8 lines
Hi Dave,
Quoted 3 lines
But I just noticed that patch #9 is bogus, it ends up mixing code and variable declarations in the function. Please fix this and resend your pull request.
makes it more ugly, but you are right. I updated the tree with a proper fix for that one now. Please pull again.
Looks a lot better, pulled thanks!