id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
9b54d5c610fc5ba191d28c356b81999e81d9b515
Analyze and fix the following issue in the Linux kernel code: [NETFILTER] IPV6: Fix dependencies.
Problem Details: Although the menu dependencies in net/ipv6/netfilter/Kconfig guard the entries in that file from the Kconfig GUI, this does not prevent them from being selected still via "make oldconfig" when IPV6 etc. is disabled. So add explicit dependencies. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/netfilter/Kconfig b/net/ipv6/netfilter/Kconfig index fc3e5eb4bc3f..adcd6131df2a 100644 --- a/net/ipv6/netfilter/Kconfig +++ b/net/ipv6/netfilter/Kconfig @@ -7,7 +7,7 @@ menu "IPv6: Netfilter Configuration (EXPERIMENTAL)" config NF_CONNTRACK_IPV6 tristate "IPv6 connection tracking supp...
6634292be47856c571634944dc0f6c8498602032
Analyze and fix the following issue in the Linux kernel code: [BNX2]: Fix minor loopback problem.
Problem Details: Use the configured MAC address instead of the permanent MAC address for loopback frames. Update version to 1.5.2. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 4fa7cefaa296..ada5e9b9988c 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -57,8 +57,8 @@ #define DRV_MODULE_NAME "bnx2" #define PFX DRV_MODULE_NAME ": " -#define DRV_MODULE_VERSION "1.5.1" -#define DRV_MODULE_RELDATE "November 15, 2006...
6a13add1e1b802a29187a9af98a6ca26539dc33d
Analyze and fix the following issue in the Linux kernel code: [BNX2]: Fix bug in bnx2_nvram_write().
Problem Details: Length was not calculated correctly if the NVRAM offset is on a non- aligned offset. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index f296c37f29b6..4fa7cefaa296 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -3096,7 +3096,7 @@ bnx2_nvram_write(struct bnx2 *bp, u32 offset, u8 *data_buf, if ((align_start = (offset32 & 3))) { offset32 &= ~3; - len32 += align_start; +...
faac9c4b753f420c02bdce0785d2657087830a12
Analyze and fix the following issue in the Linux kernel code: [BNX2]: Fix panic in bnx2_tx_int().
Problem Details: There was an off-by-one bug in bnx2_tx_avail(). If the tx ring is completely full, the producer and consumer indices may be apart by 256 even though the ring size is only 255. One entry in the ring is unused and must be properly accounted for when calculating the number of available entries. The bug...
```diff diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 7d824cf8ee2d..f296c37f29b6 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -217,9 +217,16 @@ static inline u32 bnx2_tx_avail(struct bnx2 *bp) u32 diff; smp_mb(); - diff = TX_RING_IDX(bp->tx_prod) - TX_RING_IDX(bp->tx_cons); - if (diff ...
a3d384029aa304f8f3f5355d35f0ae274454f7cd
Analyze and fix the following issue in the Linux kernel code: [AX.25]: Fix unchecked rose_add_loopback_neigh uses
Problem Details: rose_add_loopback_neigh uses kmalloc and the callers were ignoring the error value. Rewrite to let the caller deal with the allocation. This allows the use of static allocation of kmalloc use entirely. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft....
```diff diff --git a/include/net/rose.h b/include/net/rose.h index 0143796a3e37..4c05a88b921b 100644 --- a/include/net/rose.h +++ b/include/net/rose.h @@ -188,12 +188,12 @@ extern void rose_kick(struct sock *); extern void rose_enquiry_response(struct sock *); /* rose_route.c */ -extern struct rose_neigh *rose_loop...
a159aaa328a02b0189774c58ae7d917b25d26852
Analyze and fix the following issue in the Linux kernel code: [AX.25]: Fix unchecked rose_add_loopback_node uses
Problem Details: Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/rose/rose_dev.c b/net/rose/rose_dev.c index 7c279e2659ec..50824d345fa6 100644 --- a/net/rose/rose_dev.c +++ b/net/rose/rose_dev.c @@ -93,20 +93,34 @@ static int rose_rebuild_header(struct sk_buff *skb) static int rose_set_mac_address(struct net_device *dev, void *addr) { struct sockaddr *sa...
a4282717c102aef2bfab1d947c392de4d8abc0ec
Analyze and fix the following issue in the Linux kernel code: [AX.25]: Fix unchecked ax25_linkfail_register uses
Problem Details: ax25_linkfail_register uses kmalloc and the callers were ignoring the error value. Rewrite to let the caller deal with the allocation. This allows the use of static allocation of kmalloc use entirely. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft.n...
```diff diff --git a/include/net/ax25.h b/include/net/ax25.h index 51060ef74590..5ae10dd2e32e 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h @@ -342,8 +342,14 @@ struct ax25_protocol { extern void ax25_register_pid(struct ax25_protocol *ap); extern void ax25_protocol_release(unsigned int); -extern int __m...
58bc57471514be9206ebcda90b1076f6be41d1c7
Analyze and fix the following issue in the Linux kernel code: [AX.25]: Fix unchecked nr_add_node uses.
Problem Details: Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c index c6aa7aa03234..8f88964099ef 100644 --- a/net/netrom/nr_route.c +++ b/net/netrom/nr_route.c @@ -779,9 +779,13 @@ int nr_route_frame(struct sk_buff *skb, ax25_cb *ax25) nr_src = (ax25_address *)(skb->data + 0); nr_dest = (ax25_address *)(skb->da...
81dcd1690697efbdf8126e78fbbf7c76d359377f
Analyze and fix the following issue in the Linux kernel code: [AX.25]: Fix unchecked ax25_listen_register uses
Problem Details: Fix ax25_listen_register to return something that's a sane error code, then all callers to use it. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ax25/ax25_iface.c b/net/ax25/ax25_iface.c index dd9b7fee3df8..51e293420b7f 100644 --- a/net/ax25/ax25_iface.c +++ b/net/ax25/ax25_iface.c @@ -154,7 +154,7 @@ int ax25_listen_register(ax25_address *callsign, struct net_device *dev) return 0; if ((listen = kmalloc(sizeof(*listen), GFP_ATOM...
8d5cf596d10d740b69b5f4bbdb54b85abf75810d
Analyze and fix the following issue in the Linux kernel code: [AX.25]: Fix unchecked ax25_protocol_register uses.
Problem Details: Replace ax25_protocol_register by ax25_register_pid which assumes the caller has done the memory allocation. This allows replacing the kmalloc allocations entirely by static allocations. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/net/ax25.h b/include/net/ax25.h index ced202f0729b..51060ef74590 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h @@ -333,7 +333,14 @@ extern void ax25_ds_t3timer_expiry(ax25_cb *); extern void ax25_ds_idletimer_expiry(ax25_cb *); /* ax25_iface.c */ -extern int __must_check ax25...
c9266b99e2def0a456766220df09713f8e765891
Analyze and fix the following issue in the Linux kernel code: [AX.25]: Mark all kmalloc users __must_check
Problem Details: The recent fix 0506d4068bad834aab1141b5dc5e748eb175c6b3 made obvious that error values were not being propagated through the AX.25 stack. To help with that this patch marks all kmalloc users in the AX.25, NETROM and ROSE stacks as __must_check. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed...
```diff diff --git a/include/net/ax25.h b/include/net/ax25.h index 14b72d868f03..ced202f0729b 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h @@ -277,7 +277,7 @@ struct sock *ax25_get_socket(ax25_address *, ax25_address *, int); extern ax25_cb *ax25_find_cb(ax25_address *, ax25_address *, ax25_digi *, struct ...
7686fcf7304eebd2228ec47045cb28ee3c58b1f1
Analyze and fix the following issue in the Linux kernel code: [PATCH] more work_struct fixes: tas300x sound drivers
Problem Details: Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/sound/oss/dmasound/tas3001c.c b/sound/oss/dmasound/tas3001c.c index f227c9f688cc..2f21a3c00374 100644 --- a/sound/oss/dmasound/tas3001c.c +++ b/sound/oss/dmasound/tas3001c.c @@ -50,6 +50,7 @@ struct tas3001c_data_t { int output_id; int speaker_id; struct tas_drce_t drce_state; + struct work_s...
ab9d90db956dec1a83f4c4ef443df6bdbfc3f25d
Analyze and fix the following issue in the Linux kernel code: [ARM] 4056/1: iop13xx: fix resource.end off-by-one in flash setup
Problem Details: The struct resource 'end' field is inclusive, the iop13xx flash setup code got this wrong. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-iop13xx/setup.c b/arch/arm/mach-iop13xx/setup.c index 3756d2ccb1a7..5fbeb28d04bb 100644 --- a/arch/arm/mach-iop13xx/setup.c +++ b/arch/arm/mach-iop13xx/setup.c @@ -337,7 +337,7 @@ void __init iop13xx_platform_init(void) #ifdef CONFIG_MTD_PHYSMAP iq8134x_flash_resource.end = iq813...
6d2e857d02a59332b7cd89aeac8b5962a357ac7a
Analyze and fix the following issue in the Linux kernel code: [ARM] 4055/1: iop13xx: fix phys_io/io_pg_offst for iq81340mc/sc
Problem Details: The phys_io/io_pg_offst machine record variables were being set to bogus values, causing problems when enabling DEBUG_LL. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-iop13xx/iq81340mc.c b/arch/arm/mach-iop13xx/iq81340mc.c index ee595786cd22..2a1bbfe9896f 100644 --- a/arch/arm/mach-iop13xx/iq81340mc.c +++ b/arch/arm/mach-iop13xx/iq81340mc.c @@ -88,11 +88,11 @@ static struct sys_timer iq81340mc_timer = { MACHINE_START(IQ81340MC, "Intel IQ81340MC"...
9bcb533c1338813085b0a35a6dd0887eb5a5af67
Analyze and fix the following issue in the Linux kernel code: [ARM] 4052/1: S3C24XX: Fix PM in arch/arm/mach-s3c2410/Kconfig
Problem Details: Fix up the CONFIG_PM mixups in arch/arm/mach-s3c2410/Kconfig causing CONFIG_S3C2410_PM and CONFIG_PM_H1940 to get enabled permanently. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig index 9f46bf330bc8..9ac6b5d1fa9b 100644 --- a/arch/arm/mach-s3c2410/Kconfig +++ b/arch/arm/mach-s3c2410/Kconfig @@ -43,14 +43,13 @@ config BAST_PC104_IRQ config PM_H1940 bool - depends on PM help Internal node for H1940 and re...
255d1f8639f5877381545d0da6821079ebad1c21
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix warnings from asm/system.h
Problem Details: Move adjust_cr() into arch/arm/mm/mmu.c, and move irqflags.h to a more appropriate place in the header file. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index f028aef9a861..655c8376f0b5 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -154,6 +154,26 @@ static int __init noalign_setup(char *__unused) } __setup("noalign", noalign_setup); +#ifndef CONFIG_SMP +void adjust_cr(unsigned long mask, unsigne...
928ee513c2fc39799cb13302bc02344a849fa37c
Analyze and fix the following issue in the Linux kernel code: [CPUFREQ] longhaul compile fix.
Problem Details: Some gcc's are more anal than others about empty switch labels. error: label at end of compound statement Signed-off-by: Dave Jones <davej@redhat.com>
```diff diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c index e80a7d28d906..6d9c97a690fd 100644 --- a/arch/i386/kernel/cpu/cpufreq/longhaul.c +++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c @@ -790,6 +790,7 @@ static int __init longhaul_init(void) case 10: printk(KERN_E...
b6d1f542e3f44f8988b601e3ca6277c143282179
Analyze and fix the following issue in the Linux kernel code: [ARM] 4049/1: S3C24XX: fix sparse warning due to upf_t in regs-serial.h
Problem Details: Change the include/asm-arm/arch-s3c2410/regs-serial.h platform data to use the prorper type (upf_t) for the uart_flags. Fix all the other parts of arch/arm/mach-s3c2410 to include <linux/serial_core.h> and all other uses of the include file. mach-rx3715.c:101:18: warning: incorrect type in initialize...
```diff diff --git a/arch/arm/mach-s3c2410/cpu.c b/arch/arm/mach-s3c2410/cpu.c index 9d4899eddf1f..ae1f5bb63f7a 100644 --- a/arch/arm/mach-s3c2410/cpu.c +++ b/arch/arm/mach-s3c2410/cpu.c @@ -26,6 +26,7 @@ #include <linux/module.h> #include <linux/interrupt.h> #include <linux/ioport.h> +#include <linux/serial_core.h>...
7ae9e420de165c2a992d116002d05655138d8f24
Analyze and fix the following issue in the Linux kernel code: [ARM] 4046/1: S3C24XX: fix sparse errors arch/arm/mach-s3c2410
Problem Details: Fix the following sparse errors in arch/arm/mach-s3c2410 by fixing the include paths and making un-exported items static. s3c2410-clock.c:206:12: warning: symbol 's3c2410_baseclk_add' was not declared. Should it be static? s3c2412-clock.c:559:17: warning: symbol 'clks_src' was not declared. Should it ...
```diff diff --git a/arch/arm/mach-s3c2410/s3c2410-clock.c b/arch/arm/mach-s3c2410/s3c2410-clock.c index 00abe199a08e..5815aa0f1463 100644 --- a/arch/arm/mach-s3c2410/s3c2410-clock.c +++ b/arch/arm/mach-s3c2410/s3c2410-clock.c @@ -31,12 +31,16 @@ #include <linux/mutex.h> #include <linux/delay.h> +#include <asm/mach...
3e940b6a90c346a224c97570a97a150a16f1c036
Analyze and fix the following issue in the Linux kernel code: [ARM] 4044/1: S3C24XX: fix sparse warnings in arch/arm/mach-s3c2410/s3c2442-clock.c
Problem Details: Fix sparse errors in arch/arm/mach-s3c2410/s3c2442-clock.c warning: symbol 'clk_h' shadows an earlier one warning: symbol 'clk_p' shadows an earlier one warning: symbol 'clk_upll' shadows an earlier one Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.o...
```diff diff --git a/arch/arm/mach-s3c2410/s3c2442-clock.c b/arch/arm/mach-s3c2410/s3c2442-clock.c index d9f54b5cab7f..4e292ca7c9be 100644 --- a/arch/arm/mach-s3c2410/s3c2442-clock.c +++ b/arch/arm/mach-s3c2410/s3c2442-clock.c @@ -117,18 +117,18 @@ static int s3c2442_clk_add(struct sys_device *sysdev) { unsigned lon...
e546e8af469ee97ffea8903b21c39e5131fd33bd
Analyze and fix the following issue in the Linux kernel code: [ARM] 4043/1: S3C24XX: fix sparse warnings in arch/arm/mach-s3c2410/s3c2440-clock.c
Problem Details: Fix the sparse errors in arch/arm/mach-s3c2410/s3c2440-clock.c warning: symbol 'clk_h' shadows an earlier one warning: symbol 'clk_p' shadows an earlier one warning: symbol 'clk_upll' shadows an earlier one Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.lin...
```diff diff --git a/arch/arm/mach-s3c2410/s3c2440-clock.c b/arch/arm/mach-s3c2410/s3c2440-clock.c index 15796864d010..ba13c1d079d1 100644 --- a/arch/arm/mach-s3c2410/s3c2440-clock.c +++ b/arch/arm/mach-s3c2410/s3c2440-clock.c @@ -113,18 +113,18 @@ static int s3c2440_clk_add(struct sys_device *sysdev) { unsigned lon...
2d8c1cef84dcba462e1806c1223aecd97df33f99
Analyze and fix the following issue in the Linux kernel code: [ARM] 4042/1: H1940: Fix sparse errors from VA addresses
Problem Details: Fix address-space conversion errors from passing addresses generated from include/asm-arm/arch-s3c2410/map.h by adding an __force argument to the `void __iomem *` for all the virtual addresses. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/include/asm-arm/arch-s3c2410/h1940-latch.h b/include/asm-arm/arch-s3c2410/h1940-latch.h index 22a7efd358f4..c3de5ab102eb 100644 --- a/include/asm-arm/arch-s3c2410/h1940-latch.h +++ b/include/asm-arm/arch-s3c2410/h1940-latch.h @@ -16,7 +16,7 @@ #ifndef __ASSEMBLY__ -#define H1940_LATCH ((void ...
cdcb38352b6cf97241d4c3969f93f792026d18cc
Analyze and fix the following issue in the Linux kernel code: [ARM] 4041/1: S3C24XX: Fix sparse errors from VA addresses
Problem Details: Fix address-space conversion errors from passing addresses generated from include/asm-arm/arch-s3c2410/map.h by adding an __force argument to the `void __iomem *` for all the virtual addresses. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/include/asm-arm/arch-s3c2410/map.h b/include/asm-arm/arch-s3c2410/map.h index 4ef4eebf42b2..6746114e1a2d 100644 --- a/include/asm-arm/arch-s3c2410/map.h +++ b/include/asm-arm/arch-s3c2410/map.h @@ -25,7 +25,7 @@ */ #ifndef __ASSEMBLY__ -#define S3C2410_ADDR(x) ((void __iomem *)0xF0000000 + (...
c16f7bd8d48f64ba2d87ab821288815c9e35b14d
Analyze and fix the following issue in the Linux kernel code: [ARM] 4040/1: S3C24XX: Fix copyrights in arch/arm/mach-s3c2410
Problem Details: Fix the copyright messages in arch/arm/mach-s3c2410 to actually have `Copyright` in the line. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c index 01abb0ace234..717322a0916b 100644 --- a/arch/arm/mach-s3c2410/dma.c +++ b/arch/arm/mach-s3c2410/dma.c @@ -1,6 +1,6 @@ /* linux/arch/arm/mach-s3c2410/dma.c * - * (c) 2003-2005,2006 Simtec Electronics + * Copyright (c) 2003-2005,2006 ...
9d6be125ba8b7cd3af4832094bf3643e09d6e39b
Analyze and fix the following issue in the Linux kernel code: [ARM] 4039/1: S3C24XX: Fix copyrights in include/asm-arm/arch-s3c2410 (mach)
Problem Details: Fix copyright notices in include/asm-arm/arch-s3c2410 to actually have `Copyright` in the line. This patch deals with all the core files. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/include/asm-arm/arch-s3c2410/anubis-cpld.h b/include/asm-arm/arch-s3c2410/anubis-cpld.h index 40e8e270d337..dcebf6d61903 100644 --- a/include/asm-arm/arch-s3c2410/anubis-cpld.h +++ b/include/asm-arm/arch-s3c2410/anubis-cpld.h @@ -1,6 +1,6 @@ /* linux/include/asm-arm/arch-s3c2410/anubis-cpld.h * ...
f056076ea727f7c291daf17da4ae25af474f0c67
Analyze and fix the following issue in the Linux kernel code: [ARM] 4038/1: S3C24XX: Fix copyrights in include/asm-arm/arch-s3c2410 (core)
Problem Details: Fix copyright notices in include/asm-arm/arch-s3c2410 to actually have `Copyright` in the line. This patch deals with all the core files. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/include/asm-arm/arch-s3c2410/audio.h b/include/asm-arm/arch-s3c2410/audio.h index 7e0222276c98..65e0acffa1ad 100644 --- a/include/asm-arm/arch-s3c2410/audio.h +++ b/include/asm-arm/arch-s3c2410/audio.h @@ -1,6 +1,6 @@ /* linux/include/asm-arm/arch-s3c2410/audio.h * - * (c) 2004-2005 Simtec Elect...
2343217fb770ef2b172a12186c0cd0526bfb7d0c
Analyze and fix the following issue in the Linux kernel code: [ARM] 4035/1: fix collie compilation
Problem Details: Thanks to Al Viro, here's fix to 2.6.20-rc1-git, so that collie compiles, again. It was broken by INIT_WORK changes. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c index cd10b18150b8..5d2a4a4b731c 100644 --- a/drivers/video/sa1100fb.c +++ b/drivers/video/sa1100fb.c @@ -1200,9 +1200,9 @@ static void set_ctrlr_state(struct sa1100fb_info *fbi, u_int state) * Our LCD controller task (which is called when we bl...
46a34d68901c12621ef09f11a5d410b92f0643e4
Analyze and fix the following issue in the Linux kernel code: [ARM] 4034/1: pxafb: Fix compile errors
Problem Details: Fix pxafb compile failures when CONFIG_FB_PXA_PARAMETERS is enabled after recent structure changes. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index 38eb0b69c2d7..b4947c810706 100644 --- a/drivers/video/pxafb.c +++ b/drivers/video/pxafb.c @@ -1216,7 +1216,7 @@ static int __init pxafb_parse_options(struct device *dev, char *options) done: if (res_specified) { dev_info(dev, "overridi...
c924aff853bdc1c9841dd22440f931fba5ab3a59
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix BUG()s in ioremap() code
Problem Details: We need to ensure that the area size is page aligned so that remap_area_pte() doesn't increment the address past the end of the desired area. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index 3bb3951920bc..251685fe73a8 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c @@ -292,6 +292,8 @@ __ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size, if (pfn >= 0x100000 && (__pfn_to_phys(pfn) & ~SUPERSECTION_MASK)) ...
9bc83dcff8fab1f22048c8f82deb3198ec44d53f
Analyze and fix the following issue in the Linux kernel code: [SUNKBD]: Fix sunkbd_enable(sunkbd, 0); obvious.
Problem Details: "sunkbd_enable(sunkbd, 0);" has no effect. Adding "sunkbd->enabled = enable" in sunkbd_enable (obvious) Signed-off-by: Fabrice Knevez <nuxdoors@cegetel.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/input/keyboard/sunkbd.c b/drivers/input/keyboard/sunkbd.c index 3826db9403e6..cc0238366414 100644 --- a/drivers/input/keyboard/sunkbd.c +++ b/drivers/input/keyboard/sunkbd.c @@ -225,7 +225,7 @@ static void sunkbd_reinit(struct work_struct *work) static void sunkbd_enable(struct sunkbd *sun...
b06824cecafdacf2b12de583d4b41fd9c583c8c4
Analyze and fix the following issue in the Linux kernel code: [DocBook]: Fix two typos in generic IRQ docs.
Problem Details: desc-status --> desc->status Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/Documentation/DocBook/genericirq.tmpl b/Documentation/DocBook/genericirq.tmpl index 0f4a4b6321e4..4215f69ce7e6 100644 --- a/Documentation/DocBook/genericirq.tmpl +++ b/Documentation/DocBook/genericirq.tmpl @@ -303,10 +303,10 @@ desc->status |= running; do { if (desc->status &amp; masked) desc...
825020c3866e7312947e17a0caa9dd1a5622bafc
Analyze and fix the following issue in the Linux kernel code: [PATCH] sys_mincore: s/max/min/
Problem Details: fix a typo, sys_mincore() needs min(). Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Linus "I'm a moron" Torvalds <torvalds@osdl.org>
```diff diff --git a/mm/mincore.c b/mm/mincore.c index 566b6c2bae5f..8aca6f7167bb 100644 --- a/mm/mincore.c +++ b/mm/mincore.c @@ -142,7 +142,7 @@ asmlinkage long sys_mincore(unsigned long start, size_t len, * the temporary buffer size. */ down_read(&current->mm->mmap_sem); - retval = do_mincore(start, tmp,...
2bb71b5a44bfbe0d2066ee041149995f43b52d12
Analyze and fix the following issue in the Linux kernel code: [PATCH] m68k trivial build fixes
Problem Details: amikbd: missing declaration sun3_NCR5380: more work_struct mess sun3_NCR5380: cast is not an lvalue Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/drivers/input/keyboard/amikbd.c b/drivers/input/keyboard/amikbd.c index 16583d71753b..c67e84ec2d6a 100644 --- a/drivers/input/keyboard/amikbd.c +++ b/drivers/input/keyboard/amikbd.c @@ -187,7 +187,7 @@ static irqreturn_t amikbd_interrupt(int irq, void *dummy) static int __init amikbd_init(void) ...
4fb23e439ce09157d64b89a21061b9fc08f2b495
Analyze and fix the following issue in the Linux kernel code: Fix up mm/mincore.c error value cases
Problem Details: Hugh Dickins correctly points out that mincore() is actually _supposed_ to fail on an unmapped hole in the user address space, rather than return valid ("empty") information about the hole. This just simplifies the problem further (I had been misled by our previous confusing and complicated way of doi...
```diff diff --git a/mm/mincore.c b/mm/mincore.c index b44d7f875cb6..566b6c2bae5f 100644 --- a/mm/mincore.c +++ b/mm/mincore.c @@ -49,29 +49,20 @@ static long do_mincore(unsigned long addr, unsigned char *vec, unsigned long pag struct vm_area_struct *vma = find_vma(current->mm, addr); /* - * find_vma() didn't fi...
2f77d107050abc14bc393b34bdb7b91cf670c250
Analyze and fix the following issue in the Linux kernel code: Fix incorrect user space access locking in mincore()
Problem Details: Doug Chapman noticed that mincore() will doa "copy_to_user()" of the result while holding the mmap semaphore for reading, which is a big no-no. While a recursive read-lock on a semaphore in the case of a page fault happens to work, we don't actually allow them due to deadlock schenarios with writers d...
```diff diff --git a/mm/mincore.c b/mm/mincore.c index 72890780c1c9..b44d7f875cb6 100644 --- a/mm/mincore.c +++ b/mm/mincore.c @@ -1,7 +1,7 @@ /* * linux/mm/mincore.c * - * Copyright (C) 1994-1999 Linus Torvalds + * Copyright (C) 1994-2006 Linus Torvalds */ /* @@ -38,46 +38,60 @@ static unsigned char mincor...
5c9a76118d24f044b8d8ee721dbbf4e5c7db3dbb
Analyze and fix the following issue in the Linux kernel code: [PATCH] pata_via: Cable detect error
Problem Details: The UDMA66 VIA hardware has no controller side cable detect bits we can use. This patch minimally fixes the problem by reporting unknown in this case and using drive side detection. The old drivers/ide code does some additional tricks but those aren't appropriate now we are in -rc. Without this updat...
```diff diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index cc09d47fb927..ff93e8f71cf8 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c @@ -161,10 +161,15 @@ static int via_pre_reset(struct ata_port *ap) return -ENOENT; } - if ((config->flags & VIA_UDMA) >= VIA_UDMA_66) + if ((con...
2bfc3611bd91986ed2b979a7f536c52751c8ac8f
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix help text for CONFIG_ATA_PIIX
Problem Details: > Thanks for clarifying Bill, and sorry Alan. ata_piix does indeed work > correctly. The help text is a bit confusing: > > config ATA_PIIX > tristate "Intel PIIX/ICH SATA support" > depends on PCI > help > This option enables support for ICH5/6/7/8 Serial ATA. > ...
```diff diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index 984ab284382a..b34e0a958d0f 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig @@ -40,9 +40,9 @@ config ATA_PIIX tristate "Intel PIIX/ICH SATA support" depends on PCI help - This option enables support for ICH5/6/7/8 Serial ATA. - If ...
9825d73ceb6cad9b9c2ee2dc2971b58dbe8623cd
Analyze and fix the following issue in the Linux kernel code: [PATCH] ata: fix platform_device_register_simple() error check
Problem Details: The return value of platform_device_register_simple() should be checked by IS_ERR(). Cc: Jeff Garzik <jgarzik@pobox.com> Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jeff@garz...
```diff diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c index c7d1738e4e69..e7bf9d89c8ee 100644 --- a/drivers/ata/pata_legacy.c +++ b/drivers/ata/pata_legacy.c @@ -698,8 +698,10 @@ static __init int legacy_init_one(int port, unsigned long io, unsigned long ctrl goto fail_io; pdev = platform_de...
33480a0ede8dcc7e6483054279008f972bd56fd3
Analyze and fix the following issue in the Linux kernel code: [PATCH] libata: don't initialize sg in ata_exec_internal() if DMA_NONE (take #2)
Problem Details: Calling sg_init_one() with NULL buf causes oops on certain configurations. Don't initialize sg in ata_exec_internal() if DMA_NONE and make the function complain if @buf is NULL when dma_dir isn't DMA_NONE. While at it, fix comment. The problem is discovered and initial patch was submitted by Arnd Be...
```diff diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 011c0a8a2dcc..0d51d13b16bf 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -1332,7 +1332,7 @@ unsigned ata_exec_internal_sg(struct ata_device *dev, } /** - * ata_exec_internal_sg - execute libata internal comm...
da02d2a16ef3accd625f9e6e7bf83bb0f946ff62
Analyze and fix the following issue in the Linux kernel code: [libata] use kmap_atomic(KM_IRQ0) in SCSI simulator
Problem Details: We are inside spin_lock_irqsave(). quoth akpm's debug facility: [ 231.948000] SCSI device sda: 195371568 512-byte hdwr sectors (100030 MB) [ 232.232000] ata1.00: configured for UDMA/33 [ 232.404000] WARNING (1) at arch/i386/mm/highmem.c:47 kmap_atomic() [ 232.404000] [<c01162e6>] kmap_atomic...
```diff diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 664e1377b54c..a4790be41d1c 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -1539,7 +1539,7 @@ static unsigned int ata_scsi_rbuf_get(struct scsi_cmnd *cmd, u8 **buf_out) struct scatterlist *sg; sg = (struct...
fae07dc389bc32a3638b9d4c61dd3738ca3fb61d
Analyze and fix the following issue in the Linux kernel code: [PATCH] ata_piix: use piix_host_stop() in ich_pata_ops
Problem Details: piix_init_one() allocates host private data which should be freed by piix_host_stop(). ich_pata_ops wasn't converted to piix_host_stop() while merging, leaking 4 bytes on driver detach. Fix it. This was spotted using Kmemleak by Catalin Marinas. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Catal...
```diff diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index 58dba1df2b7b..47701b286f8b 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c @@ -342,7 +342,7 @@ static const struct ata_port_operations ich_pata_ops = { .port_start = ata_port_start, .port_stop = ata_port_stop, - .host_st...
7e244322cd4ea361ef9ee623b3fcb4d9f4ff841c
Analyze and fix the following issue in the Linux kernel code: ACPI: fix git automerge failure
Problem Details: Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c index 39bc16bec5aa..18f4715c655d 100644 --- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c @@ -569,7 +569,6 @@ static int sw_any_bug_found(struct dmi_system_id ...
0221872a3b0aa2fa2f3fa60affcbaebd662c4a90
Analyze and fix the following issue in the Linux kernel code: Fix "delayed_work_pending()" macro expansion
Problem Details: Nobody uses it, but it was still wrong. Using the macro argument name 'work' meant that when we used 'work' as a member name, that would also get replaced by the macro argument. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index edef8d50b26b..5b13dcf02714 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h @@ -121,8 +121,8 @@ struct execute_work { * pending * @work: The work item in question */ -#define delayed_work_pending(work) \ - test_...
bf628dc22a09ed2022abb32c76011ae5f99ad6b0
Analyze and fix the following issue in the Linux kernel code: IB/srp: Fix FMR mapping for 32-bit kernels and addresses above 4G
Problem Details: struct srp_device.fmr_page_mask was unsigned long, which means that the top part of addresses above 4G was being chopped off on 32-bit architectures. Of course nothing good happens when data from SRP targets is DMAed to the wrong place. Fix this by changing fmr_page_mask to u64, to match the addresse...
```diff diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index e9b6a6f07dd7..cdecbf5911c8 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -1898,7 +1898,7 @@ static void srp_add_one(struct ib_device *device) */ srp_dev->fmr_page_shi...
c59a3da1342ff456e5123361739bc331446cda21
Analyze and fix the following issue in the Linux kernel code: IB: Fix ib_dma_alloc_coherent() wrapper
Problem Details: The ib_dma_alloc_coherent() wrapper uses a u64* for the dma_handle parameter, unlike dma_alloc_coherent, which uses dma_addr_t*. This means that we need a temporary variable to handle the case when ib_dma_alloc_coherent() just falls through directly to dma_alloc_coherent() on architectures where sizeo...
```diff diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 3c2e10574b23..0bfa3328d686 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -1639,7 +1639,14 @@ static inline void *ib_dma_alloc_coherent(struct ib_device *dev, { if (dev->dma_ops) return dev->dma_ops->alloc_coherent...
1003f06953472ecc34f12d9867670f475a8c1af6
Analyze and fix the following issue in the Linux kernel code: [GFS2] Fix Kconfig
Problem Details: Here is a patch to fix up the Kconfig so that we don't land up with problems when people disable the NET subsystem. Thanks for all the hints and suggestions that people have sent me regarding this. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> Cc: Aleksandr Koltsoff <czr@iki.fi> Cc: Toralf F...
```diff diff --git a/fs/gfs2/Kconfig b/fs/gfs2/Kconfig index c0791cbacad9..6a2ffa2db14f 100644 --- a/fs/gfs2/Kconfig +++ b/fs/gfs2/Kconfig @@ -34,7 +34,9 @@ config GFS2_FS_LOCKING_NOLOCK config GFS2_FS_LOCKING_DLM tristate "GFS2 DLM locking module" - depends on GFS2_FS + depends on GFS2_FS && NET && INET && (IPV6 ...
c80e7c83d56866a735236b45441f024b589f9e88
Analyze and fix the following issue in the Linux kernel code: [DLM] fix compile warning
Problem Details: This patch fixes a compile warning in lowcomms-tcp.c indicating that kmem_cache_t is deprecated. Signed-Off-By: Patrick Caulfield <pcaulfie@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
```diff diff --git a/fs/dlm/lowcomms-tcp.c b/fs/dlm/lowcomms-tcp.c index 8f2791fc8447..9be3a440c42a 100644 --- a/fs/dlm/lowcomms-tcp.c +++ b/fs/dlm/lowcomms-tcp.c @@ -143,7 +143,7 @@ static DECLARE_WAIT_QUEUE_HEAD(lowcomms_recv_waitq); /* An array of pointers to connections, indexed by NODEID */ static struct connect...
e42734e270b9e5ada83188d73b733533ce11ee4a
Analyze and fix the following issue in the Linux kernel code: [S390] cio: css_register_subchannel race.
Problem Details: Asynchronous probe can release memory of a subchannel before css_get_ssd_info is called. To fix this call css_get_ssd_info before registering with driver core. Signed-off-by: Stefan Bader <shbader@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index 4c81d890791e..9d6c02446863 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c @@ -139,6 +139,8 @@ css_register_subchannel(struct subchannel *sch) sch->dev.release = &css_subchannel_release; sch->dev.groups = subch_attr_groups; ...
da1cf23efe0c067ef95e4702b386e6e1baab10c7
Analyze and fix the following issue in the Linux kernel code: [S390] Save prefix register for dump on panic
Problem Details: The dump tools expect that the saved prefix register points to the lowcore of the dump cpu. Since we set the prefix register to 0 during reipl/dump, we have to save the original prefix register. Before we start the dump program, we copy the original prefix register to the designated location in the low...
```diff diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c index 48bfe402052b..9e9972e8a52b 100644 --- a/arch/s390/kernel/ipl.c +++ b/arch/s390/kernel/ipl.c @@ -995,6 +995,7 @@ static void do_reset_calls(void) extern void reset_mcck_handler(void); extern void reset_pgm_handler(void); +extern __u32 dump_pr...
58be944127be80bd947dd72d69523b3d4b17781f
Analyze and fix the following issue in the Linux kernel code: [S390] Fix reboot hang
Problem Details: We use printks after shutting down all other cpus. This is not allowed and can lead to deadlocks. Therefore the printks have to be removed. Signed-off-by: Michael Holzheu <holzheu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c index d2e6a0a56ade..48bfe402052b 100644 --- a/arch/s390/kernel/ipl.c +++ b/arch/s390/kernel/ipl.c @@ -609,42 +609,12 @@ static ssize_t on_panic_store(struct subsystem *subsys, const char *buf, static struct subsys_attribute on_panic_attr = __ATTR(...
a45e14148fb34175cba042df8979e7982758635f
Analyze and fix the following issue in the Linux kernel code: [S390] Fix reboot hang on LPARs
Problem Details: Reboot hangs on LPARs without diag308 support. The reason for this is, that before the reboot is done, the channel subsystem is shut down. During the reset on each possible subchannel a "store subchannel" is done. This operation can end in a program check interruption, if the specified subchannel set i...
```diff diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c index a36bea1188d9..d2e6a0a56ade 100644 --- a/arch/s390/kernel/ipl.c +++ b/arch/s390/kernel/ipl.c @@ -1037,13 +1037,15 @@ static void do_reset_calls(void) } extern void reset_mcck_handler(void); +extern void reset_pgm_handler(void); void s390_r...
13e742babda8cda7df55b8d1ca67d46b4f8dea84
Analyze and fix the following issue in the Linux kernel code: [S390] zcrypt: module unload fixes.
Problem Details: Add code to reset all queues for a domain and add missing tasklet_kill call to ap bus module exit code. Signed-off-by: Ralph Wuerthner <rwuerthn@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index ad60afe5dd11..81b5899f4010 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c @@ -1129,7 +1129,15 @@ static void ap_poll_thread_stop(void) mutex_unlock(&ap_poll_thread_mutex); } -static void ap_reset(vo...
86b22470f68528c68cb25dbd58886040e1917494
Analyze and fix the following issue in the Linux kernel code: [S390] hypfs fixes
Problem Details: Correct typo to make hypfs work on systems that support only diag204 subcode 4 and fix error handling in hypfs_diag_init. Signed-off-by: Christian Borntraeger <cborntra@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/arch/s390/hypfs/hypfs_diag.c b/arch/s390/hypfs/hypfs_diag.c index 443fa377d9ff..2782cf9da5b4 100644 --- a/arch/s390/hypfs/hypfs_diag.c +++ b/arch/s390/hypfs/hypfs_diag.c @@ -379,7 +379,7 @@ static void *diag204_alloc_vbuf(int pages) static void *diag204_alloc_rbuf(void) { diag204_buf = (void*)_...
1d6bb8e51dba3db1c15575901022fe72d363e5a4
Analyze and fix the following issue in the Linux kernel code: drm: Unify radeon offset checking.
Problem Details: Replace r300_check_offset() with generic radeon_check_offset(), which doesn't reject valid offsets when the framebuffer area is at the very end of the card's 32 bit address space. Make radeon_check_and_fixup_offset() use radeon_check_offset() as well. This fixes https://bugs.freedesktop.org/show_bug.c...
```diff diff --git a/drivers/char/drm/r300_cmdbuf.c b/drivers/char/drm/r300_cmdbuf.c index d14477ba3679..032a022ec6a8 100644 --- a/drivers/char/drm/r300_cmdbuf.c +++ b/drivers/char/drm/r300_cmdbuf.c @@ -242,26 +242,6 @@ static __inline__ int r300_check_range(unsigned reg, int count) return 0; } -/* - * we expect o...
29c7cf96186ac14ce7380633f690fc39732ff03a
Analyze and fix the following issue in the Linux kernel code: [SCTP]: Handle address add/delete events in a more efficient way.
Problem Details: Currently in SCTP, we maintain a local address list by rebuilding the whole list from the device list whenever we get a address add/delete event. This patch fixes it by only adding/deleting the address for which we receive the event. Also removed the sctp_local_addr_lock() which is no longer needed a...
```diff diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index c089f93ba591..b00d85e14fe1 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h @@ -201,13 +201,12 @@ extern struct sctp_globals { struct sctp_bind_hashbucket *port_hashtable; /* This is the global local address...
6931ba7cef3991fbb970997d33e24139ccdc3c2c
Analyze and fix the following issue in the Linux kernel code: [TCP]: Fix oops caused by __tcp_put_md5sig_pool()
Problem Details: It should call tcp_free_md5sig_pool() not __tcp_free_md5sig_pool() so that it does proper refcounting. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 090c690627e5..b67e0dd743be 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -2364,8 +2364,9 @@ struct tcp_md5sig_pool *__tcp_get_md5sig_pool(int cpu) EXPORT_SYMBOL(__tcp_get_md5sig_pool); -void __tcp_put_md5sig_pool(void) { - __tcp_free_md5sig_pool(tcp_...
befffe901649e2cc421d0d150c4379d01658cf6b
Analyze and fix the following issue in the Linux kernel code: [IPV6]: Fix IPV6_UNICAST_HOPS getsockopt().
Problem Details: > Relevant standard (RFC 3493) notes: > > The IPV6_UNICAST_HOPS option may be used with getsockopt() to > determine the hop limit value that the system will use for subsequent > unicast packets sent via that socket. > > I don't reckon -1 could be the hop limit value. -1 means un-initialized. ...
```diff diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index 1eafcfc95e81..352690e2ab82 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c @@ -978,12 +978,27 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, break; case IPV6_UNICAST_HOPS: - val = np->h...
832e3ca62d6ee1893db05f5202c24ae5331e19ba
Analyze and fix the following issue in the Linux kernel code: [DCCP] ccid3: return value in ccid3_hc_rx_calc_first_li
Problem Details: In a recent patch we introduced invalid return codes which will result in the opposite of what is intended (i.e. send more packets in face of peculiar network conditions). This fixes it by returning ~0 which means not calculated as per dccp_li_hist_calc_i_mean. Signed-off-by: Ian McDonald <ian.mcdona...
```diff diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index fa6b75372ed7..40402c59506a 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c @@ -845,8 +845,8 @@ found: * Find some p such that f(p) = fval; return 1/p [RFC 3448, 6.3.1]. */ if (rtt == 0) { /* would result in divide-by-z...
e1b4b9f3986b80d5785d91dbd8d72cfaf9fd1117
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: {ip,ip6,arp}_tables: fix exponential worst-case search for loops
Problem Details: If we come to node we'd already marked as seen and it's not a part of path (i.e. we don't have a loop right there), we already know that it isn't a part of any loop, so we don't need to revisit it. That speeds the things up if some chain is refered to from several places and kills O(exp(table size)) w...
```diff diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c index 71b76ade00e1..9aa22398b3dc 100644 --- a/net/ipv4/netfilter/arp_tables.c +++ b/net/ipv4/netfilter/arp_tables.c @@ -358,6 +358,7 @@ static int mark_source_chains(struct xt_table_info *newinfo, for (;;) { struct arpt_standa...
083e69e99e1c728d360c6346456daa4d4c19e25c
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: nf_nat: fix NF_NAT dependency
Problem Details: NF_NAT depends on NF_CONNTRACK_IPV4, not NF_CONNTRACK. Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/netfilter/Kconfig b/net/ipv4/netfilter/Kconfig index 363df9976c9d..f6026d4ac428 100644 --- a/net/ipv4/netfilter/Kconfig +++ b/net/ipv4/netfilter/Kconfig @@ -401,7 +401,7 @@ config IP_NF_NAT # NAT + specific targets: nf_conntrack config NF_NAT tristate "Full NAT" - depends on IP_NF_IPTA...
3a411355bcf4bf714022420badfec1cd1e2fbd9a
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: Fix INET=n linking error
Problem Details: Building with INET=n results in WARNING: "ip_route_output_key" [net/netfilter/nf_conntrack_h323.ko] undefined! The entire code in net/netfilter is only used for IPv4/IPv6 currently, so let it depend on INET. Noticed by Toralf Förster <toralf.foerster@gmx.de>. Signed-off-by: Patrick McHardy <kaber@t...
```diff diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig index 3a66878a1829..1b853c34d301 100644 --- a/net/netfilter/Kconfig +++ b/net/netfilter/Kconfig @@ -1,5 +1,5 @@ menu "Core Netfilter Configuration" - depends on NET && NETFILTER + depends on NET && INET && NETFILTER config NETFILTER_NETLINK ...
29a7f3ada7fea5510504c5359c3f70d109aeb055
Analyze and fix the following issue in the Linux kernel code: DebugFS : file/directory removal fix
Problem Details: Fix file and directory removal in debugfs. Add inotify support for file removal. The following scenario : create dir a create dir a/b cd a/b (some process goes in cwd a/b) rmdir a/b rmdir a fails due to the fact that "a" appears to be non empty. It is because the "b" dentry is not deleted from "a" ...
```diff diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index 554f4a9dfaf8..c692487346ea 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c @@ -286,6 +286,7 @@ void debugfs_remove(struct dentry *dentry) mutex_lock(&parent->d_inode->i_mutex); if (debugfs_positive(dentry)) { if (dentry->d_inode) { + d...
63223a0654c2a473ae64835819b87826cb7415ee
Analyze and fix the following issue in the Linux kernel code: DebugFS : file/directory creation error handling
Problem Details: Fix error handling of file and directory creation in DebugFS. The error path should release the file system because no _remove will be called for this erroneous creation. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index 05d1a9c4fb76..d6c5fb53c746 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c @@ -206,13 +206,15 @@ struct dentry *debugfs_create_file(const char *name, mode_t mode, pr_debug("debugfs: creating file '%s'\n",name); - error = simple_pin_fs(&de...
bafb232ec42aa6862798236009e8e5233d05ab36
Analyze and fix the following issue in the Linux kernel code: DebugFS : coding style fixes
Problem Details: Minor coding style fixes along the way : 80 cols and a white space. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index 020da4c60593..05d1a9c4fb76 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c @@ -55,7 +55,8 @@ static struct inode *debugfs_get_inode(struct super_block *sb, int mode, dev_t d inode->i_op = &simple_dir_inode_operations; inode->i_fop = &si...
02828845dda5ccf921ab2557c6ca17b6e7fc70e2
Analyze and fix the following issue in the Linux kernel code: [ARM] 4016/1: prefetch macro is wrong wrt gcc's "delete-null-pointer-checks"
Problem Details: optimization The gcc manual says: |`-fdelete-null-pointer-checks' | Use global dataflow analysis to identify and eliminate useless | checks for null pointers. The compiler assumes that dereferencing | a null pointer would have halted the program. If a pointer is | checked after it h...
```diff diff --git a/include/asm-arm/processor.h b/include/asm-arm/processor.h index b442e8e2a809..1bbf16182d62 100644 --- a/include/asm-arm/processor.h +++ b/include/asm-arm/processor.h @@ -103,14 +103,14 @@ extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); #if __LINUX_ARM_ARCH__ >= 5 #d...
bcd022801ee514e28c32837f0b3ce18c775f1a7b
Analyze and fix the following issue in the Linux kernel code: [PATCH] MIPS: Fix COW D-cache aliasing on fork
Problem Details: Provide a custom copy_user_highpage() to deal with aliasing issues on MIPS. It uses kmap_coherent() to map an user page for kernel with same color. Rewrite copy_to_user_page() and copy_from_user_page() with the new interfaces to avoid extra cache flushing. The main part of this patch was originally ...
```diff diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index ea2d15370bb7..30245c09d025 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c @@ -203,6 +203,31 @@ static inline void kunmap_coherent(struct page *page) preempt_check_resched(); } +void copy_user_highpage(struct page *to, struct page *fro...
77fff4ae2b7bba6d66a8287d9ab948e2b6c16145
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix COW D-cache aliasing on fork
Problem Details: Problem: 1. There is a process containing two thread (T1 and T2). The thread T1 calls fork(). Then dup_mmap() function called on T1 context. static inline int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm) ... flush_cache_mm(current->mm); ... /* A */ (write-protect all Copy-On-Write...
```diff diff --git a/include/linux/highmem.h b/include/linux/highmem.h index 3d8768b619e9..ea5780b518ef 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h @@ -96,6 +96,8 @@ static inline void memclear_highpage_flush(struct page *page, unsigned int offse kunmap_atomic(kaddr, KM_USER0); } +#ifndef __...
0743b86800cf1dfbf96df4a438938127bbe4476c
Analyze and fix the following issue in the Linux kernel code: [PATCH] sstfb: add sysfs interface
Problem Details: Modify the sstfb (Voodoo1/2) driver: - fix a memleak when removing the sstfb module - fix sstfb to use the fbdev default videomode database - add module option "mode_option" to set initial screen mode - add sysfs-interface to turn VGA-passthrough on/off via /sys/class/graphics/fbX/vgapass - remo...
```diff diff --git a/drivers/video/sstfb.c b/drivers/video/sstfb.c index 711cb11d6eb3..59cd1e750f30 100644 --- a/drivers/video/sstfb.c +++ b/drivers/video/sstfb.c @@ -21,6 +21,11 @@ * Remove never finished and bogus 24/32bit support * Clean up macro abuse * Minor tidying for format. + * 12/2006 Helge Deller <d...
26c068daf089aa21844236c97d05049b9497cc0a
Analyze and fix the following issue in the Linux kernel code: [PATCH] ide: HPT3xx: fix PCI clock detection
Problem Details: Use the f_CNT value saved by the HighPoint BIOS if available as reading it directly would give us a wrong PCI frequency after DPLL has already been calibrated by BIOS. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl> Cc: Alan Cox ...
```diff diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index 4968b16fa307..9fd50801d382 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c @@ -70,6 +70,8 @@ * - fix/remove bad/unused timing tables and use one set of tables for the whole * HPT37x chip family; save space by intro...
73d1dd93c462b52512685fe118159eafc7eb9f7e
Analyze and fix the following issue in the Linux kernel code: [PATCH] ide: fix the case of multiple HPT3xx chips present
Problem Details: init_chipset_hpt366() modifies some fields of the ide_pci_device_t structure depending on the chip's revision, so pass it a copy of the structure to avoid issues when multiple different chips are present. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Bartlomiej Zolnierkiewicz <B.Zolnier...
```diff diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index 29a377044323..4968b16fa307 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c @@ -72,6 +72,8 @@ * table in which the mode lookup is done * - fix the hotswap code: it caused RESET- to glitch when tristating the bus, ...
33b18a602525198ab8892789dab6839f325407f8
Analyze and fix the following issue in the Linux kernel code: [PATCH] ide: fix HPT3xx hotswap support
Problem Details: Fix the broken hotswap code: on HPT37x it caused RESET- to glitch when tristating the bus (the MISC control 3/6 and soft control 2 need to be written to in the certain order), and for HPT36x the obsolete HDIO_TRISTATE_HWIF ioctl() handler was called instead which treated the state argument wrong. Also,...
```diff diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index 787efd35db2b..29a377044323 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c @@ -70,6 +70,8 @@ * - fix/remove bad/unused timing tables and use one set of tables for the whole * HPT37x chip family; save space by intro...
9448732f6c9ef4932b226056338d1084f3669752
Analyze and fix the following issue in the Linux kernel code: [PATCH] ide: fix HPT37x timing tables
Problem Details: Fix/remove bad/unused timing tables: HPT370/A 66 MHz tables weren't really needed (the chips are not UltraATA/133 capable and shouldn't support 66 MHz PCI) and had many modes over- and underclocked, HPT372 33 MHz table was in fact for 66 MHz and 50 MHz table missed UltraDMA mode 6, HPT374 33 MHz table ...
```diff diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index 7534171c2c61..51f40f2db772 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c @@ -67,6 +67,10 @@ * - add support for HPT302N and HPT371N clocking (the same as for HPT372N) * - HPT371/N are single channel chips, so avoid...
836c0063c74cc088ffe370d007e1c6cac95e7caa
Analyze and fix the following issue in the Linux kernel code: [PATCH] ide: HPT3xxN clocking fixes
Problem Details: Fix serious problems with the HPT372N clock turnaround code: - the wrong ports were written to when called for the secondary channel; - it didn't serialize access to the channels; - turnaround shou;dn't be done on 66 MHz PCI; - caching the clock mode per-channel caused it to get out of sync with th...
```diff diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index e993a51f250e..7534171c2c61 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c @@ -4,6 +4,7 @@ * Copyright (C) 1999-2003 Andre Hedrick <andre@linux-ide.org> * Portions Copyright (C) 2001 Sun Microsystems, Inc. ...
f988443a84528bd30c2f474efa5e2c511959f19b
Analyze and fix the following issue in the Linux kernel code: [PATCH] knfsd: Fix up some bit-rot in exp_export
Problem Details: The nfsservctl system call isn't used but recent nfs-utils releases for exporting filesystems, and consequently the code that is uses - exp_export - has suffered some bitrot. Particular: - some newly added fields in 'struct svc_export' are being initialised properly. - the return value is now ...
```diff diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index 1137d09c5976..248dd92e6a56 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c @@ -955,6 +955,8 @@ exp_export(struct nfsctl_export *nxp) exp = exp_get_by_name(clp, nd.mnt, nd.dentry, NULL); + memset(&new, 0, sizeof(new)); + /* must make sure there ...
b797b5beac966df5c5d96c0d39fe366f57135343
Analyze and fix the following issue in the Linux kernel code: [PATCH] knfsd: svcrpc: fix gss krb5i memory leak
Problem Details: The memory leak here is embarassingly obvious. This fixes a problem that causes the kernel to leak a small amount of memory every time it receives a integrity-protected request. Thanks to Aim Le Rouzic for the bug report. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Br...
```diff diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index 700353b330fd..3bf3520f92d1 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c @@ -804,19 +804,19 @@ unwrap_integ_data(struct xdr_buf *buf, u32 seq, struct gss_ctx *ctx) integ_len = sv...
b3f13debd593dbd7242a4ecf6c9b4d529805e5a0
Analyze and fix the following issue in the Linux kernel code: [PATCH] tty_io.c balance tty_ldisc_ref()
Problem Details: tty_ldisc_deref() should only be called when tty_ldisc_ref() succeeds otherwise it triggers a BUG(). There's already a function tty_ldisc_flush() that flushes properly. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> S...
```diff diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index a928f6af52f2..47a6eacb10bc 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -3335,18 +3335,13 @@ static void __do_SAK(struct work_struct *work) int session; int i; struct file *filp; - struct tty_ldisc *disc; struct fdtab...
a2db8dfce8d94fecae50128d912fec7980687a51
Analyze and fix the following issue in the Linux kernel code: [PATCH] rtc framewok: rtc_wkalrm.enabled reporting updates
Problem Details: Fix a glitch in the procfs dumping of whether the alarm IRQ is enabled: use the traditional name (from drivers/char/rtc.c and many other places) of "alarm_IRQ", not "alrm_wakeup" (which didn't even match the efirtc code, which originated that reporting API). Also, update a few of the RTC drivers to st...
```diff diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c index 5c8addcaf1fb..4f654c901c64 100644 --- a/drivers/rtc/rtc-at91rm9200.c +++ b/drivers/rtc/rtc-at91rm9200.c @@ -137,6 +137,9 @@ static int at91_rtc_readalarm(struct device *dev, struct rtc_wkalrm *alrm) tm->tm_yday = rtc_year_days(tm->...
5a6534e4cf53e16a6ea92f033f89d6575b3d7422
Analyze and fix the following issue in the Linux kernel code: [PATCH] rtc: remove syslog spam on registration
Problem Details: This removes some syslog spam as RTC drivers register; debug messages shouldn't come out at "info" level. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torval...
```diff diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c index 828b329e08e0..94d3df62a5fa 100644 --- a/drivers/rtc/rtc-dev.c +++ b/drivers/rtc/rtc-dev.c @@ -435,7 +435,7 @@ static int rtc_dev_add_device(struct class_device *class_dev, goto err_cdev_del; } - dev_info(class_dev->dev, "rtc intf: dev (%d:%...
74c383f1400f559562aa517d6d62f77245bddf52
Analyze and fix the following issue in the Linux kernel code: [PATCH] lockdep: fix possible races while disabling lock-debugging
Problem Details: Jarek Poplawski noticed that lockdep global state could be accessed in a racy way if one CPU did a lockdep assert (shutting lockdep down), while the other CPU would try to do something that changes its global state. This patch fixes those races and cleans up lockdep's internal locking by adding a grap...
```diff diff --git a/kernel/lockdep.c b/kernel/lockdep.c index 07a3d74a84be..01e750559034 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c @@ -43,13 +43,49 @@ #include "lockdep_internals.h" /* - * hash_lock: protects the lockdep hashes and class/list/hash allocators. + * lockdep_lock: protects the lockdep graph...
23d95a03d63eff25118b50737006ce6e7c1b8def
Analyze and fix the following issue in the Linux kernel code: [PATCH] lockdep: improve lockdep_reset()
Problem Details: Clear all the chains during lockdep_reset(). This fixes some locking-selftest false positives i saw on -rt. (never saw those on mainline though, but it could happen.) Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl....
```diff diff --git a/kernel/lockdep.c b/kernel/lockdep.c index 5ba2825bd46a..77fa791f6f31 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c @@ -2437,6 +2437,7 @@ EXPORT_SYMBOL_GPL(lock_release); void lockdep_reset(void) { unsigned long flags; + int i; raw_local_irq_save(flags); current->curr_chain_key = 0;...
81fc685a898f84d0787eeebb1c118de0bd3484a0
Analyze and fix the following issue in the Linux kernel code: [PATCH] lockdep: improve verbose messages
Problem Details: Make verbose lockdep messages (off by default) more informative by printing out the hash chain key. (this patch was what helped me catch the earlier lockdep hash-collision bug) Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torva...
```diff diff --git a/kernel/lockdep.c b/kernel/lockdep.c index 5d69c7d7407e..5ba2825bd46a 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c @@ -1264,7 +1264,7 @@ out_unlock_set: * add it and return 0 - in this case the new dependency chain is * validated. If the key is already hashed, return 1. */ -static inli...
a664089741aa9010333ecbdadbf5d9de62bafa2d
Analyze and fix the following issue in the Linux kernel code: [PATCH] lockdep: filter off by default
Problem Details: Fix typo in the class_filter() function. (filtering is not used by default so this only affects lockdep-internal debugging cases) Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/kernel/lockdep.c b/kernel/lockdep.c index b02032476dc2..5d69c7d7407e 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c @@ -172,8 +172,8 @@ static int class_filter(struct lock_class *class) !strcmp(class->name, "&struct->lockfield")) return 1; #endif - /* Allow everything else. 0 would be...
5d6f647fc6bb57377c9f417c4752e43189f56bb1
Analyze and fix the following issue in the Linux kernel code: [PATCH] debug: add sysrq_always_enabled boot option
Problem Details: Most distributions enable sysrq support but set it to 0 by default. Add a sysrq_always_enabled boot option to always-enable sysrq keys. Useful for debugging - without having to modify the disribution's config files (which might not be possible if the kernel is on a live CD, etc.). Also, while at it,...
```diff diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index d8323b8893c3..ef69c75780bf 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -1656,6 +1656,12 @@ and is between 256 and 4096 characters. It is defined in the file sym53c416=...
1c0350bd0c9b59957760e67516973db35bafa050
Analyze and fix the following issue in the Linux kernel code: [PATCH] Xtensa: Add ktermios and minor filename fix
Problem Details: The kernel termios (ktermios) changes were somehow missed for Xtensa. This patch adds the ktermios structure and also includes some minor file name fix that was missed in the syscall patch. Signed-off-by: Chris Zankel <chris@zankel.net> Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: And...
```diff diff --git a/arch/xtensa/kernel/Makefile b/arch/xtensa/kernel/Makefile index d573017a5dde..71f733c4f66d 100644 --- a/arch/xtensa/kernel/Makefile +++ b/arch/xtensa/kernel/Makefile @@ -6,7 +6,7 @@ extra-y := head.o vmlinux.lds obj-y := align.o entry.o irq.o coprocessor.o process.o ptrace.o semaphore.o \ - ...
8a102eed9c4e1d21bad07a8fd97bd4fbf125d966
Analyze and fix the following issue in the Linux kernel code: [PATCH] PM: Fix SMP races in the freezer
Problem Details: Currently, to tell a task that it should go to the refrigerator, we set the PF_FREEZE flag for it and send a fake signal to it. Unfortunately there are two SMP-related problems with this approach. First, a task running on another CPU may be updating its flags while the freezer attempts to set PF_FREE...
```diff diff --git a/include/asm-arm/thread_info.h b/include/asm-arm/thread_info.h index d9b8bddc8732..5014794f9eb3 100644 --- a/include/asm-arm/thread_info.h +++ b/include/asm-arm/thread_info.h @@ -147,6 +147,7 @@ extern void iwmmxt_task_switch(struct thread_info *); #define TIF_POLLING_NRFLAG 16 #define TIF_USING_I...
3df494a32b936aef76d893f5065f962ebd9b9437
Analyze and fix the following issue in the Linux kernel code: [PATCH] PM: Fix freezing of stopped tasks
Problem Details: Currently, if a task is stopped (ie. it's in the TASK_STOPPED state), it is considered by the freezer as unfreezeable. However, there may be a race between the freezer and the delivery of the continuation signal to the task resulting in the task running after we have finished freezing the other tasks...
```diff diff --git a/kernel/power/process.c b/kernel/power/process.c index 99eeb119b06d..b9a32860bef3 100644 --- a/kernel/power/process.c +++ b/kernel/power/process.c @@ -28,8 +28,7 @@ static inline int freezeable(struct task_struct * p) if ((p == current) || (p->flags & PF_NOFREEZE) || (p->exit_state ==...
55935a34a428a1497e3b37982e2782c09c6f914d
Analyze and fix the following issue in the Linux kernel code: [PATCH] More slab.h cleanups
Problem Details: More cleanups for slab.h 1. Remove tabs from weird locations as suggested by Pekka 2. Drop the check for NUMA and SLAB_DEBUG from the fallback section as suggested by Pekka. 3. Uses static inline for the fallback defs as also suggested by Pekka. 4. Make kmem_ptr_valid take a const * argument. 5...
```diff diff --git a/include/linux/slab.h b/include/linux/slab.h index e7a9c6b42412..1ef822e31c77 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -20,11 +20,11 @@ typedef struct kmem_cache kmem_cache_t __deprecated; * Flags to pass to kmem_cache_create(). * The ones marked DEBUG are only valid if CO...
2e892f43ccb602e8ffad73396a1000f2040c9e0b
Analyze and fix the following issue in the Linux kernel code: [PATCH] Cleanup slab headers / API to allow easy addition of new slab allocators
Problem Details: This is a response to an earlier discussion on linux-mm about splitting slab.h components per allocator. Patch is against 2.6.19-git11. See http://marc.theaimsgroup.com/?l=linux-mm&m=116469577431008&w=2 This patch cleans up the slab header definitions. We define the common functions of slob and sla...
```diff diff --git a/include/linux/slab.h b/include/linux/slab.h index 2271886744f8..e7a9c6b42412 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -1,7 +1,9 @@ /* - * linux/include/linux/slab.h - * Written by Mark Hemment, 1996. - * (markhe@nextd.demon.co.uk) + * Written by Mark Hemment, 1996 (markhe@ne...
3468a33e98524a7661a158251b10cea7c9fafece
Analyze and fix the following issue in the Linux kernel code: [PATCH] sx: fix non-PCI build
Problem Details: When CONFIG_PCI is not defined (i.e. PCI bus is disabled), the sx driver fails to link, since some pci functions are not available. Fix this behaviour to be able to compile this driver on machines with no PCI bus (but with ISA bus support). Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-...
```diff diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index b1c07ed3cb93..087619986688 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -312,7 +312,7 @@ config SPECIALIX_RTSCTS config SX tristate "Specialix SX (and SI) card support" - depends on SERIAL_NONSTANDARD + depends on SERIAL_NONS...
fb0c9295b81f5c7f51058aabfadd13d8e70b48f4
Analyze and fix the following issue in the Linux kernel code: [PATCH] mxser_new: fix non-PCI build
Problem Details: When CONFIG_PCI is not defined (i.e. PCI bus is disabled), the mxser_new driver fails to link, since some pci functions are not available. Fix this behaviour to be able to compile this driver on machines with no PCI bus (but with ISA bus support). Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Sign...
```diff diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 91133bea8ca0..b1c07ed3cb93 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -203,7 +203,7 @@ config MOXA_SMARTIO config MOXA_SMARTIO_NEW tristate "Moxa SmartIO support v. 2.0 (EXPERIMENTAL)" - depends on SERIAL_NONSTANDARD + depe...
a3808ac156f503dd2a00a059d9ff4677ce75244f
Analyze and fix the following issue in the Linux kernel code: [PATCH] isicom: fix build with PCI disabled
Problem Details: With CONFIG_PCI=n: drivers/char/isicom.c: In function 'isicom_probe': drivers/char/isicom.c:1793: warning: implicit declaration of function 'pci_request_region' drivers/char/isicom.c:1827: warning: implicit declaration of function 'pci_release_region' Let's CONFIG_ISI depend on CONFIG_PCI. Signed-off...
```diff diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 0a3aee29e067..91133bea8ca0 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -218,7 +218,7 @@ config MOXA_SMARTIO_NEW config ISI tristate "Multi-Tech multiport card support (EXPERIMENTAL)" - depends on SERIAL_NONSTANDARD + depends...
89040b21e7e2205985feb77f9a83138ab9cb0dfd
Analyze and fix the following issue in the Linux kernel code: [PATCH] w1: Fix for kconfig entry typo
Problem Details: Based on patch from Alexander Rigbo <alexander.rigbo@acgnystrom.se> Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/w1/slaves/Kconfig b/drivers/w1/slaves/Kconfig index d18d6424cd21..904e5aeb696c 100644 --- a/drivers/w1/slaves/Kconfig +++ b/drivers/w1/slaves/Kconfig @@ -9,7 +9,7 @@ config W1_SLAVE_THERM tristate "Thermal family implementation" depends on W1 help - Say Y here if you want to connect...
bfdc0c280a497575670e87efa89e78a88438483b
Analyze and fix the following issue in the Linux kernel code: [PATCH] KVM: Fix vmx hardware_enable() on macbooks
Problem Details: It seems macbooks set bit 2 but not bit 0, which is an "enabled but vmxon will fault" setting. Signed-off-by: Avi Kivity <avi@qumranet.com> Tested-by: Alex Larsson (sometimes testing helps) Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index ea3bdbb0da9c..f0f0b1a781f8 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c @@ -534,7 +534,7 @@ static __init void hardware_enable(void *garbage) u64 old; rdmsrl(MSR_IA32_FEATURE_CONTROL, old); - if ((old & 5) == 0) + if ((old & 5) != 5) /*...
011e3a9ad4891ba1b27e281e085228189c56b137
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix crossbuilding checkstack
Problem Details: The previous checkstack fix for UML, which needs to use the host's tools, was wrong in the crossbuilding case. It would use the build host's, rather than the target's, toolchain. This patch removes the old fix and adds an explicit special case for UML, leaving everyone else alone. Signed-off-by: Jef...
```diff diff --git a/Makefile b/Makefile index 4eabaa8afbff..f732e75be43d 100644 --- a/Makefile +++ b/Makefile @@ -1390,12 +1390,18 @@ endif #ifeq ($(mixed-targets),1) PHONY += checkstack kernelrelease kernelversion -# Use $(SUBARCH) here instead of $(ARCH) so that this works for UML. -# In the UML case, $(SUBARCH...
dd47ea755693228bf842c779e8afdfa47efb20a3
Analyze and fix the following issue in the Linux kernel code: [PATCH] slab: fix sleeping in atomic bug
Problem Details: Fallback_alloc() does not do the check for GFP_WAIT as done in cache_grow(). Thus interrupts are disabled when we call kmem_getpages() which results in the failure. Duplicate the handling of GFP_WAIT in cache_grow(). Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: Jay Cliburn <jacliburn@bell...
```diff diff --git a/mm/slab.c b/mm/slab.c index 2c655532f5ef..c7576b9027a6 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -3252,6 +3252,7 @@ void *fallback_alloc(struct kmem_cache *cache, gfp_t flags) struct zone **z; void *obj = NULL; int nid; + gfp_t local_flags = (flags & GFP_LEVEL_MASK); retry: /* @@ -3275,7...
3dfcaf16135150d0f025047a7525664a41bb2adf
Analyze and fix the following issue in the Linux kernel code: [PATCH] vt: fix comments to not refer to kill_proc
Problem Details: The code has been fixed to use kill_pid instead of kill_proc fix the comments as well. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c index ac5d60edbafa..311493e7b409 100644 --- a/drivers/char/vt_ioctl.c +++ b/drivers/char/vt_ioctl.c @@ -1087,7 +1087,7 @@ static void complete_change_console(struct vc_data *vc) switch_screen(vc); /* - * This can't appear below a successful k...
acd19499e9724615d720b29c74be6b218ce765c6
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix section mismatch in parainstructions
Problem Details: Section .parainstructions should not warn about section mismatches. WARNING: drivers/net/hamradio/scc.o - Section mismatch: reference to .exit.text: from .parainstructions after '' (at offset 0x0) WARNING: drivers/net/hamradio/scc.o - Section mismatch: reference to .exit.text: from .parainstructions a...
```diff diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index ac0a58222992..15ab5d02e80a 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -997,6 +997,7 @@ static int exit_section_ref_ok(const char *name) "__bug_table", /* used by powerpc for BUG() */ ".exitcall.exit", ".eh_frame", +...
d78437245aa3842e8eeaef2709753ac485465652
Analyze and fix the following issue in the Linux kernel code: [PATCH] i2o_exec_exit and i2o_driver_exit should not be __exit.
Problem Details: i2o_exec_exit and i2o_driver_exit were marked as __exit which is a bug because both are invoked from __init and __exit functions. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Cc: Markus Lidel <Markus.Lidel@shadowconnect.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torval...
```diff diff --git a/drivers/message/i2o/core.h b/drivers/message/i2o/core.h index dc388a3ff5e0..cbe384fb848c 100644 --- a/drivers/message/i2o/core.h +++ b/drivers/message/i2o/core.h @@ -18,7 +18,7 @@ extern struct i2o_driver i2o_exec_driver; extern int i2o_exec_lct_get(struct i2o_controller *); extern int __init i...
39f07223d400330b9e08aae4c77a391f2418023e
Analyze and fix the following issue in the Linux kernel code: [PATCH] isdn/gigaset: fix possible missing wakeup
Problem Details: Eliminate some possibilities for user processes writing to the Gigaset character device to be left sleeping indefinitely, by adding wakeup calls to error paths and properly disposing of pending write requests when the device is disconnected. It also removes unnecessary NULL checks before usb_free_urb(...
```diff diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c index 63b629b1cdb2..b5e7f9c7d74e 100644 --- a/drivers/isdn/gigaset/bas-gigaset.c +++ b/drivers/isdn/gigaset/bas-gigaset.c @@ -1853,20 +1853,24 @@ static int gigaset_write_cmd(struct cardstate *cs, { struct cmdbuf_t *cb; un...
eff3b634d9a0cccb6ca8b431819fa415f10804dc
Analyze and fix the following issue in the Linux kernel code: [PATCH] uml: fix net_kern workqueue abuse
Problem Details: Fix up the work on stack and exit scope trouble by placing the work_struct in the uml_net_private data. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index b2e9762e13c5..afe3d427ddfa 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c @@ -72,9 +72,11 @@ static int uml_net_rx(struct net_device *dev) return pkt_len; } -static void uml_dev_close(void* dev) +static voi...