id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
d4d5d205b653fe68c898d42e7a27a7363a4fb3ba
Analyze and fix the following issue in the Linux kernel code: uml: fix recvmsg return value checking
Problem Details: Stupid bug - we need to compare the return value of recvmsg to the value of iov_len, not its size. This caused port_helper processes not to be killed on shutdown on x86_64 because the pids weren't being passed out properly. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton...
```diff diff --git a/arch/um/os-Linux/file.c b/arch/um/os-Linux/file.c index b542a3a021bf..f83462758627 100644 --- a/arch/um/os-Linux/file.c +++ b/arch/um/os-Linux/file.c @@ -496,8 +496,7 @@ int os_rcv_fd(int fd, int *helper_pid_out) n = recvmsg(fd, &msg, 0); if(n < 0) return -errno; - - else if(n != sizeof(iov....
03ad369ac900116f35da7505f768ebbd481d09a4
Analyze and fix the following issue in the Linux kernel code: uvesafb: fix warnings about unused variables on non-x86
Problem Details: Variables that are only used in #ifdef CONFIG_X86 should also only be declared there. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Cc: Michal Januszewski <spock@gentoo.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Lin...
```diff diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c index b983d262ab78..d1d6c0facd54 100644 --- a/drivers/video/uvesafb.c +++ b/drivers/video/uvesafb.c @@ -926,8 +926,10 @@ static int uvesafb_setpalette(struct uvesafb_pal_entry *entries, int count, int start, struct fb_info *info) { struct uves...
fcbaa088fc8625381bd1096bc2eedc4f58a1572c
Analyze and fix the following issue in the Linux kernel code: uml: fix symlink loops
Problem Details: symlinks to directories in the non-O= case were lacking -n, which meant that, when the link already existed, a new link pointing at itself was created in the target directory. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-...
```diff diff --git a/arch/um/Makefile b/arch/um/Makefile index 768a5d14b755..31999bc1c8a4 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -168,7 +168,7 @@ ifneq ($(KBUILD_SRC),) $(Q)mkdir -p $(objtree)/include/asm-um $(Q)ln -fsn $(srctree)/include/asm-$(HEADER_ARCH) include/asm-um/arch else - $(Q)cd $(TOPD...
5a6dca7c15623626943786977aca738520ea5ba3
Analyze and fix the following issue in the Linux kernel code: lib: move bitmap.o from lib-y to obj-y.
Problem Details: mac80211 has a reference to __bitmap_empty() via bitmap_empty(). In lib/bitmap.c this is flagged with an EXPORT_SYMBOL(), but this is ultimately ineffective due to bitmap.o being linked in lib-y, resulting in: ERROR: "__bitmap_empty" [net/mac80211/mac80211.ko] undefined! Moving bitmap.o to obj-y fix...
```diff diff --git a/lib/Makefile b/lib/Makefile index 3a0983b77412..b6793ed28d84 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -4,7 +4,7 @@ lib-y := ctype.o string.o vsprintf.o cmdline.o \ rbtree.o radix-tree.o dump_stack.o \ - idr.o int_sqrt.o bitmap.o extable.o prio_tree.o \ + idr.o int_sqrt.o extable.o pr...
ddd73611b7bddbc0a9079f27a1471f635100aaab
Analyze and fix the following issue in the Linux kernel code: cm40x0_cs.c: fix debug macros
Problem Details: When PCMCIA_DEBUG is set, cm40x0_cs.c and cm4000_cs.c don't build because the definition of reader_to_dev uses a non-existent handle field of the struct pcmcia_device in the call to handle_to_dev. As handle_to_dev works on struct pcmcia_device, the fix is quite trivial. Signed-off-by: Pascal Terjan <...
```diff diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c index cc5d77797def..02518da6a386 100644 --- a/drivers/char/pcmcia/cm4000_cs.c +++ b/drivers/char/pcmcia/cm4000_cs.c @@ -47,7 +47,7 @@ /* #define ATR_CSUM */ #ifdef PCMCIA_DEBUG -#define reader_to_dev(x) (&handle_to_dev(x->p_dev->...
dbd0cf48842700c3a694dcd32b29e63e27f37acc
Analyze and fix the following issue in the Linux kernel code: serial: add PNP ID for Davicom ISA 33.6K modem
Problem Details: This should resolve these bug reports of the modem not working: http://bugzilla.kernel.org/show_bug.cgi?id=4355 http://www.linuxquestions.org/questions/linux-newbie-8/connect-script-failed-on-ppp-go-123975/ I don't have hardware to test this, but the initial report in the kernel bugzilla indic...
```diff diff --git a/drivers/serial/8250_pnp.c b/drivers/serial/8250_pnp.c index 926f58a674a1..dafc6ff5a056 100644 --- a/drivers/serial/8250_pnp.c +++ b/drivers/serial/8250_pnp.c @@ -69,6 +69,8 @@ static const struct pnp_device_id pnp_dev_table[] = { { "CTL3001", 0 }, /* Creative Labs Modem Blaster 28.8 DSVD PnP V...
cc550defe9790b495c96fafabc5a6528dc586f24
Analyze and fix the following issue in the Linux kernel code: slab: fix typo in allocation failure handling
Problem Details: This patch fixes wrong array index in allocation failure handling. Cc: Pekka Enberg <penberg@cs.helsinki.fi> Acked-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torva...
```diff diff --git a/mm/slab.c b/mm/slab.c index cfa6be4e378e..c31cd3682a0b 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -1043,7 +1043,7 @@ static struct array_cache **alloc_alien_cache(int node, int limit) } ac_ptr[i] = alloc_arraycache(node, limit, 0xbaadf00d); if (!ac_ptr[i]) { - for (i--; i <= 0; i--) +...
e9b5a495dc23f58ecaa9517f1ff4dd9ac724935f
Analyze and fix the following issue in the Linux kernel code: W1: fix memset size error
Problem Details: The size argument passed to memset is wrong. Signed-off-by Li Zefan <lizf@cn.fujitsu.com> Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/w1/masters/ds2490.c b/drivers/w1/masters/ds2490.c index 299e274d241a..b63b5e044a4c 100644 --- a/drivers/w1/masters/ds2490.c +++ b/drivers/w1/masters/ds2490.c @@ -233,7 +233,7 @@ static int ds_recv_status_nodump(struct ds_device *dev, struct ds_status *st, { int count, err; - memset(st,...
3cc2c17700c98b0af778566b0af6292b23b01430
Analyze and fix the following issue in the Linux kernel code: drivers/video/ps3fb: fix memset size error
Problem Details: The size passed to memset is wrong. Signed-off-by Li Zefan <lizf@cn.fujitsu.com> Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/video/ps3fb.c b/drivers/video/ps3fb.c index b3463ddcfd60..75836aa83191 100644 --- a/drivers/video/ps3fb.c +++ b/drivers/video/ps3fb.c @@ -727,7 +727,7 @@ static int ps3fb_blank(int blank, struct fb_info *info) static int ps3fb_get_vblank(struct fb_vblank *vblank) { - memset(vblank, 0, s...
1299342bacbe9038bef473d9b5b3cbebad112d4c
Analyze and fix the following issue in the Linux kernel code: Fix Oops in toshiba_acpi error return path
Problem Details: When backlight_device_register() fails, return after undo initialization, do not try to use pointer that just was reset to NULL This fixes this oops: [ 1595.177672] [<c010480a>] show_trace_log_lvl+0x1a/0x30 [ 1595.177706] [<c01052a2>] show_trace+0x12/0x20 [ 1595.177718] [<c0105305>] dump_stack+0x1...
```diff diff --git a/drivers/acpi/toshiba_acpi.c b/drivers/acpi/toshiba_acpi.c index a736ef7bdee4..9e8c20c6a0b7 100644 --- a/drivers/acpi/toshiba_acpi.c +++ b/drivers/acpi/toshiba_acpi.c @@ -591,9 +591,12 @@ static int __init toshiba_acpi_init(void) NULL, &toshiba_backlight_data); if (IS_ERR(tosh...
66fbb541a5d2d58fdae21c1e7b558a75bfbd483f
Analyze and fix the following issue in the Linux kernel code: iwl4965: fix not correctly dealing with hotunplug
Problem Details: The interrupt handler returns IRQ_NONE if it detects that the device is gone. That's incorrect because the device may have raised the interrupt. Not acknowledging it may trigger the spurious interrupt detection and kill drivers sharing the interrupt line. Signed-off-by: Oliver Neukum <oneukum@suse.de>...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index d60adcb9bd4a..d5107bb413cd 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c @@ -5156,9 +5156,10 @@ static irqreturn_t iwl_isr(int irq, void *data...
755a957d407c3fcac58360d9309b1664078ac15d
Analyze and fix the following issue in the Linux kernel code: rt2x00: Fix chipset revision validation
Problem Details: The validation of the chipset revision was broken since for rt2500usb and rt73usb different registers should be read. When rt2500usb was loaded for a rt73 device it would false think the chipset was correct because the wrong register was read and validated. This has been fixed by expanding the check t...
```diff diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index ff2d63267b19..702321c30164 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c @@ -620,7 +620,7 @@ static void rt2500pci_link_tuner(struct rt2x00_dev *rt2x00dev) ...
14577f239fe5193d556ef1471c8667dabd556418
Analyze and fix the following issue in the Linux kernel code: iwl3945: place CCK rates in front of OFDM for supported rates
Problem Details: The patch fixes association failure (reason = 18) bug by arranging CCK rates before OFDM rates. This patch will register with mac80211 the modified rate arrangement with CCK rate first. Change rate scale algorithm also to deal with rate change. Fix Txpower and rate Table commands to be constructed corr...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c index 262ab0b55824..c48b1b537d2b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c @@ -71,19 +71,19 @@ struct iwl_rate_scale_priv { }; static s32 iwl_ex...
a0af5f14542a2e0687f95e093a33ea7301fe8cc5
Analyze and fix the following issue in the Linux kernel code: mac80211: Fix queuing of scan containing a SSID
Problem Details: This patch fixes scanning for specific ssid's which is broken due to the scan being queued up without respecting the ssid to scan for. Signed-off-by: Helmut Schaa <hschaa@suse.de> Signed-off-by: Jiri Benc <jbenc@suse.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 4b4ed2a5803c..d575ccd67e91 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -241,6 +241,8 @@ struct ieee80211_if_sta { u8 bssid[ETH_ALEN], prev_bssid[ETH_ALEN]; u8 ssid[IEEE80211_MAX_SSID_LEN]; size_t ssi...
66ba886254edbbd9442d30f1eef6f6fb0145027d
Analyze and fix the following issue in the Linux kernel code: [ISDN] sc: Really, really fix warning
Problem Details: CC [M] drivers/isdn/sc/shmem.o drivers/isdn/sc/shmem.c: In function ‘memcpy_toshmem’: drivers/isdn/sc/shmem.c:53: warning: passing argument 1 of ‘memcpy_toio’ makes pointer from integer without a cast Commit 9317d4313e0cd51b2256ea9a9316f2d8561e37a8: ISDN/sc: fix longstanding warning claimed to fix...
```diff diff --git a/drivers/isdn/sc/shmem.c b/drivers/isdn/sc/shmem.c index e0331e0094f1..712220cef139 100644 --- a/drivers/isdn/sc/shmem.c +++ b/drivers/isdn/sc/shmem.c @@ -50,7 +50,7 @@ void memcpy_toshmem(int card, void *dest, const void *src, size_t n) outb(((sc_adapter[card]->shmem_magic + ch * SRAM_PAGESIZE)...
186fd777a8c63c28acdbcb0e9aefa7ebc858641e
Analyze and fix the following issue in the Linux kernel code: [ISDN] sc: Fix sndpkt to have the correct number of arguments
Problem Details: isdn_if.writebuf_skb has an additional ack flag argument which was missing from sndpkt leading to the following warning: CC [M] drivers/isdn/sc/init.o drivers/isdn/sc/init.c: In function ‘sc_init’: drivers/isdn/sc/init.c:281: warning: assignment from incompatible pointer type Note that this doesn't...
```diff diff --git a/drivers/isdn/sc/card.h b/drivers/isdn/sc/card.h index 5992f63c383e..0120bcf88311 100644 --- a/drivers/isdn/sc/card.h +++ b/drivers/isdn/sc/card.h @@ -109,7 +109,7 @@ void memcpy_fromshmem(int card, void *dest, const void *src, size_t n); int get_card_from_id(int driver); int indicate_status(int c...
8a856397f1b023b53907d13e742c216d90dd5034
Analyze and fix the following issue in the Linux kernel code: [FS_ENET]: Fix module build.
Problem Details: If fs_enet is build as module, on PPC_CPM_NEW_BINDING platforms mii-fec/mii-bitbang should be build as module, as well. On other platforms, mii-fec/mii-bitbang must be included into the main module. Otherwise some symbols remain undefined. Additionally, fs_enet uses libphy, so add a select PHYLIB. B...
```diff diff --git a/drivers/net/fs_enet/Kconfig b/drivers/net/fs_enet/Kconfig index 2765e49e07df..562ea68ed99b 100644 --- a/drivers/net/fs_enet/Kconfig +++ b/drivers/net/fs_enet/Kconfig @@ -2,6 +2,7 @@ config FS_ENET tristate "Freescale Ethernet Driver" depends on CPM1 || CPM2 select MII + ...
fb93134dfc2a6e6fbedc7c270a31da03fce88db9
Analyze and fix the following issue in the Linux kernel code: [TCP]: Fix size calculation in sk_stream_alloc_pskb
Problem Details: We round up the header size in sk_stream_alloc_pskb so that TSO packets get zero tail room. Unfortunately this rounding up is not coordinated with the select_size() function used by TCP to calculate the second parameter of sk_stream_alloc_pskb. As a result, we may allocate more than a page of data in...
```diff diff --git a/include/net/sock.h b/include/net/sock.h index 5504fb9fa88a..567e468d7492 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -1235,14 +1235,16 @@ static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk, gfp_t gfp) { struct sk_buff *skb; - int hdr_len; - hdr_len = S...
505f76b3061f6e74a50f378e45ac931abc1fe784
Analyze and fix the following issue in the Linux kernel code: [SCSI] iscsi_tcp: fix potential lockup with write commands
Problem Details: There is a race condition in iscsi_tcp.c that may cause it to forget that it received a R2T from the target. This race may cause a data-out command (such as a write) to lock up. The race occurs here: static int iscsi_send_unsol_pdu(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) { struct isc...
```diff diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index 4bcf916c21a7..57ce2251abc8 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c @@ -197,7 +197,7 @@ iscsi_tcp_cleanup_ctask(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) if (unlikely(!sc)) return; - tcp_ctask-...
e383d19e90cfbbf8e00512d44194ce175b3f60a2
Analyze and fix the following issue in the Linux kernel code: mlx4_core: Fix thinko in QP destroy (incorrect bitmap_free)
Problem Details: Fix thinko in commit eaf559bf ("mlx4_core: Don't free special QPs in QP number bitmap"). The old commit had the logic exactly backwards and ended up freeing *only* special QPs, which not only left the original bug in place but also introduced the problem that the QP number bitmap would get full after ...
```diff diff --git a/drivers/net/mlx4/qp.c b/drivers/net/mlx4/qp.c index cc4b1be18219..42b47639c81c 100644 --- a/drivers/net/mlx4/qp.c +++ b/drivers/net/mlx4/qp.c @@ -240,7 +240,7 @@ void mlx4_qp_free(struct mlx4_dev *dev, struct mlx4_qp *qp) mlx4_table_put(dev, &qp_table->auxc_table, qp->qpn); mlx4_table_put(dev, ...
18b2b7bd09811779309592a10080fe9ffb93144d
Analyze and fix the following issue in the Linux kernel code: [S2IO]: Fixed memory leak when MSI-X vector allocation fails
Problem Details: - Fixed memory leak by freeing MSI-X local entry memories when vector allocation fails in s2io_add_isr. - Added two utility functions remove_msix_isr and remove_inta_isr to eliminate code duplication. - Incorporated following review comments from Jeff - Removed redundant stats->mem_freed and sy...
```diff diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index b8c0e7b4ca1c..632666706247 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c @@ -84,7 +84,7 @@ #include "s2io.h" #include "s2io-regs.h" -#define DRV_VERSION "2.0.26.5" +#define DRV_VERSION "2.0.26.6" /* S2io Driver name & version. */ stat...
8cbdeec637c1ce87bf329c5c19a9964e36bdf9fb
Analyze and fix the following issue in the Linux kernel code: [BONDING]: Fix resource use after free
Problem Details: Fix bond_destroy and bond_free_all to not reference the struct net_device after calling unregister_netdevice. Bug and offending change reported by Moni Shoua <monis@voltaire.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index a198404a3e36..423298c84a1d 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1847,9 +1847,9 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev) */ void bond_dest...
ce1d18e0064d55106a7042c07cfca97cad66f407
Analyze and fix the following issue in the Linux kernel code: [SYSCTL]: Fix warning for token-ring from sysctl checker
Problem Details: As seen when booting ppc64_defconfig: sysctl table check failed: /net/token-ring .3.14 procname does not match binary path procname Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/kernel/sysctl_check.c b/kernel/sysctl_check.c index 5a2f2b2bf888..4abc6d2306f4 100644 --- a/kernel/sysctl_check.c +++ b/kernel/sysctl_check.c @@ -738,7 +738,7 @@ static struct trans_ctl_table trans_net_table[] = { { NET_ROSE, "rose", trans_net_rose_table }, { NET_IPV6, "ipv6", trans_net_ipv...
23aeeec365dcf8bc87fae44c533e50d0bb4f23cc
Analyze and fix the following issue in the Linux kernel code: [TCP] FRTO: Plug potential LOST-bit leak
Problem Details: It might be possible that, in some extreme scenario that I just cannot now construct in my mind, end_seq <= frto_highmark check does not match causing the lost_out and LOST bits become out-of-sync due to clearing and recounting in the loop. This may fix LOST-bit leak reported by Chazarain Guillaume <g...
```diff diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index b59da5308ac0..12ae9a68cdaa 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -1704,6 +1704,8 @@ static void tcp_enter_frto_loss(struct sock *sk, int allowed_segments, int flag) tcp_for_write_queue(skb, sk) { if (skb == tcp_send_he...
f0163ac45b40bd032b877c747796146d52d4e800
Analyze and fix the following issue in the Linux kernel code: [E1000]: Fix schedule while atomic when called from mii-tool.
Problem Details: mii-tool can cause the driver to call msleep during nway reset, bugzilla.kernel.org bug 8430. Fix by simply calling reinit_locked outside of the spinlock, which is safe from ethtool, so it should be safe from here. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <...
```diff diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 72deff0d4d90..cf39473ef90a 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -4804,6 +4804,7 @@ e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) spin_unlock_irqrestore(&...
e2ac455a18806b31c2d0da0a51d8740af5010b7a
Analyze and fix the following issue in the Linux kernel code: [NETX]: Fix build failure added by 2.6.24 statistics cleanup.
Problem Details: Reported by rmk from kautobuild output: drivers/net/netx-eth.c: In function 'netx_eth_hard_start_xmit': drivers/net/netx-eth.c:131: error: 'dev' undeclared (first use in this function) drivers/net/netx-eth.c:131: error: (Each undeclared identifier is reported only once drivers/net/netx-eth.c:131: erro...
```diff diff --git a/drivers/net/netx-eth.c b/drivers/net/netx-eth.c index eb0aff787dfd..5267e031daa0 100644 --- a/drivers/net/netx-eth.c +++ b/drivers/net/netx-eth.c @@ -128,8 +128,8 @@ netx_eth_hard_start_xmit(struct sk_buff *skb, struct net_device *ndev) FIFO_PTR_FRAMELEN(len)); ndev->trans_start = ...
4e04b84ea542a3e3f2fa308b3a7e7ed149f9a3a2
Analyze and fix the following issue in the Linux kernel code: [EP93xx_ETH]: Build fix after 2.6.24 NAPI changes.
Problem Details: Reported by rmk from kautobuild output: drivers/net/arm/ep93xx_eth.c:420: error: implicit declaration of function '__netif_rx_schedule_prep' Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/arm/ep93xx_eth.c b/drivers/net/arm/ep93xx_eth.c index 7f016f3d5bf0..91a6590d107b 100644 --- a/drivers/net/arm/ep93xx_eth.c +++ b/drivers/net/arm/ep93xx_eth.c @@ -417,7 +417,7 @@ static irqreturn_t ep93xx_irq(int irq, void *dev_id) if (status & REG_INTSTS_RX) { spin_lock(&ep->rx_l...
9a7666494bac60b99d2bd7d904bd22e8c9b1e3f7
Analyze and fix the following issue in the Linux kernel code: RDMA/cxgb3: Set the max_qp_init_rd_atom attribute in query_device
Problem Details: The device attribute max_qp_init_rd_atom is not getting set in cxgb3's query_device method. Version 1.0.4 of librdmacm now validates the user's requested initiator and responder resources against the max supported by the device. Since iw_cxgb3 wasn't setting this attribute (and it defaulted to 0), al...
```diff diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c index f0c777589374..b5436ca92e68 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_provider.c +++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c @@ -1000,6 +1000,7 @@ static int iwch_query_device(struct ib_device *...
51aaa54eb9e9f01878aa5d62277fd156e458dfe1
Analyze and fix the following issue in the Linux kernel code: IB/ehca: Fix static rate calculation
Problem Details: The IPD (inter-packet delay) formula was a little off and assumed a fixed physical link rate; fix the formula and query the actual physical link rate, now that we can get it. Also, refactor the calculation into a common function ehca_calc_ipd() and use that instead of duplicating code. Signed-off-by:...
```diff diff --git a/drivers/infiniband/hw/ehca/ehca_av.c b/drivers/infiniband/hw/ehca/ehca_av.c index 97d108634c58..453eb995c1d4 100644 --- a/drivers/infiniband/hw/ehca/ehca_av.c +++ b/drivers/infiniband/hw/ehca/ehca_av.c @@ -50,6 +50,38 @@ static struct kmem_cache *av_cache; +int ehca_calc_ipd(struct ehca_shca *...
f4ad1bcc4425a772ea584e1f24abadc64c2b839f
Analyze and fix the following issue in the Linux kernel code: IB/ipath: Fix race with ACK retry timeout list management
Problem Details: When an ACK is received, the QP is removed from the timeout list and then if there are still pending send WQEs, the QP is put back on the timeout list. It is possible that another post send has put the QP on the timeout list thus, a check needs to be made before trying to do it again or the list is cor...
```diff diff --git a/drivers/infiniband/hw/ipath/ipath_rc.c b/drivers/infiniband/hw/ipath/ipath_rc.c index 5c29b2bfea17..120a61b03bc4 100644 --- a/drivers/infiniband/hw/ipath/ipath_rc.c +++ b/drivers/infiniband/hw/ipath/ipath_rc.c @@ -959,8 +959,9 @@ static int do_rc_ack(struct ipath_qp *qp, u32 aeth, u32 psn, int opco...
a6e7550d8f73d6b75c20afff321f0f06fe144775
Analyze and fix the following issue in the Linux kernel code: IB/ipath: Fix memory leak in ipath_resize_cq() if copy_to_user() fails
Problem Details: Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Patrick Marchand Latifi <patrick.latifi@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/ipath/ipath_cq.c b/drivers/infiniband/hw/ipath/ipath_cq.c index 645ed71fd797..08d8ae148cd0 100644 --- a/drivers/infiniband/hw/ipath/ipath_cq.c +++ b/drivers/infiniband/hw/ipath/ipath_cq.c @@ -404,7 +404,7 @@ int ipath_resize_cq(struct ib_cq *ibcq, int cqe, struct ib_udata *uda...
3bba11e5c47dfc1d381a1ece26464fb7eea2d79c
Analyze and fix the following issue in the Linux kernel code: mlx4_core: Fix possible bad free in mlx4_buf_free()
Problem Details: When mlx4_buf_free() is called from the error path of mlx4_buf_alloc(), it may be passed a buffer structure that does not have all pages filled in. Add a check for NULL to mlx4_buf_free() so we avoid passing NULL to dma_free_coherent() (which will crash). Signed-off-by: Ali Ayoub <ali@mellanox.co.il>...
```diff diff --git a/drivers/net/mlx4/alloc.c b/drivers/net/mlx4/alloc.c index f8d63d39f592..b226e019bc8b 100644 --- a/drivers/net/mlx4/alloc.c +++ b/drivers/net/mlx4/alloc.c @@ -171,9 +171,10 @@ void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf) buf->u.direct.map); else { for (i = 0; ...
133672efbc1085f9af990bdc145e1822ea93bcf3
Analyze and fix the following issue in the Linux kernel code: [CIFS] Fix buffer overflow if server sends corrupt response to small
Problem Details: request In SendReceive() function in transport.c - it memcpy's message payload into a buffer passed via out_buf param. The function assumes that all buffers are of size (CIFSMaxBufSize + MAX_CIFS_HDR_SIZE) , unfortunately it is also called with smaller (MAX_CIFS_SMALL_BUFFER_SIZE) buffers. There are ...
```diff diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 87f51f23276f..4ff8179df7ec 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h @@ -471,6 +471,17 @@ struct dir_notify_req { #define CIFS_LARGE_BUFFER 2 #define CIFS_IOVEC 4 /* array of response buffers */ +/* Type of Reque...
24ffbd62583024f85bdba72cd373d050aa1a1b15
Analyze and fix the following issue in the Linux kernel code: it821x/jmicron: fix return value of {it821x,jmicron}_init_one()
Problem Details: Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/pci/it821x.c b/drivers/ide/pci/it821x.c index 5c9975435319..99b7d763b6c7 100644 --- a/drivers/ide/pci/it821x.c +++ b/drivers/ide/pci/it821x.c @@ -653,8 +653,7 @@ static const struct ide_port_info it821x_chipsets[] __devinitdata = { static int __devinit it821x_init_one(struct pci_dev ...
34c69b601b2ec8fc8ff6657a547ce3865d58e220
Analyze and fix the following issue in the Linux kernel code: ide: don't BUG() on unsupported transfer modes
Problem Details: Fix ide-cris, cs5530, sc1200 and sis5513 host drivers to just return instead of OOPS-ing for unsupported modes in ->set_dma_mode methods. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/cris/ide-cris.c b/drivers/ide/cris/ide-cris.c index e196aefa2070..7f5bc2ee6c7e 100644 --- a/drivers/ide/cris/ide-cris.c +++ b/drivers/ide/cris/ide-cris.c @@ -748,8 +748,7 @@ static void cris_set_dma_mode(ide_drive_t *drive, const u8 speed) hold = ATA_DMA2_HOLD; break; default...
6183289cd4356b790c5eaa619020fb887ec0fa44
Analyze and fix the following issue in the Linux kernel code: cmd64x: don't clear the other channel's interrupt
Problem Details: Make sure to not clear the other IDE channel's interrupt when clearing an IDE interrupt via the MRDMODE register. Thanks to Bart for finding a coding mistake. Bart: This fixes regression from commit 66602c83dcb6a5d82772d88ae7a32cd4a1213528 ("cmd64x: use interrupt status from MRDMODE register (take 2...
```diff diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c index ea0143ef5fe5..51fca441c294 100644 --- a/drivers/ide/pci/cmd64x.c +++ b/drivers/ide/pci/cmd64x.c @@ -1,5 +1,5 @@ /* - * linux/drivers/ide/pci/cmd64x.c Version 1.50 May 10, 2007 + * linux/drivers/ide/pci/cmd64x.c Version 1.51 Nov 8, 2007 ...
072ee3f9bd26a2f89a79d1eae9052d30b8d745a5
Analyze and fix the following issue in the Linux kernel code: [TEHUTI]: Fix incorrect usage of strncat in bdx_get_drvinfo()
Problem Details: Fix incorrect length for strncat by replacing it with strlcat Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/tehuti.c b/drivers/net/tehuti.c index 4e1b84e6d66a..21230c97b2a0 100644 --- a/drivers/net/tehuti.c +++ b/drivers/net/tehuti.c @@ -2168,10 +2168,10 @@ bdx_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *drvinfo) { struct bdx_priv *priv = netdev->priv; - strncat(drvinf...
81d9ddae856678c45297550e9353c8a5a7fd6438
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: bridge: fix double POSTROUTING hook invocation
Problem Details: Packets routed between bridges have the POST_ROUTING hook invoked twice since bridging mistakes them for bridged packets because they have skb->nf_bridge set. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c index da22f900e89d..c1757c79dfbb 100644 --- a/net/bridge/br_netfilter.c +++ b/net/bridge/br_netfilter.c @@ -766,6 +766,9 @@ static unsigned int br_nf_post_routing(unsigned int hook, struct sk_buff *skb, if (!nf_bridge) return NF_ACCEPT; +...
e0bf9cf15fc30d300b7fbd821c6bc975531fab44
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: nf_nat: fix memset error
Problem Details: The size passing to memset is the size of a pointer. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/netfilter/nf_nat_core.c b/net/ipv4/netfilter/nf_nat_core.c index 56e93f692e82..70e7997ea284 100644 --- a/net/ipv4/netfilter/nf_nat_core.c +++ b/net/ipv4/netfilter/nf_nat_core.c @@ -681,7 +681,7 @@ static int clean_nat(struct nf_conn *i, void *data) if (!nat) return 0; - memset(nat, ...
6548d83a37a570b0050e60565937bbb582545d96
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Silence an annoying boot message
Problem Details: vmemmap_populate will printk (with KERN_WARNING) for a lot of pages if CONFIG_SPARSEMEM_VMEMMAP is enabled (at least it does on iSeries). Use pr_debug for it instead. Replace the only other use of DBG in this file with pr_debug as well. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by:...
```diff diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index d9c82d3d6482..c0f5cff77035 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c @@ -19,8 +19,6 @@ * */ -#undef DEBUG - #include <linux/signal.h> #include <linux/sched.h> #include <linux/kernel.h> @@ -66,12 +64,6 ...
b7a2da1199d2ba2a870b137d6b4c2a538ab68c38
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix early btext debug on PowerMac
Problem Details: The early btext debug wouldn't work on PowerMac when booted from BootX due to the code looking for the wrong property name. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/kernel/btext.c b/arch/powerpc/kernel/btext.c index 3ef51fb6f107..9c74fdf29eec 100644 --- a/arch/powerpc/kernel/btext.c +++ b/arch/powerpc/kernel/btext.c @@ -186,7 +186,9 @@ int btext_initialize(struct device_node *np) pitch = *prop; if (pitch == 1) pitch = 0x1000; - prop = of_g...
0302f12e1c72e450d3b4569d9c03c57c9b5edac1
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Demote clockevent printk to KERN_DEBUG
Problem Details: These don't need to be seen by everyone on every boot. Signed-off-by: Tony Breeds <tony@bakeyournoodle.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 4beb6329dfb7..c0d77723ba11 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c @@ -829,7 +829,7 @@ static void register_decrementer_clockevent(int cpu) *dec = decrementer_clockevent; dec->cpumask = cpumask_of_cpu...
9bafbb0c4d8df8b6baa1b917abfc10dc0969cd9d
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix CONFIG_SMP=n build error on ppc64
Problem Details: The patch "KVM: fix !SMP build error" change the way smp_call_function() actually uses the passed in function names on non-SMP builds. So previously it was never caught that the function passed in was never actually defined. This causes a build error on ppc64_defconfig + CONFIG_SMP=n: arch/powerpc/m...
```diff diff --git a/arch/powerpc/mm/tlb_64.c b/arch/powerpc/mm/tlb_64.c index eafbca52bff9..e2d867ce1c7e 100644 --- a/arch/powerpc/mm/tlb_64.c +++ b/arch/powerpc/mm/tlb_64.c @@ -54,12 +54,10 @@ unsigned long pte_freelist_forced_free; ((PAGE_SIZE - sizeof(struct pte_freelist_batch)) \ / sizeof(pgtable_free_t)) ...
b5af7126ea7586eb8f030280c027611c42a6a9c7
Analyze and fix the following issue in the Linux kernel code: [TG3]: Add A1 revs
Problem Details: This patch adds the A1 revision of 5784, 5764, and 5761, and applies all previous bugfixes. In places where the list of devices gets too long, the patch uses a new TG3_FLG3_5761_5784_AX_FIXES flag instead. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom...
```diff diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 72db78b1ec3b..8e76092a171e 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -1106,8 +1106,7 @@ static int tg3_phy_reset(struct tg3 *tp) if (err) return err; - if (tp->pci_chip_rev_id == CHIPREV_ID_5784_A0 || - tp->pci_chip_rev_id == CH...
aa6c91fe5913faa2cd2a62de993a3130799412b1
Analyze and fix the following issue in the Linux kernel code: [TG3]: Prescaler fix
Problem Details: Internal hardware timers become inaccurate after link events. Clock frequency switches performed by the CPMU fail to adjust timer prescalers. The fix is to detect core clock frequency changes during link events and adjust the timer prescalers accordingly. Signed-off-by: Matt Carlson <mcarlson@broadc...
```diff diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index bb3b73435170..ecd64a224e95 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -3154,6 +3154,22 @@ static int tg3_setup_phy(struct tg3 *tp, int force_reset) err = tg3_setup_copper_phy(tp, force_reset); } + if (tp->pci_chip_rev_id == CHIPREV_I...
5f60891b80f1a0f0a0015b084f4838ae8b9637c7
Analyze and fix the following issue in the Linux kernel code: [TG3]: Limit 5784 / 5764 to MAC LED mode
Problem Details: Most 5784 / 5764 LED modes do not work as expected because of a hardware bug. This patch forces the LED mode to be in MAC LED mode. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index b5c4799003e0..bb3b73435170 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -10610,6 +10610,9 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp) tp->pdev->subsystem_vendor == PCI_VENDOR_ID_DELL) tp->led_ctrl = LED_CTRL_MODE...
e875093c9659d2a9f3923aa9ee1b89ef40cf95b9
Analyze and fix the following issue in the Linux kernel code: [TG3]: CPMU adjustments for loopback tests
Problem Details: This patch adds the LINK_SPEED mode to the list of CPMU modes that can cause the loopback tests to fail. These bugs are planned to be fixed in future revisions of the chip, so the patch qualifies the fixes as such. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan...
```diff diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index ef849b1eb110..25e57d8ddb51 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -9354,7 +9354,8 @@ static int tg3_test_loopback(struct tg3 *tp) if (err) return TG3_LOOPBACK_FAILED; - if (tp->tg3_flags & TG3_FLAG_CPMU_PRESENT) { + if (tp->pci_c...
a5767dec1980463aef5614b7ad8a800bb4f4c353
Analyze and fix the following issue in the Linux kernel code: [TG3]: Fix nvram selftest failures
Problem Details: Newer devices contain bootcode in the chip's private ROM area. This bootcode is called selfboot. Selfboot can be patched in the device's NVRAM and the patches can have several formats. In one particular format, the checksum calculation needs to be slightly modified. This patch adjusts the NVRAM tes...
```diff diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index b865c5d44837..ef849b1eb110 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -8701,7 +8701,9 @@ static void tg3_get_ethtool_stats (struct net_device *dev, } #define NVRAM_TEST_SIZE 0x100 -#define NVRAM_SELFBOOT_FORMAT1_SIZE 0x14 +#define NVRAM...
9acb961e7d780291659bf950b3b718ff9e085620
Analyze and fix the following issue in the Linux kernel code: [TG3]: 5784 / 5764 DMA engine lockup fix
Problem Details: 5784 and 5764 devices lock up when the link speed is 10Mbps, the CPMU link speed mode is enabled, and the MAC clock is running at 1.5Mhz. The fix is to run the MAC clock at faster speeds. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-b...
```diff diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 833cb9b7f343..b865c5d44837 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -6369,6 +6369,21 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy) val = tr32(TG3_CPMU_CTRL); val &= ~(CPMU_CTRL_LINK_AWARE_MODE | CPMU_CTRL_LINK_IDLE_MODE)...
84af67fdf07c4fce664dbca87a8d5e2802901bff
Analyze and fix the following issue in the Linux kernel code: [TG3]: APE flag fix
Problem Details: This patch corrects a bug where the ENABLE_APE flag was tested against the wrong flag variable. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 82b1cf0e2d18..833cb9b7f343 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -10881,7 +10881,7 @@ static void __devinit tg3_read_fw_ver(struct tg3 *tp) } if (!(tp->tg3_flags & TG3_FLAG_ENABLE_ASF) || - (tp->tg3_flags & TG3_FLG3_ENABLE_A...
ce057f01956bfcb3cb8588091000ae546be78e00
Analyze and fix the following issue in the Linux kernel code: [TG3]: 5784 / 5764 GPHY power down fix
Problem Details: 5784 and 5764 devices fail to link / pass traffic after one load / unload cycle. This happens because of a hardware bug in the new CPMU. During normal operation, the MAC depends on the PHY clock being available. When the PHY is powered down, the clock the MAC depends on is disabled. The fix is to sw...
```diff diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index ddeaa0c78305..82b1cf0e2d18 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -1106,6 +1106,19 @@ static int tg3_phy_reset(struct tg3 *tp) if (err) return err; + if (tp->pci_chip_rev_id == CHIPREV_ID_5784_A0 || + tp->pci_chip_rev_id == C...
c88864df27590b80fca4a991e0c257d1757cec41
Analyze and fix the following issue in the Linux kernel code: [TG3]: Fix 5761 PXEboot crash
Problem Details: When 5761 devices boot the machine using PXEboot, PXE leaves the device active when it terminates. The tg3 driver has code to detect this condition and resets the device during initialization. On 5761 devices, device resets involve sending a driver state update message to the APE on the 5761. Howeve...
```diff diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index cad519910767..ddeaa0c78305 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -12464,6 +12464,28 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, goto err_out_iounmap; } + if (tp->tg3_flags3 & TG3_FLG3_ENABLE_APE) { + if (!(pci_re...
be85d4ad8ab69520e5ca4717c491a311c9eeae59
Analyze and fix the following issue in the Linux kernel code: [AF_PACKET]: Fix minor code duplication
Problem Details: Simplify some code by eliminating duplicate if-else clauses in packet_do_bind(). Signed-off-by: Urs Thuermann <urs@isnogud.escape.de> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index eb6be5030c70..8a7807dbba01 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -881,20 +881,14 @@ static int packet_do_bind(struct sock *sk, struct net_device *dev, __be16 protoc if (protocol == 0) goto out_unlock; - if (d...
91cf45f02af5c871251165d000c3f42a2a0b0552
Analyze and fix the following issue in the Linux kernel code: [NET]: Add the helper kernel_sock_shutdown()
Problem Details: ...and fix a couple of bugs in the NBD, CIFS and OCFS2 socket handlers. Looking at the sock->op->shutdown() handlers, it looks as if all of them take a SHUT_RD/SHUT_WR/SHUT_RDWR argument instead of the RCV_SHUTDOWN/SEND_SHUTDOWN arguments. Add a helper, and then define the SHUT_* enum to ensure that k...
```diff diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 6332acad078c..b4c0888aedc3 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -28,6 +28,7 @@ #include <linux/err.h> #include <linux/kernel.h> #include <net/sock.h> +#include <linux/net.h> #include <asm/uaccess.h> #include <asm/system...
62768e28d606c10ba54217f908123de34dad9374
Analyze and fix the following issue in the Linux kernel code: [SUNGEM]: Fix suspend regression due to NAPI changes.
Problem Details: Commit bea3348e (the NAPI changes) made sungem unconditionally enable NAPI when resuming and unconditionally disable when suspending, this, however, makes napi_disable() hang when suspending when the interface was taken down before suspend because taking the interface down also disables NAPI. This patc...
```diff diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index 53b8344a68ef..f6fedcc32de1 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c @@ -2333,10 +2333,10 @@ static int gem_close(struct net_device *dev) { struct gem *gp = dev->priv; - napi_disable(&gp->napi); - mutex_lock(&gp->pm_mutex);...
cd228d5458186f66bc36c4884f4f26ed955c5945
Analyze and fix the following issue in the Linux kernel code: [PPP]: Remove ptr comparisons to 0
Problem Details: fix sparse warnings "Using plain integer as NULL pointer" Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ppp_async.c b/drivers/net/ppp_async.c index 8d278c87ba48..f023d5b67e6e 100644 --- a/drivers/net/ppp_async.c +++ b/drivers/net/ppp_async.c @@ -160,7 +160,7 @@ ppp_asynctty_open(struct tty_struct *tty) err = -ENOMEM; ap = kzalloc(sizeof(*ap), GFP_KERNEL); - if (ap == 0) + if (!ap) ...
325d22df7b19e0116aff3391d3a03f73d0634ded
Analyze and fix the following issue in the Linux kernel code: sigwait eats blocked default-ignore signals
Problem Details: While a signal is blocked, it must be posted even if its action is SIG_IGN or is SIG_DFL with the default action to ignore. This works right most of the time, but is broken when a sigwait (rt_sigtimedwait) is in progress. This changes the early-discard check to respect real_blocked. ~blocked is the ...
```diff diff --git a/kernel/signal.c b/kernel/signal.c index 909a0cc6bc70..afa4f781f924 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -55,7 +55,7 @@ static int sig_ignored(struct task_struct *t, int sig) * signal handler may change by the time it is * unblocked. */ - if (sigismember(&t->blocked, sig)) ...
6fa02839bf9412e18e773d04e96182b4cd0b5d57
Analyze and fix the following issue in the Linux kernel code: nfsd4: recheck for secure ports in fh_verify
Problem Details: As with commit 7fc90ec93a5eb71f4b08403baf5ba7176b3ec6b1 ("knfsd: nfsd: call nfsd_setuser() on fh_compose(), fix nfsd4 permissions problem") this is a case where we need to redo a security check in fh_verify() even though the filehandle already has an associated dentry--if the filehandle was created by ...
```diff diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c index 4f712e970584..468f17a78441 100644 --- a/fs/nfsd/nfsfh.c +++ b/fs/nfsd/nfsfh.c @@ -95,6 +95,22 @@ nfsd_mode_check(struct svc_rqst *rqstp, umode_t mode, int type) return 0; } +static __be32 nfsd_setuser_and_check_port(struct svc_rqst *rqstp, + struct...
ac8587dcb58e40dd336d99d60f852041e06cc3dd
Analyze and fix the following issue in the Linux kernel code: knfsd: fix spurious EINVAL errors on first access of new filesystem
Problem Details: The v2/v3 acl code in nfsd is translating any return from fh_verify() to nfserr_inval. This is particularly unfortunate in the case of an nfserr_dropit return, which is an internal error meant to indicate to callers that this request has been deferred and should just be dropped pending the results of ...
```diff diff --git a/fs/nfsd/nfs2acl.c b/fs/nfsd/nfs2acl.c index b61742885011..0e5fa11e6b44 100644 --- a/fs/nfsd/nfs2acl.c +++ b/fs/nfsd/nfs2acl.c @@ -41,7 +41,7 @@ static __be32 nfsacld_proc_getacl(struct svc_rqst * rqstp, fh = fh_copy(&resp->fh, &argp->fh); if ((nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_NOP))...
92d140e21f1ce8cf99320afbbcad73879128e6dc
Analyze and fix the following issue in the Linux kernel code: x86: fix taking DNA during 64bit sigreturn
Problem Details: restore sigcontext is taking a DNA exception while restoring FP context from the user stack, during the sigreturn. Appended patch fixes it by doing clts() if the app doesn't touch FP during the signal handler execution. This will stop generating a DNA, during the fxrstor in the sigreturn. This impro...
```diff diff --git a/arch/x86/kernel/i387_64.c b/arch/x86/kernel/i387_64.c index 56c1f1147109..bfaff28fb134 100644 --- a/arch/x86/kernel/i387_64.c +++ b/arch/x86/kernel/i387_64.c @@ -92,13 +92,14 @@ int save_i387(struct _fpstate __user *buf) if (task_thread_info(tsk)->status & TS_USEDFPU) { err = save_i387_checkin...
6a3f0b460cea79f08683cef1862d686a887efd8c
Analyze and fix the following issue in the Linux kernel code: Blackfin arch: fix bug cplbmgr.S does not exit properly on error condition
Problem Details: https://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=1685 Ensure that cache/protection is turned back on when we get a fault, and ensure that the initial population of the CPLB tables are correct - that kernel is locked in CPLB tables Signed-off-by: Rob...
```diff diff --git a/arch/blackfin/kernel/cplbinit.c b/arch/blackfin/kernel/cplbinit.c index f2db6a5e2b5b..7392ac2d2c29 100644 --- a/arch/blackfin/kernel/cplbinit.c +++ b/arch/blackfin/kernel/cplbinit.c @@ -163,8 +163,8 @@ static struct cplb_desc cplb_data[] = { static u16 __init lock_kernel_check(u32 start, u32 end...
0954f70ab1ffd9ad945c88c11877a08baed311c7
Analyze and fix the following issue in the Linux kernel code: Blackfin arch: fix AD7877 bus_num and add support for WM8731 SPI control interface
Problem Details: Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
```diff diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c index 88b41b71bffc..299b1704796d 100644 --- a/arch/blackfin/mach-bf527/boards/ezkit.c +++ b/arch/blackfin/mach-bf527/boards/ezkit.c @@ -451,6 +451,13 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = {...
9abed245a6dc94c32b2f45a1ecc51a0829d11470
Analyze and fix the following issue in the Linux kernel code: Fix memory leak in discard case of sctp_sf_abort_violation()
Problem Details: In net/sctp/sm_statefuns.c::sctp_sf_abort_violation() we may leak the storage allocated for 'abort' by returning from the function without using or freeing it. This happens in case "sctp_auth_recv_cid(SCTP_CID_ABORT, asoc)" is true and we jump to the 'discard' label. Spotted by the Coverity checker. T...
```diff diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index a66075a70f29..5ebbe808d801 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c @@ -4064,11 +4064,6 @@ static sctp_disposition_t sctp_sf_abort_violation( struct sctp_chunk *chunk = arg; struct sctp_chunk *abort = NULL; - /...
4a589e1ef67fdb2d5fa783117da8dc7cba576af4
Analyze and fix the following issue in the Linux kernel code: Blackfin arch: fix bux - only reset the PC when necessary, otherwise gdb gets confused
Problem Details: Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
```diff diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index aaddb724a5fb..ce9981b5339b 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c @@ -158,7 +158,7 @@ static void decode_address(char *buf, unsigned long address) } /* we were unable to find this address a...
f26fbc48f130962fce15f37d079968f0f272e0c2
Analyze and fix the following issue in the Linux kernel code: Blackfin arch: ensure we work around ANOMALY_05000261 for null pointers
Problem Details: We currently do not. Also make it easier to handle cplb violations - in traps.c Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
```diff diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index cfa05436c972..aaddb724a5fb 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c @@ -311,11 +311,10 @@ asmlinkage void trap_c(struct pt_regs *fp) printk(KERN_NOTICE EXC_0x22); CHK_DEBUGGER_TRAP(); brea...
1200e646ae238afc536be70257290eb33fb6e364
Analyze and fix the following issue in the Linux kernel code: lguest: Fix lguest virtio-blk backend size computation
Problem Details: This seems like an obvious typo but it's worked in the past because the virtio blk frontend just ignores the length field on completion. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
```diff diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c index f2668390e8f7..157f6a26b939 100644 --- a/Documentation/lguest/lguest.c +++ b/Documentation/lguest/lguest.c @@ -1342,7 +1342,7 @@ static bool service_io(struct device *dev) if (out->type & VIRTIO_BLK_T_SCSI_CMD) { fprintf(stderr...
1bc4953ed44454c7f53d0b609445d1534981ee75
Analyze and fix the following issue in the Linux kernel code: virtio: Fix used_idx wrap-around
Problem Details: The more_used() function compares the vq->vring.used->idx with last_used_idx. Since vq->vring.used->idx is a 16-bit integer, and last_used_idx is an unsigned int, this results in unpredictable behavior when vq->vring.used->idx wraps around. This patch corrects this by changing last_used_idx to the cor...
```diff diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 0e4baca21b8f..0e1bf053d8cd 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -53,7 +53,7 @@ struct vring_virtqueue unsigned int num_added; /* Last used index we've seen. */ - unsigned int last_used...
4d125de3a5d130054df2285e542c1491d214d3e8
Analyze and fix the following issue in the Linux kernel code: virtio: more fallout from scatterlist changes.
Problem Details: This fixes OOPS in network driver when CONFIG_DEBUG_SG=y. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
```diff diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index e396c9d2af8d..a75be57fb209 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -146,6 +146,7 @@ static void try_fill_recv(struct virtnet_info *vi) struct scatterlist sg[1+MAX_SKB_FRAGS]; int num, err; + sg_init_tabl...
44332f7167dfb1ca04af96a2cff938c5e23433db
Analyze and fix the following issue in the Linux kernel code: virtio: fix vring_init for 64 bits
Problem Details: This patch fixes a typo in vring_init(). This happens to work today in lguest because the sizeof(struct vring_desc) is 16 and struct vring contains 3 pointers and an unsigned int so on 32-bit sizeof(struct vring_desc) == sizeof(struct vring). However, this is no longer true on 64-bit where the bug is...
```diff diff --git a/include/linux/virtio_ring.h b/include/linux/virtio_ring.h index ac69e7bb5a14..5b88d215af50 100644 --- a/include/linux/virtio_ring.h +++ b/include/linux/virtio_ring.h @@ -92,8 +92,8 @@ static inline void vring_init(struct vring *vr, unsigned int num, void *p) { vr->num = num; vr->desc = p; - vr...
5f78e89b5f7041895c4820be5c000792243b634f
Analyze and fix the following issue in the Linux kernel code: [SCSI] aacraid: fix security weakness
Problem Details: Actually there are several but one is trivially fixed 1. FSACTL_GET_NEXT_ADAPTER_FIB ioctl does not lock dev->fib_list but needs to 2. Ditto for FSACTL_CLOSE_GET_ADAPTER_FIB 3. It is possible to construct an attack via the SRB ioctls where the user obtains assorted elevated privileges. Various approac...
```diff diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 53061bceaad8..9dd331bc29b0 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -636,7 +636,7 @@ static int aac_cfg_open(struct inode *inode, struct file *file) static int aac_cfg_ioctl(struct inode *inode...
2e21630ddc3fb717dc645356b75771c6a52dc627
Analyze and fix the following issue in the Linux kernel code: [CRYPTO] geode: Fix not inplace encryption
Problem Details: Currently the Geode AES module fails to encrypt or decrypt if the coherent bits are not set what is currently the case if the encryption does not occur inplace. However, the encryption works on my Geode machine _only_ if the coherent bits are always set. Signed-off-by: Sebastian Siewior <sebastian@bre...
```diff diff --git a/drivers/crypto/geode-aes.c b/drivers/crypto/geode-aes.c index f9a34abbf4fa..711e246e1ef0 100644 --- a/drivers/crypto/geode-aes.c +++ b/drivers/crypto/geode-aes.c @@ -110,8 +110,7 @@ geode_aes_crypt(struct geode_aes_op *op) * we don't need to worry */ - if (op->src == op->dst) - flags |= (A...
2994c63863ac350c4c8c6a65d8110749c2abb95c
Analyze and fix the following issue in the Linux kernel code: [INET]: Small possible memory leak in FIB rules
Problem Details: This patch fixes a small memory leak. Default fib rules can be deleted by the user if the rule does not carry FIB_RULE_PERMANENT flag, f.e. by ip rule flush Such a rule will not be freed as the ref-counter has 2 on start and becomes clearly unreachable after removal. Signed-off-by: Denis V. Lunev <d...
```diff diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h index 017aebd90683..41a301e38643 100644 --- a/include/net/fib_rules.h +++ b/include/net/fib_rules.h @@ -107,4 +107,7 @@ extern int fib_rules_unregister(struct fib_rules_ops *); extern int fib_rules_lookup(struct fib_rules_ops *, struct ...
60d78c4473493674531a1df0772ca9e4d6133a62
Analyze and fix the following issue in the Linux kernel code: ssb: Fix PCMCIA-host lowlevel bus access
Problem Details: This fixes the lowlevel bus access routines for PCMCIA based devices. There are still a few issues with register access sideeffects after this patch. This will be addressed in a later patch. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c index fc1d589dc675..85a20546e827 100644 --- a/drivers/ssb/main.c +++ b/drivers/ssb/main.c @@ -440,6 +440,7 @@ static int ssb_devices_register(struct ssb_bus *bus) break; case SSB_BUSTYPE_PCMCIA: #ifdef CONFIG_SSB_PCMCIAHOST + sdev->irq = bus->host_p...
d52a60ad389d8aeac162350b19e4303c6cde7f93
Analyze and fix the following issue in the Linux kernel code: mac80211: fix MAC80211_RCSIMPLE Kconfig
Problem Details: I meant for this to be selectable only with EMBEDDED, not enabled only with EMBEDDED. This does it that way. Sorry. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/net/mac80211/Kconfig b/net/mac80211/Kconfig index 32c8c08c4683..ce176e691afe 100644 --- a/net/mac80211/Kconfig +++ b/net/mac80211/Kconfig @@ -14,9 +14,9 @@ config MAC80211 networking stack. config MAC80211_RCSIMPLE - bool "'simple' rate control algorithm" + bool "'simple' rate control algorith...
7f3ad8943e2e6336ba229b208be8c7a80730c5d4
Analyze and fix the following issue in the Linux kernel code: mac80211: make "decrypt failed" messages conditional upon MAC80211_DEBUG
Problem Details: Make "decrypt failed" and "have no key" debugging messages compile conditionally upon CONFIG_MAC80211_DEBUG. They have been useful for finding certain problems in the past, but in many cases they just clutter a user's logs. A typical example is an enviornment where multiple SSIDs are using a single B...
```diff diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index ece77766ea2b..428a9fcf57d6 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -509,9 +509,11 @@ ieee80211_rx_h_decrypt(struct ieee80211_txrx_data *rx) rx->key->tx_rx_count++; /* TODO: add threshold stuff again */ } else { +#ifdef CONFIG_MAC...
5b98b1f7daf6d52ccc446486aca0b8bc9a588b2c
Analyze and fix the following issue in the Linux kernel code: mac80211: use IW_AUTH_PRIVACY_INVOKED rather than IW_AUTH_KEY_MGMT
Problem Details: In the long bug-hunt for why dynamic WEP networks didn't work it turned out that mac80211 incorrectly uses IW_AUTH_KEY_MGMT while it should use IW_AUTH_PRIVACY_INVOKED to determine whether to associate to protected networks or not. This patch changes the behaviour to be that way and clarifies the exis...
```diff diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 4b4ed2a5803c..b4e32ab3664d 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -230,6 +230,7 @@ struct ieee80211_if_vlan { #define IEEE80211_STA_AUTO_SSID_SEL BIT(10) #define IEEE80211_STA_AUTO_BSSID_SEL BIT(11)...
2736622344e9af9801392edf9e733e8a8f6931d1
Analyze and fix the following issue in the Linux kernel code: rfkill: Fix sparse warning
Problem Details: Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c index 47e8cd0322c0..73d60a307129 100644 --- a/net/rfkill/rfkill.c +++ b/net/rfkill/rfkill.c @@ -27,6 +27,10 @@ #include <linux/mutex.h> #include <linux/rfkill.h> +/* Get declaration of rfkill_switch_all() to shut up sparse. */ +#include "rfkill-input.h"...
7319f1e6bcf04abd2eddb19747b0933a76f839ce
Analyze and fix the following issue in the Linux kernel code: rfkill: Use mutex_lock() at register and add sanity check
Problem Details: Replace mutex_lock_interruptible() by mutex_lock() in rfkill_register(), as interruptible doesn't make sense there. Add a sanity check for rfkill->type, as that's used for an unchecked dereference in an array and might cause hard to debug crashes if the driver sets this to an invalid value. Signed-of...
```diff diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c index bbfbb9e7a917..47e8cd0322c0 100644 --- a/net/rfkill/rfkill.c +++ b/net/rfkill/rfkill.c @@ -276,21 +276,17 @@ static struct class rfkill_class = { static int rfkill_add_switch(struct rfkill *rfkill) { - int retval; - - retval = mutex_lock_interrupti...
f51359a8fb1bb00ae87051991e59d0f92d90604b
Analyze and fix the following issue in the Linux kernel code: iwlwifi: select proper rate control algorithm
Problem Details: Prior to this patch, iwlwifi would always use the first registered rate control algorithm which, depending on system setup, could be anything. After the mac80211 patch to make the simple algorithm built-in, it would always be simple. This has always been a bug in iwlwifi. This fixes it by requesting ...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 4f22a7174caf..be7c9f42a340 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c @@ -8354,6 +8354,8 @@ static int iwl_pci_probe(struct pci_dev *pdev, ...
8a8f1c0437a77cce29c1cb6089f01f22a6d9ca6e
Analyze and fix the following issue in the Linux kernel code: rfkill: Register LED triggers before registering switch
Problem Details: Registering the switch triggers a LED event, so we must register LED triggers before the switch. This has a potential to fix a crash, depending on how the device driver initializes the rfkill data structure. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> ...
```diff diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c index 51d151c0e962..c6a9412fe5bd 100644 --- a/net/rfkill/rfkill.c +++ b/net/rfkill/rfkill.c @@ -388,19 +388,20 @@ int rfkill_register(struct rfkill *rfkill) if (!rfkill->toggle_radio) return -EINVAL; + snprintf(dev->bus_id, sizeof(dev->bus_id), + "...
8d8c90e3fd1f8895f6d48bdcb34ba69a1fe73616
Analyze and fix the following issue in the Linux kernel code: ssb: Fix initcall ordering
Problem Details: ssb must init after PCI but before the ssb drivers. Signed-off-by: Michael Buesch <mb@bu3sch.de> Cc: Christian Casteyde <casteyde.christian@free.fr> Fixes-bug: #9219 Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c index c12a741b5574..fc1d589dc675 100644 --- a/drivers/ssb/main.c +++ b/drivers/ssb/main.c @@ -1147,7 +1147,10 @@ static int __init ssb_modinit(void) return err; } -subsys_initcall(ssb_modinit); +/* ssb must be initialized after PCI but before the ssb dri...
94e10bfb8a7372df3ef2759c9ec2a37de2f24aca
Analyze and fix the following issue in the Linux kernel code: softmac: fix wext MLME request reason code endianness
Problem Details: The MLME request reason code is host-endian and our passing it to the low level functions is host-endian as well since they do the swapping. I noticed that the reason code 768 was sent (0x300) rather than 3 when wpa_supplicant terminates. This removes the superfluous cpu_to_le16() call. Signed-off-by:...
```diff diff --git a/net/ieee80211/softmac/ieee80211softmac_wx.c b/net/ieee80211/softmac/ieee80211softmac_wx.c index ac36767b56e8..e01b59aedc54 100644 --- a/net/ieee80211/softmac/ieee80211softmac_wx.c +++ b/net/ieee80211/softmac/ieee80211softmac_wx.c @@ -470,7 +470,7 @@ ieee80211softmac_wx_set_mlme(struct net_device *d...
78608ba0326f1448f9a10dbb402a38192559f639
Analyze and fix the following issue in the Linux kernel code: [NET]: Fix skb_truesize_check() assertion
Problem Details: The intent of the assertion in skb_truesize_check() is to check for skb->truesize being decremented too much by other code, resulting in a wraparound below zero. The type of the right side of the comparison causes the compiler to promote the left side to an unsigned type, despite the presence of an ex...
```diff diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 94e49915a8c0..91140fe8c119 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -387,7 +387,9 @@ extern void skb_truesize_bug(struct sk_buff *skb); static inline void skb_truesize_check(struct sk_buff *skb) { - if (unlik...
e9671fcb3bef1fe2e71aa0456bd5b7eec9e8de4d
Analyze and fix the following issue in the Linux kernel code: [NET]: Fix infinite loop in dev_mc_unsync().
Problem Details: From: Joe Perches <joe@perches.com> Based upon an initial patch and report by Luis R. Rodriguez. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/core/dev_mcast.c b/net/core/dev_mcast.c index ae354057d84c..647973daca2b 100644 --- a/net/core/dev_mcast.c +++ b/net/core/dev_mcast.c @@ -168,13 +168,13 @@ void dev_mc_unsync(struct net_device *to, struct net_device *from) da = from->mc_list; while (da != NULL) { next = da->next; - if (...
fbd52eb2bd17bd3468974aa2fdce140f0cd32fc7
Analyze and fix the following issue in the Linux kernel code: [TCP]: Split SACK FRTO flag clearing (fixes FRTO corner case bug)
Problem Details: In case we run out of mem when fragmenting, the clearing of FLAG_ONLY_ORIG_SACKED might get missed which then feeds FRTO with false information. Move clearing outside skb processing loop so that it will get executed even if the skb loop terminates prematurely due to out-of-mem. Besides, now the core o...
```diff diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 84bcdc94dfa9..20c9440ab85e 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -1444,12 +1444,17 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_ tp->retransmit_skb_hint = NULL; } } el...
c7caf8d3ed7a6617aa0a3083815c439bd952c45c
Analyze and fix the following issue in the Linux kernel code: [TCP]: Fix reord detection due to snd_una covered holes
Problem Details: Fixes subtle bug like the one with fastpath_cnt_hint happening due to the way the GSO and hints interact. Because hints are not reset when just a GSOed skb is partially ACKed, there's no guarantee that the relevant part of the write queue is going to be processed in sacktag at all (skbs below snd_una) ...
```diff diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 0f757578f3bd..9fc9096ada8a 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -1417,11 +1417,6 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_ if ((dup_sack && in_sack) && (sacked&TCPC...
ad4c9a09c7bf6aaa418679f0fb48484eab53a285
Analyze and fix the following issue in the Linux kernel code: qla3xxx: bugfix: Fix bad logical operation in link state machine.
Problem Details: Luckily, this wasn't reported or reproduced. The logical operation for setting duplex had wrong grouping. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c index 4f0fd41dce19..a5791114b7bd 100644 --- a/drivers/net/qla3xxx.c +++ b/drivers/net/qla3xxx.c @@ -1456,16 +1456,11 @@ static void ql_phy_start_neg_ex(struct ql3_adapter *qdev) PHYAddr[qdev->mac_index]); reg &= ~PHY_GIG_ALL_PARAMS; - if(port...
3e23b7d3b54c07f1c4fee1ebc418d1a37248654e
Analyze and fix the following issue in the Linux kernel code: qla3xxx: bugfix: Move link state machine into a worker thread
Problem Details: The link state machine requires access to some resources that are shared with the iSCSI function on the chip. (See iSCSI driver at drivers/scsi/qla4xxx) If the interface is being up/downed at a rapid pace this driver may need to sleep waiting to get access to the common resources. For this we are mov...
```diff diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c index 30adf726743c..4f0fd41dce19 100644 --- a/drivers/net/qla3xxx.c +++ b/drivers/net/qla3xxx.c @@ -1645,8 +1645,11 @@ static int ql_finish_auto_neg(struct ql3_adapter *qdev) return 0; } -static void ql_link_state_machine(struct ql3_adapter *qdev) ...
32bee776533eea839f9499d985c1490b5ac98512
Analyze and fix the following issue in the Linux kernel code: pasemi_mac: Fix CRC checks
Problem Details: Make sure we don't feed packets with bad CRC up the network stack, and discount the packet length as reported from the MAC for the CRC field. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/pasemi_mac.c b/drivers/net/pasemi_mac.c index b14f171b1b67..09b4fde8d924 100644 --- a/drivers/net/pasemi_mac.c +++ b/drivers/net/pasemi_mac.c @@ -580,6 +580,16 @@ static int pasemi_mac_clean_rx(struct pasemi_mac *mac, int limit) len = (macrx & XCT_MACRX_LLEN_M) >> XCT_MACRX_LLEN_S;...
1466a21997212a5fb33d5da9357841972b28b007
Analyze and fix the following issue in the Linux kernel code: bonding: fix rtnl locking merge error
Problem Details: Looks like I incorrectly merged one of the rtnl lock changes, so that one function, bonding_show_active_slave, held rtnl but didn't release it, and another, bonding_store_active_slave, never held rtnl but did release it. Fixed so the first function doesn't mess with rtnl, and the second correctly acq...
```diff diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index 7a06ade85b02..b29330d8e309 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c @@ -1193,8 +1193,6 @@ static ssize_t bonding_show_active_slave(struct device *d, struct bonding *bond = to_bond...
bdb3f751cfe6d8d5737a2ff406d7169361b5dfb2
Analyze and fix the following issue in the Linux kernel code: b43: Fix kconfig dependencies for rfkill and leds
Problem Details: Fix dependencies for built-in b43. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/b43/Kconfig b/drivers/net/wireless/b43/Kconfig index e3c573e56b63..fdbc351ac333 100644 --- a/drivers/net/wireless/b43/Kconfig +++ b/drivers/net/wireless/b43/Kconfig @@ -61,16 +61,18 @@ config B43_PCMCIA If unsure, say N. -# LED support +# This config option automaticall...
cd73ba911248ea3620cd201deda58f0b532ce429
Analyze and fix the following issue in the Linux kernel code: b43legacy: Fix sparse warning
Problem Details: Fix a sparse warning about a nonstatic function. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c index 1ebb787ef9cf..3bde1e9ab428 100644 --- a/drivers/net/wireless/b43legacy/main.c +++ b/drivers/net/wireless/b43legacy/main.c @@ -3335,7 +3335,7 @@ out_mutex_unlock: return err; } -void b43legacy_stop(struct ieee80...
440cb58a7aa979fabb02a38e55bfe93adde0f41c
Analyze and fix the following issue in the Linux kernel code: b43legacy: fix shared IRQ race condition
Problem Details: Fix an IRQ race condition in b43legacy. If we call b43legacy_wireless_core_stop(), it will set the status of the device to INITIALIZED and the IRQ handler won't care any longer about IRQs, thus the kernel will disable the IRQ if it's shared (unless we boot it with the 'irqpoll' option). So we must disa...
```diff diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c index f0e56dfc9ecf..1ebb787ef9cf 100644 --- a/drivers/net/wireless/b43legacy/main.c +++ b/drivers/net/wireless/b43legacy/main.c @@ -2781,6 +2781,17 @@ static void b43legacy_wireless_core_stop(struct b43legacy_wldev *dev) ...
a19d12d742903c745890c1374d64092595571e40
Analyze and fix the following issue in the Linux kernel code: b43: fix shared IRQ race condition
Problem Details: Fix an IRQ race condition in b43. If we call b43_stop_wireless_core(), it will set the status of the device to INITIALIZED and the IRQ handler won't care any longer about IRQs, thus the kernel will disable the IRQ if it's shared (unless we boot it with the 'irqpoll' option). So we must disable IRQs bef...
```diff diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index c9778c6cf2e8..2b17c1dc46f1 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c @@ -2985,6 +2985,16 @@ static void b43_wireless_core_stop(struct b43_wldev *dev) if (b43_status(dev) < B43_STAT_S...
2817ef1a5d9010873692f8353f6320ebecf9b837
Analyze and fix the following issue in the Linux kernel code: b43legacy: add me as maintainer and fix URLs
Problem Details: As b43legacy is going to be orphaned, add me as a maintainer. Fix URLs for the related website and fix my e-mail address in MAINTAINERS file. Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Cc: Larry Finger <larry.finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/MAINTAINERS b/MAINTAINERS index 1c7c229a0926..6a9702726239 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -787,23 +787,25 @@ B43 WIRELESS DRIVER P: Michael Buesch M: mb@bu3sch.de P: Stefano Brivio -M: st3@riseup.net +M: stefano.brivio@polimi.it L: linux-wireless@vger.kernel.org -W: http://bcm43x...
187a9dca3f2f90341e321a3998a5b0c74111f77c
Analyze and fix the following issue in the Linux kernel code: b43legacy: fix possible buffer overrun in debugfs
Problem Details: Fix possible buffer overrun. The patch to b43 by Michael Buesch <mb@bu3sch.de> has been ported to b43legacy. Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/b43legacy/debugfs.c b/drivers/net/wireless/b43legacy/debugfs.c index eefa6fb79685..619b4534ef09 100644 --- a/drivers/net/wireless/b43legacy/debugfs.c +++ b/drivers/net/wireless/b43legacy/debugfs.c @@ -124,7 +124,7 @@ static ssize_t shm_read_file(struct b43legacy_wldev *dev, cha...
35c7e6602b81bdacb745f04236a419402777139e
Analyze and fix the following issue in the Linux kernel code: b43: Rewrite and fix rfkill init
Problem Details: The rfkill subsystem doesn't like code like that rfkill_allocate(); rfkill_register(); rfkill_unregister(); rfkill_register(); /* <- This will crash */ This sequence happens with modprobe b43 ifconfig wlanX up ifconfig wlanX down ifconfig wlanX up Fix this by always re-allocating the rfkill stuff bef...
```diff diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 5058e60e5703..c9778c6cf2e8 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c @@ -3661,7 +3661,6 @@ static int b43_setup_modes(struct b43_wldev *dev, static void b43_wireless_core_detach(struc...
30c4ae42317666f3aeed658cdb8803c84ac6fe77
Analyze and fix the following issue in the Linux kernel code: b43: debugfs SHM read buffer overrun fix
Problem Details: Fix possible buffer overrun. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/b43/debugfs.c b/drivers/net/wireless/b43/debugfs.c index 734e70e1a06d..ef0075d9f9cb 100644 --- a/drivers/net/wireless/b43/debugfs.c +++ b/drivers/net/wireless/b43/debugfs.c @@ -128,7 +128,7 @@ static ssize_t shm_read_file(struct b43_wldev *dev, __le16 *le16buf = (__le16 *)buf...
80fda03fc8b5cd09c3e0e90725ef9bcb2a5c7b30
Analyze and fix the following issue in the Linux kernel code: b43: Fix rfkill callback deadlock
Problem Details: wl->mutex might already be locked on initialization. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/b43/rfkill.c b/drivers/net/wireless/b43/rfkill.c index 800e0a61a7f5..456930ffef2d 100644 --- a/drivers/net/wireless/b43/rfkill.c +++ b/drivers/net/wireless/b43/rfkill.c @@ -61,15 +61,22 @@ static void b43_rfkill_poll(struct input_polled_dev *poll_dev) mutex_unlock(&wl->mutex...
ce2d90591fe69ba19076c5d187dfc88ba3318623
Analyze and fix the following issue in the Linux kernel code: b43: pcmcia-host initialization bugfixes
Problem Details: Fix the initialization for PCMCIA devices. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/b43/pcmcia.c b/drivers/net/wireless/b43/pcmcia.c index b242a9a90dd2..4b6648f0efcd 100644 --- a/drivers/net/wireless/b43/pcmcia.c +++ b/drivers/net/wireless/b43/pcmcia.c @@ -65,12 +65,12 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev) tuple_t tuple; cispa...