id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
e24977d45f45d1675e050dc1a0aaf4bfc4ca9866
Analyze and fix the following issue in the Linux kernel code: Reduce path_lookup() abuses
Problem Details: ... use kern_path() where possible [folded a fix from rdd] Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/drivers/scsi/osd/osd_uld.c b/drivers/scsi/osd/osd_uld.c index f644c9571eab..22b59e13ba83 100644 --- a/drivers/scsi/osd/osd_uld.c +++ b/drivers/scsi/osd/osd_uld.c @@ -173,26 +173,26 @@ static const struct file_operations osd_fops = { .unlocked_ioctl = osd_uld_ioctl, }; -struct osd_dev *osduld_p...
c490d79bb70c549e096099576b1df40a8810b0d8
Analyze and fix the following issue in the Linux kernel code: fs: dcache fix LRU ordering
Problem Details: Fix ordering of LRU when moving referenced dentries to the head of the list (they should go to the head of the list in the same order as they were found from the tail, rather than reverse order). Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/fs/dcache.c b/fs/dcache.c index 1fcffebfb44f..75659a6fd1f8 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -481,7 +481,7 @@ restart: if ((flags & DCACHE_REFERENCED) && (dentry->d_flags & DCACHE_REFERENCED)) { dentry->d_flags &= ~DCACHE_REFERENCED; - list_move_tail(&dentry->d_lru, &re...
265e771e8197cdb22a1e2556663173fb62c9cd91
Analyze and fix the following issue in the Linux kernel code: Fix deadlock in ipathfs ->get_sb()
Problem Details: forgot to unlock superblock before calling deactivate_super()... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/ipath/ipath_fs.c index 8dc2bb781605..b3684060465e 100644 --- a/drivers/infiniband/hw/ipath/ipath_fs.c +++ b/drivers/infiniband/hw/ipath/ipath_fs.c @@ -347,7 +347,7 @@ static int ipathfs_fill_super(struct super_block *sb, void *data, ...
c96f58573778ddf96ff67108a635f3f642ea63d3
Analyze and fix the following issue in the Linux kernel code: Fix a leak in failure exit in 9p ->get_sb()
Problem Details: Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c index 0d29a57c63e6..ab5547ff29a1 100644 --- a/fs/9p/vfs_super.c +++ b/fs/9p/vfs_super.c @@ -156,6 +156,7 @@ static int v9fs_get_sb(struct file_system_type *fs_type, int flags, root = d_alloc_root(inode); if (!root) { + iput(inode); retval = -ENOMEM; ...
0c7a531a200480c7bc447260376973d830da9069
Analyze and fix the following issue in the Linux kernel code: GFS2: Fix glock ref counting bug
Problem Details: Depending on the ordering of events as we go around the glock shrinker loop, it is possible to drop the ref count of a glock incorrectly. It doesn't happen very often. This patch corrects the got_ref variable, fixing the problem. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
```diff diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 1afd9f26bcb1..ff4981090489 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -1304,6 +1304,7 @@ static int gfs2_shrink_glock_memory(int nr, gfp_t gfp_mask) nr--; if (queue_delayed_work(glock_workqueue, &gl->gl_work, 0) == 0) gfs2_glock_put...
7cd0378ef4c0d7b05e7dcb1daa115b841ffdc31a
Analyze and fix the following issue in the Linux kernel code: sh: Fix up SHmedia module ELF relocations.
Problem Details: This fixes up the LSB setting for SHmedia branching in updated symbols when processing module relocations. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/kernel/module.c b/arch/sh/kernel/module.c index c43081039dd5..c19b0f7d2cc1 100644 --- a/arch/sh/kernel/module.c +++ b/arch/sh/kernel/module.c @@ -90,7 +90,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, * SHmedia, the LSB of the symbol needs to be asserted * for the CPU to be in SH...
92d23f703c608fcb2c8edd74a3fd0f4031e18606
Analyze and fix the following issue in the Linux kernel code: sched: Fix fallback sched_clock()'s offset when using jiffies
Problem Details: Account for the initial offset to the jiffy count. [ Impact: fix printk timestamps on architectures using fallback sched_clock() ] Signed-off-by: Ron Lee <ron@debian.org> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/kernel/sched_clock.c b/kernel/sched_clock.c index 819f17ac796e..e1d16c9a7680 100644 --- a/kernel/sched_clock.c +++ b/kernel/sched_clock.c @@ -38,7 +38,8 @@ */ unsigned long long __attribute__((weak)) sched_clock(void) { - return (unsigned long long)jiffies * (NSEC_PER_SEC / HZ); + return (unsig...
f15b18d0755b3ee4b29991fc2fde535ee41df53c
Analyze and fix the following issue in the Linux kernel code: perf_counter tools: remove debug code from builtin-stat.c
Problem Details: Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/Documentation/perf_counter/builtin-stat.c b/Documentation/perf_counter/builtin-stat.c index e2fa117eab58..cf575c305a6c 100644 --- a/Documentation/perf_counter/builtin-stat.c +++ b/Documentation/perf_counter/builtin-stat.c @@ -331,8 +331,6 @@ static void create_perfstat_counter(int counter) hw_eve...
6dbe47a170f80159f23c856ad4e02f2685c6f6cb
Analyze and fix the following issue in the Linux kernel code: sh: Provide __read_{read,write}sl() definitions for sh64.
Problem Details: These are presently only defined for sh32, use the plain unoptimized versions for sh64. Fixes up smsc911x build. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h index c7c360b58667..25348141674b 100644 --- a/arch/sh/include/asm/io.h +++ b/arch/sh/include/asm/io.h @@ -123,10 +123,15 @@ static inline void __raw_reads##bwlq(volatile void __iomem *mem, \ __BUILD_MEMORY_STRING(b, u8) __BUILD_MEMORY_STRING(w...
e9e8b1fb995543c4cc3930f465923a552b2e48b7
Analyze and fix the following issue in the Linux kernel code: sh: Fix up the sh64 earlyprintk build.
Problem Details: sci_rxd_in() on SH-5 wants to be using SCSPTR, not SCSPTR2. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/drivers/serial/sh-sci.h b/drivers/serial/sh-sci.h index e3eae4eaaddf..38072c15b845 100644 --- a/drivers/serial/sh-sci.h +++ b/drivers/serial/sh-sci.h @@ -636,7 +636,7 @@ static inline int sci_rxd_in(struct uart_port *port) #elif defined(CONFIG_CPU_SUBTYPE_SH5_101) || defined(CONFIG_CPU_SUBTYPE_SH5...
201913ed746c7724a40d33ee5a0b6a1fd2ef3193
Analyze and fix the following issue in the Linux kernel code: nilfs2: fix circular locking dependency of writer mutex
Problem Details: This fixes the following circular locking dependency problem: ======================================================= [ INFO: possible circular locking dependency detected ] 2.6.30-rc3 #5 ------------------------------------------------------- segctord/3895 is trying to acquire lock: (&nilfs->n...
```diff diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c index 108d281ebca5..be387c6b2d46 100644 --- a/fs/nilfs2/ioctl.c +++ b/fs/nilfs2/ioctl.c @@ -516,14 +516,16 @@ static ssize_t nilfs_ioctl_do_free_segments(struct the_nilfs *nilfs, __u64 *posp, int flags, void *buf, size_t size, size_t nmembs) { - stru...
85c2a74fabadfc561b75fbd7decc6bcbfe873d57
Analyze and fix the following issue in the Linux kernel code: nilfs2: fix possible recovery failure due to block creation without writer
Problem Details: Some function calls in nilfs_prepare_segment_for_recovery() may fail because they can create blocks on meta data files without configuring a writable FS-instance. Concretely, nilfs_mdt_create_block() routine of meta data files will fail in that case. This fixes the problem by temporarily attaching a ...
```diff diff --git a/fs/nilfs2/recovery.c b/fs/nilfs2/recovery.c index 4fc081e47d70..57afa9d24061 100644 --- a/fs/nilfs2/recovery.c +++ b/fs/nilfs2/recovery.c @@ -407,6 +407,7 @@ void nilfs_dispose_segment_list(struct list_head *head) } static int nilfs_prepare_segment_for_recovery(struct the_nilfs *nilfs, + ...
be286fd229e95658516ddf880054ea3c9ad9bb34
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8187se: Fix compilation warnings and procfs directory leak
Problem Details: Fix some warnings during compilation and correct a programming error that was leaking a directory in /proc. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Tested-by: Bernhard Schiffner <bernhard@schiffner-limbach.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/rtl8187se/r8180.h b/drivers/staging/rtl8187se/r8180.h index 12215fc61ddc..db446b7e2e08 100644 --- a/drivers/staging/rtl8187se/r8180.h +++ b/drivers/staging/rtl8187se/r8180.h @@ -19,7 +19,7 @@ #define R8180H -#define RTL8180_MODULE_NAME "rtl8180" +#define RTL8180_MODULE_NAME "r8...
82fbb01cf3c2bd150262269bd017431d7dd74063
Analyze and fix the following issue in the Linux kernel code: Staging: w35und: unregister device from the ieee80211 stack upon ->disconnect()
Problem Details: Impact: fix module removal This patch fixes an oops when the w35und module is removed from the kernel and added back. Reported-by: luoyi <luoyi.ly@gmail.com> Tested-by: Sandro Bonazzola <sandro.bonazzola@gmail.com> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> S...
```diff diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c index 9c3f9439f35e..3b2d52819b4c 100644 --- a/drivers/staging/winbond/wbusb.c +++ b/drivers/staging/winbond/wbusb.c @@ -386,7 +386,7 @@ static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id if (err) go...
c45d63202fbaccef7ef7946c03f27f72c809b1cc
Analyze and fix the following issue in the Linux kernel code: usb-serial: ftdi_sio: fix reference counting of ftdi_private
Problem Details: This patch (as1238) adds proper reference counting for ftdi_sio's private data structure. Without it, the driver will free the structure while it is still in use if the user unplugs the serial device before closing the device file. The patch also replaces a slightly dangerous cancel_delayed_work/flus...
```diff diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index aab567644b99..0ab8474b00cb 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -56,6 +56,7 @@ static __u16 vendor = FTDI_VID; static __u16 product; struct ftdi_private { + struct kref kref; ftdi_...
0f43158caddcbb110916212ebe4e39993ae70864
Analyze and fix the following issue in the Linux kernel code: USB: Gadget: fix UTF conversion in the usbstring library
Problem Details: This patch (as1234) fixes a bug in the UTF8 -> UTF-16 conversion routine in the gadget/usbstring library. In a UTF-8 multi-byte sequence, all bytes after the first should have their high-order two bits set to 10, not 11. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: David Brownell <...
```diff diff --git a/drivers/usb/gadget/usbstring.c b/drivers/usb/gadget/usbstring.c index 4154be375c7a..58c4d37d312a 100644 --- a/drivers/usb/gadget/usbstring.c +++ b/drivers/usb/gadget/usbstring.c @@ -38,7 +38,7 @@ static int utf8_to_utf16le(const char *s, __le16 *cp, unsigned len) uchar = (c & 0x1f) << 6; ...
72a772a9a3da47e1cdbe01c4aa1105aa8badfff2
Analyze and fix the following issue in the Linux kernel code: USB: Fix makefile so that CONFIG_WDM and CONFIG_TMC work.
Problem Details: If CONFIG_USB_ACM and CONFIG_USB_PRINTER are not set, then cdc-wdm and usbtmc won't get built. Signed-off-by: Andy Lutomirski <amluto@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile index 89299a5ce168..0716cdb44cd8 100644 --- a/drivers/usb/Makefile +++ b/drivers/usb/Makefile @@ -27,6 +27,8 @@ obj-$(CONFIG_USB_WUSB) += wusbcore/ obj-$(CONFIG_USB_ACM) += class/ obj-$(CONFIG_USB_PRINTER) += class/ +obj-$(CONFIG_USB_WDM) += class/...
10107bd04fc88657204ca40af2ace33626496fd3
Analyze and fix the following issue in the Linux kernel code: USB: cxacru: Fix negative dB output
Problem Details: Values of dB between -0.99 and -0.01 will be output with the wrong sign. This converts the negative value to positive and outputs it with a "-" prefix. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c index 6789089e2461..56802d2e994b 100644 --- a/drivers/usb/atm/cxacru.c +++ b/drivers/usb/atm/cxacru.c @@ -227,8 +227,14 @@ static ssize_t cxacru_sysfs_showattr_s8(s8 value, char *buf) static ssize_t cxacru_sysfs_showattr_dB(s16 value, char *buf...
bee86321b7b2312fbb62f4cb903eba1cca45e8ad
Analyze and fix the following issue in the Linux kernel code: Revert driver core: fix passing platform_data
Problem Details: This reverts commit ce21c7bcd796fc4f45d48781b7e85f493cc55ee5: We will remove platform_data field from struct device until all platform devices pass its specific data from platfom_device and all platform drivers use platform specific data passed by platform_device->platform_data. This kind of conver...
```diff diff --git a/drivers/base/platform.c b/drivers/base/platform.c index ec5400c32021..d1d0ee431926 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -247,20 +247,7 @@ int platform_device_add(struct platform_device *pdev) else dev_set_name(&pdev->dev, pdev->name); - /* We will remove plat...
fe0e2bb9b3ca55b78e637b1260faeaa951523959
Analyze and fix the following issue in the Linux kernel code: Remove old PRINTK_DEBUG config item
Problem Details: On Tue, Apr 21, 2009 at 01:55:53PM +0200, Stefan Richter wrote: > Robert P. J. Day wrote: > > lib/Kconfig.debug: select PRINTK_DEBUG > > > > should that perhaps refer to "DYNAMIC_PRINTK_DEBUG"? since there is > > no such thing as a PRINTK_DEBUG Kconfig variable. > > Looks like a rudiment from...
```diff diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 812c28207baf..6cdcf38f2da9 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -891,7 +891,6 @@ config DYNAMIC_DEBUG default n depends on PRINTK depends on DEBUG_FS - select PRINTK_DEBUG help Compiles debug level messages into the kern...
d86c1302c58e4d4ebd99d459c2daff13613ac7f4
Analyze and fix the following issue in the Linux kernel code: Driver core: platform: fix kernel-doc warnings
Problem Details: Fix function parameter notation in platform.c; fixes kernel-doc warnings. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/base/platform.c b/drivers/base/platform.c index b5b6c973a2e0..ec5400c32021 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -1028,7 +1028,7 @@ static __initdata LIST_HEAD(early_platform_device_list); /** * early_platform_driver_register - * @edrv: early_platform dr...
36d3793c947f1ef7ba3d24eeeddc1be41adc5ab4
Analyze and fix the following issue in the Linux kernel code: x86, boot: use appropriate rep string for move and clear
Problem Details: In the pre-decompression code, use the appropriate largest possible rep movs and rep stos to move code and clear bss, respectively. For reverse copy, do note that the initial values are supposed to be the address of the first (highest) copy datum, not one byte beyond the end of the buffer. rep string...
```diff diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S index d02a4f02be13..6710dc78ac59 100644 --- a/arch/x86/boot/compressed/head_32.S +++ b/arch/x86/boot/compressed/head_32.S @@ -100,11 +100,12 @@ ENTRY(startup_32) * where decompression in place becomes safe. */ pushl %esi ...
283ab1c0bd462dd0b179393fb081a626f6687413
Analyze and fix the following issue in the Linux kernel code: x86, boot: follow standard Kbuild style for compression suffix
Problem Details: When generating the compression suffix in arch/x86/boot/compressed/Makefile, follow standard Kbuild conventions, that is: - Use a dash not underscore before y/m/n endings - Use := whenever possible. Requested-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
```diff diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile index b35c3bb70907..7f24fdb584e6 100644 --- a/arch/x86/boot/compressed/Makefile +++ b/arch/x86/boot/compressed/Makefile @@ -46,10 +46,10 @@ $(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE $(obj)/vmlinux.bin.lzma: $(vmlinux.bi...
201517a7f3ec497fff545a7659c6c876f89f9054
Analyze and fix the following issue in the Linux kernel code: kprobes: fix to use text_mutex around arm/disarm kprobe
Problem Details: Fix kprobes to lock text_mutex around some arch_arm/disarm_kprobe() which are newly added by commit de5bd88d5a5cce3cacea904d3503e5ebdb3852a2. Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl....
```diff diff --git a/kernel/kprobes.c b/kernel/kprobes.c index a5e74ddee0e2..c0fa54b276d9 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -319,6 +319,22 @@ struct kprobe __kprobes *get_kprobe(void *addr) return NULL; } +/* Arm a kprobe with text_mutex */ +static void __kprobes arm_kprobe(struct kprobe *kp)...
6cac5a924668a56c7ccefc345805f1fe0536a90e
Analyze and fix the following issue in the Linux kernel code: xen/x86-64: fix breakpoints and hardware watchpoints
Problem Details: Native x86-64 uses the IST mechanism to run int3 and debug traps on an alternative stack. Xen does not do this, and so the frames were being misinterpreted by the ptrace code. This change special-cases these two exceptions by using Xen variants which run on the normal kernel stack properly. Impact: ...
```diff diff --git a/arch/x86/include/asm/traps.h b/arch/x86/include/asm/traps.h index 0d5342515b86..c44e5002f2ff 100644 --- a/arch/x86/include/asm/traps.h +++ b/arch/x86/include/asm/traps.h @@ -13,6 +13,9 @@ asmlinkage void divide_error(void); asmlinkage void debug(void); asmlinkage void nmi(void); asmlinkage void ...
61de71c67caec39df0a854a1ef5be0c6be385c2a
Analyze and fix the following issue in the Linux kernel code: Network Drop Monitor: Fix skb_kill_datagram
Problem Details: Commit ead2ceb0ec9f85cff19c43b5cdb2f8a054484431 ("Network Drop Monitor: Adding kfree_skb_clean for non-drops and modifying end-of-line points for skbs") established new conventions for identifying dropped packets. Align skb_kill_datagram() with these conventions so that packets that get dropped just b...
```diff diff --git a/net/core/datagram.c b/net/core/datagram.c index 22ea437c5023..e2a36f05cdf7 100644 --- a/net/core/datagram.c +++ b/net/core/datagram.c @@ -260,7 +260,9 @@ int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, unsigned int flags) spin_unlock_bh(&sk->sk_receive_queue.lock); } - skb_free_d...
be8be9eccbf2d908a7e56b3f7a71105cd88da06b
Analyze and fix the following issue in the Linux kernel code: ipvs: Fix IPv4 FWMARK virtual services
Problem Details: This fixes the use of fwmarks to denote IPv4 virtual services which was unfortunately broken as a result of the integration of IPv6 support into IPVS, which was included in 2.6.28. The problem arises because fwmarks are stored in the 4th octet of a union nf_inet_addr .all, however in the case of IPv4 ...
```diff diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c index 60aba45023ff..77bfdfeb966e 100644 --- a/net/netfilter/ipvs/ip_vs_conn.c +++ b/net/netfilter/ipvs/ip_vs_conn.c @@ -260,7 +260,10 @@ struct ip_vs_conn *ip_vs_ct_in_get list_for_each_entry(cp, &ip_vs_conn_tab[hash], c_list) { ...
3df5edad87a998273aa5a9a8c728c05d855ad00e
Analyze and fix the following issue in the Linux kernel code: perf_counter: rework ioctl()s
Problem Details: Corey noticed that ioctl()s on grouped counters didn't work on the whole group. This extends the ioctl() interface to take a second argument that is interpreted as a flags field. We then provide PERF_IOC_FLAG_GROUP to toggle the behaviour. Having this flag gives the greatest flexibility, allowing you ...
```diff diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h index 00081d84169f..88f863ec2748 100644 --- a/include/linux/perf_counter.h +++ b/include/linux/perf_counter.h @@ -157,10 +157,14 @@ struct perf_counter_hw_event { /* * Ioctls that can be done on a perf counter fd: */ -#define PERF_COU...
848ddf116b3d1711c956fac8627be12dfe8d736f
Analyze and fix the following issue in the Linux kernel code: hwmon: (w83781d) Fix W83782D support (NULL pointer dereference)
Problem Details: Commit 360782dde00a2e6e7d9fd57535f90934707ab8a8 (hwmon: (w83781d) Stop abusing struct i2c_client for ISA devices) broke W83782D support for devices connected on the ISA bus. You will hit a NULL pointer dereference as soon as you read any device attribute. Other devices, and W83782D devices on the SMBus...
```diff diff --git a/drivers/hwmon/w83781d.c b/drivers/hwmon/w83781d.c index dbfb30c588d8..0bdab959b736 100644 --- a/drivers/hwmon/w83781d.c +++ b/drivers/hwmon/w83781d.c @@ -1462,7 +1462,8 @@ static struct w83781d_data *w83781d_update_device(struct device *dev) data->pwm[i] = w83781d_read_value(data, ...
b9008708f24de8fb9bdbfb5d3b27e36d5a357eda
Analyze and fix the following issue in the Linux kernel code: hwmon: (asus_atk0110) Fix compiler warning
Problem Details: atk_sensor_type is only used when DEBUG is defined. Signed-off-by: Luca Tettamanti <kronos.it@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
```diff diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon/asus_atk0110.c index 0897edef2574..bff0103610c1 100644 --- a/drivers/hwmon/asus_atk0110.c +++ b/drivers/hwmon/asus_atk0110.c @@ -348,6 +348,7 @@ static int validate_hwmon_pack(struct atk_data *data, union acpi_object *obj) return 0; } +#ifdef DEBUG ...
e73173dbe55e5b4c2306728aad50c8e42194f6d5
Analyze and fix the following issue in the Linux kernel code: sh: Fix UBC setup and registers for SH2A
Problem Details: Signed-off-by: Kieran Bingham <kieranbingham@gmail.com> Signed-off-by: Peter Griffin <pgriffin@mpc-data.co.uk> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/include/asm/ubc.h b/arch/sh/include/asm/ubc.h index a7b9028bbfbb..4ca4b7717371 100644 --- a/arch/sh/include/asm/ubc.h +++ b/arch/sh/include/asm/ubc.h @@ -42,12 +42,23 @@ #define BRCR_CMFA (1 << 15) #define BRCR_CMFB (1 << 14) + +#if defined CONFIG_CPU_SH2A +#define BRCR_CMFCA (1 << 1...
168f36237b16e2b3159e24c7d3b658e3c912d149
Analyze and fix the following issue in the Linux kernel code: serial: sh-sci: Fix up h8300 support.
Problem Details: - Dummy SCIF functions define. - h8300 specific header include. Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index 686e4a456e32..4e3248d58602 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c @@ -54,6 +54,10 @@ #include <asm/sh_bios.h> #endif +#ifdef CONFIG_H8300 +#include <asm/gpio.h> +#endif + #include "sh-sci.h" struct sci_port ...
54507f6ee99778a727ff1b38a1f4050fe6479835
Analyze and fix the following issue in the Linux kernel code: serial: sh-sci: Fix up section mismatch in error path.
Problem Details: The sci_probe_single() path attempts to use sci_remove() for the error path, while sci_remove() is still flagged as __devexit. So, we simply discard the section annotation. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index 3daf76725ac6..686e4a456e32 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c @@ -1227,7 +1227,7 @@ static struct uart_driver sci_uart_driver = { }; -static int __devexit sci_remove(struct platform_device *dev) +static int...
cd1a6de7d4a492bf3405a6c070075a4cb8c90262
Analyze and fix the following issue in the Linux kernel code: mtd: fix timeout in M25P80 driver
Problem Details: Extend erase timeout in M25P80 SPI Flash driver. The M25P80 drivers fails erasing sectors on a M25P128 because the ready wait timeout is too short. Change the timeout from a simple loop count to a suitable number of seconds. Signed-off-by: Peter Horton <zero@colonel-panic.org> Tested-by: Martin Michl...
```diff diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index dfadef84c052..cc6369ea67dd 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -54,7 +54,7 @@ #define SR_SRWD 0x80 /* SR write protect */ /* Define max times to check status register before we give u...
42171c17f267d7fdc5167ad7b6b5fb9edfd04186
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix and clean up hippo-compat HP auto-muting
Problem Details: The speaker auto-muting per HP plugging for ALC262 HIPPO and compatible devices is slightly buggy as the "Master" or "Front" mixer control can still toggle the speaker output even if the headphone is plugged. This patch fixes the issue, and clean up the hippo-related codes together with fixes of some ...
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index b9495342c921..8b242c9da4dd 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -9534,24 +9534,6 @@ static struct snd_kcontrol_new alc262_base_mixer[] = { { } /* end */ }; -static struct snd_kcontr...
8f31bfe538ebafac187d2d4465a92e1d9ee6d8c2
Analyze and fix the following issue in the Linux kernel code: tracing/events: clean up for ftrace_set_clr_event()
Problem Details: Add a helper function __ftrace_set_clr_event(), and replace some ftrace_set_clr_event() calls with this helper, thus we don't need any kstrdup() or kmalloc(). As a side effect, this patch fixes an issue in self tests code, which is similar to the one fixed in commit d6bf81ef0f7474434c2a049e8bf3c9146a1...
```diff diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index 8d0fae3af595..45f1099386b6 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c @@ -111,11 +111,44 @@ static void ftrace_event_enable_disable(struct ftrace_event_call *call, } } -static int ftrace_set_clr_eve...
bec4c99e8637b5b8bd4b0513eacb51da25885e3b
Analyze and fix the following issue in the Linux kernel code: ASoC: Fix file patterns for PXA sound drivers
Problem Details: The file matches for PXA sound drivers missed the generic AC97 support and were overly specific within sound/soc/pxa, omitting all machine drivers and the SSP driver. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/MAINTAINERS b/MAINTAINERS index 3cf4f0d8c79a..17c8ec119d4f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4544,7 +4544,8 @@ F: drivers/pcmcia/pxa2xx* F: drivers/spi/pxa2xx* F: drivers/usb/gadget/pxa2* F: include/sound/pxa2xx-lib.h -F: sound/soc/pxa/pxa2xx* +F: sound/arm/pxa* +F: sound/soc/pxa ...
c198d811812417961582d4e25360372ca1eccdae
Analyze and fix the following issue in the Linux kernel code: ASoC: TWL4030: Fix typo in twl4030_codec_mute function
Problem Details: Copy-paste error: TWL4030_PRECKL_GAIN >> TWL4030_PRECKR_GAIN It has not caused problems, since TWL4030_PRECKL_GAIN == TWL4030_PRECKR_GAIN == 0x30 Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c index 1a00e4b20390..fd392c65f475 100644 --- a/sound/soc/codecs/twl4030.c +++ b/sound/soc/codecs/twl4030.c @@ -237,7 +237,7 @@ static void twl4030_codec_mute(struct snd_soc_codec *codec, int mute) TWL4030_REG_PRECKL_CTL); reg_val = twl...
6eac1af01112d1919b1c432f6591e6368e8d538f
Analyze and fix the following issue in the Linux kernel code: sh: Always select RTC_LIB, not just for SUPERH32.
Problem Details: The RTC_LIB helpers are used in arch/sh/kernel/time.c, which was previously only the case for the 32-bit variant. Now that this has become the common implementation, move the RTC_LIB select to reflect that. Fixes up the sh64 build. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index d88a61b11d32..6ed16c4548c9 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -15,6 +15,7 @@ config SUPERH select HAVE_IOREMAP_PROT if MMU select HAVE_ARCH_TRACEHOOK select HAVE_DMA_API_DEBUG + select RTC_LIB help The SuperH is a RISC processor...
e5299926d7459d9fa7c7f856983147817aedb10e
Analyze and fix the following issue in the Linux kernel code: x86: MCE: make cmci_discover_lock irq-safe
Problem Details: Lockdep reports the warning below when Li tries to offline one cpu: [ 110.835487] ================================= [ 110.835616] [ INFO: inconsistent lock state ] [ 110.835688] 2.6.30-rc4-00336-g8c9ed89 #52 [ 110.835757] --------------------------------- [ 110.835828] inconsistent {HARDIRQ-ON-W}...
```diff diff --git a/arch/x86/kernel/cpu/mcheck/mce_intel_64.c b/arch/x86/kernel/cpu/mcheck/mce_intel_64.c index d6b72df89d69..cef3ee30744b 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_intel_64.c +++ b/arch/x86/kernel/cpu/mcheck/mce_intel_64.c @@ -151,10 +151,11 @@ static void print_update(char *type, int *hdr, int num)...
33df4db04a79660150e1948e3296eeb451ac121b
Analyze and fix the following issue in the Linux kernel code: x86: xen, i386: reserve Xen pagetables
Problem Details: The Xen pagetables are no longer implicitly reserved as part of the other i386_start_kernel reservations, so make sure we explicitly reserve them. This prevents them from being released into the general kernel free page pool and reused. [ Impact: fix Xen guest crash ] Also-Bisected-by: Bryan Donlan <...
```diff diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 9842b1212407..e25a78e1113a 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c @@ -1794,6 +1794,11 @@ __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd, pin_pagetable_pfn(MMUEXT_PIN_L3_TABLE, PFN_DOWN(__pa(swapper_pg_dir))); + reserve_early...
4f5ecaa05493dfddf155b40224b951592bfce325
Analyze and fix the following issue in the Linux kernel code: sh: clock framework update, fix count and kill off kref
Problem Details: This patch updates the clock framework use count code. With this patch the enable() and disable() callbacks only get called when counting from and to zero. While at it the kref stuff gets replaced with an int. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/include/asm/clock.h b/arch/sh/include/asm/clock.h index 2f6c9627bc1f..b1f29199e4bd 100644 --- a/arch/sh/include/asm/clock.h +++ b/arch/sh/include/asm/clock.h @@ -1,7 +1,6 @@ #ifndef __ASM_SH_CLOCK_H #define __ASM_SH_CLOCK_H -#include <linux/kref.h> #include <linux/list.h> #include <li...
ef9f89996e450e9686816b6fc1e34d7b9a65766c
Analyze and fix the following issue in the Linux kernel code: sh: Kill off unused sh64 debug code.
Problem Details: None of the print_page() code and associated helpers are presently used by anything in-tree, so just kill it off. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/lib64/dbg.c b/arch/sh/lib64/dbg.c index 25f2481bd89e..6152a6a6d9c6 100644 --- a/arch/sh/lib64/dbg.c +++ b/arch/sh/lib64/dbg.c @@ -246,51 +246,3 @@ void show_excp_regs(char *from, int trapnr, int signr, struct pt_regs *regs) print_dtlb(); print_itlb(); } - -/* ==========================...
bb70dfa5f8ab4a0f1c699ddb3ef0276d91219b7c
Analyze and fix the following issue in the Linux kernel code: netfilter: xtables: consolidate comefrom debug cast access
Problem Details: Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
```diff diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c index d91ecd4c264e..7b35c0b3841b 100644 --- a/net/ipv4/netfilter/ip_tables.c +++ b/net/ipv4/netfilter/ip_tables.c @@ -311,6 +311,8 @@ ipt_do_table(struct sk_buff *skb, const struct net_device *out, struct xt_table *table)...
4f2f6f236af484ada595ff37d0ee1902aa56221f
Analyze and fix the following issue in the Linux kernel code: netfilter: xtables: fix const inconsistency
Problem Details: Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
```diff diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c index 7fcbc16dd24b..16b7c09c0366 100644 --- a/net/ipv4/netfilter/ip_tables.c +++ b/net/ipv4/netfilter/ip_tables.c @@ -238,8 +238,8 @@ static struct nf_loginfo trace_loginfo = { /* Mildly perf critical (only if packet tracing is on) */...
9da29271bea5d831d745f3ceb7f6f6b2def13a5b
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix secondary SPDIF on VT1708S and VT1702 codecs
Problem Details: VIA VT1708S and VT1702 codecs can have two SPDIF outputs. One of them should have been handled as the extra digital out, but it's not properly accessed. This patch fixes the handling of the secondary SPDIF on these codecs with the slave dig-out as found in patch_sigmatel.c. This makes the use of suc...
```diff diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index b25a5cc637d6..8e004fb6961a 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c @@ -205,7 +205,7 @@ struct via_spec { /* playback */ struct hda_multi_out multiout; - hda_nid_t extra_dig_out_nid; + hda_nid_t slave_di...
5dd17cb992ef4c1ebb1a2d60cbef4b6967974673
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix line-in on Mac Mini Core2 Duo
Problem Details: BIOS on Mac Mini Core2 Duo sets both INPUT and OUTPUT pinctl bits to the line-in jack, and it confuses the driver as if it's a valid input. This patch adds the check of OUTPUT bit so that the driver fixes the invalid pin setup. Tested-by: Tino Keitel <tino.keitel@gmx.de> Cc: <stable@kernel.org> Signed...
```diff diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 917bc5d3ac2c..03b3646018a1 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -4079,7 +4079,12 @@ static int stac92xx_init(struct hda_codec *codec) pinctl = snd_hda_codec_read(codec, nid, 0, ...
ec91d1335f478c5cd089d82ffbf936075c5f24c8
Analyze and fix the following issue in the Linux kernel code: xfs: fix double unlock in xfs_swap_extents()
Problem Details: Regreesion from commit ef8f7fc, which rearranged the code in xfs_swap_extents() leading to double unlock of xfs inode ilock. That resulted in xfs_fsr deadlocking itself on platforms, which don't handle double unlock of rw_semaphore nicely. It caused the count go negative, which represents the write hol...
```diff diff --git a/fs/xfs/xfs_dfrag.c b/fs/xfs/xfs_dfrag.c index e6d839bddbf0..7465f9ee125f 100644 --- a/fs/xfs/xfs_dfrag.c +++ b/fs/xfs/xfs_dfrag.c @@ -347,13 +347,15 @@ xfs_swap_extents( error = xfs_trans_commit(tp, XFS_TRANS_SWAPEXT); -out_unlock: - xfs_iunlock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL); - xfs_i...
6407df5ca54a511054200a1eb23f78f723ca1de4
Analyze and fix the following issue in the Linux kernel code: x86, kexec: fix crashdump panic with CONFIG_KEXEC_JUMP
Problem Details: Tim Starling reported that crashdump will panic with kernel compiled with CONFIG_KEXEC_JUMP due to null pointer deference in machine_kexec_32.c: machine_kexec(), when deferencing kexec_image. Refering to: http://bugzilla.kernel.org/show_bug.cgi?id=13265 This patch fixes the BUG via replacing global v...
```diff diff --git a/arch/x86/kernel/machine_kexec_32.c b/arch/x86/kernel/machine_kexec_32.c index e7368c1da01d..c1c429d00130 100644 --- a/arch/x86/kernel/machine_kexec_32.c +++ b/arch/x86/kernel/machine_kexec_32.c @@ -194,7 +194,7 @@ void machine_kexec(struct kimage *image) unsigned int preserve_context); ...
61438766514a2d7f191ce1b3cf6812eabbef4ef7
Analyze and fix the following issue in the Linux kernel code: x86: fix boot hang in early_reserve_e820()
Problem Details: If the first non-reserved (sub-)range doesn't fit the size requested, an endless loop will be entered. If a range returned from find_e820_area_size() turns out insufficient in size, the range must be skipped before calling the function again. [ Impact: fixes boot hang on some platforms ] Signed-off-b...
```diff diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index ef2c3563357d..006281302925 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c @@ -1074,12 +1074,13 @@ u64 __init early_reserve_e820(u64 startt, u64 sizet, u64 align) u64 addr; u64 start; - start = startt; - while (size < size...
2b6b7d4be487bada8c727df829c25068c7b5e5a3
Analyze and fix the following issue in the Linux kernel code: IB/mlx4: Don't overwrite fast registration page list when posting work request
Problem Details: The low-level mlx4 driver modified the page-list addresses for fast register work requests post send to big-endian, and set a "present" bit. This caused problems later when the consumer attempted to unmap the pages using the page-list (using the list addresses which were assumed to be still in CPU-end...
```diff diff --git a/drivers/infiniband/hw/mlx4/mlx4_ib.h b/drivers/infiniband/hw/mlx4/mlx4_ib.h index 9974e886b8de..8a7dd6795fa0 100644 --- a/drivers/infiniband/hw/mlx4/mlx4_ib.h +++ b/drivers/infiniband/hw/mlx4/mlx4_ib.h @@ -86,6 +86,7 @@ struct mlx4_ib_mr { struct mlx4_ib_fast_reg_page_list { struct ib_fast_reg...
19bde778c1fd2574cc020a618d7d576f260271ca
Analyze and fix the following issue in the Linux kernel code: ACPI: suspend: don't let device _PS3 failure prevent suspend
Problem Details: 6328a57401dc5f5cf9931738eb7268fcd8058c49 "Enable PNPACPI _PSx Support, v3" added a call to acpi_bus_set_power(handle, ACPI_STATE_D3) to pnpacpi_disable_resource() before the existing call to evaluate _DIS on the device. This caused suspend to fail on the system in http://bugzilla.kernel.org/show_bug....
```diff diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c index 9a3a682c6981..9496494f340e 100644 --- a/drivers/pnp/pnpacpi/core.c +++ b/drivers/pnp/pnpacpi/core.c @@ -110,11 +110,9 @@ static int pnpacpi_disable_resources(struct pnp_dev *dev) /* acpi_unregister_gsi(pnp_irq(dev, 0)); */ ret = 0;...
ddc50b6ad634d9ce2526a777d4b7da80effdfb60
Analyze and fix the following issue in the Linux kernel code: ACPI: power: update error message
Problem Details: "Transitioning device [%s] to D%d" is not correct. We print this line when we attempted to transition the device, and it failed. So instead, print "Device [%s] failed to transition to D%d\n" This can happen under two conditions: 1. acpi_power_transition() fails when trying to handle the _ON/_OFF ...
```diff diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index e8f7b64e92da..ae862f1798dc 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -312,7 +312,7 @@ int acpi_bus_set_power(acpi_handle handle, int state) end: if (result) printk(KERN_WARNING PREFIX - "Transitioning device [%s] to...
90e4ee5d311d4e0729daa676b1d7f754265b5874
Analyze and fix the following issue in the Linux kernel code: [CIFS] Fix double list addition in cifs posix open code
Problem Details: Remove adding open file entry twice to lists in the file Do not fill file info twice in case of posix opens and creates Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
```diff diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index 461750e01364..11431ed72a7f 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c @@ -281,6 +281,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, int create_options = CREATE_NOT_DIR; int oplock = 0; int oflags; + bool posix_create = false; ...
06ee846a25642c434c55209151c633f538c12022
Analyze and fix the following issue in the Linux kernel code: sh: r7785 highlander clock fixes
Problem Details: Update the r7785 highlander defconfig to fix PCLK value and that mode4 is set high. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/configs/r7785rp_defconfig b/arch/sh/configs/r7785rp_defconfig index 890fe3cc9142..5e677a8e3a36 100644 --- a/arch/sh/configs/r7785rp_defconfig +++ b/arch/sh/configs/r7785rp_defconfig @@ -269,7 +269,7 @@ CONFIG_SH_R7785RP=y # CONFIG_SH_TMU=y CONFIG_SH_TIMER_IRQ=28 -CONFIG_SH_PCLK_FREQ=5000...
5dafc91fca9135a7b0acb76d9709f4abfad92d6e
Analyze and fix the following issue in the Linux kernel code: sh: sh7785 early scif fix
Problem Details: This patch moves the SH4 case of EARLY_SCIF_CONSOLE_PORT so the SH7785 default value gets used. Without this patch the value for SH7785 is set to 0xffe80000. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug index fdb049373e7c..fafa907e14ac 100644 --- a/arch/sh/Kconfig.debug +++ b/arch/sh/Kconfig.debug @@ -38,10 +38,10 @@ config EARLY_SCIF_CONSOLE_PORT default "0xffe00000" if CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7763 || \ CPU_SUBTYPE_SH7722 || CPU_SUB...
9e68177ef93b2f34eee5a1e1707bceef4b9ba69c
Analyze and fix the following issue in the Linux kernel code: Input: ff-memless - fix signed to unsigned bit overflow
Problem Details: When userspace sets effect->u.rumble.strong_magnitude to 0x8001 or larger, ml_combine_effects() would always return strong_magnitude 0xffff. Problem is that 'gain' is passed in as signed integer. Multiplying magnitude (__u16) with gain (int) causes magnitude read as signed and results negative value (...
```diff diff --git a/drivers/input/ff-memless.c b/drivers/input/ff-memless.c index bc4e40f3ede7..2d1415e16834 100644 --- a/drivers/input/ff-memless.c +++ b/drivers/input/ff-memless.c @@ -226,7 +226,7 @@ static int get_compatible_type(struct ff_device *ff, int effect_type) */ static void ml_combine_effects(struct ff_...
d07a9cba6be5c0e947afc1014b5a62182a86f1f1
Analyze and fix the following issue in the Linux kernel code: Input: joydev - blacklist digitizers
Problem Details: BTN_TOUCH is not set by the wacom driver which causes it to be handled by the joydev driver while the resulting device is broken. This causes problems with applications that try to use a joystick device. Ubuntu BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/300143 Signed-off-by: Tim Co...
```diff diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index 4224f0112849..012a5e753991 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c @@ -843,7 +843,13 @@ static const struct input_device_id joydev_blacklist[] = { INPUT_DEVICE_ID_MATCH_KEYBIT, .evbit = { BIT_MASK(EV_KEY) }, ....
5afc4abe7902b8453c248321daa9b13b12d9c838
Analyze and fix the following issue in the Linux kernel code: ACPI: video: DMI workaround another broken Acer BIOS enabling display brightness
Problem Details: http://bugzilla.kernel.org/show_bug.cgi?id=13121 Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 7e8ee49ebd40..3a3d1565a7dd 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -562,6 +562,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = { DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5720"), }, }, + { + .callback = vi...
d3584183d2f40f40371e288ceef187d04da213b5
Analyze and fix the following issue in the Linux kernel code: sparc64: Fix SET_PERSONALITY to not clip bits outside of PER_MASK.
Problem Details: Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc/include/asm/elf_64.h b/arch/sparc/include/asm/elf_64.h index 425c2f9be6d5..d42e393078c4 100644 --- a/arch/sparc/include/asm/elf_64.h +++ b/arch/sparc/include/asm/elf_64.h @@ -208,8 +208,9 @@ do { unsigned long new_flags = current_thread_info()->flags; \ else \ clear_thread_flag...
928f308f556f4943e50c5064b546f47bce301f02
Analyze and fix the following issue in the Linux kernel code: smsc911x: fix calculation of res_size for ioremap
Problem Details: fix size of remaped iomem, which is 1 byte to small (e.g. mappes only 0xff bytes instead of 0x100) Signed-off-by: Matthias Ludwig <mludwig@ultratronik.de> Acked-by: Steve Glendinning <steve.glendinning@smsc.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c index 9a8528c5bb5e..3cff84078a9e 100644 --- a/drivers/net/smsc911x.c +++ b/drivers/net/smsc911x.c @@ -1976,7 +1976,7 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev) retval = -ENODEV; goto out_0; } - res_size = res->end...
bf069c9726b592432ed646e72b910ac3c098d025
Analyze and fix the following issue in the Linux kernel code: ixgbe: fix failing to log fan failures
Problem Details: We weren't logging the 82598AT fan failure if it occurred before (ixgbe_open) as we hadn't sent up to catch the interrupt that event caused. This patch checks for this failure in: ixgbe_probe - So we can log the failure asap. We check right after we set up the adapter->flags, which is when we know tha...
```diff diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 01d8b6b12be6..4a316e9c0541 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -2457,6 +2457,17 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter) ixgbe_irq_enable(adapter); + /* ...
51991763416251f259efbfe459c16f331f31d01f
Analyze and fix the following issue in the Linux kernel code: ACPICA: use acpi.* modparam namespace
Problem Details: Add acpi/acpica/*.c to the acpi.* modparam namespace so that any modparams we stick into ACPICA do not expose ACPICA filenames to users. There are currently only two modparams in ACPICA, just recently added for http://bugzilla.kernel.org/show_bug.cgi?id=13041 With this change, they become acpi.gts=1...
```diff diff --git a/drivers/acpi/acpica/Makefile b/drivers/acpi/acpica/Makefile index 17e50824a6f1..72ac28da14e3 100644 --- a/drivers/acpi/acpica/Makefile +++ b/drivers/acpi/acpica/Makefile @@ -5,40 +5,43 @@ ccflags-y := -Os ccflags-$(CONFIG_ACPI_DEBUG) += -DACPI_DEBUG_OUTPUT -obj-y := dsfield.o dsmthdat.o ds...
65b77242043f74bca6a0d733c0e48ef03a8c9893
Analyze and fix the following issue in the Linux kernel code: tracing: have menu default enabled when kernel debug is configured
Problem Details: Tracing can be very helpful to debug the kernel. When DEBUG_KERNEL is enabled it is nice to enable the trace menu as well. This patch only make the tracing menu enabled by default, it does not make any of the tracers enabled. And the menu is only enabled by default if DEBUG_KERNEL is enabled. [ Impac...
```diff diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index 50f62a296e1d..f61be3015783 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig @@ -79,6 +79,7 @@ if TRACING_SUPPORT menuconfig FTRACE bool "Tracers" + default y if DEBUG_KERNEL help Enable the kernel tracing infrastructure. ```
54f2c841fa0007e5fee3b7d01a911c774f0a6cda
Analyze and fix the following issue in the Linux kernel code: oprofile: fix cpu buffer size
Problem Details: The unit of oprofile_cpu_buffer_size is in samples, but was allocated in bytes. This led to the allocation of too small cpu buffers. This patch recalculates the buffer size in bytes taking also the ring_buffer_event header size into account. Reported-by: Suravee Suthikulpanit <suravee.suthikulpanit@am...
```diff diff --git a/drivers/oprofile/cpu_buffer.c b/drivers/oprofile/cpu_buffer.c index f0e99d4c066b..242257b19441 100644 --- a/drivers/oprofile/cpu_buffer.c +++ b/drivers/oprofile/cpu_buffer.c @@ -78,16 +78,20 @@ void free_cpu_buffers(void) op_ring_buffer_write = NULL; } +#define RB_EVENT_HDR_SIZE 4 + int alloc...
8511a2728ab82cab398e39d019f5cf1246021c1c
Analyze and fix the following issue in the Linux kernel code: dlm: fix use count with multiple joins
Problem Details: When a lockspace was joined multiple times, the global dlm use count was incremented when it should not have been. This caused the global dlm threads to not be stopped when all lockspaces were eventually be removed. Signed-off-by: David Teigland <teigland@redhat.com>
```diff diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c index 82528d9b72ed..d489fcc86713 100644 --- a/fs/dlm/lockspace.c +++ b/fs/dlm/lockspace.c @@ -419,16 +419,14 @@ static int new_lockspace(const char *name, int namelen, void **lockspace, break; } ls->ls_create_count++; - module_put(THIS_MODULE); - ...
b4380b8e5888e5ef5872e43b610c9dac4bf253ac
Analyze and fix the following issue in the Linux kernel code: [ARM] 5501/1: Freescale STMP: fix compilation warning
Problem Details: To avoid compile-time warning, added parameter to the stmp3xxx_clock_read Signed-off-by: dmitry pervushin <dpervushin@embeddedalley.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/plat-stmp3xxx/timer.c b/arch/arm/plat-stmp3xxx/timer.c index c916068f0cab..7d872f0aee70 100644 --- a/arch/arm/plat-stmp3xxx/timer.c +++ b/arch/arm/plat-stmp3xxx/timer.c @@ -45,7 +45,7 @@ stmp3xxx_timer_interrupt(int irq, void *dev_id) return IRQ_HANDLED; } -static cycle_t stmp3xxx_clo...
81ec1f929fe5be3f6464edf7939a9b65fc8223ca
Analyze and fix the following issue in the Linux kernel code: mxc: fix wrong register access in timer code
Problem Details: Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
```diff diff --git a/arch/arm/plat-mxc/time.c b/arch/arm/plat-mxc/time.c index 85f002e7f1e5..88fb3a57e029 100644 --- a/arch/arm/plat-mxc/time.c +++ b/arch/arm/plat-mxc/time.c @@ -234,9 +234,9 @@ static irqreturn_t mxc_timer_interrupt(int irq, void *dev_id) uint32_t tstat; if (cpu_is_mx3()) - tstat = __raw_readl(...
c1332616315584d45776a5e664382888513c0fa0
Analyze and fix the following issue in the Linux kernel code: i.MX31: Correct comments on CONFIG_DEBUG_LL.
Problem Details: Several comments in board config files stated "mandatory for CONFIG_LL_DEBUG" but the correct name is CONFIG_DEBUG_LL. Signed-off-by: Magnus Lilja <lilja.magnus@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
```diff diff --git a/arch/arm/plat-mxc/include/mach/board-mx31ads.h b/arch/arm/plat-mxc/include/mach/board-mx31ads.h index 318c72ada13d..06e6895f7f65 100644 --- a/arch/arm/plat-mxc/include/mach/board-mx31ads.h +++ b/arch/arm/plat-mxc/include/mach/board-mx31ads.h @@ -114,7 +114,7 @@ #define MXC_MAX_EXP_IO_LINES 16 ...
c010dba89bc0f5585550877b1693d11d24063b6b
Analyze and fix the following issue in the Linux kernel code: imx: re-work of PWM, add i.MX21 support
Problem Details: * Kconfig enables now HAVE_PWM (this enables in turn the selection of CONFIG_BACKLIGHT_PWM) * changes CONFIG_ARCH_MXyy to CONFIG_MACH_MXyy * fix some register names to match those of the reference manual * write a stub code so that the PWM can be used to program the LCD backlight * convert from #if...
```diff diff --git a/arch/arm/plat-mxc/Kconfig b/arch/arm/plat-mxc/Kconfig index 61acd4ca9349..beeb01aa029c 100644 --- a/arch/arm/plat-mxc/Kconfig +++ b/arch/arm/plat-mxc/Kconfig @@ -48,6 +48,7 @@ config MXC_IRQ_PRIOR config MXC_PWM tristate "Enable PWM driver" depends on ARCH_MXC + select HAVE_PWM help Enab...
76b6ea0aaa19fe94338bf2cd49a90d14976595ca
Analyze and fix the following issue in the Linux kernel code: MX35: Fix IPU/Framebuffer clock names
Problem Details: Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
```diff diff --git a/arch/arm/mach-mx3/clock-imx35.c b/arch/arm/mach-mx3/clock-imx35.c index db4aba7e5c6f..1814ba44d1b9 100644 --- a/arch/arm/mach-mx3/clock-imx35.c +++ b/arch/arm/mach-mx3/clock-imx35.c @@ -407,7 +407,8 @@ static struct clk_lookup lookups[] __initdata = { _REGISTER_CLOCK("imx-i2c.1", NULL, i2c2_clk) ...
19e3f4858d4a2863ad66b2c92d0f9270879eac04
Analyze and fix the following issue in the Linux kernel code: [ARM] SMDK6400: Fix WM8753 i2c board definition
Problem Details: Signed-off-by: Ben Dooks <ben-linux@fluff.org>
```diff diff --git a/arch/arm/mach-s3c6400/mach-smdk6400.c b/arch/arm/mach-s3c6400/mach-smdk6400.c index d020a2ac5b59..ab19285389a7 100644 --- a/arch/arm/mach-s3c6400/mach-smdk6400.c +++ b/arch/arm/mach-s3c6400/mach-smdk6400.c @@ -73,7 +73,7 @@ static struct platform_device *smdk6400_devices[] __initdata = { }; sta...
57699e9adf1b44f281d808609b47816804763bfa
Analyze and fix the following issue in the Linux kernel code: [ARM] S3C: Add debug to UART save and a per-arch callback pre-restore
Problem Details: Add a simple debug message on saving the UART state and add a per-arch pre-restore function to be used by the s3c64xx restore code to ensure the UARTs control registers do not go through any illegal state changes. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
```diff diff --git a/arch/arm/plat-s3c/pm.c b/arch/arm/plat-s3c/pm.c index 061182ca66e3..de4c4aa22468 100644 --- a/arch/arm/plat-s3c/pm.c +++ b/arch/arm/plat-s3c/pm.c @@ -83,6 +83,9 @@ static void s3c_pm_save_uart(unsigned int uart, struct pm_uart_save *save) save->ufcon = __raw_readl(regs + S3C2410_UFCON); save->u...
d94fc523f3c35bd8013f04827e94756cbc0212f4
Analyze and fix the following issue in the Linux kernel code: tracing/events: fix concurrent access to ftrace_events list, fix
Problem Details: In filter_add_subsystem_pred() we should release event_mutex before calling filter_free_subsystem_preds(), since both functions hold event_mutex. [ Impact: fix deadlock when writing invalid pred into subsystem filter ] Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Cc: tzanussi@gmail.com Cc: a.p.zijls...
```diff diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c index 8c62e5bdff09..85ad6a8939ad 100644 --- a/kernel/trace/trace_events_filter.c +++ b/kernel/trace/trace_events_filter.c @@ -636,14 +636,15 @@ static int filter_add_subsystem_pred(struct filter_parse_state *ps, err = filt...
5928c3cc0ffcb6894bbab6be591b7ae1786b2d87
Analyze and fix the following issue in the Linux kernel code: tracing/filters: support for operator reserved characters in strings
Problem Details: When we set a filter for an event, such as: echo "name == my_lock_name" > \ /debug/tracing/events/lockdep/lock_acquired/filter then the following order of token type is parsed: - space - operator - parentheses - operand Because the operators and parentheses have a higher precedence than the operan...
```diff diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c index 01c76eb3e168..8c62e5bdff09 100644 --- a/kernel/trace/trace_events_filter.c +++ b/kernel/trace/trace_events_filter.c @@ -851,10 +851,19 @@ static void postfix_clear(struct filter_parse_state *ps) static int filter_parse...
aa47b7e0f89b9998dad4d1667447e8cb7703ff4e
Analyze and fix the following issue in the Linux kernel code: sched: emit thread info flags with stack trace
Problem Details: When a thread is oom killed and fails to exit, it's helpful to know which threads have access to memory reserves if the machine livelocks. This is done by testing for the TIF_MEMDIE thread info flag and should be displayed alongside stack traces to identify tasks that have access to such reserves but ...
```diff diff --git a/kernel/sched.c b/kernel/sched.c index 2a43a581ead3..5aa63f50c696 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -6610,8 +6610,9 @@ void sched_show_task(struct task_struct *p) #ifdef CONFIG_DEBUG_STACK_USAGE free = stack_not_used(p); #endif - printk(KERN_CONT "%5lu %5d %6d\n", free, - task...
9456f0fa6d3cb944d3b9fc31c9a244e0362c26ea
Analyze and fix the following issue in the Linux kernel code: tracing: reset ring buffer when removing modules with events
Problem Details: Li Zefan found that there's a race using the event ids of events and modules. When a module is loaded, an event id is incremented. We only have 16 bits for event ids (65536) and there is a possible (but highly unlikely) race that we could load and unload a module that registers events so many times tha...
```diff diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 4164a344e72a..dd40d2320346 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -639,6 +639,16 @@ void tracing_reset_online_cpus(struct trace_array *tr) tracing_reset(tr, cpu); } +void tracing_reset_current(int cpu) +{ + tracing_res...
db305e507d554430a69ede901a6308e6ecb72349
Analyze and fix the following issue in the Linux kernel code: md: fix some (more) errors with bitmaps on devices larger than 2TB.
Problem Details: If a write intent bitmap covers more than 2TB, we sometimes work with values beyond 32bit, so these need to be sector_t. This patches add the required casts to some unsigned longs that are being shifted up. This will affect any raid10 larger than 2TB, or any raid1/4/5/6 with member devices that are l...
```diff diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index bc1d64b7b63b..47c68bc75a17 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c @@ -1013,9 +1013,11 @@ static int bitmap_init_from_disk(struct bitmap *bitmap, sector_t start) kunmap_atomic(paddr, KM_USER0); if (b) { /* if the disk bit ...
b74fd2826c5acce20e6f691437b2d19372bc2057
Analyze and fix the following issue in the Linux kernel code: md: fix loading of out-of-date bitmap.
Problem Details: When md is loading a bitmap which it knows is out of date, it fills each page with 1s and writes it back out again. However the write_page call makes used of bitmap->file_pages and bitmap->last_page_size which haven't been set correctly yet. So this can sometimes fail. Move the setting of file_pages...
```diff diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index 1fb91edc7de2..bc1d64b7b63b 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c @@ -986,6 +986,9 @@ static int bitmap_init_from_disk(struct bitmap *bitmap, sector_t start) oldindex = index; oldpage = page; + bitmap->filemap[bitmap->f...
581daf7e00c5e766f26aff80a61a860a17b0d75a
Analyze and fix the following issue in the Linux kernel code: bnx2: Fix panic in bnx2_poll_work().
Problem Details: Add barrier() to bnx2_get_hw_{tx|rx}_cons() to fix this issue: http://bugzilla.kernel.org/show_bug.cgi?id=12698 This issue was reported by multiple i386 users. Without barrier(), the compiled code looks like the following where %eax contains the address of the tx_cons or rx_cons in the DMA status bl...
```diff diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index d47839184a06..b0cb29d4cc01 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -54,8 +54,8 @@ #define DRV_MODULE_NAME "bnx2" #define PFX DRV_MODULE_NAME ": " -#define DRV_MODULE_VERSION "2.0.0" -#define DRV_MODULE_RELDATE "April 2, 2009" +#...
6473990c7f0565fca2007f8662395d122e30f0d8
Analyze and fix the following issue in the Linux kernel code: net-sched: fix bfifo default limit
Problem Details: When no limit is given, the bfifo uses a default of tx_queue_len * mtu. Packets handled by qdiscs include the link layer header, so this should be taken into account, similar to what other qdiscs do. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/sched/sch_fifo.c b/net/sched/sch_fifo.c index 92cfc9d7e3b9..69188e8358b4 100644 --- a/net/sched/sch_fifo.c +++ b/net/sched/sch_fifo.c @@ -51,7 +51,7 @@ static int fifo_init(struct Qdisc *sch, struct nlattr *opt) u32 limit = qdisc_dev(sch)->tx_queue_len ? : 1; if (sch->ops == &bfifo_qdis...
60db402780ec257b287de591d65157575952bb4a
Analyze and fix the following issue in the Linux kernel code: drivers/base/iommu.c: add missing includes
Problem Details: Fix zillions of -mm x86_64 allmodconfig build errors - the file uses EXPORT_SYMBOL() and kmalloc but misses the needed includes. Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torva...
```diff diff --git a/drivers/base/iommu.c b/drivers/base/iommu.c index 9f0e672f4be8..8ad4ffea6920 100644 --- a/drivers/base/iommu.c +++ b/drivers/base/iommu.c @@ -18,6 +18,8 @@ #include <linux/bug.h> #include <linux/types.h> +#include <linux/module.h> +#include <linux/slab.h> #include <linux/errno.h> #include <li...
74614f8d9d4141a3752fc1c38706859b63f4842b
Analyze and fix the following issue in the Linux kernel code: isl29003: fix resume functionality
Problem Details: The isl29003 does not interpret the return value of i2c_smbus_write_byte_data() correctly and hence causes an error on system resume. Also introduce power_state_before_suspend and restore the chip's power state upon wakeup. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: "Rafael J. Wysocki" <rjw@sis...
```diff diff --git a/drivers/misc/isl29003.c b/drivers/misc/isl29003.c index 2e2a5923d4c2..a71e245801ee 100644 --- a/drivers/misc/isl29003.c +++ b/drivers/misc/isl29003.c @@ -64,6 +64,7 @@ struct isl29003_data { struct i2c_client *client; struct mutex lock; u8 reg_cache[ISL29003_NUM_CACHABLE_REGS]; + u8 power_sta...
2498ce42d3a4d1a498f1df4884da960087547db7
Analyze and fix the following issue in the Linux kernel code: alloc_vmap_area: fix memory leak
Problem Details: If alloc_vmap_area() fails the allocated struct vmap_area has to be freed. Signed-off-by: Ralph Wuerthner <ralphw@linux.vnet.ibm.com> Reviewed-by: Christoph Lameter <cl@linux-foundation.org> Reviewed-by: Minchan Kim <minchan.kim@gmail.com> Cc: Nick Piggin <npiggin@suse.de> Signed-off-by: Andrew Morton...
```diff diff --git a/mm/vmalloc.c b/mm/vmalloc.c index fab19876b4d1..083716ea38c9 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -402,6 +402,7 @@ overflow: printk(KERN_WARNING "vmap allocation for size %lu failed: " "use vmalloc=<size> to increase size.\n", size); + kfree(va); return ERR_PTR(-EBUSY);...
bdca0f9b1eabb24373e2307fe492f428f5928abc
Analyze and fix the following issue in the Linux kernel code: fbdev: fix fillrect for 24bpp modes
Problem Details: The software fillrect routines do not work properly when the number of pixels per machine word is not an integer. To see that, run the following command on a fbdev console with a 24bpp video mode, using a non-accelerated driver such as (u)vesafb: reset ; echo -e '\e[41mtest\e[K' The expected resul...
```diff diff --git a/drivers/video/cfbfillrect.c b/drivers/video/cfbfillrect.c index 64b35766b2a2..ba9f58b2a5e8 100644 --- a/drivers/video/cfbfillrect.c +++ b/drivers/video/cfbfillrect.c @@ -9,10 +9,6 @@ * * NOTES: * - * The code for depths like 24 that don't have integer number of pixels per - * long is broken...
df3935ffd6166fdd00702cf548fb5bb55737758b
Analyze and fix the following issue in the Linux kernel code: fiemap: fix problem with setting FIEMAP_EXTENT_LAST
Problem Details: Fix a problem where the generic block based fiemap stuff would not properly set FIEMAP_EXTENT_LAST on the last extent. I've reworked things to keep track if we go past the EOF, and mark the last extent properly. The problem was reported by and tested by Eric Sandeen. Tested-by: Eric Sandeen <sandeen@...
```diff diff --git a/fs/ioctl.c b/fs/ioctl.c index ac2d47e43926..82d9c42b8bac 100644 --- a/fs/ioctl.c +++ b/fs/ioctl.c @@ -258,7 +258,7 @@ int __generic_block_fiemap(struct inode *inode, long long length = 0, map_len = 0; u64 logical = 0, phys = 0, size = 0; u32 flags = FIEMAP_EXTENT_MERGED; - int ret = 0; + int ...
381a80e6df396eaabef2c00f85974a4579ac1c70
Analyze and fix the following issue in the Linux kernel code: inotify: use GFP_NOFS in kernel_event() to work around a lockdep false-positive
Problem Details: There is what we believe to be a false positive reported by lockdep. inotify_inode_queue_event() => take inotify_mutex => kernel_event() => kmalloc() => SLOB => alloc_pages_node() => page reclaim => slab reclaim => dcache reclaim => inotify_inode_is_dead => take inotify_mutex => deadlock The plan is ...
```diff diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index bed766e435b5..1634319e2404 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c @@ -220,7 +220,7 @@ static struct inotify_kernel_event * kernel_event(s32 wd, u32 mask, u32 cookie, rem = 0;...
7eaa2b20ca0a471e1c73f72d8c6a0eac2c7838a7
Analyze and fix the following issue in the Linux kernel code: mv643xx_eth: fix variable shadowing sparse warning
Problem Details: Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index a400d7115f78..352c77227a6f 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c @@ -1807,7 +1807,6 @@ static void mv643xx_eth_program_multicast_filter(struct net_device *dev) if (dev->flags & (IFF_PROMISC | IFF_ALLMULTI...
3d0a3cc9d72047e4baa76021c897f64fc84cc543
Analyze and fix the following issue in the Linux kernel code: netxen: fix bonding support
Problem Details: o Pause traffic during mac addr change. o Enable setting mac address for NX3031. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index d368e24c0235..9350c8663fd8 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h @@ -1264,9 +1264,10 @@ struct netxen_adapter { int (*enable_phy_interrupts) (struct netxen_adapter *); int (*di...
5cf4d323f8864dab818d500ec74f2fcb9ad5bf89
Analyze and fix the following issue in the Linux kernel code: netxen: fix mac list management
Problem Details: o use standard linked list api for mac addr list management in NX3031. o release mac addresses in firmware in dev close(). Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index 8dacfbb003e2..d368e24c0235 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h @@ -1019,8 +1019,8 @@ typedef struct { #define NETXEN_MAC_DEL 2 typedef struct nx_mac_list_s { - struct nx_mac_li...
22527864ed7ee6c50f3c4d4b03c83c963caf5c0b
Analyze and fix the following issue in the Linux kernel code: netxen: fix race in tx ring acccess
Problem Details: Fix the distance check between tx ring producer and consumer that could lead to tx ring wrap around. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index 9f5ced3eaf9d..23c974a7e0e4 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c @@ -526,7 +526,7 @@ netxen_send_cmd_descs(struct netxen_adapter *adapter, producer = tx_ring->producer;...
fab892232e275e4e9351a50d018c0a9513155814
Analyze and fix the following issue in the Linux kernel code: vt: Add a note on the historical abuse of CLOCK_TICK_RATE
Problem Details: This is one area where we can't just magic away the bizarre use of CLOCK_TICK_RATE as it leaks to user space APIs. It also means the visible CLOCK_TICK_RATE is frozen for architectures which is horrible. We need to fix this somehow Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus T...
```diff diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c index a2dee0eb6dad..e6ce632a393e 100644 --- a/drivers/char/vt_ioctl.c +++ b/drivers/char/vt_ioctl.c @@ -400,6 +400,9 @@ int vt_ioctl(struct tty_struct *tty, struct file * file, case KIOCSOUND: if (!perm) goto eperm; + /* FIXME: This is an ...
89996df4b5b1a09c279f50b3fd03aa9df735f5cb
Analyze and fix the following issue in the Linux kernel code: lockd: fix list corruption on lockd restart
Problem Details: If lockd is signalled soon enough after restart then locks_start_grace() will try to re-add an entry to a list and trigger a lock corruption warning. Thanks to Wang Chen for the problem report and diagnosis. WARNING: at lib/list_debug.c:26 __list_add+0x27/0x5c() ... list_add corruption. next->prev sh...
```diff diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index abf83881f68a..1a54ae14a192 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c @@ -104,6 +104,16 @@ static void set_grace_period(void) schedule_delayed_work(&grace_period_end, grace_period); } +static void restart_grace(void) +{ + if (nlmsvc_ops) { + cancel_...
d1a2627a29667fe7c4a9d06e1579a2d65bd39bba
Analyze and fix the following issue in the Linux kernel code: wimax: fix oops if netlink fails to add attribute
Problem Details: When sending a message to user space using wimax_msg(), if nla_put() fails, correctly interpret the return code from wimax_msg_alloc() as an err ptr and return the error code instead of crashing (as it is assuming than non-NULL means the pointer is ok). Signed-off-by: Inaky Perez-Gonzalez <inaky@linux...
```diff diff --git a/net/wimax/op-msg.c b/net/wimax/op-msg.c index 5d149c1b5f0d..9ad4d893a566 100644 --- a/net/wimax/op-msg.c +++ b/net/wimax/op-msg.c @@ -149,7 +149,8 @@ struct sk_buff *wimax_msg_alloc(struct wimax_dev *wimax_dev, } result = nla_put(skb, WIMAX_GNL_MSG_DATA, size, msg); if (result < 0) { - dev_e...
b2c0cea6b1cb210e962f07047df602875564069e
Analyze and fix the following issue in the Linux kernel code: nfsd4: check for negative dentry before use in nfsv4 readdir
Problem Details: After 2f9092e1020246168b1309b35e085ecd7ff9ff72 "Fix i_mutex vs. readdir handling in nfsd" (and 14f7dd63 "Copy XFS readdir hack into nfsd code"), an entry may be removed between the first mutex_unlock and the second mutex_lock. In this case, lookup_one_len() will return a negative dentry. Check for th...
```diff diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index b820c311931c..b73549d293be 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -2214,6 +2214,15 @@ nfsd4_encode_dirent_fattr(struct nfsd4_readdir *cd, dentry = lookup_one_len(name, cd->rd_fhp->fh_dentry, namlen); if (IS_ERR(dentry)) return nf...
358623c22c9fd837b3b1b444377037f72553dc9f
Analyze and fix the following issue in the Linux kernel code: rt2x00: Simplify rt2x00_check_rev
Problem Details: rt2x00_check_rev() was too specific for rt2500usb and rt73usb, by adding the mask argument (instead of hardcoding it into the function itself) we can use the function in rt2800usb as well. v2: Fix revision mask for rt2800usb Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linv...
```diff diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index 08e88333b0ff..1debb88bc60e 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c @@ -1559,7 +1559,7 @@ static int rt2500usb_init_eeprom(struct rt2x00_dev *rt2x00dev) ...
6cfe62cd58da862db04d4eb61f218f65b0cedbb3
Analyze and fix the following issue in the Linux kernel code: mac80211: Fix sparse warning for ssid_len on ieee80211_sta_config_auth()
Problem Details: net/mac80211/mlme.c:2079:28: warning: symbol 'ssid_len' shadows an earlier one net/mac80211/mlme.c:2022:12: originally declared here ssid_len is already being declared and checked above so there is no need for it again. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. ...
```diff diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 5509c5aa6beb..75c487229f2e 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -2076,10 +2076,6 @@ static int ieee80211_sta_config_auth(struct ieee80211_sub_if_data *sdata) return 0; } else { if (ifmgd->assoc_scan_tries < IEEE80211_A...
8a7130404948b966e98b1285e777972b4b3f2fa2
Analyze and fix the following issue in the Linux kernel code: ar9170: fix build when !CONFIG_PM
Problem Details: Fix this build error when CONFIG_PM is not set: drivers/net/wireless/ath/ar9170/usb.c: In function 'ar9170_usb_probe': drivers/net/wireless/ath/ar9170/usb.c:692: error: 'struct usb_device' has no member named 'reset_resume' Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: Joh...
```diff diff --git a/drivers/net/wireless/ath/ar9170/usb.c b/drivers/net/wireless/ath/ar9170/usb.c index d7b562dcebd2..d7c13c0177ca 100644 --- a/drivers/net/wireless/ath/ar9170/usb.c +++ b/drivers/net/wireless/ath/ar9170/usb.c @@ -689,7 +689,9 @@ static int ar9170_usb_probe(struct usb_interface *intf, aru->common.exe...
1b06bb4087d195d8289919df2f4d95ec3b89769e
Analyze and fix the following issue in the Linux kernel code: cfg80211: make nl80211_send_mlme_timeout() static
Problem Details: Fixes sparse complaint: CHECK net/wireless/nl80211.c net/wireless/nl80211.c:3694:6: warning: symbol 'nl80211_send_mlme_timeout' was not declared. Should it be static? Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index b1fc98225fd1..3c53c5cbc3a9 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -3696,9 +3696,9 @@ void nl80211_send_disassoc(struct cfg80211_registered_device *rdev, NL80211_CMD_DISASSOCIATE); } -void nl80211_send_mlme_ti...
13792578c88961256dd30e3a5d3fa1ac1ec9a7e0
Analyze and fix the following issue in the Linux kernel code: p54usb: Fixes compile error with CONFIG_PM=n
Problem Details: /drivers/net/wireless/p54/p54usb.c: In function 'p54u_probe': /drivers/net/wireless/p54/p54usb.c:923: error: 'struct usb_device' has no member named 'reset_resume' In the struct usb_device the reset_resume attribute is only available when CONFIG_PM is defined. Signed-off-by: Hauke Mehrtens <hauke@hau...
```diff diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c index ec6c95474f1a..f40c0f468b27 100644 --- a/drivers/net/wireless/p54/p54usb.c +++ b/drivers/net/wireless/p54/p54usb.c @@ -919,9 +919,11 @@ static int __devinit p54u_probe(struct usb_interface *intf, priv->common.open = p54u_o...