From cd8d627a6b66d9755637b4dad2083864a9bfce9a Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Tue, 5 Feb 2008 03:04:05 -0800 Subject: hamradio: fix dmascc section mismatch hw[] is used in both init and exit functions so it cannot be initdata (section mismatch is when CONFIG_MODULES=n and CONFIG_DMASCC=y). WARNING: vmlinux.o(.exit.text+0xba7): Section mismatch: reference to .init.data: (between 'dmascc_exit' and 'sixpack_exit_driver') Signed-off-by: Randy Dunlap Cc: Klaus Kudielka Cc: Sam Ravnborg Signed-off-by: Andrew Morton Signed-off-by: David S. Miller --- drivers/net/hamradio/dmascc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/net/hamradio/dmascc.c b/drivers/net/hamradio/dmascc.c index 11b83dae00a..e04bf992644 100644 --- a/drivers/net/hamradio/dmascc.c +++ b/drivers/net/hamradio/dmascc.c @@ -262,8 +262,8 @@ static void tm_isr(struct scc_priv *priv); static int io[MAX_NUM_DEVS] __initdata = { 0, }; -/* Beware! hw[] is also used in cleanup_module(). */ -static struct scc_hardware hw[NUM_TYPES] __initdata_or_module = HARDWARE; +/* Beware! hw[] is also used in dmascc_exit(). */ +static struct scc_hardware hw[NUM_TYPES] = HARDWARE; /* Global variables */ -- cgit v1.2.3-70-g09d2 From a26af1e08a3a1e0f88e6f2685ac2313d713a59c9 Mon Sep 17 00:00:00 2001 From: Nathaniel Filardo Date: Tue, 5 Feb 2008 03:05:07 -0800 Subject: tun: impossible to deassert IFF_ONE_QUEUE or IFF_NO_PI From: "Nathaniel Filardo" Taken from http://bugzilla.kernel.org/show_bug.cgi?id=9806 The TUN/TAP driver only permits one-way transitions of IFF_NO_PI or IFF_ONE_QUEUE during the lifetime of a tap/tun interface. Note that tun_set_iff contains 541 if (ifr->ifr_flags & IFF_NO_PI) 542 tun->flags |= TUN_NO_PI; 543 544 if (ifr->ifr_flags & IFF_ONE_QUEUE) 545 tun->flags |= TUN_ONE_QUEUE; This is easily fixed by adding else branches which clear these bits. Steps to reproduce: This is easily reproduced by setting an interface persistant using tunctl then attempting to open it as IFF_TAP or IFF_TUN, without asserting the IFF_NO_PI flag. The ioctl() will succeed and the ifr.flags word is not modified, but the interface remains in IFF_NO_PI mode (as it was set by tunctl). Acked-by: Maxim Krasnyansky Signed-off-by: Andrew Morton Signed-off-by: David S. Miller --- drivers/net/tun.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers') diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 46339f6bcd0..038c1ef94d2 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -529,9 +529,13 @@ static int tun_set_iff(struct file *file, struct ifreq *ifr) if (ifr->ifr_flags & IFF_NO_PI) tun->flags |= TUN_NO_PI; + else + tun->flags &= ~TUN_NO_PI; if (ifr->ifr_flags & IFF_ONE_QUEUE) tun->flags |= TUN_ONE_QUEUE; + else + tun->flags &= ~TUN_ONE_QUEUE; file->private_data = tun; tun->attached = 1; -- cgit v1.2.3-70-g09d2 From cb7cd42930d4421780e78323f62243350ea14789 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Tue, 5 Feb 2008 03:08:45 -0800 Subject: drivers/bluetooth/bpa10x.c: fix memleak This patch fixea a memleak spotted by the Coverity checker. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: David S. Miller --- drivers/bluetooth/bpa10x.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/bluetooth/bpa10x.c b/drivers/bluetooth/bpa10x.c index 1375b5345a0..3b28658f5a1 100644 --- a/drivers/bluetooth/bpa10x.c +++ b/drivers/bluetooth/bpa10x.c @@ -423,6 +423,7 @@ static int bpa10x_send_frame(struct sk_buff *skb) break; default: + usb_free_urb(urb); return -EILSEQ; } -- cgit v1.2.3-70-g09d2 From 2fa993423a345fd484f7295797ddb59b7738ad38 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Tue, 5 Feb 2008 03:09:17 -0800 Subject: drivers/bluetooth/btsdio.c: fix double-free This patch fixes a double-free spotted by the Coverity checker. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: David S. Miller --- drivers/bluetooth/btsdio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/bluetooth/btsdio.c b/drivers/bluetooth/btsdio.c index b786f618790..58630cc1eff 100644 --- a/drivers/bluetooth/btsdio.c +++ b/drivers/bluetooth/btsdio.c @@ -162,10 +162,8 @@ static int btsdio_rx_packet(struct btsdio_data *data) bt_cb(skb)->pkt_type = hdr[3]; err = hci_recv_frame(skb); - if (err < 0) { - kfree(skb); + if (err < 0) return err; - } sdio_writeb(data->func, 0x00, REG_PC_RRT, NULL); -- cgit v1.2.3-70-g09d2 From 6e46c8cb3cbfa7bafe78d43a3d57750605a2dfa3 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Tue, 5 Feb 2008 03:10:02 -0800 Subject: bluetooth: blacklist another Broadcom BCM2035 device This device is recognized as bluetooth, but still not works. Signed-off-by: Andy Shevchenko Signed-off-by: Andrew Morton Signed-off-by: David S. Miller --- drivers/bluetooth/hci_usb.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c index 98a9cdeaffb..372c7ef633d 100644 --- a/drivers/bluetooth/hci_usb.c +++ b/drivers/bluetooth/hci_usb.c @@ -111,6 +111,7 @@ static struct usb_device_id blacklist_ids[] = { { USB_DEVICE(0x0a5c, 0x2033), .driver_info = HCI_IGNORE }, /* Broadcom BCM2035 */ + { USB_DEVICE(0x0a5c, 0x2035), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU }, { USB_DEVICE(0x0a5c, 0x200a), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU }, { USB_DEVICE(0x0a5c, 0x2009), .driver_info = HCI_BCM92035 }, -- cgit v1.2.3-70-g09d2 From 2bfc79de2b6482955f0e352da7e53787dd8167c0 Mon Sep 17 00:00:00 2001 From: Johann Felix Soden Date: Tue, 5 Feb 2008 03:13:58 -0800 Subject: [NET]: Remove further references to net-modules.txt The Kconfig of igb and enc28j60 contains references to obsolet Documentation/networking/net-modules.txt. Signed-off-by: Johann Felix Soden Signed-off-by: David S. Miller --- drivers/net/Kconfig | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index f234ba3f040..7d170cd381c 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -920,8 +920,7 @@ config ENC28J60 ---help--- Support for the Microchip EN28J60 ethernet chip. - To compile this driver as a module, choose M here and read - . The module will be + To compile this driver as a module, choose M here. The module will be called enc28j60. config ENC28J60_WRITEVERIFY @@ -2041,8 +2040,7 @@ config IGB More specific information on configuring the driver is in . - To compile this driver as a module, choose M here and read - . The module + To compile this driver as a module, choose M here. The module will be called igb. source "drivers/net/ixp2000/Kconfig" -- cgit v1.2.3-70-g09d2