id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
6aa3001b239b387d98a7f945e4a51edeb59e4f2d
Analyze and fix the following issue in the Linux kernel code: [PATCH] page_alloc.c: buddy handling cleanup
Problem Details: Fix up some whitespace damage. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 97d6827c7d66..123c60586740 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -232,11 +232,13 @@ static inline void prep_zero_page(struct page *page, int order, gfp_t gfp_flags) * zone->lock is already acquired when we use these. * So, we don't need at...
013159227b840dfd441bd2e4c8b4d77ffb3cc42e
Analyze and fix the following issue in the Linux kernel code: [PATCH] mm: fix mm_struct reference counting bugs in mm/oom_kill.c
Problem Details: Fix oom_kill_task() so it doesn't call mmput() (which may sleep) while holding tasklist_lock. Signed-off-by: David S. Peterson <dsp@llnl.gov> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 9a643c4bf77c..042e6436c3ee 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -254,17 +254,24 @@ static void __oom_kill_task(task_t *p, const char *message) force_sig(SIGKILL, p); } -static struct mm_struct *oom_kill_task(task_t *p, const char *message) +stat...
97c2c9b84d0c1edf4926b13661d5af3f0edccbce
Analyze and fix the following issue in the Linux kernel code: [PATCH] oom-kill: mm locking fix
Problem Details: Dave Peterson <dsp@llnl.gov> points out that badness() is playing with mm_structs without taking a reference on them. mmput() can sleep, so taking a reference here (inside tasklist_lock) is hard. Fix it up via task_lock() instead. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Tor...
```diff diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 78747afad6b0..9a643c4bf77c 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -46,15 +46,25 @@ unsigned long badness(struct task_struct *p, unsigned long uptime) { unsigned long points, cpu_time, run_time, s; - struct list_head *tsk; + struct mm_struct *mm; + ...
8db08de4f6ae24e90aedf5125b5ddd52ffff15f4
Analyze and fix the following issue in the Linux kernel code: [PATCH] m41t00: fix bitmasks when writing to chip
Problem Details: Fix the bitmasks used when writing to the M41T00 registers. The original code used a mask of 0x7f when writing to each register, this is incorrect and probably the result of a copy-paste error. As a result years from 1980 to 1999 will be read back as 2000 to 2019. Signed-off-by: David Barksdale <ama...
```diff diff --git a/drivers/i2c/chips/m41t00.c b/drivers/i2c/chips/m41t00.c index 27fc9ff2961a..99ab4ec34390 100644 --- a/drivers/i2c/chips/m41t00.c +++ b/drivers/i2c/chips/m41t00.c @@ -131,13 +131,13 @@ m41t00_set(void *arg) if ((i2c_smbus_write_byte_data(save_client, 0, tm.tm_sec & 0x7f) < 0) || (i2c_smbus_writ...
b73781c866f671ff5a84d7c840510b43e8731d13
Analyze and fix the following issue in the Linux kernel code: [PATCH] uml: MADV_REMOVE fixes
Problem Details: MADV_REMOVE fixes - change the test mapping to be MAP_SHARED instead of MAP_PRIVATE, as MADV_REMOVE on MAP_PRIVATE maps won't work. Also, use the kernel's definition of MADV_REMOVE instead of hardcoding it if there isn't a libc definition. Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Hugh Dickins...
```diff diff --git a/arch/um/include/sysdep-i386/kernel-offsets.h b/arch/um/include/sysdep-i386/kernel-offsets.h index 82f96c574144..2c13de321f2f 100644 --- a/arch/um/include/sysdep-i386/kernel-offsets.h +++ b/arch/um/include/sysdep-i386/kernel-offsets.h @@ -1,6 +1,7 @@ #include <linux/stddef.h> #include <linux/sched...
181ae4005d0a4010802be534d929b38c42b9ac06
Analyze and fix the following issue in the Linux kernel code: [PATCH] uml: make 64-bit COW files compatible with 32-bit ones
Problem Details: This is the minimal fix to make 64-bit UML binaries create 32-bit compatible COW files and read them. I've indeed tested that current code doesn't do this - the code gets SIGFPE for a division by a value read at the wrong place, where 0 is found. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisor...
```diff diff --git a/arch/um/drivers/cow_user.c b/arch/um/drivers/cow_user.c index 0ec4052db9c5..6ab852bfcd3a 100644 --- a/arch/um/drivers/cow_user.c +++ b/arch/um/drivers/cow_user.c @@ -100,7 +100,7 @@ struct cow_header_v3_broken { __u32 alignment; __u32 cow_format; char backing_file[PATH_LEN_V3]; -}; +} __attri...
a4514ebd8e12c63c09ab02be518db545bd1d24af
Analyze and fix the following issue in the Linux kernel code: [PATCH] splice: offset fixes
Problem Details: - We need to adjust *ppos for writes as well. - Copy back modified offset value if one was passed in, similar to what sendfile does. Signed-off-by: Jens Axboe <axboe@suse.de>
```diff diff --git a/fs/splice.c b/fs/splice.c index 4f5e6b09fb26..27d6408ff490 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -720,22 +720,26 @@ generic_file_splice_write(struct pipe_inode_info *pipe, struct file *out, ssize_t ret; ret = move_from_pipe(pipe, out, ppos, len, flags, pipe_to_file); - - /* - * If fi...
2a27250e6cf47ca1ea3bea0a55e4b7889c097627
Analyze and fix the following issue in the Linux kernel code: [PATCH] tee: link_pipe() must be careful when dropping one of the pipe locks
Problem Details: We need to ensure that we only drop a lock that is ordered last, to avoid ABBA deadlocks with competing processes. Signed-off-by: Jens Axboe <axboe@suse.de>
```diff diff --git a/fs/splice.c b/fs/splice.c index 78cd264340f2..4f5e6b09fb26 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -1012,7 +1012,9 @@ static int link_pipe(struct pipe_inode_info *ipipe, size_t len, unsigned int flags) { struct pipe_buffer *ibuf, *obuf; - int ret = 0, do_wakeup = 0, i; + int ret, d...
954c24227318c166ec1925e1229db442e1f56f51
Analyze and fix the following issue in the Linux kernel code: mtd: improve parameter parsing for block2mtd
Problem Details: Expand the parameter parsing for block2mtd. It now accepts: Ki, Mi, Gi - the official prefixes for binary multiples, see http://physics.nist.gov/cuu/Units/binary.html, ki - mistake on my side and analog to "k" for decimal multiples, KiB, MiB, GiB - for people that prefer to add a "B" for byte, ki...
```diff diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c index 4160b8334c53..f54e4bf9b968 100644 --- a/drivers/mtd/devices/block2mtd.c +++ b/drivers/mtd/devices/block2mtd.c @@ -4,7 +4,7 @@ * block2mtd.c - create an mtd from a block device * * Copyright (C) 2001,2002 Simon Evans <spse...
9200c0b2a07c430bd98c546fc44b94f50e67ac62
Analyze and fix the following issue in the Linux kernel code: [MIPS] Fix Makefile bugs for MIPS32/MIPS64 R1 and R2.
Problem Details: This fixes kernel builds with gcc 3.2 (not 64-bit, that is looking like it is beyond recovery) and 3.3. With these bugs fixed we now also can get undo 3b4c4996a0c24da9e6f8be764e3950b756b18cc0 and similar bits for SMTC that were added in 79cc8007b93838a670b164b8a55ab3e735a12a8b. Signed-off-by: Ralf Ba...
```diff diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 5d10758356a6..69b9c1b8fafc 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -105,13 +105,13 @@ cflags-$(CONFIG_CPU_R4300) += -march=r4300 -Wa,--trap cflags-$(CONFIG_CPU_VR41XX) += -march=r4100 -Wa,--trap cflags-$(CONFIG_CPU_R4X00) += -march...
a682a2417007ad6265cd71b97b751753fd10e2fb
Analyze and fix the following issue in the Linux kernel code: [MIPS] Fix genrtc compilation.
Problem Details: Signed-off-by: Ralf Roesch <ralf.roesch@rw-gmbh.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/include/asm-mips/rtc.h b/include/asm-mips/rtc.h index a2abc4572b63..82ad401c7dca 100644 --- a/include/asm-mips/rtc.h +++ b/include/asm-mips/rtc.h @@ -32,7 +32,7 @@ static inline unsigned int get_rtc_time(struct rtc_time *time) { unsigned long nowtime; - nowtime = rtc_get_time(); + nowtime = rt...
62a442155ea58a17497b487324b27ec2f2dc5c5c
Analyze and fix the following issue in the Linux kernel code: [MIPS] Fix VR41xx build errors.
Problem Details: Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
```diff diff --git a/arch/mips/vr41xx/Kconfig b/arch/mips/vr41xx/Kconfig index a7add16c9aa4..055a2cdfc841 100644 --- a/arch/mips/vr41xx/Kconfig +++ b/arch/mips/vr41xx/Kconfig @@ -4,6 +4,8 @@ config CASIO_E55 select DMA_NONCOHERENT select IRQ_CPU select ISA + select SYS_HAS_CPU_VR41XX + select SYS_SUPPORTS_32BIT_K...
67a3f6de939a5f52e0aea6dcff7778d4bcca0734
Analyze and fix the following issue in the Linux kernel code: [MIPS] Fix tx49_blast_icache32_page_indexed.
Problem Details: Fix the cache index value in tx49_blast_icache32_page_indexed(). This is a damage by de62893bc0725f8b5f0445250577cd7a10b2d8f8 commit. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index 32b7f6aeb983..c4c208449d87 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c @@ -154,7 +154,8 @@ static inline void blast_icache32_r4600_v1_page_indexed(unsigned long page) static inline void tx49_blast_icache32_page_indexed(unsigned l...
d35d473c25d43d7db3e5e18b66d558d2a631cca8
Analyze and fix the following issue in the Linux kernel code: [MIPS] Fix the crime against humanity that mipsIRQ.S is.
Problem Details: Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/mips-boards/atlas/Makefile b/arch/mips/mips-boards/atlas/Makefile index d8dab75906bf..50fec2a5aee6 100644 --- a/arch/mips/mips-boards/atlas/Makefile +++ b/arch/mips/mips-boards/atlas/Makefile @@ -16,5 +16,5 @@ # 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. # -obj-y := atl...
ba8990f2aec85b5b62643aa82a1e71c738efc487
Analyze and fix the following issue in the Linux kernel code: [MIPS] JMR3927 build fixes for the RTC code.
Problem Details: Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/jmr3927/common/rtc_ds1742.c b/arch/mips/jmr3927/common/rtc_ds1742.c index a6bd3f4d3049..e6561345d12a 100644 --- a/arch/mips/jmr3927/common/rtc_ds1742.c +++ b/arch/mips/jmr3927/common/rtc_ds1742.c @@ -60,15 +60,15 @@ rtc_ds1742_get_time(void) unsigned long flags; spin_lock_irqsave(&r...
2ef2e1d9731bd8b3d8565e31bacd52a7c13a0aed
Analyze and fix the following issue in the Linux kernel code: [MIPS] EV96100: Fix over two year old typo in variable name.
Problem Details: Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/galileo-boards/ev96100/irq.c b/arch/mips/galileo-boards/ev96100/irq.c index 97bf094da4fe..fa29c3b0323f 100644 --- a/arch/mips/galileo-boards/ev96100/irq.c +++ b/arch/mips/galileo-boards/ev96100/irq.c @@ -54,7 +54,7 @@ static inline unsigned int ffz8(unsigned int word) return k; } -as...
c40b92e09c029ef2cb0b2287cbd222ff14ae3de8
Analyze and fix the following issue in the Linux kernel code: [MIPS] Ocelot 3: Fix build errors after the recent move of Marvell headers.
Problem Details: Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/momentum/ocelot_3/setup.c b/arch/mips/momentum/ocelot_3/setup.c index 370e75d0e75c..c69195234309 100644 --- a/arch/mips/momentum/ocelot_3/setup.c +++ b/arch/mips/momentum/ocelot_3/setup.c @@ -329,22 +329,22 @@ void __init plat_setup(void) /* shut down ethernet ports, just to be sure our...
ac2384a855c94e1d5467afe20bcb8ca23f0f3853
Analyze and fix the following issue in the Linux kernel code: [MIPS] it8172: Fix build of serial driver.
Problem Details: Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/include/asm-mips/serial.h b/include/asm-mips/serial.h index 7b2366412203..7196ceb0e948 100644 --- a/include/asm-mips/serial.h +++ b/include/asm-mips/serial.h @@ -77,15 +77,15 @@ #include <asm/it8712.h> #define ITE_SERIAL_PORT_DEFNS \ { .baud_base = BASE_BAUD,...
b56bce9a25e8c117794fe74c1b9bf790de10d554
Analyze and fix the following issue in the Linux kernel code: [MIPS] Jaguar: Fix build errors after the recent move of Marvell headers.
Problem Details: Some things were renamed because the PPC variant of the MV-643XX now uses the same header and the Jaguar code didn't catch up on that. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/momentum/jaguar_atx/setup.c b/arch/mips/momentum/jaguar_atx/setup.c index 91d9637143d7..1379c76845dc 100644 --- a/arch/mips/momentum/jaguar_atx/setup.c +++ b/arch/mips/momentum/jaguar_atx/setup.c @@ -381,24 +381,24 @@ void __init plat_setup(void) * shut down ethernet ports, just to be ...
0428657d874edf228fcd5396bb0e095b806e954c
Analyze and fix the following issue in the Linux kernel code: [MIPS] ITE8172: Fix build error due to missmatching prototypes.
Problem Details: Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/ite-boards/generic/irq.c b/arch/mips/ite-boards/generic/irq.c index e67f96129491..8c1cdfcd4284 100644 --- a/arch/mips/ite-boards/generic/irq.c +++ b/arch/mips/ite-boards/generic/irq.c @@ -62,9 +62,6 @@ #define ALLINTS_NOTIMER (IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3 | IE_IRQ4) -void di...
f13b68e8174657b0253ca7cf263521ed3ac19125
Analyze and fix the following issue in the Linux kernel code: [MIPS] Fix CONFIG_LIMITED_DMA build.
Problem Details: This fix a build error for the Momentum Jaguar ATX eval board. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/mm/highmem.c b/arch/mips/mm/highmem.c index 1f7b37b38f5c..0c544375b856 100644 --- a/arch/mips/mm/highmem.c +++ b/arch/mips/mm/highmem.c @@ -83,6 +83,7 @@ void __kunmap_atomic(void *kvaddr, enum km_type type) preempt_check_resched(); } +#ifndef CONFIG_LIMITED_DMA /* * This is the s...
41d4f0e61283f6807553c129416fc20766a7043f
Analyze and fix the following issue in the Linux kernel code: [MIPS] PNX8550 build fix.
Problem Details: Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/philips/pnx8550/common/platform.c b/arch/mips/philips/pnx8550/common/platform.c index a592260fd673..5436b4b97455 100644 --- a/arch/mips/philips/pnx8550/common/platform.c +++ b/arch/mips/philips/pnx8550/common/platform.c @@ -18,6 +18,7 @@ #include <linux/resource.h> #include <linux/seria...
c9e321e095384f25f2b7ffef456794cfa876dafc
Analyze and fix the following issue in the Linux kernel code: [MIPS] Fix breakage due to the grand makefile crapectomy.
Problem Details: It's cc-option not cc-options. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 9a69e0f0ab76..5d10758356a6 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -114,9 +114,9 @@ cflags-$(CONFIG_CPU_MIPS64_R1) += $(call cc-option,-march=mips64,-mips2 -mtune=r cflags-$(CONFIG_CPU_MIPS64_R2) += $(call cc-option,-march=mips64r2,...
91b05e6776e173da5ce7c96d67b3ad186c4fa49f
Analyze and fix the following issue in the Linux kernel code: [MIPS] Fix vectored interrupt support in TLB exception handler generator.
Problem Details: Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index 599b3c297186..c5eea6ae12ca 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c @@ -742,7 +742,7 @@ static void __init build_r3000_tlb_refill_handler(void) } #endif - memcpy((void *)CAC_BASE, tlb_handler, 0x80); + memcpy((void *)ebase, ...
ff3eab2a985f8efac239768fe7dda8fffc028ded
Analyze and fix the following issue in the Linux kernel code: [MIPS] Some formatting fixes.
Problem Details: Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 7ab49c6f6574..857319085255 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -987,7 +987,7 @@ int mips_srs_max(void) return shadow_registers.sr_supported; } -int mips_srs_alloc (void) +int mips_srs_alloc(void) { ...
f2a1585244681b92fd416d071a85de0db79235d2
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix dependencies of HUGETLB_PAGE_SIZE_64K
Problem Details: This patch fixes dependencies of HUGETLB_PAGE_SIZE_64K Signed-off-by: Jean-Luc Lger <jean-luc.leger@dspnet.fr.eu.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig index 648047a0bce3..43a66f5407f4 100644 --- a/arch/sparc64/Kconfig +++ b/arch/sparc64/Kconfig @@ -187,7 +187,7 @@ config HUGETLB_PAGE_SIZE_512K bool "512K" config HUGETLB_PAGE_SIZE_64K - depends on !SPARC64_PAGE_SIZE_4MB && !SPARC64_PAGE_SIZE_512KB &...
40daafc80b0f6a950c9252f9f1a242ab5cb6a648
Analyze and fix the following issue in the Linux kernel code: unaligned access in sk_run_filter()
Problem Details: This patch fixes unaligned access warnings noticed on IA64 in sk_run_filter(). 'ptr' can be unaligned. Signed-off-By: Dmitry Mishin <dim@openvz.org> Signed-off-By: Kirill Korotaev <dev@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/core/filter.c b/net/core/filter.c index 93fbd01d2259..5b4486a60cf6 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -34,6 +34,7 @@ #include <linux/timer.h> #include <asm/system.h> #include <asm/uaccess.h> +#include <asm/unaligned.h> #include <linux/filter.h> /* No hurry in this ...
e5d25a90886d62d88fdd7cd5c3375f4fe436be64
Analyze and fix the following issue in the Linux kernel code: [IPV6] XFRM: Fix decoding session with preceding extension header(s).
Problem Details: We did not correctly decode session with preceding extension header(s). This was because we had already pulled preceding headers, skb->nh.raw + 40 + 1 - skb->data was minus, and pskb_may_pull() failed. We now have IP6CB(skb)->nhoff and skb->h.raw, and we can start parsing / decoding upper layer proto...
```diff diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c index 588922bd9264..88c840f1beb6 100644 --- a/net/ipv6/xfrm6_policy.c +++ b/net/ipv6/xfrm6_policy.c @@ -191,10 +191,10 @@ error: static inline void _decode_session6(struct sk_buff *skb, struct flowi *fl) { - u16 offset = sizeof(struct ipv6hdr); +...
ef5cb9738b488140eb6c3f32fffab08f39a4905e
Analyze and fix the following issue in the Linux kernel code: [TCP]: Fix truesize underflow
Problem Details: There is a problem with the TSO packet trimming code. The cause of this lies in the tcp_fragment() function. When we allocate a fragment for a completely non-linear packet the truesize is calculated for a payload length of zero. This means that truesize could in fact be less than the real payload le...
```diff diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index b871db6adc55..44df1db726a3 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -551,7 +551,9 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss buff = sk_stream_alloc_skb(sk, nsize, GFP_ATOMIC); i...
9180053cacfec4aa233a6cabf1256960e75b0abd
Analyze and fix the following issue in the Linux kernel code: [CPUFREQ] powernow-k8.c: fix a check-after-use
Problem Details: This patch fixes a check-after-use introduced by commit 4211a30349e8d2b724cfb4ce2584604f5e59c299 and spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Dave Jones <davej@redhat.com>
```diff diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c index 30bb6fd5b2b2..71fffa174425 100644 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c @@ -905,14 +905,17 @@ static int powernowk8_target(struct cpufreq_policy ...
3aee086bd3ecce968283798ce4a73966c7ed44e3
Analyze and fix the following issue in the Linux kernel code: [CPUFREQ] Remove duplicate check in powernow-k8
Problem Details: Remove a duplicate NULL pointer check introduced by commit 4211a30349e8d2b724cfb4ce2584604f5e59c299 Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Signed-off-by: Dave Jones <davej@redhat.com>
```diff diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c index 7c0e160a2145..30bb6fd5b2b2 100644 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c @@ -1106,9 +1106,6 @@ static unsigned int powernowk8_get (unsigned int cp...
608c783aaa0abe39e3672f65b786cdade8db6df9
Analyze and fix the following issue in the Linux kernel code: [ARM] 3479/1: Corgi SSP: Fix potential concurrent access problem
Problem Details: Patch from Richard Purdie corgi_ssp_probe() should not access GPDR directly but should use pxa_gpio_mode() which has appropriate locking and other safeguards. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-pxa/corgi_ssp.c b/arch/arm/mach-pxa/corgi_ssp.c index b371d723635f..8a25a1c8019f 100644 --- a/arch/arm/mach-pxa/corgi_ssp.c +++ b/arch/arm/mach-pxa/corgi_ssp.c @@ -196,12 +196,9 @@ static int __init corgi_ssp_probe(struct platform_device *dev) int ret; /* Chip Select - Disable A...
7ea3bbbc8997df1ae7dc4e736d163dabc00f4721
Analyze and fix the following issue in the Linux kernel code: [ARM] 3478/1: SharpSL SCOOP: Fix potenial build failure
Problem Details: Patch from Richard Purdie Move platform_scoop_config from the SharpSL scoop PCMCIA driver to the SCOOP driver. This avoids build failures when PCMCIA is not built or is modular (scoop.c itself cannot be modular). Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Russell King <rmk+kerne...
```diff diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c index 5e830f444c6c..314ebd3a1d71 100644 --- a/arch/arm/common/scoop.c +++ b/arch/arm/common/scoop.c @@ -18,6 +18,18 @@ #include <asm/io.h> #include <asm/hardware/scoop.h> +/* PCMCIA to Scoop linkage + + There is no easy way to link multiple sc...
0a489cb3b6a7b277030cdbc97c2c65905db94536
Analyze and fix the following issue in the Linux kernel code: x86: don't allow tail-calls in sys_ftruncate[64]()
Problem Details: Gcc thinks it owns the incoming argument stack, but that's not true for "asmlinkage" functions, and it corrupts the caller-set-up argument stack when it pushes the third argument onto the stack. Which can result in %ebx getting corrupted in user space. Now, normally nobody sane would ever notice, sin...
```diff diff --git a/fs/open.c b/fs/open.c index c32c89d6d8db..8279c65d3bef 100644 --- a/fs/open.c +++ b/fs/open.c @@ -331,7 +331,9 @@ out: asmlinkage long sys_ftruncate(unsigned int fd, unsigned long length) { - return do_sys_ftruncate(fd, length, 1); + long ret = do_sys_ftruncate(fd, length, 1); + prevent_tail_ca...
1cb5821f444cadbe94453282f9f4767cf8744a8e
Analyze and fix the following issue in the Linux kernel code: e1000: fix mismerge skb_put.
Problem Details: Seems there was a bit of a fix needed to due a bad merge in the legacy receive path. Fixes a panic due to skb_over_panic. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
```diff diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 2b8bced0cf64..fb8cef619142 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -3585,8 +3585,7 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter, buffer_info->skb = skb; goto next_desc;...
dc86d32ab51c4ad3086472457fb90b61249d91f5
Analyze and fix the following issue in the Linux kernel code: e1000: fix mispatch for media type detect.
Problem Details: Recent patch was mismerged in the miitool path. e1000_media_type_copper was being compared with the phy type instead of the media type. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
```diff diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 82d443ba3612..2b8bced0cf64 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -4174,7 +4174,7 @@ e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) spin_unlock_irqrestore(&...
87cb23a48c208f31ab87c7a2aad37dbb355575f3
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386/x86-64: Fix ACPI disabled LAPIC handling mismerge
Problem Details: The patch I submitted earlier to fix disabled LAPIC handling in ACPI was mismerged for some reason I still don't quite understand. Parts of it was applied to the wrong function. This patch fixes it up. Cc: len.brown@intel.com Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torv...
```diff diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c index 030a0007a4e0..049a25583793 100644 --- a/arch/i386/kernel/acpi/boot.c +++ b/arch/i386/kernel/acpi/boot.c @@ -168,7 +168,7 @@ int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size) unsigned long i; int config_size;...
be3b075354e170368a0d29558cae492205e80a64
Analyze and fix the following issue in the Linux kernel code: [PATCH] cfq: Further rbtree traversal and cfq_exit_queue() race fix
Problem Details: In current code, we are re-reading cic->key after dead cic->key check. So, in theory, it may really re-read *after* cfq_exit_queue() seted NULL. To avoid race, we copy it to stack, then use it. With this change, I guess gcc will assign cic->key to a register or stack, and it wouldn't be re-readed. Si...
```diff diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 246feae16c60..2540dfaa3e38 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -1487,20 +1487,22 @@ cfq_cic_rb_lookup(struct cfq_data *cfqd, struct io_context *ioc) { struct rb_node *n; struct cfq_io_context *cic; - void *key = cfqd; + ...
f39224a8c1828bdd327539da72a53d8a13595838
Analyze and fix the following issue in the Linux kernel code: powerpc: Use correct sequence for putting CPU into nap mode
Problem Details: We weren't using the recommended sequence for putting the CPU into nap mode. When I changed the idle loop, for some reason 7447A cpus started hanging when we put them into nap mode. Changing to the recommended sequence fixes that. The complexity here is that the recommended sequence is a loop that k...
```diff diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 2cdc35ce8045..65f67f986156 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -366,6 +366,7 @@ config PPC_PMAC64 select U3_DART select MPIC_BROKEN_U3 select GENERIC_TBSYNC + select PPC_970_NAP default y config PPC_PREP @@ -38...
d253258c80117c2afaa644554e613201992e4ee9
Analyze and fix the following issue in the Linux kernel code: drm: Fix further issues in drivers/char/drm/via_irq.c
Problem Details: Fix de-reference of 'dev_priv' before NULL check. Signed-off-by: Jayachandran C. <c.jayachandran@gmail.com> Cc: Dave Airlie <airlied@linux.ie> Signed-off-by: Andrew Morton <akpm@osdl.org>
```diff diff --git a/drivers/char/drm/via_irq.c b/drivers/char/drm/via_irq.c index 1228fa55355b..c33d068cde19 100644 --- a/drivers/char/drm/via_irq.c +++ b/drivers/char/drm/via_irq.c @@ -196,7 +196,7 @@ via_driver_irq_wait(drm_device_t * dev, unsigned int irq, int force_sequence, { drm_via_private_t *dev_priv = (drm...
dbecf3ab40b5a6cc4499543778cd9f9682c0abad
Analyze and fix the following issue in the Linux kernel code: [PATCH 2/2] cfq: fix cic's rbtree traversal
Problem Details: When queue dies, we set cic->key=NULL as dead mark. So, when we traverse a rbtree, we must check whether it's still valid key. if it was invalidated, drop it, then restart the traversal from top. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Jens Axboe <axboe@suse.de>
```diff diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 01820b1094e9..246feae16c60 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -1472,15 +1472,31 @@ out: return cfqq; } +static void +cfq_drop_dead_cic(struct io_context *ioc, struct cfq_io_context *cic) +{ + read_lock(&cfq_exit_lock); ...
fba822722e3f9d438fca8fd9541d7ddd447d7a48
Analyze and fix the following issue in the Linux kernel code: [PATCH 1/2] iosched: fix typo and barrier()
Problem Details: On rmmod path, cfq/as waits to make sure all io-contexts was freed. However, it's using complete(), not wait_for_completion(). I think barrier() is not enough in here. To avoid the following case, this patch replaces barrier() with smb_wmb(). cpu0 visibility cpu1 [ioc_gnone=NULL...
```diff diff --git a/block/as-iosched.c b/block/as-iosched.c index 296708ceceb2..e25a5d79ab27 100644 --- a/block/as-iosched.c +++ b/block/as-iosched.c @@ -1844,9 +1844,10 @@ static void __exit as_exit(void) DECLARE_COMPLETION(all_gone); elv_unregister(&iosched_as); ioc_gone = &all_gone; - barrier(); + /* ioc_gone...
69cf0fac6052c5bd3fb3469a41d4216e926028f8
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix MADV_REMOVE protection checking
Problem Details: madvise_remove needs to respect file and mmap protections. Signed-off-by: Hugh Dickins <hugh@veritas.com> [ Will the real CVE-2006-1524 stand up, please.. ] Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/mm/madvise.c b/mm/madvise.c index af3d573b0141..4e196155a0c3 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -168,6 +168,9 @@ static long madvise_remove(struct vm_area_struct *vma, return -EINVAL; } + if ((vma->vm_flags & (VM_SHARED|VM_WRITE)) != (VM_SHARED|VM_WRITE)) + return -EACCES; + ...
d2c962b8530b84f4e035df8ade7e35f353a57cbe
Analyze and fix the following issue in the Linux kernel code: [IPV4]: ip_route_input panic fix
Problem Details: This fixes http://bugzilla.kernel.org/show_bug.cgi?id=6388 The bug is caused by ip_route_input dereferencing skb->nh.protocol of the dummy skb passed dow from inet_rtm_getroute (Thanks Thomas for seeing it). It only happens if the route requested is for a multicast IP address. Signed-off-by: Stephen H...
```diff diff --git a/net/ipv4/route.c b/net/ipv4/route.c index ff434821909f..cc9423de7311 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -2741,7 +2741,10 @@ int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void *arg) /* Reserve room for dummy headers, this skb can pass through good ch...
b78b6af66a5fbaf17d7e6bfc32384df5e34408c8
Analyze and fix the following issue in the Linux kernel code: [PATCH] shmat: stop mprotect from giving write permission to a readonly attachment (CVE-2006-1524)
Problem Details: I found that all of 2.4 and 2.6 have been letting mprotect give write permission to a readonly attachment of shared memory, whether or not IPC would give the caller that permission. SUS says "The behaviour of this function [mprotect] is unspecified if the mapping was not established by a call to mmap"...
```diff diff --git a/ipc/shm.c b/ipc/shm.c index 6b0c9af5bbf7..1c2faf62bc73 100644 --- a/ipc/shm.c +++ b/ipc/shm.c @@ -162,6 +162,8 @@ static int shm_mmap(struct file * file, struct vm_area_struct * vma) ret = shmem_mmap(file, vma); if (ret == 0) { vma->vm_ops = &shm_vm_ops; + if (!(vma->vm_flags & VM_WRITE)) +...
ca1e0484d9fe8a9048ac32b0f9894545f43704e8
Analyze and fix the following issue in the Linux kernel code: [PATCH] cciss: bug fix for crash when running hpacucli
Problem Details: Fix a crash when running hpacucli with multiple logical volumes on a cciss controller. We were not properly initializing the disk->queue and causing a fault. Thanks to Hasso Tepper for reporting the problem. Thanks to Steve Cameron for root causing the problem. Most of the patch just moves things a...
```diff diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 1b0fd31c57c3..1319d8f20640 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -1180,6 +1180,53 @@ static int revalidate_allvol(ctlr_info_t *host) return 0; } +static inline void complete_buffers(struct bio *bio, int stat...
75616cf9854b83eb83a968b1338ae0ee11c9673c
Analyze and fix the following issue in the Linux kernel code: [PATCH] ext3: Fix missed mutex unlock
Problem Details: Missed unlock_super()call is added in error condition code path. Signed-off-by: Leonid Ananiev <leonid.i.ananiev@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/fs/ext3/resize.c b/fs/ext3/resize.c index 14f5f6ea3e72..c5ffa8523968 100644 --- a/fs/ext3/resize.c +++ b/fs/ext3/resize.c @@ -767,6 +767,7 @@ int ext3_group_add(struct super_block *sb, struct ext3_new_group_data *input) if (input->group != sbi->s_groups_count) { ext3_warning(sb, __FUNCTION__, ...
2436f039d26a91e5404974ee0cb789b17db46168
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix block device symlink name
Problem Details: As noted further on the this file, some block devices have a / in their name, so fix the "block:..." symlink name the same as the /sys/block name. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morto...
```diff diff --git a/fs/partitions/check.c b/fs/partitions/check.c index f3b6af071722..45ae7dd3c650 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c @@ -372,6 +372,7 @@ static char *make_block_name(struct gendisk *disk) char *name; static char *block_str = "block:"; int size; + char *s; size = s...
d96fb997c6174f98a2a0a98200f99ac13b053bd6
Analyze and fix the following issue in the Linux kernel code: [JFFS2] Fix race in post-mount node checking
Problem Details: For a while now, we've postponed CRC-checking of data nodes to be done by the GC thread, instead of being done while the user is waiting for mount to finish. The GC thread would iterate through all the inodes on the system and check each of their data nodes. It would skip over inodes which had already ...
```diff diff --git a/fs/jffs2/gc.c b/fs/jffs2/gc.c index f9ffece453a3..967fb2cf8e21 100644 --- a/fs/jffs2/gc.c +++ b/fs/jffs2/gc.c @@ -181,6 +181,10 @@ int jffs2_garbage_collect_pass(struct jffs2_sb_info *c) and trigger the BUG() above while we haven't yet finished checking all its nodes */ D1(printk(...
c5f2e6404c65e8380c9ba80a7d58a27d2642743b
Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_scan.c: fix compile warnings
Problem Details: drivers/scsi/scsi_scan.c: In function `scsi_probe_and_add_lun': drivers/scsi/scsi_scan.c:926: warning: unused variable `vend' drivers/scsi/scsi_scan.c:926: warning: unused variable `mod' drivers/scsi/scsi_scan.c: At top level: drivers/scsi/scsi_scan.c:829: warning: `scsi_inq_str' defined but not used ...
```diff diff --git a/drivers/scsi/scsi_logging.h b/drivers/scsi/scsi_logging.h index e1722ba94586..a3e2af6a846c 100644 --- a/drivers/scsi/scsi_logging.h +++ b/drivers/scsi/scsi_logging.h @@ -45,10 +45,12 @@ extern unsigned int scsi_logging_level; ((scsi_logging_level >> (SHIFT)) & ((1 << (BITS)) - 1)) #defi...
3d41e30aa3dde76c81ecbbf0e3a25392fcd90469
Analyze and fix the following issue in the Linux kernel code: e1000: Version bump, contact fix, year string change
Problem Details: Add the sourceforge project mailinglist to the contact information. Bump version to 7.0.38-k2 Update copyright string with the new year. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com>
```diff diff --git a/drivers/net/e1000/Makefile b/drivers/net/e1000/Makefile index ca9f89552da3..92823ac89d42 100644 --- a/drivers/net/e1000/Makefile +++ b/drivers/net/e1000/Makefile @@ -22,6 +22,7 @@ # # Contact Information: # Linux NICS <linux.nics@intel.com> +# e1000-devel Mailing List <e1000-devel@lists.sourcef...
9e2feace1acd38d7a3b1275f7f9f8a397d09040e
Analyze and fix the following issue in the Linux kernel code: e1000: Buffer optimizations for small MTU
Problem Details: Remove multi-descriptor support from legacy recieve path Add memory usage efficiency by using more correct size descriptors for small MTU sizes and optimize using LPE for <= 1522 byte frame sizes An extra performance fix that effected our TCP window size growth as a receiver. Set our initial buffer ...
```diff diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h index 764808f3702e..2dfabdb29e7b 100644 --- a/drivers/net/e1000/e1000.h +++ b/drivers/net/e1000/e1000.h @@ -114,6 +114,8 @@ struct e1000_adapter; /* Supported Rx Buffer Sizes */ #define E1000_RXBUFFER_128 128 /* Used for packet split */ ...
4cc15f54991caf1572e03ffc65d9986e433007e2
Analyze and fix the following issue in the Linux kernel code: e1000: Esb2 wol link cycle bug and uninitialized registers
Problem Details: Esb2 link didn't return after wol disable. The code previously assumed that writing reset to PHY_CTRL phy register turned the phy back on. In the ESB2 phy case that didn't occur. Add ESB2 to acquire/release_hw functions upon review it was discovered that esb2 was skipped on these functions Signed-of...
```diff diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index ac1e8387416b..8de9f9affae4 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -359,6 +359,7 @@ e1000_release_hw_control(struct e1000_adapter *adapter) switch (adapter->hw.mac_type) { case e100...
d0e027db7861ef03de0ac08494a9a61984d8f8b0
Analyze and fix the following issue in the Linux kernel code: e1000: Remove PM warning DPRINTKs breaking 2.4.x kernels
Problem Details: remove DPRINTKs that were printing warnings about power management on 2.4 kernels. Since we really don't react differently these printk statements are not needed. This code was originally added to fix some compile time warnings that got fixed by newer kernels. Signed-off-by: Jesse Brandeburg <jesse...
```diff diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index add8dc4aa7b0..ac1e8387416b 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -4515,21 +4515,13 @@ e1000_suspend(struct pci_dev *pdev, pm_message_t state) E1000_WRITE_REG(&adapter->hw, WUC, E...
2c5362007bc0a46461a9d94958cdd53bb027004c
Analyze and fix the following issue in the Linux kernel code: Fix AT91RM9200 build breakage
Problem Details: The at91_cf driver got out of sync with certain changes in the PCMCIA layer, notably getting rid of some duplication of data ... causing the version merged to kernel.org to fail compiling. This patch gives the at91_cf platform device a new iomem resource, using it so this new pcmcia scheme works. It ...
```diff diff --git a/arch/arm/mach-at91rm9200/devices.c b/arch/arm/mach-at91rm9200/devices.c index 1781b8f342c4..bfe47bd6e50c 100644 --- a/arch/arm/mach-at91rm9200/devices.c +++ b/arch/arm/mach-at91rm9200/devices.c @@ -194,13 +194,23 @@ void __init at91_add_device_eth(struct at91_eth_data *data) {} #if defined(CONFIG_...
3d9dd7564d5d7c28eb87b14c13a23806484667f3
Analyze and fix the following issue in the Linux kernel code: [PATCH] ip_output: account for fraggap when checking to add trailer_len
Problem Details: During other work I noticed that ip_append_data() seemed to be forgetting to include the frag gap in its calculation of a fragment that consumes the rest of the payload. Herbert confirmed that this was a bug that snuck in during a previous rework. Signed-off-by: Zach Brown <zach.brown@oracle.com> Sig...
```diff diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 8dcba3887f04..cff9c3a72daf 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -904,7 +904,7 @@ alloc_new_skb: * because we have no idea what fragment will be * the last. */ - if (datalen == length) + if (datalen == le...
269690ac164fc0a7c2de03e7e0d2f554104d1516
Analyze and fix the following issue in the Linux kernel code: [IRDA]: irda-usb, unregister netdev when patch upload fails
Problem Details: In the STIR421x case, when the firmware upload fails, we need to unregister_netdev. Otherwise we hit a BUG on free_netdev(), if sysfs is enabled. Signed-off-by: Samuel Ortiz <samuel.ortiz@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c index 606243d11793..96bdb73c2283 100644 --- a/drivers/net/irda/irda-usb.c +++ b/drivers/net/irda/irda-usb.c @@ -1815,14 +1815,14 @@ static int irda_usb_probe(struct usb_interface *intf, self->needspatch = (ret < 0); if (ret < 0) { ...
e49e76db031fdfaadb4907a319ea3a1dc9d2925f
Analyze and fix the following issue in the Linux kernel code: [ATM] clip: run through Lindent
Problem Details: Run CLIP driver through Lindent script to fix formatting. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/atm/clip.c b/net/atm/clip.c index b1f12f6c5fd6..00dddba67c81 100644 --- a/net/atm/clip.c +++ b/net/atm/clip.c @@ -2,7 +2,6 @@ /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */ - #include <linux/config.h> #include <linux/string.h> #include <linux/errno.h> @@ -55,21 +54,23 @@ st...
5ecdd0f67c624714ccd5358e1cc88324f86f0e10
Analyze and fix the following issue in the Linux kernel code: kbuild: fix false section mismatch warnings
Problem Details: Darren Jenkins <darrenrjenkins@gmail.com> pointed out a number of false positives where we referenced variables from a _driver variable. Fix it by check for that pattern and ignore it. Randy.Dunlap <rdunlap@xenotime.net> pointed out a similar set of warnings for a number of scsi drivers. In scsi world...
```diff diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 7e8079a34adf..cd00e9f07589 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -492,17 +492,19 @@ static int strrcmp(const char *s, const char *sub) * These functions may often be marked __init and we do not want to * warn he...
f3a0592b37b83e56a7f47826f552b35a2c3b2fc9
Analyze and fix the following issue in the Linux kernel code: [ATM]: clip causes unregister hang
Problem Details: If Classical IP over ATM module is loaded, its neighbor table gets populated when permanent neighbor entries are created; but these entries are not flushed when the device is removed. Since the entry never gets flushed the unregister of the network device never completes. This version of the patch als...
```diff diff --git a/net/atm/clip.c b/net/atm/clip.c index 3ab4e7947bab..5841c30384a4 100644 --- a/net/atm/clip.c +++ b/net/atm/clip.c @@ -613,12 +613,19 @@ static int clip_create(int number) static int clip_device_event(struct notifier_block *this,unsigned long event, - void *dev) + void *arg) { + stru...
2717096ab41eacdbf07352dca6826b59470eb39a
Analyze and fix the following issue in the Linux kernel code: [XFRM]: Fix aevent timer.
Problem Details: Send aevent immediately if we have sent nothing since last timer and this is the first packet. Fixes a corner case when packet threshold is very high, the timer low and a very low packet rate input which is bursty. Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <dave...
```diff diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 0d5529c382e8..afa508d92c93 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -143,6 +143,11 @@ struct xfrm_state /* Replay detection state at the time we sent the last notification */ struct xfrm_replay_state preplay; + /* internal flag ...
cdb8c2a6d848deb9eeefffff42974478fbb51b8c
Analyze and fix the following issue in the Linux kernel code: [SCSI] dc395x: dynamically map scatter-gather for PIO
Problem Details: The current dc395x driver uses PIO to transfer up to 4 bytes which do not get transferred by DMA (under unclear circumstances). For this the driver uses page_address() which is broken on highmem. Apart from this the actual calculation of the virtual address is wrong (even without highmem). So, e.g., fo...
```diff diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index cbf825263f3b..0c56095f8140 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c @@ -230,13 +230,12 @@ struct ScsiReqBlk { struct scsi_cmnd *cmd; struct SGentry *segment_x; /* Linear array of hw sg entries (up to 64 entries) */ - u3...
e778272dd547d53dedf92240e8b3dbdee44b87b6
Analyze and fix the following issue in the Linux kernel code: [PATCH] PCI: fix sparse warning about pci_bus_flags
Problem Details: Sparse warns about casting to a __bitwise type. However, it's correct to do when defining the enum for pci_bus_flags_t, so add a __force to quiet the warnings. This will fix getting include/linux/pci.h:100:26: warning: cast to restricted type from sparse all over the build. Signed-off-by: Rola...
```diff diff --git a/include/linux/pci.h b/include/linux/pci.h index 15e1675edef9..3a6a4e37a482 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -97,7 +97,7 @@ enum pci_channel_state { typedef unsigned short __bitwise pci_bus_flags_t; enum pci_bus_flags { - PCI_BUS_FLAGS_NO_MSI = (pci_bus_flags_t) 1, +...
13f7e5acc8b329080672c13f05f252ace5b79825
Analyze and fix the following issue in the Linux kernel code: [SCSI] BLIST_ATTACH_PQ3 flags
Problem Details: Some devices report a peripheral qualifier of 3 for LUN 0; with the original code, we would still try a REPORT_LUNS scan (if SCSI level is >= 3 or if we have the BLIST_REPORTLUNS2 passed in), but NOT any sequential scan. Also, the device at LUN 0 (which is not connected according to the PQ) is not regi...
```diff diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c index 84c3937ae8fb..6f46b338c991 100644 --- a/drivers/scsi/scsi_devinfo.c +++ b/drivers/scsi/scsi_devinfo.c @@ -155,6 +155,8 @@ static struct { {"HITACHI", "DF400", "*", BLIST_SPARSELUN}, {"HITACHI", "DF500", "*", BLIST_SPARSELUN}, {"H...
6c7154c97e20c0ea28547240dc86731c0cee1b2f
Analyze and fix the following issue in the Linux kernel code: [SCSI] Better log messages for PQ3 devs
Problem Details: Some devices report a peripheral qualifier of 3 for LUN 0; with the original code, we would still try a REPORT_LUNS scan (if SCSI level is >= 3 or if we have the BLIST_REPORTLUNS2 passed in), but NOT any sequential scan. Also, the device at LUN 0 (which is not connected according to the PQ) is not regi...
```diff diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 820c4ad7b581..5603dc6eca47 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -808,6 +808,29 @@ static inline void scsi_destroy_sdev(struct scsi_device *sdev) put_device(&sdev->sdev_gendev); } +/** + * scsi_inq_str...
4186ab1973758190916703eb8889ebe8002c5c8f
Analyze and fix the following issue in the Linux kernel code: [SCSI] Try LUN 1 and use bflags
Problem Details: Some devices report a peripheral qualifier of 3 for LUN 0; with the original code, we would still try a REPORT_LUNS scan (if SCSI level is >= 3 or if we have the BLIST_REPORTLUNS2 passed in), but NOT any sequential scan. Also, the device at LUN 0 (which is not connected according to the PQ) is not regi...
```diff diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index f14945996ede..820c4ad7b581 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -872,6 +872,8 @@ static int scsi_probe_and_add_lun(struct scsi_target *starget, if (scsi_probe_lun(sdev, result, result_len, &bflags)) go...
a14388904ca67197c9a531dba2358d8131697865
Analyze and fix the following issue in the Linux kernel code: [PATCH] driver core: fix unnecessary NULL check in drivers/base/class.c
Problem Details: This patch tries to fix an issue in drivers/base/class.c, please review and apply if correct. Patch Description: "parent_class" is checked for NULL already, so removed the unnecessary check. Signed-off-by: Jayachandran C. <c.jayachandran@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.d...
```diff diff --git a/drivers/base/class.c b/drivers/base/class.c index df7fdabd0730..0e71dff327cd 100644 --- a/drivers/base/class.c +++ b/drivers/base/class.c @@ -562,14 +562,13 @@ int class_device_add(struct class_device *class_dev) kobject_uevent(&class_dev->kobj, KOBJ_ADD); /* notify any interfaces this device...
bfb25849f00d0b8453191ee12125738b5f5c9146
Analyze and fix the following issue in the Linux kernel code: [PATCH] hid-core.c: fix "input irq status -32 received" for Silvercrest USB Keyboard
Problem Details: When not using this patch, the kernel will continuously return "input irq status -32 received", while making the keyboard unusable. This can be easely resolved using HID_QUIRK_NOGET. Vendor-ID and Device-ID should be applied to hid-core.c, and making an entry to make use of it. Signed-off-by: Jeffre...
```diff diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c index f2225d1ddb0d..f419bd82ab7f 100644 --- a/drivers/usb/input/hid-core.c +++ b/drivers/usb/input/hid-core.c @@ -1374,6 +1374,9 @@ void hid_close(struct hid_device *hid) #define USB_VENDOR_ID_PANJIT 0x134c +#define USB_VENDOR_ID_SIL...
8e32640672bdcb01e0d83f087f09dd65fcbc3275
Analyze and fix the following issue in the Linux kernel code: [PATCH] USB: UHCI: don't track suspended ports
Problem Details: Someone recently posted a bug report where it turned out that uhci-hcd was disagreeing with the UHCI controller over whether or not a port was suspended: The driver thought it wasn't and the hardware thought it was. This patch (as665) fixes the problem and simplifies the driver by removing the internal...
```diff diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c index 3d511690c9b7..c0c4db78b590 100644 --- a/drivers/usb/host/uhci-hcd.c +++ b/drivers/usb/host/uhci-hcd.c @@ -115,8 +115,7 @@ static void finish_reset(struct uhci_hcd *uhci) for (port = 0; port < uhci->rh_numports; ++port) outw(0, uhc...
01e89506351b84ac6f39eb70f99c71483768ca60
Analyze and fix the following issue in the Linux kernel code: [PATCH] USB: keyspan-remote bugfix
Problem Details: Signed-off-by: Michael Downey <downey@zymeta.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/input/keyspan_remote.c b/drivers/usb/input/keyspan_remote.c index b4a051b549d1..3d911976f378 100644 --- a/drivers/usb/input/keyspan_remote.c +++ b/drivers/usb/input/keyspan_remote.c @@ -297,6 +297,8 @@ static void keyspan_check_data(struct usb_keyspan *remote, struct pt_regs *regs) ...
e1394b49ee70bd8686acaf969e4d61b57da1c263
Analyze and fix the following issue in the Linux kernel code: [PATCH] USB: g_ether, highspeed conformance fix
Problem Details: Be sure to record the peripheral's ep0 maxpacket size BEFORE using that to initialize the (high speed) device qualifier; that helps a lot with USBCV testing. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index c3d8e5c5bf28..9c4422ac9de4 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c @@ -2338,6 +2338,9 @@ autoconf_fail: hs_subset_descriptors(); } + device_desc.bMaxPacketSize0 = gadget->ep0->maxpacket; + usb_gadg...
68ba61b89c10b3412c7ee05cd649303ba5a588d1
Analyze and fix the following issue in the Linux kernel code: [PATCH] USB: at91 usb driver supend/resume fixes
Problem Details: AT91: the two USB drivers (OHCI, UDC) got out of sync with various usbcore and driver model PM updates; fix. Also minor fixes to ohci: whitespace/style, MODULE_ALIAS so coldplug works using /sys/.../modalias, and turn off _both_ clocks during suspend. Signed-off-by: David Brownell <dbrownell@users.s...
```diff diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c index 865858cfd1c2..b8d0b7825bf3 100644 --- a/drivers/usb/gadget/at91_udc.c +++ b/drivers/usb/gadget/at91_udc.c @@ -1709,7 +1709,7 @@ static int __devexit at91udc_remove(struct platform_device *dev) } #ifdef CONFIG_PM -static int at9...
984163338a24198863116ccf3e7762fd1fc3c663
Analyze and fix the following issue in the Linux kernel code: [PATCH] USB: gadgetfs highspeed bugfix
Problem Details: This catches up to a change in the Kconfig support for highspeed modes; the change predated 2.6.10, and anyone using gadgetfs on a highspeed device would see the kernel wrongly reject the alternate descriptors. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-H...
```diff diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c index 3f618ce6998d..42b457030b03 100644 --- a/drivers/usb/gadget/inode.c +++ b/drivers/usb/gadget/inode.c @@ -810,7 +810,7 @@ ep_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr) if (value == 0) data->state = STA...
51400f1d6ef7ca871b584117527f7c6b12bf182b
Analyze and fix the following issue in the Linux kernel code: [PATCH] USB: rndis_host whitespace/comment updates
Problem Details: This adds a "avoid proprietary protocols" warnoff, identifying several of the known deficiencies in Microsoft's excuse-for-specification, and fixes some whitespace bugs. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/net/rndis_host.c b/drivers/usb/net/rndis_host.c index 49991ac1bf3b..94ddfe16fdda 100644 --- a/drivers/usb/net/rndis_host.c +++ b/drivers/usb/net/rndis_host.c @@ -39,6 +39,20 @@ * RNDIS is NDIS remoted over USB. It's a MSFT variant of CDC ACM ... of * course ACM was intended for mod...
68dcc688d1f042842a8fb523e4a584b3211181d1
Analyze and fix the following issue in the Linux kernel code: [PATCH] USB: net2280 short rx status fix
Problem Details: Some patch broke short-OUT packet handling for net2280, making it report illegal status values. This updates the status code so it's correct. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c index 7682c07035bd..6a4b93ad1082 100644 --- a/drivers/usb/gadget/net2280.c +++ b/drivers/usb/gadget/net2280.c @@ -2241,7 +2241,8 @@ static void handle_ep_small (struct net2280_ep *ep) if (likely (req)) { req->td->dmacount = 0; ...
42795410c325108d59d0b1e750657197a7374c04
Analyze and fix the following issue in the Linux kernel code: [PATCH] USB: fix gadget_is_musbhdrc()
Problem Details: I submitted the wrong version of the patch teaching about the driver for Mentor's Highspeed Dual Role Controller (HDRC), whoops! This uses the right name for that driver. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_chips.h index c4081407171f..aa80f0910720 100644 --- a/drivers/usb/gadget/gadget_chips.h +++ b/drivers/usb/gadget/gadget_chips.h @@ -100,9 +100,9 @@ #define gadget_is_musbhsfc(g) 0 #endif -/* Mentor high speed "dual role" controller, ...
4d45e21867bee51e3bb42e95bc2929231d7c8192
Analyze and fix the following issue in the Linux kernel code: [PATCH] USB: UEAGLE : memory leack fix
Problem Details: this patch fix leak of memory allocated to intr if allocation of sc->urb_int fails. Found by the Coverity checker. Signed-off-by: Duncan Sands <baldrick@free.fr> Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c index 047fb4ea2fa6..b38990adf1cd 100644 --- a/drivers/usb/atm/ueagle-atm.c +++ b/drivers/usb/atm/ueagle-atm.c @@ -1376,7 +1376,7 @@ static int uea_boot(struct uea_softc *sc) if (ret < 0) { uea_err(INS_TO_USBDEV(sc), "urb sub...
584958c3d2985396bdb6f96ae632971b43f6f984
Analyze and fix the following issue in the Linux kernel code: [PATCH] USB: UEAGLE : null pointer dereference fix
Problem Details: this patch fix potential null pointer dereference. Found by the Coverity checker. Signed-off-by: Duncan Sands <baldrick@free.fr> Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c index 602be5488c9d..047fb4ea2fa6 100644 --- a/drivers/usb/atm/ueagle-atm.c +++ b/drivers/usb/atm/ueagle-atm.c @@ -1673,7 +1673,7 @@ static int uea_bind(struct usbatm_data *usbatm, struct usb_interface *intf, sc = kzalloc(sizeof(struct ...
2a99b50719d3bff0a090fa8daf56d519c338296c
Analyze and fix the following issue in the Linux kernel code: [PATCH] USB: UEAGLE : cosmetic
Problem Details: - improve debug trace in order to make easy to solve user problems. - indent some code - increase version number Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c index 830d2c982670..8ec9e031e0d1 100644 --- a/drivers/usb/atm/ueagle-atm.c +++ b/drivers/usb/atm/ueagle-atm.c @@ -68,7 +68,7 @@ #include "usbatm.h" -#define EAGLEUSBVERSION "ueagle 1.2" +#define EAGLEUSBVERSION "ueagle 1.3" /* @@...
016534cffc5847e2a75b25d10f8c52edec6c8cb7
Analyze and fix the following issue in the Linux kernel code: [PATCH] USB: pegasus driver bugfix
Problem Details: Attached is a patch that fixes nasty bug, which i am afraid was there for a long time. It was spotted by Andre Draszik <kernel@andred.net>. From: Petko Manolov <petkan@nucleusys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/net/pegasus.c b/drivers/usb/net/pegasus.c index 5b6675684567..2deb4c01539e 100644 --- a/drivers/usb/net/pegasus.c +++ b/drivers/usb/net/pegasus.c @@ -262,7 +262,7 @@ static int set_register(pegasus_t * pegasus, __u16 indx, __u8 data) usb_fill_control_urb(pegasus->ctrl_urb, pegasus->us...
7d3fe085f9cdd3d3eea0154ea02e2f6b4a8f3974
Analyze and fix the following issue in the Linux kernel code: [PATCH] USB: wacom tablet driver update
Problem Details: This patch adds support for DTF 521, Intuos3 12x12, and 12x19; fixes minor data report bugs. Signed-off-by: Ping Cheng <pingc@wacom.com> Acked-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/input/wacom.c b/drivers/usb/input/wacom.c index d3e15df9e815..cf84c6096f29 100644 --- a/drivers/usb/input/wacom.c +++ b/drivers/usb/input/wacom.c @@ -9,7 +9,7 @@ * Copyright (c) 2000 Daniel Egger <egger@suse.de> * Copyright (c) 2001 Frederic Lepied <flepied@mandrakesoft.com> *...
f096e0434c717d7a2aa1614e0be0d1b7c64bec29
Analyze and fix the following issue in the Linux kernel code: [PATCH] USB: cleanups for ohci-s3c2410.c
Problem Details: Fix compile errors due to functions not being defined static Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/host/ohci-s3c2410.c b/drivers/usb/host/ohci-s3c2410.c index 682bf2215660..b27669fe9f0f 100644 --- a/drivers/usb/host/ohci-s3c2410.c +++ b/drivers/usb/host/ohci-s3c2410.c @@ -37,7 +37,7 @@ static void s3c2410_hcd_oc(struct s3c2410_hcd_info *info, int port_oc); /* conversion functions ...
f043ca43c1ae354346f72dc5826d820d5619f0b2
Analyze and fix the following issue in the Linux kernel code: [PATCH] Enhancing accessibility of lxdialog
Problem Details: For easily getting fairly good accessibility, the TTY cursor should always be left at the focus location. This patch fixes the checklist by just having the list refreshed after the dialog box (hence the cursor position remains in the list). Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org...
```diff diff --git a/scripts/kconfig/lxdialog/checklist.c b/scripts/kconfig/lxdialog/checklist.c index db07ae73e051..be0200e9cdaf 100644 --- a/scripts/kconfig/lxdialog/checklist.c +++ b/scripts/kconfig/lxdialog/checklist.c @@ -196,8 +196,8 @@ int dialog_checklist(const char *title, const char *prompt, int height, p...
e57a5059846e55d82b86d96dde40e988598601b3
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix non-leader exec under ptrace
Problem Details: This reverts most of commit 30e0fca6c1d7d26f3f2daa4dd2b12c51dadc778a. It broke the case of non-leader MT exec when ptraced. I think the bug it was intended to fix was already addressed by commit 788e05a67c343fa22f2ae1d3ca264e7f15c25eaf. Signed-off-by: Roland McGrath <roland@redhat.com> Acked-by: Oleg ...
```diff diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 0eeb7e66722c..4e0f0ec003f7 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c @@ -56,10 +56,6 @@ void ptrace_untrace(task_t *child) signal_wake_up(child, 1); } } - if (child->signal->flags & SIGNAL_GROUP_EXIT) { - sigaddset(&child->pending.signal, S...
3c0c25b97c7d020ef07f6366cf1d668a8e980c7c
Analyze and fix the following issue in the Linux kernel code: [SCSI] mptfusion - fix panic in mptsas_slave_configure
Problem Details: Driver panic when RAID logical volume was present when driver loaded, or when a RAID logical volume was created on the fly. This issue was created in due to recent scsi_transport_sas change, when sas_read_port_mode_page was added into the mptsas drivers slave_config entry point. This new API expects ...
```diff diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index 010d4a39269b..e9716b10acea 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c @@ -366,7 +366,15 @@ mptsas_sas_enclosure_pg0(MPT_ADAPTER *ioc, struct mptsas_enclosure *enclosure, static int mpts...
20ac94378de59d61dc39f10ed5530485e4ac8c07
Analyze and fix the following issue in the Linux kernel code: [PATCH] do_SAK: Don't recursively take the tasklist_lock
Problem Details: By calling send_sig do_SAK is recursively taking the tasklist_lock, which is silly. In addition I just audited the kernel and this was the only place where tasklist_lock is taken inside of task_lock. So this one line change is a general worthwhile cleanup and it increases our options on how to fix th...
```diff diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index f70a47eadb52..841f0bd3eaaf 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -2734,7 +2734,7 @@ static void __do_SAK(void *arg) printk(KERN_NOTICE "SAK: killed process %d" " (%s): fd#%d opened to the tty\n", ...
e36e0c80137af8f012528938dab2970c26d5ec4c
Analyze and fix the following issue in the Linux kernel code: [SCSI] SCSI: fix scsi_kill_request() busy count handling
Problem Details: scsi_kill_request() completes requests via normal SCSI completion path which decrements busy counts; however, requests which get passed to scsi_kill_request() aren't holding busy counts and scsi_kill_request() don't increment them before invoking completion path resulting in incorrect busy counts. Bum...
```diff diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 8f010a314a3d..7b0f9a3810d2 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1479,6 +1479,8 @@ static inline int scsi_host_queue_ready(struct request_queue *q, static void scsi_kill_request(struct request *req, request_qu...
aedf349773e5877d716a89368d512b9baa3e8c7b
Analyze and fix the following issue in the Linux kernel code: [SCSI] FC transport: fixes for workq deadlocks
Problem Details: As previously reported via Michael Reed, the FC transport took a hit in 2.6.15 (perhaps a little earlier) when we solved a recursion error. There are 2 deadlocks occurring: - With scan and the delete items sharing the same workq, flushing the workq for the delete code was getting it stalled behind a ...
```diff diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index 8db656214b5c..95c5478dcdfd 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/scsi_transport_fc.c @@ -34,6 +34,8 @@ #include <scsi/scsi_cmnd.h> #include "scsi_priv.h" +static int fc_queue_work(struct Scsi_Ho...
b0d2364887e94c880680f1e17943cd660bcf8979
Analyze and fix the following issue in the Linux kernel code: [SCSI] aic79xx: target hotplug fixes
Problem Details: When a target is added aic79xx tries to be overly clever: it changes the command on the fly to TEST UNIT READY and tries to requeue the original command. Sadly this breaks SCSI compability and of course the midlayer is getting a bit confused by it. So we're just removing that bit of code and let the m...
```diff diff --git a/drivers/scsi/aic7xxx/aic79xx.h b/drivers/scsi/aic7xxx/aic79xx.h index 933e5101edf6..bb5166da4358 100644 --- a/drivers/scsi/aic7xxx/aic79xx.h +++ b/drivers/scsi/aic7xxx/aic79xx.h @@ -589,7 +589,7 @@ typedef enum { SCB_PACKETIZED = 0x00800, SCB_EXPECT_PPR_BUSFREE = 0x01000, SCB_PKT_SENSE = 0x...
f41b5cec9bd6fec1b11b74500f5fb9c3e6e808b2
Analyze and fix the following issue in the Linux kernel code: [SCSI] aic79xx bus reset update
Problem Details: As James B. correctly noted, ahd_reset_channel() in ahd_linux_bus_reset() should be protected by ahd_lock(). However, the main reason for not doing so was a deadlock with the interesting polling mechanism to detect the end a bus reset. This patch replaces the polling mechanism with a saner signalling...
```diff diff --git a/drivers/scsi/aic7xxx/aic79xx.h b/drivers/scsi/aic7xxx/aic79xx.h index 1d11f7e77564..933e5101edf6 100644 --- a/drivers/scsi/aic7xxx/aic79xx.h +++ b/drivers/scsi/aic7xxx/aic79xx.h @@ -372,7 +372,7 @@ typedef enum { AHD_CURRENT_SENSING = 0x40000, AHD_SCB_CONFIG_USED = 0x80000,/* No SEEPROM but...
183b73ae7c9e4e19fa95d88e1778481899a65210
Analyze and fix the following issue in the Linux kernel code: [PATCH] spufs: fix context-switch decrementer code
Problem Details: We found that when the 'decrementer' is saved, the PPE saves the current time 'csa->suspend_time'. When restoring the 'decrementer', (Step 34) decrementer seems to be adjusted with the number of cycles th= at a spu thread has not been running. In that code it is missing a substract ('-') because 'delt...
```diff diff --git a/arch/powerpc/platforms/cell/spufs/switch.c b/arch/powerpc/platforms/cell/spufs/switch.c index 97898d5d34e5..1726bfe38ee0 100644 --- a/arch/powerpc/platforms/cell/spufs/switch.c +++ b/arch/powerpc/platforms/cell/spufs/switch.c @@ -1297,7 +1297,7 @@ static inline void setup_decr(struct spu_state *csa...
b055a9e10fd05c7fdd87904a50c1f413aea10ec4
Analyze and fix the following issue in the Linux kernel code: [PATCH] powerpc/pseries: bugfix: balance calls to pci_device_put
Problem Details: Repeated calls to eeh_remove_device() can result in multiple (and thus unbalanced) calls to pci_dev_put(). Make sure the pci_device_put() is called only once (since there was only one call to the matching pci_device_get()). Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Paul Macker...
```diff diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index 780fb27a0099..32eaddfa5470 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c @@ -957,8 +957,10 @@ static void eeh_remove_device(struct pci_dev *dev) pci_addr_cache_remove_d...
6f806ceed53776ae5e04c8b334dc9daa0932ad1e
Analyze and fix the following issue in the Linux kernel code: [PATCH] powerpc: Fix machine detection in prom_init.c
Problem Details: In e8222502ee6157e2713da9e0792c21f4ad458d50 the detection of machine types in prom_init broke for some machines. We should be checking /device_type instead of /model. This should make Power3 and Power4 boot again. Haven't been able to test this. We also need to relocate before comparing. Signed-off-b...
```diff diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index d66c5e77fcff..7e4d54821a07 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c @@ -1528,12 +1528,11 @@ static int __init prom_find_machine_type(void) * non-IBM designs ! * - it has /rtas...
132058f78a1bc8cce2c5a40245365938d51832fe
Analyze and fix the following issue in the Linux kernel code: [PATCH] ppc32: Fix string comparing in platform_notify_map
Problem Details: Fixed odd function behavior when dev->bus_id does not contain '.' - it compared that case 0 characters of the string and hereby reported success and executed callback. Now bus_id's are compared correctly, extra callback triggering eliminated. Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com> Signed...
```diff diff --git a/arch/ppc/syslib/ppc_sys.c b/arch/ppc/syslib/ppc_sys.c index 60c724e11584..7662c4e6e7d6 100644 --- a/arch/ppc/syslib/ppc_sys.c +++ b/arch/ppc/syslib/ppc_sys.c @@ -156,12 +156,13 @@ void platform_notify_map(const struct platform_notify_dev_map *map, while (map->bus_id != NULL) { idx = -1; s =...
49c28e4e40be73019481f3c13a5966e0cc8f5a9d
Analyze and fix the following issue in the Linux kernel code: [PATCH] powerpc: Avoid __initcall warnings
Problem Details: Fix __initcall return in proc_rtas_init and rtas_init. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/kernel/rtas-proc.c b/arch/powerpc/kernel/rtas-proc.c index 456286cf1d14..9c9ad1fa9cce 100644 --- a/arch/powerpc/kernel/rtas-proc.c +++ b/arch/powerpc/kernel/rtas-proc.c @@ -258,11 +258,11 @@ static int __init proc_rtas_init(void) struct proc_dir_entry *entry; if (!machine_is(pser...
d637c4543fdc86cbef5805c679d24bb665172a7d
Analyze and fix the following issue in the Linux kernel code: [SCSI] sym2: Fix build when spinlock debugging is enabled
Problem Details: When spinlock debugging is turned on, a struct completion grows beyond the size allowed for the scsi_pointer. So move the struct completion back onto the stack. The additional memory barriers are to keep us from completing a random piece of kernel stack if the command happens to complete after the er...
```diff diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c index 2c4e5f1e7a94..9c83b4d39a26 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.c +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c @@ -140,11 +140,11 @@ static struct scsi_transport_template *sym2_transport_template = NULL; * Dri...
c06bb7f514567efa39062a781679120e51caa818
Analyze and fix the following issue in the Linux kernel code: [SCSI] sg: fix leak when dio setup fails
Problem Details: when the sg driver is unable to setup direct IO, free that scatter gather list prior to falling back to indirect IO Further to this thread started by Bryan Holty: http://marc.theaimsgroup.com/?l=linux-scsi&m=114306885116728&w=2 Here is the reworked patch again. This time it has been tested with a pro...
```diff diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index bfa86b378fb9..b098942445ec 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -1799,8 +1799,10 @@ sg_build_direct(Sg_request * srp, Sg_fd * sfp, int dxfer_len) res = st_map_user_pages(schp->buffer, mx_sc_elems, (unsigned long)hp->dxferp, dxf...
92aab6464be735139f9ea38fd039c3b84c722630
Analyze and fix the following issue in the Linux kernel code: [SCSI] sas transport: ref count update
Problem Details: Fix puts so that release functions will be called. Signed-off-by: Mike Anderson <andmike@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c index 134c44c8538a..f6f7fecc0ad1 100644 --- a/drivers/scsi/scsi_transport_sas.c +++ b/drivers/scsi/scsi_transport_sas.c @@ -406,8 +406,6 @@ struct sas_phy *sas_phy_alloc(struct device *parent, int number) if (!phy) return NU...
9a72f976d29091e4f4dfa08ed404ef84a56b0d47
Analyze and fix the following issue in the Linux kernel code: [SCSI] aacraid: Driver version update
Problem Details: Received from Mark Salyzyn Fix module param Update driver version. Signed-off-by: Mark Haverkamp <markh@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index fb8350e86d98..642a3b4e5937 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -149,20 +149,20 @@ static int dacmode = -1; static int commit = -1; -module_param(nondasd, int, 0); +module_param(non...
3d2f98a66571d1aa8d66aab1a97bad6ffff61b24
Analyze and fix the following issue in the Linux kernel code: [SCSI] aacraid: Fix parenthesis placement error
Problem Details: Received from Mark Salyzyn On 64 bit machines, when a 32 bit application tries to acquire the AIF, they will always get and EFAULT error response from the driver. Signed-off-by: Mark Haverkamp <markh@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 364232858f71..8d41064406cc 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -571,12 +571,12 @@ static long aac_compat_do_ioctl(struct aac_dev *dev, unsigned cmd, unsigned long f = compat_alloc_us...