id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
9b6efcd2e2275e13403700913b7a1da92cf11ad2
Analyze and fix the following issue in the Linux kernel code: lguest: update comments to reflect LHCALL_LOAD_GDT_ENTRY.
Problem Details: We used to have a hypercall which reloaded the entire GDT, then we switched to one which loaded a single entry (to match the IDT code). Some comments were not updated, so fix them. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reported by: Eviatar Khen <eviatarkhen@gmail.com>
```diff diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index 9257510b4836..9d5f55848455 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c @@ -324,9 +324,8 @@ static void lguest_load_gdt(const struct desc_ptr *desc) } /* - * For a single GDT entry which changes, we do the lazy thing: alt...
6df7aadcd9290807c464675098b5dd2dc9da5075
Analyze and fix the following issue in the Linux kernel code: virtio: console: Fix poll blocking even though there is data to read
Problem Details: I found this while working on a Linux agent for spice, the symptom I was seeing was select blocking on the spice vdagent virtio serial port even though there were messages queued up there. virtio_console's port_fops_poll checks port->inbuf != NULL to determine if read won't block. However if an applic...
```diff diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 942a9826bd23..2f2e31b58b34 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -642,7 +642,7 @@ static unsigned int port_fops_poll(struct file *filp, poll_table *wait) poll_wait(filp, &port->waitqueu...
c7fcf25525b3cd6559f882837bfa76d04a80f8a6
Analyze and fix the following issue in the Linux kernel code: Staging: line6: workaround for null pointer bug
Problem Details: Signed-off-by: Markus Grabner <grabner@icg.tugraz.at> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/line6/capture.c b/drivers/staging/line6/capture.c index a3c99244b359..06a6db889fbd 100644 --- a/drivers/staging/line6/capture.c +++ b/drivers/staging/line6/capture.c @@ -147,6 +147,9 @@ void line6_capture_copy(struct snd_line6_pcm *line6pcm, char *fbuf, int fsize) const int bytes_...
9b906a33e0a459ea4d51c8d243154c6998be2a1d
Analyze and fix the following issue in the Linux kernel code: staging: ath6kl: Fixing a race condition during initialization
Problem Details: The commit fixes a race condition in the initialization portion of the driver. The problem was observed while testing with the kernel in the staging-next tree. The wait on the ready event is signalled prematurely before setting the arVersion.wlan_ver and arVersion.abi_ver. The code waiting on this sema...
```diff diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c index c7922c9ff233..daba6e4cb9d8 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c @@ -4170,8 +4170,6 @@ ar6000_ready_event(void *devt, A_UINT8 *dat...
103281df0b7fec07872ef033666a1707b5755b9c
Analyze and fix the following issue in the Linux kernel code: staging: ath6kl: Fixing a compile error
Problem Details: The commit fixes a compilation error that was encountered while using a specific kernel configuration file. The problem was the use of some functions defined in <linux/semaphore.h> without including the header file explicitly. It was probably working before because of the dependency getting implicitly ...
```diff diff --git a/drivers/staging/ath6kl/os/linux/include/osapi_linux.h b/drivers/staging/ath6kl/os/linux/include/osapi_linux.h index ef7cc827cfb4..fce6ceb73fa4 100644 --- a/drivers/staging/ath6kl/os/linux/include/osapi_linux.h +++ b/drivers/staging/ath6kl/os/linux/include/osapi_linux.h @@ -39,7 +39,7 @@ #include <...
8522e70b44021d1cc44de1f6c491ac21cc8f4f3d
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: fix printk() coding style issue in adl_pci9111.c
Problem Details: This is a patch to the adl_pci9111.c file that fixes all, printk() should include KERN-facility level, warnings found by the checkpatch.pl tool Signed-off-by: Maurice Dawson <mauricedawson2699@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/comedi/drivers/adl_pci9111.c b/drivers/staging/comedi/drivers/adl_pci9111.c index 18103b68769c..fc48bae42ab7 100644 --- a/drivers/staging/comedi/drivers/adl_pci9111.c +++ b/drivers/staging/comedi/drivers/adl_pci9111.c @@ -1292,7 +1292,8 @@ static int pci9111_attach(struct comedi_dev...
dd173abfead903c7df54e977535973f3312cd307
Analyze and fix the following issue in the Linux kernel code: Staging: vt6655: fix buffer overflow
Problem Details: "param->u.wpa_associate.wpa_ie_len" comes from the user. We should check it so that the copy_from_user() doesn't overflow the buffer. Also further down in the function, we assume that if "param->u.wpa_associate.wpa_ie_len" is set then "abyWPAIE[0]" is initialized. To make that work, I changed the te...
```diff diff --git a/drivers/staging/vt6655/wpactl.c b/drivers/staging/vt6655/wpactl.c index 0142338bcafe..4bdb8362de82 100644 --- a/drivers/staging/vt6655/wpactl.c +++ b/drivers/staging/vt6655/wpactl.c @@ -766,9 +766,14 @@ static int wpa_set_associate(PSDevice pDevice, DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wpa_ie_l...
e3671ac429fe50cf0c1b4f1dc4b7237207f1d956
Analyze and fix the following issue in the Linux kernel code: serial: mfd: fix bug in serial_hsu_remove()
Problem Details: Medfield HSU driver deal with 4 pci devices(3 uart ports + 1 dma controller), so in pci remove func, we need handle them differently Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/serial/mfd.c b/drivers/serial/mfd.c index bc9af503907f..324c385a653d 100644 --- a/drivers/serial/mfd.c +++ b/drivers/serial/mfd.c @@ -1423,7 +1423,6 @@ static void hsu_global_init(void) } phsu = hsu; - hsu_debugfs_init(hsu); return; @@ -1435,18 +1434,20 @@ err_free_region: st...
476f771cb9b6cd4845dcd18f16a2f03a89ee63fc
Analyze and fix the following issue in the Linux kernel code: serial: amba-pl010: fix set_ldisc
Problem Details: Commit d87d9b7d1 ("tty: serial - fix tty referencing in set_ldisc") changed set_ldisc to take ldisc number as parameter. This patch fixes AMBA PL010 driver according the new prototype. Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi> Cc: Alan Cox <alan@linux.intel.com> Cc: Russell King <rmk+ker...
```diff diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c index 50441ffe8e38..2904aa044126 100644 --- a/drivers/serial/amba-pl010.c +++ b/drivers/serial/amba-pl010.c @@ -472,14 +472,9 @@ pl010_set_termios(struct uart_port *port, struct ktermios *termios, spin_unlock_irqrestore(&uap->port.lock, fl...
af2ac7bfec4176cad5e04402d116b5242d759bf8
Analyze and fix the following issue in the Linux kernel code: Staging: batman-adv: Introduce if_list_lock to protect if_list
Problem Details: The update critical sections of if_list must be protected by a locking primitive other than RCU. The iterator must also be protected by the chosen locking mechanism. The rtnl_lock in hardif_remove_interfaces must also be moved outside the iterator primitive to ensure that we don't deadlock the kernel ...
```diff diff --git a/drivers/staging/batman-adv/hard-interface.c b/drivers/staging/batman-adv/hard-interface.c index a587da9c827e..35b198c6bad5 100644 --- a/drivers/staging/batman-adv/hard-interface.c +++ b/drivers/staging/batman-adv/hard-interface.c @@ -33,6 +33,9 @@ #define MIN(x, y) ((x) < (y) ? (x) : (y)) +/* ...
1612ae996ec16ed358f0e9afacb0a262b1cf97a4
Analyze and fix the following issue in the Linux kernel code: Staging: batman-adv: checkpatch cleanup of comments
Problem Details: checkpatch now detects the start of a comment and warns about usage of multiple spaces at the beginning of a line. We have to replace the ' ' in multiple lines comments by ' * ' to fix it. Checkpatch also wants a comment after a definition of a spinlock_t which describes what it protects. It is curr...
```diff diff --git a/drivers/staging/batman-adv/packet.h b/drivers/staging/batman-adv/packet.h index 44de1bfb0b0c..2693383889a4 100644 --- a/drivers/staging/batman-adv/packet.h +++ b/drivers/staging/batman-adv/packet.h @@ -79,7 +79,7 @@ struct icmp_packet { #define BAT_RR_LEN 16 /* icmp_packet_rr must start with al...
369ae8be423889c2ca1eed00e1eb4f5a91c17771
Analyze and fix the following issue in the Linux kernel code: staging: octeon: '&pointer[0]' to 'pointer' fix
Problem Details: Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c index 9537ea4ae09d..fb568a935eef 100644 --- a/drivers/staging/octeon/ethernet.c +++ b/drivers/staging/octeon/ethernet.c @@ -465,7 +465,7 @@ int cvm_oct_common_init(struct net_device *dev) if (cvm_oct_mac_addr_offset >= octeon...
a3cf4b42ce40492b12396ec64e734f84ace3a729
Analyze and fix the following issue in the Linux kernel code: staging: rt2870: '&pointer[0]' to 'pointer' fix
Problem Details: Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/rt2870/common/rtusb_io.c b/drivers/staging/rt2870/common/rtusb_io.c index eb01c8a4239d..7d2f7e05814d 100644 --- a/drivers/staging/rt2870/common/rtusb_io.c +++ b/drivers/staging/rt2870/common/rtusb_io.c @@ -1882,7 +1882,7 @@ void CMDHandler(struct rt_rtmp_adapter *pAd) ("Updat...
e7cde7b31271155e5fb896a325bea38e9e604806
Analyze and fix the following issue in the Linux kernel code: staging: vt6655: '&pointer[0]' to 'pointer' fix
Problem Details: Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/vt6655/iwctl.c b/drivers/staging/vt6655/iwctl.c index d74b7448b25b..92e33999054b 100644 --- a/drivers/staging/vt6655/iwctl.c +++ b/drivers/staging/vt6655/iwctl.c @@ -2018,7 +2018,7 @@ param->u.wpa_key.seq_len = seq_len; #if 0 printk("param->u.wpa_key.alg_name =%d\n",param->u.wpa...
97d2354518897cfc42740637e6390eaa23e3d206
Analyze and fix the following issue in the Linux kernel code: staging: ath6kl: '&pointer[0]' to 'pointer' fix
Problem Details: Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c index c2947bc051dd..c7922c9ff233 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c @@ -959,7 +959,7 @@ ar6000_softmac_update(AR_SOFTC_T *ar, A_UCHAR...
b01d467ddd7470b1e9c6ccc68a1279771146abad
Analyze and fix the following issue in the Linux kernel code: staging: cxt1e1: '&pointer[0]' to 'pointer' fix
Problem Details: Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/cxt1e1/sbeproc.c b/drivers/staging/cxt1e1/sbeproc.c index af8fce46b305..c3eed4bc6d7e 100644 --- a/drivers/staging/cxt1e1/sbeproc.c +++ b/drivers/staging/cxt1e1/sbeproc.c @@ -143,7 +143,7 @@ sbecom_proc_get_sbe_info (char *buffer, char **start, off_t offset, len += sprintf (buff...
cfd1015a7a6236f4fdc0f8f9f688e38e78ae6d10
Analyze and fix the following issue in the Linux kernel code: staging: otus: '&pointer[0]' to 'pointer' fix
Problem Details: Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/otus/ioctl.c b/drivers/staging/otus/ioctl.c index 405bd2901859..a403d9ccd5e8 100644 --- a/drivers/staging/otus/ioctl.c +++ b/drivers/staging/otus/ioctl.c @@ -2188,7 +2188,7 @@ int usbdrv_wpa_ioctl(struct net_device *dev, struct athr_wlan_param *zdparm) printk(KERN_ERR "usbdrv_wpa...
a5ed57a3ec3ebd20eaaad3c1cf36283b2baee531
Analyze and fix the following issue in the Linux kernel code: staging: rtl8712: '&pointer[0]' to 'pointer' fix
Problem Details: Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c index a54e25dc3fc1..685a7b112d4b 100644 --- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c +++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c @@ -1917,7 +1917,7 @@ static int r871x_get_ap_info(struct net...
db5c53d15bc987bffa22e7e8044447026750f640
Analyze and fix the following issue in the Linux kernel code: staging: wlags49_h2: '&pointer[0]' to 'pointer' fix
Problem Details: Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/wlags49_h2/wl_util.c b/drivers/staging/wlags49_h2/wl_util.c index e510dcb35d97..4521c9fd5bb2 100644 --- a/drivers/staging/wlags49_h2/wl_util.c +++ b/drivers/staging/wlags49_h2/wl_util.c @@ -338,7 +338,7 @@ const char *DbgHwAddr(unsigned char *hwAddr) static char buffer[18];...
1c919d90e157f6656439194d6823c68b81b17fee
Analyze and fix the following issue in the Linux kernel code: staging: rt2860: '&pointer[0]' to 'pointer' fix
Problem Details: Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/rt2860/common/ba_action.c b/drivers/staging/rt2860/common/ba_action.c index 3f71c5028556..1befe9919d09 100644 --- a/drivers/staging/rt2860/common/ba_action.c +++ b/drivers/staging/rt2860/common/ba_action.c @@ -655,7 +655,7 @@ BOOLEAN BARecSessionAdd(struct rt_rtmp_adapter *pAd, S...
f299470a15ab3057afbf598cec59246a90ade449
Analyze and fix the following issue in the Linux kernel code: USB: musb: MAINTAINERS: Fix my mail address
Problem Details: If we don't, contributors to musb and any USB OMAP code will be sending mails to an unexistent inbox. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/MAINTAINERS b/MAINTAINERS index 411b0d04f69b..50b8148448fd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3942,7 +3942,7 @@ F: drivers/char/isicom.c F: include/linux/isicom.h MUSB MULTIPOINT HIGH SPEED DUAL-ROLE CONTROLLER -M: Felipe Balbi <felipe.balbi@nokia.com> +M: Felipe Balbi <balbi@ti.com...
fc8f2a7608d855b911e35a33e771e6358c705c43
Analyze and fix the following issue in the Linux kernel code: USB: otg: twl4030: fix phy initialization(v1)
Problem Details: Commit 461c317705eca5cac09a360f488715927fd0a927(into 2.6.36-v3) is put forward to power down phy if no usb cable is connected, but does introduce the two issues below: 1), phy is not into work state if usb cable is connected with PC during poweron, so musb device mode is not usable in such case, follo...
```diff diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c index 05aaac1c3861..0bc97698af15 100644 --- a/drivers/usb/otg/twl4030-usb.c +++ b/drivers/usb/otg/twl4030-usb.c @@ -347,11 +347,20 @@ static void twl4030_i2c_access(struct twl4030_usb *twl, int on) } } -static void twl4030_phy_power...
a4d258036ed9b2a1811c3670c6099203a0f284a0
Analyze and fix the following issue in the Linux kernel code: tcp: Fix race in tcp_poll
Problem Details: If a RST comes in immediately after checking sk->sk_err, tcp_poll will return POLLIN but not POLLOUT. Fix this by checking sk->sk_err at the end of tcp_poll. Additionally, ensure the correct order of operations on SMP machines with memory barriers. Signed-off-by: Tom Marshall <tdm.code@gmail.com> Si...
```diff diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 3fb1428e526e..95d75d443927 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -386,8 +386,6 @@ unsigned int tcp_poll(struct file *file, struct socket *sock, poll_table *wait) */ mask = 0; - if (sk->sk_err) - mask = POLLERR; /* * POLLHUP is certa...
9828e6e6e3f19efcb476c567b9999891d051f52f
Analyze and fix the following issue in the Linux kernel code: rose: Fix signedness issues wrt. digi count.
Problem Details: Just use explicit casts, since we really can't change the types of structures exported to userspace which have been around for 15 years or so. Reported-by: Dan Rosenberg <dan.j.rosenberg@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index 8e45e76a95f5..d952e7eac188 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c @@ -679,7 +679,7 @@ static int rose_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) if (addr_len == sizeof(struct sockaddr_rose) && addr->srose_ndigis ...
c3083411062106452649e464e55c7b856de0d29b
Analyze and fix the following issue in the Linux kernel code: omap: Fix CONFIG_LOCAL_TIMERS initialization for multi-omap
Problem Details: Fix CONFIG_LOCAL_TIMERS initialization for multi-omap Signed-off-by: Tony Lindgren <tony@atomide.com> Acked-By: Santosh Shilimkar <santosh.shilimkar@ti.com>
```diff diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c index 74fbed8491f2..5a3e606dc44a 100644 --- a/arch/arm/mach-omap2/timer-gp.c +++ b/arch/arm/mach-omap2/timer-gp.c @@ -228,8 +228,10 @@ static void __init omap2_gp_clocksource_init(void) static void __init omap2_gp_timer_init(void) { ...
af6261031317f646d22f994c0b467521e47aa49f
Analyze and fix the following issue in the Linux kernel code: drm/i915: Hold a reference to the object whilst unbinding the eviction list
Problem Details: During heavy aperture thrashing we may be forced to wait upon several active objects during eviction. The active list may be the last reference to these objects and so the action of waiting upon one of them may cause another to be freed (and itself unbound). To prevent the object disappearing underneat...
```diff diff --git a/drivers/gpu/drm/i915/i915_gem_evict.c b/drivers/gpu/drm/i915/i915_gem_evict.c index 72cae3cccad8..e85246ef691c 100644 --- a/drivers/gpu/drm/i915/i915_gem_evict.c +++ b/drivers/gpu/drm/i915/i915_gem_evict.c @@ -79,6 +79,7 @@ mark_free(struct drm_i915_gem_object *obj_priv, struct list_head *unwi...
5250a5031ee5733c10c7cb371206ed3784918adc
Analyze and fix the following issue in the Linux kernel code: ASoC: Fix WM8978/migor driver name conflict
Problem Details: Standardise on 'wm8978' as the name for the CODEC. Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
```diff diff --git a/sound/soc/codecs/wm8978.c b/sound/soc/codecs/wm8978.c index 676a4306cc87..13b979a71a7c 100644 --- a/sound/soc/codecs/wm8978.c +++ b/sound/soc/codecs/wm8978.c @@ -1038,7 +1038,7 @@ MODULE_DEVICE_TABLE(i2c, wm8978_i2c_id); static struct i2c_driver wm8978_i2c_driver = { .driver = { - .name = "WM...
5f4ad04a1e805d14de080ff9d5384b4d20518a9a
Analyze and fix the following issue in the Linux kernel code: frv: fix address verification holes in setup_frame/setup_rt_frame
Problem Details: a) sa_handler might be maliciously set to point to kernel memory; blindly dereferencing it in FDPIC case is a Bad Idea(tm). b) I'm not sure you need that set_fs(USER_DS) there at all, but if you do, you'd better do it *before* checking the frame you've decided to use with access_ok(), lest si...
```diff diff --git a/arch/frv/kernel/signal.c b/arch/frv/kernel/signal.c index 7fc29615ef01..5fb2d0661c78 100644 --- a/arch/frv/kernel/signal.c +++ b/arch/frv/kernel/signal.c @@ -253,6 +253,8 @@ static int setup_frame(int sig, struct k_sigaction *ka, sigset_t *set) struct sigframe __user *frame; int rsig; + set_f...
31c4a3d3a0f84a5847665f8aa0552d188389f791
Analyze and fix the following issue in the Linux kernel code: mm: further fix swapin race condition
Problem Details: Commit 4969c1192d15 ("mm: fix swapin race condition") is now agreed to be incomplete. There's a race, not very much less likely than the original race envisaged, in which it is further necessary to check that the swapcache page's swap has not changed. Here's the reasoning: cast in terms of reuse_swap...
```diff diff --git a/mm/memory.c b/mm/memory.c index 71b161b73bb5..0e18b4d649ec 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -2680,10 +2680,12 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma, delayacct_clear_flag(DELAYACCT_PF_SWAPIN); /* - * Make sure try_to_free_swap didn't release ...
df6d02300f7c2fbd0fbe626d819c8e5237d72c62
Analyze and fix the following issue in the Linux kernel code: wext: fix potential private ioctl memory content leak
Problem Details: When a driver doesn't fill the entire buffer, old heap contents may remain, and if it also doesn't update the length properly, this old heap content will be copied back to userspace. It is very unlikely that this happens in any of the drivers using private ioctls since it would show up as junk being r...
```diff diff --git a/net/wireless/wext-priv.c b/net/wireless/wext-priv.c index 3feb28e41c53..674d426a9d24 100644 --- a/net/wireless/wext-priv.c +++ b/net/wireless/wext-priv.c @@ -152,7 +152,7 @@ static int ioctl_private_iw_point(struct iw_point *iwp, unsigned int cmd, } else if (!iwp->pointer) return -EFAULT; - ...
f3550d1b052a8acf4159b407dbdd1def47f223f9
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix capture widget for ALC269vb and co
Problem Details: ALC269vb and other variants don't use the widgets 0x24 but prefer the widget 0x22 instead. We need to fix the input parser. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 9bcf34eab679..4abe3da1240c 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -14593,7 +14593,11 @@ static int alc269_parse_auto_config(struct hda_codec *codec) err = alc269_auto_create_multi_out_ct...
749ef9f8423054e326f3a246327ed2db4b6d395f
Analyze and fix the following issue in the Linux kernel code: cfq: improve fsync performance for small files
Problem Details: Fsync performance for small files achieved by cfq on high-end disks is lower than what deadline can achieve, due to idling introduced between the sync write happening in process context and the journal commit. Moreover, when competing with a sequential reader, a process writing small files and fsync-i...
```diff diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index b9f86190763b..684592621736 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -216,7 +216,6 @@ struct cfq_data { enum wl_type_t serving_type; unsigned long workload_expires; struct cfq_group *serving_group; - bool noidle_tree_requires...
e1ca7b4ea29707920650d86b22afdb7e94ad5986
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix initialization of multiple output pins for ALC268/269
Problem Details: When multiple pins are assigned to headphones or speakers, they haven't been initialized properly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index bb3cf3b7282b..c4d9ad70fde7 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -13484,8 +13484,10 @@ static void alc268_auto_set_output_and_unmute(struct hda_codec *codec, static void alc268_auto_init...
f6837bbd599c2a4e1f621441f84286434bcc91ae
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix up autocfg output pin numbers in realtek parser
Problem Details: When quirks are applied, the numbers of output pins in autocfg aren't set up properly but only pin arrays are changed. Let's fix it up so that the rest of the parser can use autocfg.line_outs & co safely. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 6045f281b225..bb3cf3b7282b 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -876,6 +876,28 @@ static void alc_set_input_pin(struct hda_codec *codec, hda_nid_t nid, snd_hda_codec_write(codec, nid, ...
8c41e5e363db55d91aa3b1cdce4ab02ad9821de7
Analyze and fix the following issue in the Linux kernel code: kconfig: fix menuconfig on debian lenny
Problem Details: In 60f33b8 (kconfig: get rid of stray a.o, support ncursesw, 2006-01-15), support to link menuconfig with ncursesw library was added. To compute the linker command option -l, we check "libncursesw.{so,a,dylib}" to allow ncursesw to be used as a replacement ncurses. However, when checking what header ...
```diff diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh index fcef0f59d553..82cc3a85e7f8 100644 --- a/scripts/kconfig/lxdialog/check-lxdialog.sh +++ b/scripts/kconfig/lxdialog/check-lxdialog.sh @@ -23,6 +23,8 @@ ccflags() echo '-I/usr/include/ncurses -DCURSES_LOC=...
fe08d5a89726675a920b0e9bbbe849c46b27a6e5
Analyze and fix the following issue in the Linux kernel code: GFS2: Fix whitespace in previous patch
Problem Details: Removes the offending space Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
```diff diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c index f6da0d7676e2..ce4f1dfb533f 100644 --- a/fs/gfs2/ops_inode.c +++ b/fs/gfs2/ops_inode.c @@ -1423,7 +1423,7 @@ static void calc_max_reserv(struct gfs2_inode *ip, loff_t max, loff_t *len, max_data -= tmp; } /* This calculation isn't the exact rever...
9a3f236d40a99ea8dca3df40d8ef67631057cad6
Analyze and fix the following issue in the Linux kernel code: GFS2: Add a bug trap in allocation code
Problem Details: This adds a check to ensure that if we reach the block allocator that we don't try and proceed if there is no alloc structure hanging off the inode. This should only happen if there is a bug in GFS2. The error return code is distinctive in order that it will be easily spotted. Signed-off-by: Steven Wh...
```diff diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 370c29b536ea..66b6d4d8b1d2 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c @@ -1496,11 +1496,19 @@ int gfs2_alloc_block(struct gfs2_inode *ip, u64 *bn, unsigned int *n) struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); struct buffer_head *dibh; struct gfs2_a...
06497524589f2a7717da33969d541674e0a27da6
Analyze and fix the following issue in the Linux kernel code: nfsd4: fix hang on fast-booting nfs servers
Problem Details: The last_close field of a cache_detail is initialized to zero, so the condition detail->last_close < seconds_since_boot() - 30 may be false even for a cache that was never opened. However, we want to immediately fail upcalls to caches that were never opened: in the case of the auth_unix_gid cache, ...
```diff diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index da872f9fe1e0..ca7c621cd975 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c @@ -1091,6 +1091,23 @@ static void warn_no_listener(struct cache_detail *detail) } } +static bool cache_listeners_exist(struct cache_detail *detail) +{ + if (atomic...
f539dfedbd169e5ed47912bb517c75976ab556f3
Analyze and fix the following issue in the Linux kernel code: leds: leds-ns2: fix locking
Problem Details: This patch replace all the lock functions with the irq safe variant. The ns2_led_{set,get}_mode() functions must be safe in all context. For example, the trigger timer call led_set_brightness() in a softirq context. Signed-off-by: Simon Guinot <sguinot@lacie.com> Signed-off-by: Nicolas Pitre <nico@fl...
```diff diff --git a/drivers/leds/leds-ns2.c b/drivers/leds/leds-ns2.c index 74dce4ba0262..350eb34f049c 100644 --- a/drivers/leds/leds-ns2.c +++ b/drivers/leds/leds-ns2.c @@ -81,7 +81,7 @@ static int ns2_led_get_mode(struct ns2_led_data *led_dat, int cmd_level; int slow_level; - read_lock(&led_dat->rw_lock); + re...
c4a90588fa07ea47df7a67fd6cb03d6bc0f99634
Analyze and fix the following issue in the Linux kernel code: ARM: dove: fix __io() definition to use bus based offset
Problem Details: Signed-off-by: Eric Miao <eric.miao@canonical.com> Acked-by: Saeed Bishara <saeed@marvell.com> Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
```diff diff --git a/arch/arm/mach-dove/include/mach/io.h b/arch/arm/mach-dove/include/mach/io.h index 3b3e4721ce2e..eb4936ff90ad 100644 --- a/arch/arm/mach-dove/include/mach/io.h +++ b/arch/arm/mach-dove/include/mach/io.h @@ -13,8 +13,8 @@ #define IO_SPACE_LIMIT 0xffffffff -#define __io(a) ((void __iomem *)(((a...
863636828f1fcd9fdc15e24d620aa53cf18b432f
Analyze and fix the following issue in the Linux kernel code: dmaengine: fix interrupt clearing for mv_xor
Problem Details: When using simultaneously the two DMA channels on a same engine, some transfers are never completed. For example, an endless lock can occur while writing heavily on a RAID5 array (with async-tx offload support enabled). Note that this issue can also be reproduced by using the DMA test client. On a sa...
```diff diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c index 86c5ae9fde34..411d5bf50fc4 100644 --- a/drivers/dma/mv_xor.c +++ b/drivers/dma/mv_xor.c @@ -162,7 +162,7 @@ static int mv_is_err_intr(u32 intr_cause) static void mv_xor_device_clear_eoc_cause(struct mv_xor_chan *chan) { - u32 val = (1 << (1 + (c...
e4ff1c39ee1122198e8355069da59297038e55bb
Analyze and fix the following issue in the Linux kernel code: ARM: kirkwood: Unbreak PCIe I/O port
Problem Details: The support for the 2 pcie port of the 6282 has broken i/o port by switching *_IO_PHYS_BASE and *_IO_BUS_BASE. In fact, the patches reintroduced the same bug solved by commit 35f029e2514be209eb0e88c7d927f3bcc42a5cc2. So, I'm adding back *_IO_BUS_BASE in resource declaration and fix definition of KIRKWO...
```diff diff --git a/arch/arm/mach-kirkwood/include/mach/kirkwood.h b/arch/arm/mach-kirkwood/include/mach/kirkwood.h index 93fc2ec95e76..6e924b398919 100644 --- a/arch/arm/mach-kirkwood/include/mach/kirkwood.h +++ b/arch/arm/mach-kirkwood/include/mach/kirkwood.h @@ -38,7 +38,7 @@ #define KIRKWOOD_PCIE1_IO_PHYS_BASE ...
ffb5957bc48f64f0773fd3fbc43cb9bb9b38e270
Analyze and fix the following issue in the Linux kernel code: kconfig: allow build-time definition of the internal config prefix
Problem Details: Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Michal Marek <mmarek@suse.cz>
```diff diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index d56131c0b3c5..d6cfa0ffbaf0 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -425,7 +425,7 @@ static void check_conf(struct menu *menu) (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) { if (input_mode == ...
59dfa24da7cb02b3ccc39f5e74b74fe26ea9626a
Analyze and fix the following issue in the Linux kernel code: kconfig: rephrase help text not to mention the internal prefix
Problem Details: Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Michal Marek <mmarek@suse.cz>
```diff diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c index d2f6e056c058..5c3d0c4b810f 100644 --- a/scripts/kconfig/mconf.c +++ b/scripts/kconfig/mconf.c @@ -232,7 +232,7 @@ save_config_help[] = N_( "leave this blank.\n"), search_help[] = N_( "\n" - "Search for CONFIG_ symbols and display their re...
8baefd30b5b0101aa07aa75da44a9eee881eed28
Analyze and fix the following issue in the Linux kernel code: kconfig: replace a `switch()' statement by a more flexible `if()' statement
Problem Details: With the upcoming dynamical configuration prefix, we can no longer assume that the prefix will start by a 'C'. As such, we can no longer hardcode this value in the `case ...:', so replace the `switch() { ... }' statement by a more flexible 'if () { ... }' statement. Signed-off-by: Arnaud Lacombe <laco...
```diff diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index dc11d51bd8b3..d9181de78927 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -221,8 +221,7 @@ load: while (fgets(line, sizeof(line), in)) { conf_lineno++; sym = NULL; - switch (line[0]) { - case '#': +...
9b9d2e00bfa592aceda7b43da76c670df61faa97
Analyze and fix the following issue in the Linux kernel code: rds: signedness bug
Problem Details: In the original code if the copy_from_user() fails in rds_rdma_pages() then the error handling fails and we get a stack trace from kmalloc(). Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/rds/rdma.c b/net/rds/rdma.c index 48064673fc76..1a41debca1ce 100644 --- a/net/rds/rdma.c +++ b/net/rds/rdma.c @@ -522,7 +522,7 @@ int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm, struct rds_rdma_args *args; struct rds_iovec vec; struct rm_rdma_op *op = &rm->rdma; - unsi...
112d421df2fddc0278584b084f4fcfedd144c5f4
Analyze and fix the following issue in the Linux kernel code: Coda: mount hangs because of missed REQ_WRITE rename
Problem Details: Coda's REQ_* defines were renamed to avoid clashes with the block layer (commit 4aeefdc69f7b: "coda: fixup clash with block layer REQ_* defines"). However one was missed and response messages are no longer matched with requests and waiting threads are no longer woken up. This patch fixes this. Signe...
```diff diff --git a/fs/coda/psdev.c b/fs/coda/psdev.c index de89645777c7..116af7546cf0 100644 --- a/fs/coda/psdev.c +++ b/fs/coda/psdev.c @@ -184,8 +184,8 @@ static ssize_t coda_psdev_write(struct file *file, const char __user *buf, } /* adjust outsize. is this useful ?? */ - req->uc_outSize = nbytes; - ...
d93c333dc867d04111c9dcebdbcaa9ae8b2d5c2d
Analyze and fix the following issue in the Linux kernel code: ARM: Fix build error when using KCONFIG_CONFIG
Problem Details: Jonathan Cameron reports that when using the environment variable KCONFIG_CONFIG, he encounters this error: make[2]: *** No rule to make target `.config', needed by `arch/arm/boot/compressed/vmlinux.lds' Reported-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Russell King <rmk+kernel@arm.linux...
```diff diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index b23f6bc46cfa..65a7c1c588a9 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile @@ -116,5 +116,5 @@ CFLAGS_font.o := -Dstatic= $(obj)/font.c: $(FONTC) $(call cmd,shipped) -$(obj)/vmlin...
c6834dd2d20fe607d0a4a98e78a68614e4079492
Analyze and fix the following issue in the Linux kernel code: ASoC: fix SIU driver breakage, occurred during the multi-component transition
Problem Details: This patch fixes multiple bugs and a typo, occurred during the multi- component transition. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/sh/siu.h b/sound/soc/sh/siu.h index 1c0e1f72e4d4..9f4dcb921ff0 100644 --- a/sound/soc/sh/siu.h +++ b/sound/soc/sh/siu.h @@ -98,7 +98,9 @@ enum { SIU_CLKB_EXT }; +struct device; struct siu_info { + struct device *dev; int port_id; u32 __iomem *pram; u32 __iomem *xram; diff...
7d25d64441a8ce9fb8c0e1c889badb14d8af9370
Analyze and fix the following issue in the Linux kernel code: sh: fix an SIU device name mismatch
Problem Details: Recent ASoC changes unified all PCM names, fix the platform code to match. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c index 156ccc960015..d551ed8dea95 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c @@ -551,7 +551,7 @@ static struct resource siu_resources[] = { }; static struct platf...
c54291de432954b99348449723f2ce2bfe102753
Analyze and fix the following issue in the Linux kernel code: ASoC: fix compile breakage of the sh/siu driver
Problem Details: The sh/siu ASoC driver doesn't compile because of a function defined static in the source and extern in a header. Remove the unneeded declaration in the header. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/sh/siu.h b/sound/soc/sh/siu.h index aa239ff7310d..1c0e1f72e4d4 100644 --- a/sound/soc/sh/siu.h +++ b/sound/soc/sh/siu.h @@ -182,7 +182,6 @@ static inline u32 siu_read32(u32 __iomem *addr) #define SIU_BRRB (0x10c / sizeof(u32)) extern struct snd_soc_platform_driver siu_platform; -exter...
cbfa5184cc5f58627f08c7fad225424f565b439d
Analyze and fix the following issue in the Linux kernel code: ASoC: fix clkdev API usage in sh/migor.c
Problem Details: The clkdev API doesn't use .name and .id members of struct clk for clock lookup. Instead clocks should be added to a lookup list. Without this patch audio om the Migo-R board fails silently. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Sign...
```diff diff --git a/sound/soc/sh/migor.c b/sound/soc/sh/migor.c index b823a5c9b9bc..87e2b7fcbf17 100644 --- a/sound/soc/sh/migor.c +++ b/sound/soc/sh/migor.c @@ -12,6 +12,7 @@ #include <linux/firmware.h> #include <linux/module.h> +#include <asm/clkdev.h> #include <asm/clock.h> #include <cpu/sh7722.h> @@ -40,12...
79e27dc0677b969e2d53b76fa0fa58467cce946a
Analyze and fix the following issue in the Linux kernel code: ARM: 6400/1: at91: fix arch_gettimeoffset fallout
Problem Details: 5cfc8ee0bb51 (ARM: convert arm to arch_gettimeoffset()) marked all of at91 AND at91x40 as needing ARCH_USES_GETTIMEOFFSET, and hence no high res timer support / accurate clock_gettime() - But only at91x40 needs it. Cc: stable@kernel.org Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com> Acked-...
```diff diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 0f89335b84c2..88c97bc7a6f5 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -271,7 +271,6 @@ config ARCH_AT91 bool "Atmel AT91" select ARCH_REQUIRE_GPIOLIB select HAVE_CLK - select ARCH_USES_GETTIMEOFFSET help This enables support for sys...
494486a1d2697f2153199b6501ab5b4d6e15a2bb
Analyze and fix the following issue in the Linux kernel code: alpha: deal with multiple simultaneously pending signals
Problem Details: Unlike the other targets, alpha sets _one_ sigframe and buggers off until the next syscall/interrupt, even if more signals are pending. It leads to quite a few unpleasant inconsistencies, starting with SIGSEGV potentially arriving not where it should and including e.g. mess with sigsuspend(); consider...
```diff diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S index a3e9cd85cfee..ab1ee0ab082b 100644 --- a/arch/alpha/kernel/entry.S +++ b/arch/alpha/kernel/entry.S @@ -317,14 +317,14 @@ ret_from_sys_call: ldq $0, SP_OFF($sp) and $0, 8, $0 beq $0, restore_all -ret_from_reschedule: +ret_to_user: /*...
53293638618f1a8b0b182dfedaab08b28930f992
Analyze and fix the following issue in the Linux kernel code: alpha: fix a 14 years old bug in sigreturn tracing
Problem Details: The way sigreturn() is implemented on alpha breaks PTRACE_SYSCALL, all way back to 1.3.95 when alpha has grown PTRACE_SYSCALL support. What happens is direct return to ret_from_syscall, in order to bypass mangling of a3 (error indicator) and prevent other mutilations of registers (e.g. by syscall rest...
```diff diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S index bceb325fd4c5..a3e9cd85cfee 100644 --- a/arch/alpha/kernel/entry.S +++ b/arch/alpha/kernel/entry.S @@ -430,6 +430,7 @@ strace: beq $1, 1f ldq $27, 0($2) 1: jsr $26, ($27), sys_gettimeofday +ret_from_straced: ldgp $gp, 0($26) /* c...
392fb6e35400edbee183baba24b34a0fa2053813
Analyze and fix the following issue in the Linux kernel code: alpha: unb0rk sigsuspend() and rt_sigsuspend()
Problem Details: Old code used to set regs->r0 and regs->r19 to force the right return value. Leaving that after switch to ERESTARTNOHAND was a Bad Idea(tm), since now that screws the restart - if we hit the case when get_signal_to_deliver() returns 0, we will step back to syscall insn, with v0 set to EINTR and a3 to ...
```diff diff --git a/arch/alpha/include/asm/unistd.h b/arch/alpha/include/asm/unistd.h index 9a9672f0a346..058937bf5a77 100644 --- a/arch/alpha/include/asm/unistd.h +++ b/arch/alpha/include/asm/unistd.h @@ -466,6 +466,7 @@ #define __ARCH_WANT_SYS_OLD_GETRLIMIT #define __ARCH_WANT_SYS_OLDUMOUNT #define __ARCH_WANT_SY...
2deba1bd7126aadb5750beb927c878a6490065e6
Analyze and fix the following issue in the Linux kernel code: alpha: belated ERESTART_RESTARTBLOCK race fix
Problem Details: same thing as had been done on other targets back in 2003 - move setting ->restart_block.fn into {rt_,}sigreturn(). Tested-by: Michael Cree <mcree@orcon.net.nz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Matt Turner <mattst88@gmail.com>
```diff diff --git a/arch/alpha/kernel/signal.c b/arch/alpha/kernel/signal.c index 0932dbb1ef8e..e5b1b3c79ff3 100644 --- a/arch/alpha/kernel/signal.c +++ b/arch/alpha/kernel/signal.c @@ -239,6 +239,8 @@ restore_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, unsigned long usp; long i, err = __get_use...
b97f897d60c34adb9a5a37a14033e6a867e86f48
Analyze and fix the following issue in the Linux kernel code: alpha: fix build breakage in asm/cacheflush.h
Problem Details: Alpha SMP flush_icache_user_range() is implemented as an inline function inside include/asm/cacheflush.h. It dereferences @current but doesn't include linux/sched.h and thus causes build failure if linux/sched.h wasn't included previously. Fix it by including the needed header file explicitly. Signe...
```diff diff --git a/arch/alpha/include/asm/cacheflush.h b/arch/alpha/include/asm/cacheflush.h index 01d71e1c8a9e..012f1243b1c1 100644 --- a/arch/alpha/include/asm/cacheflush.h +++ b/arch/alpha/include/asm/cacheflush.h @@ -43,6 +43,8 @@ extern void smp_imb(void); /* ??? Ought to use this in arch/alpha/kernel/signal.c ...
50aff040363d31f87e94f38f1710973d99489951
Analyze and fix the following issue in the Linux kernel code: ocfs2/net: fix uninitialized ret in o2net_send_message_vec()
Problem Details: mmotm/fs/ocfs2/cluster/tcp.c: In function ‘o2net_send_message_vec’: mmotm/fs/ocfs2/cluster/tcp.c:980:6: warning: ‘ret’ may be used uninitialized in this function It seems a real bug introduced by commit 9af0b38ff3 (ocfs2/net: Use wait_event() in o2net_send_message_vec()). cc: Sunil Mushran <sunil.mus...
```diff diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index 1361997cf205..cbe2f057cc28 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2/cluster/tcp.c @@ -977,7 +977,7 @@ static int o2net_tx_can_proceed(struct o2net_node *nn, int o2net_send_message_vec(u32 msg_type, u32 key, struct kvec *caller_vec, ...
04746ff1289f75af26af279eb4b0b3e231677ee4
Analyze and fix the following issue in the Linux kernel code: qlcnic: dont assume NET_IP_ALIGN is 2
Problem Details: qlcnic driver allocates rx skbs and gives to hardware too bytes of extra storage, allowing for corruption of kernel data. NET_IP_ALIGN being 0 on some platforms (including x86), drivers should not assume it's 2. rds_ring->skb_size = rds_ring->dma_size + NET_IP_ALIGN; ... skb = dev_alloc_skb(rds_ring-...
```diff diff --git a/drivers/net/qlcnic/qlcnic_init.c b/drivers/net/qlcnic/qlcnic_init.c index 75ba744b173c..60ab753f809a 100644 --- a/drivers/net/qlcnic/qlcnic_init.c +++ b/drivers/net/qlcnic/qlcnic_init.c @@ -1316,7 +1316,7 @@ qlcnic_alloc_rx_skb(struct qlcnic_adapter *adapter, return -ENOMEM; } - skb_reserve(...
4d89ecaae9c145e60b920acb1120f1de3d6eac6e
Analyze and fix the following issue in the Linux kernel code: ARM: S3C64XX: Add IORESOURCE_IRQ_HIGHLEVEL flag to dm9000 on mach-real6410
Problem Details: Add IORESOURCE_IRQ_HIGHLEVEL irq flag to dm9000 driver platform data in board mach-real6410. Signed-off-by: Darius Augulis <augulis.darius@gmail.com> [kgene.kim@samsung.com: minor title fix] Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
```diff diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c index 9f79e6bacb59..e130379ba0e8 100644 --- a/arch/arm/mach-s3c64xx/mach-real6410.c +++ b/arch/arm/mach-s3c64xx/mach-real6410.c @@ -81,7 +81,7 @@ static struct resource real6410_dm9k_resource[] = { [2] = { .start = S...
591cd25ee35986184870c447ff5c12e78bc80699
Analyze and fix the following issue in the Linux kernel code: ARM: S3C64XX: Fix coding style errors on mach-real6410
Problem Details: Fix errors reported by checkpatch.pl script Signed-off-by: Darius Augulis <augulis.darius@gmail.com> [kgene.kim@samsung.com: minor title fix] Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
```diff diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c index 5c07d013b23d..9f79e6bacb59 100644 --- a/arch/arm/mach-s3c64xx/mach-real6410.c +++ b/arch/arm/mach-s3c64xx/mach-real6410.c @@ -30,73 +30,73 @@ #include <plat/devs.h> #include <plat/regs-serial.h> -#define UCON S3...
f0f9deae9e7c421fa0c1c627beb8e174325e1ba7
Analyze and fix the following issue in the Linux kernel code: netpoll: Disable IRQ around RCU dereference in netpoll_rx
Problem Details: We cannot use rcu_dereference_bh safely in netpoll_rx as we may be called with IRQs disabled. We could however simply disable IRQs as that too causes BH to be disabled and is safe in either case. Thanks to John Linville for discovering this bug and providing a patch. Signed-off-by: Herbert Xu <herbe...
```diff diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index 791d5109f34c..50d8009be86c 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h @@ -63,20 +63,20 @@ static inline bool netpoll_rx(struct sk_buff *skb) unsigned long flags; bool ret = false; - rcu_read_lock_bh(); + local_irq...
ea53069231f9317062910d6e772cca4ce93de8c8
Analyze and fix the following issue in the Linux kernel code: x86, hotplug: Use mwait to offline a processor, fix the legacy case
Problem Details: The code in native_play_dead() has a number of problems: 1. We should use MWAIT when available, to put ourselves into a deeper sleep state. 2. We use the existence of CLFLUSH to determine if WBINVD is safe, but that is totally bogus -- WBINVD is 486+, whereas CLFLUSH is a much later addition....
```diff diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 325b7bdbebaa..f358241e4121 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h @@ -764,29 +764,6 @@ extern unsigned long idle_halt; extern unsigned long idle_nomwait; extern bool c1e_det...
d3d4152a5d59af9e13a73efa9e9c24383fbe307f
Analyze and fix the following issue in the Linux kernel code: nfs: make sillyrename an async operation
Problem Details: A synchronous rename can be interrupted by a SIGKILL. If that happens during a sillyrename operation, it's possible for the rename call to be sent to the server, but the task exits before processing the reply. If this happens, the sillyrenamed file won't get cleaned up during nfs_dentry_iput and the se...
```diff diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index bb41d88e1567..4e9d941ab548 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c @@ -438,6 +438,27 @@ nfs3_proc_unlink_done(struct rpc_task *task, struct inode *dir) return 1; } +static void +nfs3_proc_rename_setup(struct rpc_message *msg, struct in...
3518dd14ca888085797ca8d3a9e11c8ef9e7ae68
Analyze and fix the following issue in the Linux kernel code: x86, cacheinfo: Fix dependency of AMD L3 CID
Problem Details: L3 cache index disable code uses PCI accesses to AMD northbridge functions. Currently the code is #ifdef CONFIG_CPU_SUP_AMD. But it should be #if (defined(CONFIG_CPU_SUP_AMD) && defined(CONFIG_PCI)) which in the end is a dependency to K8_NB. Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com> ...
```diff diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c index 898c2f4eab88..2521cdcb877e 100644 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c @@ -306,7 +306,7 @@ struct _cache_attr { ssize_t (*store)(struct _cpuid4_info *, const char...
b7e1b2039de3a028fba46fbaca58a45c23a417ec
Analyze and fix the following issue in the Linux kernel code: HID: fix A4Tech RP-649 horizontal scrollwheel
Problem Details: Enable fix for their horizontal scroll wheel behaviour, associate it with B8 hack. Signed-off-by: Lech Perczak <lech.perczak@multivision.pl> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/hid/hid-a4tech.c b/drivers/hid/hid-a4tech.c index 3a2b223c1da4..1666c1684e79 100644 --- a/drivers/hid/hid-a4tech.c +++ b/drivers/hid/hid-a4tech.c @@ -133,6 +133,8 @@ static const struct hid_device_id a4_devices[] = { .driver_data = A4_2WHEEL_MOUSE_HACK_7 }, { HID_USB_DEVICE(USB_VENDOR_...
653d48b22166db2d8b1515ebe6f9f0f7c95dfc86
Analyze and fix the following issue in the Linux kernel code: arm: fix really nasty sigreturn bug
Problem Details: If a signal hits us outside of a syscall and another gets delivered when we are in sigreturn (e.g. because it had been in sa_mask for the first one and got sent to us while we'd been in the first handler), we have a chance of returning from the second handler to location one insn prior to where we ough...
```diff diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index f05a35a59694..1b560825e1cf 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S @@ -418,11 +418,13 @@ ENDPROC(sys_clone_wrapper) sys_sigreturn_wrapper: add r0, sp, #S_OFF + mov why, #0 @ preven...
5facb097137e7509a1b73448fe20226a4fbfe8cb
Analyze and fix the following issue in the Linux kernel code: hwmon: (lis3lv02d) Prevent NULL pointer dereference
Problem Details: If CONFIG_PM was selected and lis3lv02d_platform_data was NULL, the kernel will be panic when halt command run. Reported-by: Yusuke Goda <yusuke.goda.sx@renesas.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Samu Onkalo <samu.p.onkalo@nokia.com> Sigend-off-by: Jean ...
```diff diff --git a/drivers/hwmon/lis3lv02d_i2c.c b/drivers/hwmon/lis3lv02d_i2c.c index dc1f5402c1d7..8e5933b72d19 100644 --- a/drivers/hwmon/lis3lv02d_i2c.c +++ b/drivers/hwmon/lis3lv02d_i2c.c @@ -121,7 +121,7 @@ static int lis3lv02d_i2c_suspend(struct i2c_client *client, pm_message_t mesg) { struct lis3lv02d *lis...
2680d722bf2c5f75225dd9acb3ec9e5a9e2652f4
Analyze and fix the following issue in the Linux kernel code: UBIFS: introduce new flag for RO due to errors
Problem Details: The R/O state may have various reasons: 1. The UBI volume is R/O 2. The FS is mounted R/O 3. The FS switched to R/O mode because of an error However, in UBIFS we have only one variable which represents cases 1 and 3 - 'c->ro_media'. Indeed, we set this to 1 if we switch to R/O mode due to an error, a...
```diff diff --git a/fs/ubifs/commit.c b/fs/ubifs/commit.c index 37fa7ed062d8..712432789fb8 100644 --- a/fs/ubifs/commit.c +++ b/fs/ubifs/commit.c @@ -63,7 +63,9 @@ static int do_commit(struct ubifs_info *c) struct ubifs_lp_stats lst; dbg_cmt("start"); - if (c->ro_media) { + ubifs_assert(!c->ro_media); + + if (c-...
917bdd1c9b7b0f4c22f2504c2f0c1074c8ab9df7
Analyze and fix the following issue in the Linux kernel code: perf: Fix perf_event_exit_cpu_context()
Problem Details: Use the right cpu-context.. spotted by preempt warning on hot-unplug Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Cc: Robert Richter <robert.richter@amd.com> LKML-Reference: <20100917093009.461794357@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte....
```diff diff --git a/kernel/perf_event.c b/kernel/perf_event.c index 6d7eef5f3c41..27332e5f51a7 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c @@ -6269,14 +6269,13 @@ static void perf_event_exit_cpu_context(int cpu) idx = srcu_read_lock(&pmus_srcu); list_for_each_entry_rcu(pmu, &pmus, entry) { - ctx ...
d14b12d7adbf214f33eb59f800b5c3d5ed9268e8
Analyze and fix the following issue in the Linux kernel code: perf_events: Fix broken event grouping
Problem Details: Events were not grouped anymore. The reason was that in perf_event_open(), the field event->group_leader was initialized before the function looked up the group_fd to find the event leader. This patch fixes this by reordering the code correctly. Signed-off-by: Stephane Eranian <eranian@google.com> Sig...
```diff diff --git a/kernel/perf_event.c b/kernel/perf_event.c index 86f394e15d53..ce95617f5d2c 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c @@ -5550,17 +5550,11 @@ SYSCALL_DEFINE5(perf_event_open, if (event_fd < 0) return event_fd; - event = perf_event_alloc(&attr, cpu, group_leader, NULL, NULL); ...
1feba3b7367b333c3fc7deba638a3a1068f22932
Analyze and fix the following issue in the Linux kernel code: ALSA: HDA: Fix spelling (change VOSTO to VOSTRO)
Problem Details: It was just a boring day. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 7e22ed14ae8d..a12a9f6f795a 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c @@ -3075,7 +3075,7 @@ enum { CXT5066_LAPTOP, /* Laptops w/ EAPD support */ CXT5066_DELL_LAPTOP, /* Dell Laptop */ ...
6491848d1ab246f6d243ddef25085fc1d836ff2c
Analyze and fix the following issue in the Linux kernel code: ARM: 6387/1: errata: check primary part ID in proc-v7.S
Problem Details: Kconfig doesn't have any knowledge of specific v7 cores, so it is possible to select errata workarounds that may cause inadvertent behaviour when executed on a core other than those targetted by the fix. This patch improves the variant and revision checking in proc-v7.S so that the primary part number...
```diff diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 6a8506d99ee9..1f16f9e3f441 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S @@ -204,8 +204,13 @@ __v7_setup: bne 2f and r5, r0, #0x00f00000 @ variant and r6, r0, #0x0000000f @ revision - orr r0, r6, r5, lsr #20-4 @ combine v...
99f76891a33d130776da3b01935d978b1e75fe68
Analyze and fix the following issue in the Linux kernel code: ARM: 6375/1: plat-nomadik: MTU timer trivial bug fix
Problem Details: timer0 to 3 are all on mtu block 0, so don't calculate the clock event rate based upon mtu block 1's clock speed. Acked-by: Alessandro Rubini <rubini@unipv.it> Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Russell Ki...
```diff diff --git a/arch/arm/plat-nomadik/timer.c b/arch/arm/plat-nomadik/timer.c index ea3ca86c5283..d673888af18e 100644 --- a/arch/arm/plat-nomadik/timer.c +++ b/arch/arm/plat-nomadik/timer.c @@ -131,17 +131,12 @@ void __init nmdk_timer_init(void) { unsigned long rate; struct clk *clk0; - struct clk *clk1; u3...
41c89ef3aafea5f35601fa75edba90e7417f604e
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix mic attribute check for internal mics
Problem Details: Now Windows claims that the BIOS sets pins for internal mics to be BOTH connection instead of FIXED. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 08d81b873022..9f668efbe420 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -4648,8 +4648,11 @@ enum { static int get_mic_pin_attr(unsigned int def_conf) { unsigned int loc = get_defcfg_location(def_conf); - if...
9907790aa06bfc04bf78b445e732ea10039c61e4
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix automatic MIC switching and include dock MIC for IDT codecs
Problem Details: Signed-off-by: Charles Chin <Charles.Chin@idt.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index e4e7d43f911e..7eb359a030de 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -263,6 +263,7 @@ struct sigmatel_spec { struct sigmatel_mic_route ext_mic; struct sigmatel_mic_route int_mic; + ...
e259befd9013e212648c3bd4f6f1fbf92d0dd51d
Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix Sandybridge fence registers
Problem Details: With 5 places to update when adding handling for fence registers, it is easy to overlook one or two. Correct that oversight, but fence management should be improved before a new set of registers is added. Bugzilla: https://bugs.freedesktop.org/show_bug?id=30199 Original patch by: Yuanhan Liu <yuanhan....
```diff diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 16fca1d1799a..cf4ffbee1c00 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -2351,14 +2351,21 @@ i915_gem_object_get_fence_reg(struct drm_gem_object *obj) reg->obj = obj; - if (IS_GEN6...
79077319d7c7844d5d836e52099a7a1bcadf9b04
Analyze and fix the following issue in the Linux kernel code: drm/i915/crt: Downgrade warnings for hotplug failures
Problem Details: These are not fatal errors, so do not alarm the user by filling the logs with *** ERROR ***. Especially as we know that g4x CRT detection is a little sticky. On the one hand the errors are valid since they are warning us of a stall -- we poll the register whilst holding the mode lock so not even the m...
```diff diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c index 4b7735196cd5..8f6f38c7d84d 100644 --- a/drivers/gpu/drm/i915/intel_crt.c +++ b/drivers/gpu/drm/i915/intel_crt.c @@ -188,7 +188,7 @@ static bool intel_ironlake_crt_detect_hotplug(struct drm_connector *connector) if (wait_f...
0c796f91a518480fd6696ba2affed1167e840823
Analyze and fix the following issue in the Linux kernel code: drivers/net/tulip/de4x5.c: fix union member name in DE4X5_GET_REG ioctl
Problem Details: This was previously reported as a security issue due to leakage of uninitialized stack memory. Jeff Mahoney pointed out that this is incorrect since the copied data is from a union (rather than a struct). Therefore, this patch is only under consideration for the sake of correctness, and is not securit...
```diff diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c index 4f7503063446..1d9fef74b39b 100644 --- a/drivers/net/tulip/de4x5.c +++ b/drivers/net/tulip/de4x5.c @@ -5474,7 +5474,7 @@ de4x5_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) tmp.lval[6] = inl(DE4X5_STRR); j+=4; tmp.lval[7] = i...
ddcf3522cf03a147c867a2e0155761652dbd156a
Analyze and fix the following issue in the Linux kernel code: md: fix v1.x metadata update when a disk is missing.
Problem Details: If an array with 1.x metadata is assembled with the last disk missing, md doesn't properly record the fact that the disk was missing. This is unlikely to cause a real problem as the event count will be different to the count on the missing disk so it won't be included in the array. However it could s...
```diff diff --git a/drivers/md/md.c b/drivers/md/md.c index bdd9bba577b0..f20d13e717d5 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -1643,7 +1643,9 @@ static void super_1_sync(mddev_t *mddev, mdk_rdev_t *rdev) bmask = queue_logical_block_size(rdev->bdev->bd_disk->queue)-1; if (rdev->sb_size & bmask) ...
44a24cb3731495336d77f3a955a7004997270dfd
Analyze and fix the following issue in the Linux kernel code: [SCSI] zfcp: Change spin_lock_bh to spin_lock_irq to fix lockdep warning
Problem Details: With the change to use the data on the SCSI device, iterating through all LUNs/scsi_devices takes the SCSI host_lock. This triggers warnings from the lock dependency checker: ========================================================= [ INFO: possible irq lock inversion dependency detected ] 2.6.34.1 #9...
```diff diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 2fbd80257bca..48aa16a40d93 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c @@ -773,7 +773,7 @@ int zfcp_fsf_status_read(struct zfcp_qdio *qdio) struct fsf_status_read_buffer *sr_buf; int retval = -EIO...
d99e5f488ae28d9dfccc84435f4fd29bd1fe1b9b
Analyze and fix the following issue in the Linux kernel code: [SCSI] ibmvfc: Log link up/down events
Problem Details: By default, ibmvfc does not log any async events in order to avoid flooding the log with them. Improve on this by logging by default events that are not likely to flood the log, such as link up/down. Having these events in the log will improve the ability to debug issues with ibmvfc. Signed-off-by: Br...
```diff diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index a5dd9b4a0ae8..b1512e9d1b9d 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -2501,41 +2501,66 @@ static void ibmvfc_terminate_rport_io(struct fc_rport *rport) LEAVE; } -static const struct ...
9b906779568f009b53254a15b283b53ae4570b93
Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_debug: Convert to use root_device_register() and root_device_unregister()
Problem Details: This patch updates the scsi_debug virtual LLD to use root_device_register() and root_device_unregister() from include/linux/device.h instead of device_register() and device_unregister() respectively within scsi_debug_init() and scsi_debug_exit() This simply involved converting the static struct device ...
```diff diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 06329d47b38f..2c36bae3bd4b 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -3226,16 +3226,7 @@ static void do_remove_driverfs_files(void) driver_remove_file(&sdebug_driverfs_driver, &driver_attr_add_host); } ...
068e35eee9ef98eb4cab55181977e24995d273be
Analyze and fix the following issue in the Linux kernel code: hw breakpoints: Fix pid namespace bug
Problem Details: Hardware breakpoints can't be registered within pid namespaces because tsk->pid is passed rather than the pid in the current namespace. (See https://bugzilla.kernel.org/show_bug.cgi?id=17281 ) This is a quick fix demonstrating the problem but is not the best method of solving the problem since passin...
```diff diff --git a/kernel/hw_breakpoint.c b/kernel/hw_breakpoint.c index d71a987fd2bf..c7c2aed9e2dc 100644 --- a/kernel/hw_breakpoint.c +++ b/kernel/hw_breakpoint.c @@ -433,7 +433,8 @@ register_user_hw_breakpoint(struct perf_event_attr *attr, perf_overflow_handler_t triggered, struct task_struct *tsk)...
89e45aac42d40426c97e6901811309bf49c4993f
Analyze and fix the following issue in the Linux kernel code: x86: Fix instruction breakpoint encoding
Problem Details: Lengths and types of breakpoints are encoded in a half byte into CPU registers. However when we extract these values and store them, we add a high half byte part to them: 0x40 to the length and 0x80 to the type. When that gets reloaded to the CPU registers, the high part is masked. While making the in...
```diff diff --git a/arch/x86/include/asm/hw_breakpoint.h b/arch/x86/include/asm/hw_breakpoint.h index 528a11e8d3e3..824ca07860d0 100644 --- a/arch/x86/include/asm/hw_breakpoint.h +++ b/arch/x86/include/asm/hw_breakpoint.h @@ -20,7 +20,7 @@ struct arch_hw_breakpoint { #include <linux/list.h> /* Available HW breakpo...
ae00d4f37f4df56821331deb1028748110dd6dc9
Analyze and fix the following issue in the Linux kernel code: ceph: fix cap_snap and realm split
Problem Details: The cap_snap creation/queueing relies on both the current i_head_snapc _and_ the i_snap_realm pointers being correct, so that the new cap_snap can properly reference the old context and the new i_head_snapc can be updated to reference the new snaprealm's context. To fix this, we: - move inodes compl...
```diff diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 50461b8c23a4..efbc604001c8 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -411,8 +411,8 @@ static int writepage_nounlock(struct page *page, struct writeback_control *wbc) if (i_size < page_off + len) len = i_size - page_off; - dout("writepage %p pag...
8702d33aa6e6d753ef99163afe48aba1323374ef
Analyze and fix the following issue in the Linux kernel code: firewire: nosy: fix build when CONFIG_FIREWIRE=N
Problem Details: drivers/firewire/nosy* is a stand-alone driver that does not depend on CONFIG_FIREWIRE. Hence let make descend into drivers/firewire/ also if that option is off. The stand-alone driver drivers/ieee1394/init_ohci1394_dma* will soon be moved into drivers/firewire/ too and will require the same makefil...
```diff diff --git a/drivers/Makefile b/drivers/Makefile index 91874e048552..0bbb4561720e 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -50,7 +50,7 @@ obj-$(CONFIG_SPI) += spi/ obj-y += net/ obj-$(CONFIG_ATM) += atm/ obj-$(CONFIG_FUSION) += message/ -obj-$(CONFIG_FIREWIRE) += firewire/ +obj-y += ...
901d46d5a8eb821b03ca9e8cf005beb0c92f31ea
Analyze and fix the following issue in the Linux kernel code: ALSA: pcm - Fix race with proc files
Problem Details: The PCM proc files may open a race against substream close, which can end up with an Oops. Use the open_mutex to protect for it. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/core/pcm.c b/sound/core/pcm.c index 204af48c5cc1..ac242a377aea 100644 --- a/sound/core/pcm.c +++ b/sound/core/pcm.c @@ -372,14 +372,17 @@ static void snd_pcm_substream_proc_hw_params_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct snd_pcm_substream *sub...
8699a0b657b43fa6401537dfe345bee7aa8115ec
Analyze and fix the following issue in the Linux kernel code: ALSA: pcm - Fix unbalanced pm_qos_request
Problem Details: The pm_qos_request isn't freed properly when OSS PCM emulation is used because it skips snd_pcm_hw_free() call but directly releases the stream. This resulted in Oops later. Tested-by: Simon Kirby <sim@hostway.ca> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 134fc6c2e08d..d4eb2ef80784 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -1992,6 +1992,8 @@ void snd_pcm_release_substream(struct snd_pcm_substream *substream) substream->ops->close(substream); substream->hw_opene...
37880c909c6a22674d3c0f83f2737264b4e60fe1
Analyze and fix the following issue in the Linux kernel code: spi/mpc8xxx: fix buffer overrun on large transfers
Problem Details: It fixes an issue when sending-only or receiving-only more than PAGE_SIZE bytes. Signed-off-by: christophe leroy <christophe.leroy@c-s.fr> Acked-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
```diff diff --git a/drivers/spi/spi_mpc8xxx.c b/drivers/spi/spi_mpc8xxx.c index d31b57f7baaf..1dd86b835cd8 100644 --- a/drivers/spi/spi_mpc8xxx.c +++ b/drivers/spi/spi_mpc8xxx.c @@ -408,11 +408,17 @@ static void mpc8xxx_spi_cpm_bufs_start(struct mpc8xxx_spi *mspi) xfer_ofs = mspi->xfer_in_progress->len - mspi->cou...
dfb7ef7d84fa45270b0138dbe6ab4316b03cc724
Analyze and fix the following issue in the Linux kernel code: staging: ti-st: fix kim platform device id
Problem Details: Platform devices tend to have id as -1 when only 1 device exist and a value >=0 when multiple devices exist, since we plan to store all these platform devices if multiple exist, there was a requirement to have id to be >=0. The patch fixes this problem. Signed-off-by: Pavan Savoy <pavan_savoy@ti.com> ...
```diff diff --git a/drivers/staging/ti-st/st_kim.c b/drivers/staging/ti-st/st_kim.c index 9e99463f76e8..be18c7a17446 100644 --- a/drivers/staging/ti-st/st_kim.c +++ b/drivers/staging/ti-st/st_kim.c @@ -638,7 +638,14 @@ static int kim_probe(struct platform_device *pdev) long *gpios = pdev->dev.platform_data; struct...
008443def34db1dcc8016763587a288254ea5735
Analyze and fix the following issue in the Linux kernel code: ath9k: fix regression which disabled ps on ath9k
Problem Details: The patch titled "ath9k: Add new file init.c" shuffled some code around but in dong so for some reason also removed the revision check for disablign power save. Add this revision check again so we can get power save re-enabled again by default on cards newer than AR5416 and AR5418. $ git describe --co...
```diff diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index 224df6d8fe2c..0364167cbfaf 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c @@ -643,7 +643,8 @@ void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw) ...
3fac6dfdcd2b893c22b20a03dd1bf1af8b627c4b
Analyze and fix the following issue in the Linux kernel code: ath9k: fix regression which prevents chip sleep after CAB data
Problem Details: The patch: commit 293dc5dfdbcc16cde06e40a688394cc8ab083e48 Author: Gabor Juhos <juhosg@openwrt.org> Date: Fri Jun 19 12:17:48 2009 +0200 ath9k: remove ath_rx_ps_back_to_sleep helper This helper only clears the SC_OP_WAIT_FOR_{BEACON,CAB} flags. Remove it and clear these flags directly ...
```diff diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 007df33ab05e..c5e7af4f51ab 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c @@ -639,7 +639,7 @@ static void ath_rx_ps(struct ath_softc *sc, struct sk_buff *skb) * No...
f01a067d9e4598c71e3c9ee3a84859d2e8af4f8e
Analyze and fix the following issue in the Linux kernel code: mac80211: send last 3/5 probe requests as unicast
Problem Details: Some buggy APs do not respond to unicast probe requests or send unicast probe requests very delayed so in the worst case we should try to send broadcast probe requests, otherwise we can get disconnected from these APs. Even if drivers do not have filters to disregard probe responses from foreign APs m...
```diff diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 07d03e791bc0..8b733cf6f3ea 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -1038,10 +1038,19 @@ static void ieee80211_mgd_probe_ap_send(struct ieee80211_sub_if_data *sdata) { struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; const...
3bc3c0d748402e8c1f31b8569f5924d25d7b8e30
Analyze and fix the following issue in the Linux kernel code: mac80211: disable beacon monitor while going offchannel
Problem Details: The beacon monitor should be disabled when going off channel to prevent spurious warnings and triggering connection deterioration work such as sending probe requests. Re-enable the beacon monitor once we come back to the home channel. This patch has fixes for stable kernels [2.6.34+]. Cc: stable@kern...
```diff diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c index 627a33ef84c4..4b564091e51d 100644 --- a/net/mac80211/offchannel.c +++ b/net/mac80211/offchannel.c @@ -29,6 +29,7 @@ static void ieee80211_offchannel_ps_enable(struct ieee80211_sub_if_data *sdata) /* FIXME: what to do when local->pspollin...
d3a910a8e4e846b9a767d35483f4dc7c6de7af82
Analyze and fix the following issue in the Linux kernel code: mac80211: make the beacon monitor available externally
Problem Details: This will be used by other components next. The beacon monitor was added as of 2.6.34 so these fixes are applicable only to kernels >= 2.6.34. Cc: stable@kernel.org Cc: Paul Stewart <pstew@google.com> Cc: Amod Bodas <amod.bodas@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Sig...
```diff diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 737fd0f07524..9346a6b0f400 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -1041,6 +1041,7 @@ void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata); void ieee80211_sta_work(struct ieee80211_sub_if_d...
4730d5977f3e12b828d354f7752cffd94bdf39e5
Analyze and fix the following issue in the Linux kernel code: mac80211: reset connection idle when going offchannel
Problem Details: When we go offchannel mac80211 currently leaves alive the connection idle monitor. This should be instead postponed until we come back to our home channel, otherwise by the time we get back to the home channel we could be triggering unecesary probe requests. For APs that do not respond to unicast probe...
```diff diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c index eeacaa59380a..627a33ef84c4 100644 --- a/net/mac80211/offchannel.c +++ b/net/mac80211/offchannel.c @@ -22,12 +22,15 @@ static void ieee80211_offchannel_ps_enable(struct ieee80211_sub_if_data *sdata) { struct ieee80211_local *local = sda...
0c699c3a75d4e8d0d2c317f83048d8fd3ffe692a
Analyze and fix the following issue in the Linux kernel code: mac80211: reset probe send counter upon connection timer reset
Problem Details: Upon beacon loss we send probe requests after 30 seconds of idle time and we wait for each probe response 1/2 second. We send a total of 3 probe requests before giving up on the AP. In the case that we reset the connection idle monitor we should reset the probe requests count to 0. Right now this won't...
```diff diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 2d86a4d5e912..d7915ab15a43 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -126,11 +126,15 @@ static void mod_beacon_timer(struct ieee80211_sub_if_data *sdata) void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata)...
be099e82e9cf6d5d65d044e9ef6fc8bee3c7a113
Analyze and fix the following issue in the Linux kernel code: mac80211: add helper for reseting the connection monitor
Problem Details: This will be used in another place later. The connection monitor was added as of 2.6.35 so these fixes will be applicable to >= 2.6.35. Cc: stable@kernel.org Cc: Paul Stewart <pstew@google.com> Cc: Amod Bodas <amod.bodas@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off...
```diff diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 4e635e2fabdb..737fd0f07524 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -1041,6 +1041,7 @@ void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata); void ieee80211_sta_work(struct ieee80211_sub_if_d...