id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
512875bd9661368da6f993205a61213b79ba1df0
Analyze and fix the following issue in the Linux kernel code: dm: table detect io beyond device
Problem Details: This patch fixes a panic on shrinking a DM device if there is outstanding I/O to the part of the device that is being removed. (Normally this doesn't happen - a filesystem would be resized first, for example.) The bug is that __clone_and_map() assumes dm_table_find_target() always returns a valid poin...
```diff diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 138200bf5e0b..be730fdd4830 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c @@ -1250,21 +1250,17 @@ static int target_message(struct dm_ioctl *param, size_t param_size) if (!table) goto out_argv; - if (tmsg->sector >= dm_table...
3c378158d4cd2125b42fe2b8bb23d512fdff6fe6
Analyze and fix the following issue in the Linux kernel code: mm: fix exit_mmap BUG() on a.out binary exit
Problem Details: The problem was introduced by commit "mm: variable length argument support" (b6a2fea39318e43fee84fa7b0b90d68bed92d2ba) as it didn't update fs/binfmt_aout.c like other binfmt's. I noticed that on alpha when accidentally launched old OSF/1 Acrobat Reader binary. Obviously, other architectures are affect...
```diff diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c index e176d195e7e5..7596e1e94cde 100644 --- a/fs/binfmt_aout.c +++ b/fs/binfmt_aout.c @@ -319,7 +319,6 @@ static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs) current->mm->free_area_cache = current->mm->mmap_base; current->mm->cached...
2c3b20e91fe3a083c5d9bc79437c485866ea251c
Analyze and fix the following issue in the Linux kernel code: debug: add end-of-oops marker
Problem Details: Right now it's nearly impossible for parsers that collect kernel crashes from logs or emails (such as www.kerneloops.org) to detect the end-of-oops condition. In addition, it's not currently possible to detect whether or not 2 oopses that look alike are actually the same oops reported twice, or are tru...
```diff diff --git a/kernel/panic.c b/kernel/panic.c index 6f6e03e91595..da4d6bac270e 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -19,6 +19,7 @@ #include <linux/nmi.h> #include <linux/kexec.h> #include <linux/debug_locks.h> +#include <linux/random.h> int panic_on_oops; int tainted; @@ -265,6 +266,20 @@ v...
36bb61346d9e64b55285f27363e93a6e96f2abba
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix OOPS in dma_sync_*_for_device()
Problem Details: I included these operations vector cases for situations where we never need to do anything, the entries aren't filled in by any implementation, so we OOPS trying to invoke NULL pointer functions. Really make them NOPs, to fix the bug. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/asm-sparc64/dma-mapping.h b/include/asm-sparc64/dma-mapping.h index 1fc655452b81..38cbec76a33f 100644 --- a/include/asm-sparc64/dma-mapping.h +++ b/include/asm-sparc64/dma-mapping.h @@ -25,15 +25,9 @@ struct dma_ops { void (*sync_single_for_cpu)(struct device *dev, dma_addr_t dma...
9ac71d00398674aaec664f30559f0a21d963862f
Analyze and fix the following issue in the Linux kernel code: [POWERPC] CHRP: Fix possible NULL pointer dereference
Problem Details: This fixes a possible NULL pointer dereference inside of strncmp() if of_get_property() fails. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c index 59306261f5b2..42a21bab76c8 100644 --- a/arch/powerpc/platforms/chrp/setup.c +++ b/arch/powerpc/platforms/chrp/setup.c @@ -115,7 +115,7 @@ void chrp_show_cpuinfo(struct seq_file *m) seq_printf(m, "machine\t\t: CHRP %s\...
08a644ecef9383b109b763f5087265fd1759875f
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Stop the TOC overflowing for large builds
Problem Details: We were using -mno-minimal-toc on everything in arch/powerpc/kernel, which means that all the functions in there were putting all their TOC entries in the top-level TOC, and it was overflowing on an allyesconfig build. For various reasons, prom_init.c does need -mno-minimal-toc, but the other .c files...
```diff diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index ca51f0cf27ab..9374bc9a2dd1 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile @@ -3,7 +3,7 @@ # ifeq ($(CONFIG_PPC64),y) -EXTRA_CFLAGS += -mno-minimal-toc +CFLAGS_prom_init.o += -mno-minimal-toc endif ...
54a24cbbd0184faffc37c39cd3a896f4ddac3e03
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix PCI IRQ fallback code to not map IRQ 0
Problem Details: The PCI IRQ code has a fallback when the device-tree parsing fails, that tries to map the interrupt indicated by PCI_INTERRUPT_LINE if the firmware set something in there. This is a bit fragile but has proven useful in some cases so far. However, it's causing us to incorrectly try to map interrupt 0 on...
```diff diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 88838b0f8b90..571854f2906c 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c @@ -225,10 +225,11 @@ int pci_read_irq_line(struct pci_dev *pci_dev) if (pin == 0) return -1; if (pci_r...
bcf988a19458f08950551f66c110e41fac452b2b
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Various fixes to pcibios_enable_device()
Problem Details: Our implementation of pcibios_enable_device() has a couple of problems. One is that it should not check IORESOURCE_UNSET, as this might be left dangling after resource assignment (shouldn't but there are bugs), but instead, we make it check resource->parent which should be a reliable indication that t...
```diff diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 8935661d12d0..b6d4767e4e27 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c @@ -1147,7 +1147,10 @@ int pcibios_enable_device(struct pci_dev *dev, int mask) r = &dev->resource[idx]; if...
24f8c827f9b8ab2c8644f7ab85a1b1d58fc0fcf7
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Updates/fixes to 32 bits pcibios_enable_device()
Problem Details: Our implementation of pcibios_enable_device() incorrectly ignores the mask argument and always checks that all resources have been allocated, which isn't the right thing to do anymore. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c index ce7c20c8191f..12b74fd098ee 100644 --- a/arch/powerpc/kernel/pci_32.c +++ b/arch/powerpc/kernel/pci_32.c @@ -530,10 +530,16 @@ int pcibios_enable_device(struct pci_dev *dev, int mask) pci_read_config_word(dev, PCI_COMMAND, &cmd)...
50c9bc2fc86fddd39eea6a12ceb81585bc2aafaa
Analyze and fix the following issue in the Linux kernel code: [POWERPC] fix iSeries PCI resource management
Problem Details: The way iSeries manages PCI IO and Memory resources is a bit strange and is based on overriding the content of those resources with home cooked ones afterward. This changes it a bit to better integrate with the new resource handling so that the "virtual" tokens that iSeries replaces resources with are...
```diff diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index d804c8d0be00..f706b7e83d7e 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c @@ -190,6 +190,20 @@ int pci_read_irq_line(struct pci_dev *pci_dev) struct of_irq oirq; unsigned int virq; ...
bf5e2ba28f24f82a64524ef4772c9ebe12e2cd2a
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Merge PCI resource fixups
Problem Details: The PCI code in 32 and 64 bits fixes up resources differently. 32 bits uses a header quirk plus handles bridges in pcibios_fixup_bus() while 64 bits does things in various places depending on whether you are using OF probing, using PCI hotplug, etc... This merges those by basically using the 32 bits ...
```diff diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 0245c989d30a..c61e9324f770 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c @@ -691,3 +691,133 @@ void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, res->end = (regio...
f3d711aa02791ca5efa33112994063c9aeaf39ee
Analyze and fix the following issue in the Linux kernel code: [POWERPC] include/asm-ppc/: Spelling fixes
Problem Details: Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/include/asm-ppc/8xx_immap.h b/include/asm-ppc/8xx_immap.h index 1311cefdfd30..4b0e15206006 100644 --- a/include/asm-ppc/8xx_immap.h +++ b/include/asm-ppc/8xx_immap.h @@ -123,7 +123,7 @@ typedef struct mem_ctlr { #define OR_G5LA 0x00000400 /* Output #GPL5 on #GPL_A5 */ #define OR_G5LS 0x0000020...
c90e10962516c36edf5d9ea756cf11c7853084c5
Analyze and fix the following issue in the Linux kernel code: [POWERPC] arch/ppc/: Spelling fixes
Problem Details: Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/ppc/syslib/ppc8xx_pic.c b/arch/ppc/syslib/ppc8xx_pic.c index e8619c750732..bce9a75c80e3 100644 --- a/arch/ppc/syslib/ppc8xx_pic.c +++ b/arch/ppc/syslib/ppc8xx_pic.c @@ -16,7 +16,7 @@ extern int cpm_get_irq(void); * the only interrupt controller. Some boards, like the MBX and * Sandpoint h...
567e9fdd49bcfa7e15ebc0005853ac5529c81856
Analyze and fix the following issue in the Linux kernel code: [POWERPC] include/asm-powerpc/: Spelling fixes
Problem Details: Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/include/asm-powerpc/8xx_immap.h b/include/asm-powerpc/8xx_immap.h index 1311cefdfd30..4b0e15206006 100644 --- a/include/asm-powerpc/8xx_immap.h +++ b/include/asm-powerpc/8xx_immap.h @@ -123,7 +123,7 @@ typedef struct mem_ctlr { #define OR_G5LA 0x00000400 /* Output #GPL5 on #GPL_A5 */ #define OR...
00d70419fc8f86db94f56e0191be392c4a57f244
Analyze and fix the following issue in the Linux kernel code: [POWERPC] arch/powerpc/: Spelling fixes
Problem Details: Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/boot/4xx.c b/arch/powerpc/boot/4xx.c index ebf9e217612d..3d0e4f921f1d 100644 --- a/arch/powerpc/boot/4xx.c +++ b/arch/powerpc/boot/4xx.c @@ -122,7 +122,7 @@ void ibm4xx_denali_fixup_memsize(void) else dpath = 4; /* 32 bits */ - /* get adress pins (rows) */ + /* get address pins ...
84631f37cc405dd6dcd566f9fa4e8a3ca2f03f76
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Implement pci_set_dma_mask() in terms of the dma_ops
Problem Details: PowerPC currently doesn't implement pci_set_dma_mask(), which means drivers calling it will get the generic version in drivers/pci/pci.c. The powerpc dma mapping ops include a dma_set_mask() hook, which luckily is not implemented by anyone - so there is no bug in the fact that the hook is currently ne...
```diff diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index bf06926f677d..f5c4628698b9 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c @@ -69,6 +69,22 @@ struct dma_mapping_ops *get_pci_dma_ops(void) } EXPORT_SYMBOL(get_pci_dma_ops); + +int pci_set_dma_mask(st...
731e74c43d4e47daf327748128f1a3648e5d39a5
Analyze and fix the following issue in the Linux kernel code: [POWERPC] iSeries: Fix unregistering HV event handlers
Problem Details: Commit fbd568a3e61a7decb8a754ad952aaa5b5c82e9e5 ("Change synchronize_kernel to _rcu and _sched") changed the deprecated synchronize_kernel() in HvLpEvent_unregisterHandler() to synchronize_rcu(). It turns out that it should have been synchronize_sched(). Signed-off-by: Stephen Rothwell <sfr@canb.auug...
```diff diff --git a/arch/powerpc/platforms/iseries/lpevents.c b/arch/powerpc/platforms/iseries/lpevents.c index 34bdbbe3ce59..02c142227b51 100644 --- a/arch/powerpc/platforms/iseries/lpevents.c +++ b/arch/powerpc/platforms/iseries/lpevents.c @@ -226,7 +226,7 @@ int HvLpEvent_unregisterHandler(HvLpEvent_Type eventType)...
b24d22b1d12c436a86282347868785207cff8a88
Analyze and fix the following issue in the Linux kernel code: iwlwifi: fix possible priv->mutex deadlock during suspend
Problem Details: This patch moves _cancel_deferred_work out of mutex protection and removes unnecessary mutex in pci_suspend and pci_resume. Cc: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 4bdf237f6adc..5c67b5b409e0 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c @@ -6243,8 +6243,6 @@ static void __iwl_down(struct iwl_priv *priv) ...
286e310f94b9459f3fa975333781c969b1041522
Analyze and fix the following issue in the Linux kernel code: [TG3]: Endianness bugfix.
Problem Details: tg3_nvram_write_block_unbuffered() is reading data from nvram into allocated buffer before overwriting a part of it with user-supplied data. Then it feeds the entire page back to nvram. It should be storing the words it had read as little-endian, not as host-endian. Note that tg3_set_eeprom() does ex...
```diff diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index a76bb3dd30f7..22eb7c8c1a25 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -10251,8 +10251,7 @@ static int tg3_nvram_write_block_unbuffered(struct tg3 *tp, u32 offset, u32 len, phy_addr = offset & ~pagemask; for (j = 0; j < pagesize; j +...
b9fc7dc514566e9788c7f064bb08f8b6e2fe6f72
Analyze and fix the following issue in the Linux kernel code: [TG3]: Endianness annotations.
Problem Details: Fixed misannotations, introduced a new helper - tg3_nvram_read_le(). It gets __le32 * instead of u32 * and puts there the value converted to little-endian. A lot of callers of tg3_nvram_read() were doing that; converted them to tg3_nvram_read_le(). At that point the driver is practically endian-clean...
```diff diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 4942f7d18937..a76bb3dd30f7 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -8189,6 +8189,7 @@ static int tg3_get_eeprom_len(struct net_device *dev) } static int tg3_nvram_read(struct tg3 *tp, u32 offset, u32 *val); +static int tg3_nvram_read...
20880e8936e467fe30d79aa838c8d24b7073648f
Analyze and fix the following issue in the Linux kernel code: NET: mac80211: fix inappropriate memory freeing
Problem Details: Fix inappropriate memory freeing in case of requested rate_control_ops was not found. In this case the list head entity is going to be accidentally wasted. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Acked-by: Michael Wu <flamingice@sourmilk.net> Signed-off-by: Andrew Morton <akpm@linux-found...
```diff diff --git a/net/mac80211/ieee80211_rate.c b/net/mac80211/ieee80211_rate.c index 3260a4a0ecc5..c3f278393741 100644 --- a/net/mac80211/ieee80211_rate.c +++ b/net/mac80211/ieee80211_rate.c @@ -60,11 +60,11 @@ void ieee80211_rate_control_unregister(struct rate_control_ops *ops) list_for_each_entry(alg, &rate_ctr...
3333590e94262aebb5d0fb767cc7ed8b2359705c
Analyze and fix the following issue in the Linux kernel code: mac80211: fix header ops
Problem Details: When using recvfrom() on a SOCK_DGRAM packet socket, I noticed that the MAC address passed back for wireless frames was always completely wrong. The reason for this is that the header parse function assigned to our virtual interfaces is a function parsing an 802.11 rather than 802.3 header. This patch ...
```diff diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c index 505af1f067ab..6378850d8580 100644 --- a/net/mac80211/ieee80211.c +++ b/net/mac80211/ieee80211.c @@ -427,7 +427,6 @@ static const struct header_ops ieee80211_header_ops = { void ieee80211_if_setup(struct net_device *dev) { ether_setup(dev...
f941b168a4d7281bf49e166f2febc49470c0149f
Analyze and fix the following issue in the Linux kernel code: pata_hpt37x: Fix HPT374 detection
Problem Details: Bug #9261 Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c index 46dc70e0dee7..c79f066c2bc9 100644 --- a/drivers/ata/pata_hpt37x.c +++ b/drivers/ata/pata_hpt37x.c @@ -375,7 +375,7 @@ static int hpt374_pre_reset(struct ata_link *link, unsigned long deadline) pci_write_config_word(pdev, mcrbase + 2, mcr...
fcbe6e9709f90fd83cfa614a4e0efe83174018ea
Analyze and fix the following issue in the Linux kernel code: ps3fb: Fix ps3fb free_irq() dev_id
Problem Details: The dev_id arg passed to free_irq() must match that passed to request_irq(). Fixes this PS3 error message: Trying to free already-free IRQ 44 Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Linus Torvalds <...
```diff diff --git a/drivers/video/ps3fb.c b/drivers/video/ps3fb.c index 614586557cd4..b3128903d673 100644 --- a/drivers/video/ps3fb.c +++ b/drivers/video/ps3fb.c @@ -1212,7 +1212,7 @@ err_fb_dealloc: err_framebuffer_release: framebuffer_release(info); err_free_irq: - free_irq(ps3fb.irq_no, dev); + free_irq(ps3fb.i...
fbdcf18df73758b2e187ab94678b30cd5f6ff9f9
Analyze and fix the following issue in the Linux kernel code: x86: fix show cpuinfo cpu number always zero
Problem Details: when called by setup_arch) after smp_store_cpu_info() had set it to the correct value. The error shows up in 'cat /proc/cpuinfo' will all cpus = 0. Signed-off-by: Mike Travis <travis@sgi.com> Cc: Andi Kleen <ak@suse.de> Cc: Christoph Lameter <clameter@sgi.com> Cc: Jack Steiner <steiner@sgi.com> Cc: S...
```diff diff --git a/arch/x86/kernel/smpboot_64.c b/arch/x86/kernel/smpboot_64.c index 500670c93d81..594889521da1 100644 --- a/arch/x86/kernel/smpboot_64.c +++ b/arch/x86/kernel/smpboot_64.c @@ -141,8 +141,8 @@ static void __cpuinit smp_store_cpu_info(int id) struct cpuinfo_x86 *c = &cpu_data(id); *c = boot_cpu_d...
3d054f0fade192b454592817c16e0f49e3e295dc
Analyze and fix the following issue in the Linux kernel code: x86_32: disable_pse must be __cpuinitdata
Problem Details: CONFIG_HOTPLUG_CPU=y: WARNING: vmlinux.o(.text+0xfa52): Section mismatch: reference to .init.data:disable_pse (between 'identify_cpu' and 'identify_secondary_cpu') [ akpm@linux-foundation.org: initializer fix. ] Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-fo...
```diff diff --git a/arch/x86/kernel/setup_32.c b/arch/x86/kernel/setup_32.c index e1e18c34c821..9c24b45b513c 100644 --- a/arch/x86/kernel/setup_32.c +++ b/arch/x86/kernel/setup_32.c @@ -67,7 +67,7 @@ address, and must not be in the .bss segment! */ unsigned long init_pg_tables_end __initdata = ~0UL; -int disabl...
f2206ec92c1bd2145a63b2ef1f6abccd6439fe73
Analyze and fix the following issue in the Linux kernel code: x86 smpboot_32.c section fixes
Problem Details: CONFIG_HOTPLUG_CPU=y: WARNING: vmlinux.o(.text+0x22c60): Section mismatch: reference to .init.data:cpu_idle_tasks (between 'do_boot_cpu' and 'do_warm_boot_cpu') WARNING: vmlinux.o(.text+0x22c99): Section mismatch: reference to .init.data:cpu_idle_tasks (between 'do_boot_cpu' and 'do_warm_boot_cpu') WA...
```diff diff --git a/arch/x86/kernel/smpboot_32.c b/arch/x86/kernel/smpboot_32.c index ef0f34ede1ab..4ea80cbe52e5 100644 --- a/arch/x86/kernel/smpboot_32.c +++ b/arch/x86/kernel/smpboot_32.c @@ -60,7 +60,7 @@ #include <asm/mtrr.h> /* Set if we find a B stepping CPU */ -static int __devinitdata smp_b_stepping; +stat...
d53379832624c0ecab7f46749c8b72e49a88d160
Analyze and fix the following issue in the Linux kernel code: x86 apic_32.c section fix
Problem Details: CONFIG_HOTPLUG_CPU=y: WARNING: vmlinux.o(.text+0x2390d): Section mismatch: reference to .init.text.5:setup_local_APIC (between 'start_secondary' and 'check_tsc_warp') Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <ming...
```diff diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c index 96986b46bc85..edb5108e5d0e 100644 --- a/arch/x86/kernel/apic_32.c +++ b/arch/x86/kernel/apic_32.c @@ -849,7 +849,7 @@ void __init init_bsp_APIC(void) /** * setup_local_APIC - setup the local APIC */ -void __devinit setup_local_APIC(vo...
3a6927906f1b2adf5a31b789322d32eb8559ada0
Analyze and fix the following issue in the Linux kernel code: Do dirty page accounting when removing a page from the page cache
Problem Details: Krzysztof Oledzki noticed a dirty page accounting leak on some of his machines, causing the machine to eventually lock up when the kernel decided that there was too much dirty data, but nobody could actually write anything out to fix it. The culprit turns out to be filesystems (cough ext3 with data=jo...
```diff diff --git a/mm/filemap.c b/mm/filemap.c index 188cf5fd3e8d..f4d0cded0e10 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -124,6 +124,18 @@ void __remove_from_page_cache(struct page *page) mapping->nrpages--; __dec_zone_page_state(page, NR_FILE_PAGES); BUG_ON(page_mapped(page)); + + /* + * Some filesyste...
285fbd66330cd5899f4e607e3e65ab5921ddabf0
Analyze and fix the following issue in the Linux kernel code: [IA64] make flush_tlb_kernel_range() an inline function
Problem Details: This fixes an unused variable warning in mm/vmalloc.c. Tony: also fix resulting fallout in uncached.c with a typo in args to flush_tlb_kernel_range(). Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
```diff diff --git a/arch/ia64/kernel/uncached.c b/arch/ia64/kernel/uncached.c index a7be4f203420..2a90c32024f4 100644 --- a/arch/ia64/kernel/uncached.c +++ b/arch/ia64/kernel/uncached.c @@ -118,7 +118,7 @@ static int uncached_add_chunk(struct uncached_pool *uc_pool, int nid) for (i = 0; i < (IA64_GRANULE_SIZE / PAGE...
17fbe0043e9d623e46a57b153aa0b80ee9de7790
Analyze and fix the following issue in the Linux kernel code: [IA64] Guard elfcorehdr_addr with #if CONFIG_PROC_FS
Problem Details: Access to elfcorehdr_addr needs to be guarded by #if CONFIG_PROC_FS as well as the existing #if guards. Fixes the following build problem: arch/ia64/hp/common/built-in.o: In function `sba_init':arch/ia64/hp/common/sba_iommu.c:2043: undefined reference to `elfcorehdr_addr' :arch/ia64/hp/common/sba_iom...
```diff diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c index bc859a311eaf..45bf04eb7d70 100644 --- a/arch/ia64/hp/common/sba_iommu.c +++ b/arch/ia64/hp/common/sba_iommu.c @@ -2034,7 +2034,8 @@ sba_init(void) if (!ia64_platform_is("hpzx1") && !ia64_platform_is("hpzx1_swiotlb")) retur...
64135fa97ce016058f95345425a9ebd04ee1bd2a
Analyze and fix the following issue in the Linux kernel code: [IA64] Fix Altix BTE error return status
Problem Details: The Altix shub2 BTE error detail bits are in a different location than on shub1. The current code does not take this into account resulting in all shub2 BTE failures mapping to "unknown". This patch reads the error detail bits from the proper location, so the correct BTE failure reason is returned fo...
```diff diff --git a/arch/ia64/sn/kernel/bte.c b/arch/ia64/sn/kernel/bte.c index b362d6d6a8c8..9456d4034024 100644 --- a/arch/ia64/sn/kernel/bte.c +++ b/arch/ia64/sn/kernel/bte.c @@ -3,7 +3,7 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. * - * Copyright (c) 2000-2...
f91266edba3c6ef001819c5abe4c3a0643f66fc9
Analyze and fix the following issue in the Linux kernel code: [POWERPC] powermac: Use generic suspend code
Problem Details: This adds platform_suspend_ops for PMU based machines, directly in the PMU driver. This allows suspending via /sys/power/state on powerbooks. The patch also replaces the PMU ioctl with a simple call to pm_suspend(PM_SUSPEND_MEM). Additionally, it cleans up some debug code. Signed-off-by: Johannes B...
```diff diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 0e233185ad14..8f98257e6a15 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c @@ -10,13 +10,11 @@ * * Copyright (C) 1998 Paul Mackerras and Fabio Riccardi. * Copyright (C) 2001-2002 Benjamin Herrenschmidt ...
887ef35ae4eb269839e0f296b132edc15477db1c
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix sleep on powerbook 3400
Problem Details: Sleep on the powerbook 3400 has been broken since the change that made powerbook_sleep_3400 call pmac_suspend_devices(), which disables interrupts. There are a couple of loops in powerbook_sleep_3400 that depend on interrupts being enabled, and in fact it has to have interrupts enabled at the point of...
```diff diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 6df3f3503e5b..0e233185ad14 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c @@ -202,6 +202,12 @@ static int proc_read_options(char *page, char **start, off_t off, static int proc_write_options(struct file *fi...
ee211b37aa98123b1d9b19d228011e632a4bbe75
Analyze and fix the following issue in the Linux kernel code: [IA64] print kernel release in OOPS to make kerneloops.org happy
Problem Details: The ia64 oops message doesn't include the kernel version, which makes it hard to automatically categorize oops messages scraped from mailing lists and bug databases. Signed-off-by: Tony Luck <tony.luck@intel.com>
```diff diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index 2418289ee5ca..a70ad185725c 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c @@ -27,6 +27,7 @@ #include <linux/interrupt.h> #include <linux/delay.h> #include <linux/kdebug.h> +#include <linux/utsname.h> #incl...
313d8e57b074d5f03dfed2755f21ae41a6f0fd5a
Analyze and fix the following issue in the Linux kernel code: [IA64] Two trivial spelling fixes
Problem Details: s/addres/address/ s/performanc/performance/ Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
```diff diff --git a/arch/ia64/sn/pci/tioce_provider.c b/arch/ia64/sn/pci/tioce_provider.c index cee9379d44e0..e1a3e19d3d9c 100644 --- a/arch/ia64/sn/pci/tioce_provider.c +++ b/arch/ia64/sn/pci/tioce_provider.c @@ -41,7 +41,7 @@ * } else * do desired mmr access * - * According to hw, we can use reads instead of ...
a1ef4849fdca379cf51cbacd337e8fa742437d26
Analyze and fix the following issue in the Linux kernel code: [POWERPC] OProfile: fix cbe pm signal routing problem
Problem Details: Fix debug_bus_control and group_control PMU register values set up in set_pm_event(). Initialize variables before calling set_pm_event(). Delete unused static array and code that initialized it. Rename constant to better reflect usage. Signed-off-by: Bob Nelson <rrnelson@us.ibm.com> Signed-off-by: Ar...
```diff diff --git a/arch/powerpc/oprofile/op_model_cell.c b/arch/powerpc/oprofile/op_model_cell.c index bb6bff51ce48..13929771bee7 100644 --- a/arch/powerpc/oprofile/op_model_cell.c +++ b/arch/powerpc/oprofile/op_model_cell.c @@ -61,7 +61,7 @@ static unsigned int spu_cycle_reset; #define NUM_THREADS 2 /* numb...
a169e63740779f62a9a5ddf0aa61091a393a03c5
Analyze and fix the following issue in the Linux kernel code: [SCSI] initio: bugfix for accessors patch
Problem Details: patch: [SCSI] initio: convert to use the data buffer accessors had a small but fatal bug in that it didn't increment the pointer into the initio scatterlist descriptors as it looped over the block generated ones. Fixed here. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Botto...
```diff diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c index 769a7a805859..01bf0189367d 100644 --- a/drivers/scsi/initio.c +++ b/drivers/scsi/initio.c @@ -2616,6 +2616,7 @@ static void initio_build_scb(struct initio_host * host, struct scsi_ctrl_blk * c scsi_for_each_sg(cmnd, sglist, cblk->sglen, i) { ...
cd81621c5c5c869b848818b506962dab4499e0d9
Analyze and fix the following issue in the Linux kernel code: [SCSI] st: fix kernel BUG at include/linux/scatterlist.h:59!
Problem Details: This is caused by a missing scatterlist initialisation (it only shows up when sg list handling debugging is turned on). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Kai Makisara <Kai.Makisara@kolumbus.fi> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
```diff diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 98dfd6ea209c..328c47c6aeb1 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -3611,6 +3611,7 @@ static struct st_buffer * tb->dma = need_dma; tb->buffer_size = got; + sg_init_table(tb->sg, max_sg); return tb; } ```
99f1f534922a2f2251ba05b14657a1c62882a80e
Analyze and fix the following issue in the Linux kernel code: [SCSI] initio: fix conflict when loading driver
Problem Details: > I have a scanner connected to a Initio INI-950 SCSI card and I recently > upgraded from SuSE 10.2 to 10.3. The new kernel doesn't see any of my > devices. I get the following in /var/log/messages: > > ACPI: PCI Interrupt 0000:00:0a.0[A] -> GSI 17 (level, low) -> IRQ 16 > initio: I/O port range 0x0 ...
```diff diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c index 4c4465d39a1d..769a7a805859 100644 --- a/drivers/scsi/initio.c +++ b/drivers/scsi/initio.c @@ -2867,6 +2867,7 @@ static int initio_probe_one(struct pci_dev *pdev, } host = (struct initio_host *)shost->hostdata; memset(host, 0, sizeof(struct i...
cedefa13db502432905c29819c195f46805b13eb
Analyze and fix the following issue in the Linux kernel code: [SCSI] sym53c8xx: fix "irq X: nobody cared" regression
Problem Details: The patch described by the following excerpt from ChangeLog-2.6.24-rc1 eventually causes a "irq X: nobody cared" error after a while: commit 99c9e0a1d6cfe1ba1169a7a81435ee85bc00e4a1 Author: Matthew Wilcox <matthew@wil.cx> Date: Fri Oct 5 15:55:12 2007 -0400 [SCSI] sym53c8xx: Make interrupt hand...
```diff diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c index 463f119f20e9..254bdaeb35ff 100644 --- a/drivers/scsi/sym53c8xx_2/sym_hipd.c +++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c @@ -2791,7 +2791,7 @@ irqreturn_t sym_interrupt(struct Scsi_Host *shost) istat = INB(np, nc_istat);...
c80ddf00cde4c21018dbd0ea2872736c90c7dda2
Analyze and fix the following issue in the Linux kernel code: [SCSI] dpt_i2o: driver is only 32 bit so don't set 64 bit DMA mask
Problem Details: This fixes a potential corruption bug where the truncation would cause reading or writing to the wrong memory area on machines with >4GB of main memory. Cc: Stable Kernel Tree <stable@kernel.org> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
```diff diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index 70f48a1a6d58..b31d1c95c9fb 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c @@ -906,8 +906,7 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev } pci_set_master(pDev); - if (pci_set_dma_mask...
7ee2413ca0da80c819f2388c0faeffce1ac8513b
Analyze and fix the following issue in the Linux kernel code: [SCSI] sym53c8xx: fix free_irq() regression
Problem Details: The following commit changed the pointer passed to request_irq(), but failed to change the pointer passed to free_irq(): commit 99c9e0a1d6cfe1ba1169a7a81435ee85bc00e4a1 Author: Matthew Wilcox <matthew@wil.cx> Date: Fri Oct 5 15:55:12 2007 -0400 [SCSI] sym53c8xx: Make interrupt handler capable o...
```diff diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c index 0f74aba5b237..9e0908d1981a 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.c +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c @@ -1243,7 +1243,7 @@ static void sym_free_resources(struct sym_hcb *np, struct pci_dev *pdev) * ...
4aae07025265151e3f7041dfbf0f529e122de1d8
Analyze and fix the following issue in the Linux kernel code: x86: fix "Kernel panic - not syncing: IO-APIC + timer doesn't work!"
Problem Details: this is the tale of a full day spent debugging an ancient but elusive bug. after booting up thousands of random .config kernels, i finally happened to generate a .config that produced the following rare bootup failure on 32-bit x86: | ..TIMER: vector=0x31 apic1=0 pin1=2 apic2=-1 pin2=-1 | ..MP-BIOS b...
```diff diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c index 6cf27319a91c..c3a565bba106 100644 --- a/arch/x86/kernel/io_apic_32.c +++ b/arch/x86/kernel/io_apic_32.c @@ -1882,13 +1882,16 @@ __setup("no_timer_check", notimercheck); static int __init timer_irq_works(void) { unsigned long t1 =...
971e5b35fb02c5088d49e6c024aab73582a35b71
Analyze and fix the following issue in the Linux kernel code: genirq: revert lazy irq disable for simple irqs
Problem Details: In commit 76d2160147f43f982dfe881404cfde9fd0a9da21 lazy irq disabling was implemented, and the simple irq handler had a masking set to it. Remy Bohmer discovered that some devices in the ARM architecture would trigger the mask, but never unmask it. His patch to do the unmasking was questioned by Russe...
```diff diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 9b5dff6b3f6a..44019ce30a14 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -297,18 +297,13 @@ handle_simple_irq(unsigned int irq, struct irq_desc *desc) if (unlikely(desc->status & IRQ_INPROGRESS)) goto out_unlock; + desc->status &= ~(IRQ...
0b0122faf4833548072d23f3c3063c23bc289746
Analyze and fix the following issue in the Linux kernel code: x86: kprobes bugfix
Problem Details: Kprobes for x86-64 may cause a kernel crash if it inserted on "iret" instruction. "call absolute" is invalid on x86-64, so we don't need treat it. - Change the processing order as same as x86-32. - Add "iret"(0xcf) case. - Remove next_rip local variable. Signed-off-by: Masami Hiramatsu <mhiramat@r...
```diff diff --git a/arch/x86/kernel/kprobes_64.c b/arch/x86/kernel/kprobes_64.c index a575059fb420..5df19a9f9239 100644 --- a/arch/x86/kernel/kprobes_64.c +++ b/arch/x86/kernel/kprobes_64.c @@ -485,7 +485,6 @@ static void __kprobes resume_execution(struct kprobe *p, struct pt_regs *regs, struct kprobe_ctlblk *kcb) ...
29b6cd794e73eea7600541d06288a09861ffecb0
Analyze and fix the following issue in the Linux kernel code: x86: jprobe bugfix
Problem Details: jprobe for x86-64 may cause kernel page fault when the jprobe_return() is called from incorrect function. - Use jprobe_saved_regs instead getting it from stack. (Especially on x86-64, it may get incorrect data, because pt_regs can not be get by using container_of(rsp)) - Change the type of stack ...
```diff diff --git a/arch/x86/kernel/kprobes_32.c b/arch/x86/kernel/kprobes_32.c index d87a523070d1..3a020f79f82b 100644 --- a/arch/x86/kernel/kprobes_32.c +++ b/arch/x86/kernel/kprobes_32.c @@ -727,9 +727,7 @@ int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs) if ((addr > (u8 *) jprobe_ret...
b4be625852618636a6b54908c4f9d90fb29dc549
Analyze and fix the following issue in the Linux kernel code: timer: kernel/timer.c section fixes
Problem Details: This patch fixes the following section mismatches with CONFIG_HOTPLUG=n, CONFIG_HOTPLUG_CPU=y: ... WARNING: vmlinux.o(.text+0x41cd3): Section mismatch: reference to .init.data:tvec_base_done.22610 (between 'timer_cpu_notify' and 'run_timer_softirq') WARNING: vmlinux.o(.text+0x41d67): Section mismatch:...
```diff diff --git a/kernel/timer.c b/kernel/timer.c index a05817c021d6..d4527dcef1af 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -1219,11 +1219,11 @@ asmlinkage long sys_sysinfo(struct sysinfo __user *info) */ static struct lock_class_key base_lock_keys[NR_CPUS]; -static int __devinit init_timers_cpu(int ...
cdc6f27d9e3c2f7ca1a3e19c6eabb1ad6a2add5d
Analyze and fix the following issue in the Linux kernel code: clockevents: fix reprogramming decision in oneshot broadcast
Problem Details: Resolve the following regression of a choppy, almost unusable laptop: http://lkml.org/lkml/2007/12/7/299 http://bugzilla.kernel.org/show_bug.cgi?id=9525 A previous version of the code did the reprogramming of the broadcast device in the return from idle code. This was removed, but the logic in tick...
```diff diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c index aa82d7bf478a..5b86698faa0b 100644 --- a/kernel/time/tick-broadcast.c +++ b/kernel/time/tick-broadcast.c @@ -383,33 +383,6 @@ int tick_resume_broadcast_oneshot(struct clock_event_device *bc) return 0; } -/* - * Reprogram the broa...
bd87f1f028ddaad45d4a9a3621dfe688c840ba41
Analyze and fix the following issue in the Linux kernel code: oprofile: op_model_athlon.c support for AMD family 10h barcelona performance counters
Problem Details: This patch is for controlling the upper 32bits of the event ctrl msrs. This includes the upper 4 bits of the event select and the Guest Only and Host Only bits This patch is necessary to make Event Based Profiling work reliably on a Family 10h processor [akpm@linux-foundation.org: checkpatch.pl fixes...
```diff diff --git a/arch/x86/oprofile/op_model_athlon.c b/arch/x86/oprofile/op_model_athlon.c index 3057a19e4641..c3ee43333f26 100644 --- a/arch/x86/oprofile/op_model_athlon.c +++ b/arch/x86/oprofile/op_model_athlon.c @@ -1,6 +1,6 @@ /** * @file op_model_athlon.h - * athlon / K7 model-specific MSR operations + * at...
73c4efd2c88a41c8a4810904266a34423b5584e5
Analyze and fix the following issue in the Linux kernel code: sched: sysctl, proc_dointvec_minmax() expects int values for
Problem Details: min_sched_granularity_ns, max_sched_granularity_ns, min_wakeup_granularity_ns and max_wakeup_granularity_ns are declared "unsigned long". This is incorrect since proc_dointvec_minmax() expects plain "int" guard values. This bug only triggers on big endian 64 bit arches. Signed-off-by: Eric Dumazet <...
```diff diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 1135de730872..c68f68dcc605 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -225,10 +225,10 @@ static struct ctl_table root_table[] = { }; #ifdef CONFIG_SCHED_DEBUG -static unsigned long min_sched_granularity_ns = 100000; /* 100 usecs */ -static uns...
c7af77b584b02d3e321b00203a618a9c93782121
Analyze and fix the following issue in the Linux kernel code: sched: mark rwsem functions as __sched for wchan/profiling
Problem Details: This following commit http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=fdf8cb0909b531f9ae8f9b9d7e4eb35ba3505f07 un-inlined a low-level rwsem function, but did not mark it as __sched. The result is that it now shows up as thread wchan (which also affects /proc/profile st...
```diff diff --git a/kernel/rwsem.c b/kernel/rwsem.c index 1ec620c03064..cae050b05f5e 100644 --- a/kernel/rwsem.c +++ b/kernel/rwsem.c @@ -6,6 +6,7 @@ #include <linux/types.h> #include <linux/kernel.h> +#include <linux/sched.h> #include <linux/module.h> #include <linux/rwsem.h> @@ -15,7 +16,7 @@ /* * lock fo...
051a1d1afa47206e23ae03f781c6795ce870e3d5
Analyze and fix the following issue in the Linux kernel code: sched: fix crash on ia64, introduce task_current()
Problem Details: Some services (e.g. sched_setscheduler(), rt_mutex_setprio() and sched_move_task()) must handle a given task differently in case it's the 'rq->curr' task on its run-queue. The task_running() interface is not suitable for determining such tasks for platforms with one of the following options: #define _...
```diff diff --git a/kernel/sched.c b/kernel/sched.c index c6e551de795b..5ae0d4296e7c 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -508,10 +508,15 @@ EXPORT_SYMBOL_GPL(cpu_clock); # define finish_arch_switch(prev) do { } while (0) #endif +static inline int task_current(struct rq *rq, struct task_struct *p) +...
458cf5e9b666c251b04cb5242fb19fd5114645ba
Analyze and fix the following issue in the Linux kernel code: Cleanup umem driver: fix most checkpatch warnings, conform to kernel
Problem Details: coding style. linux-2.6.24-rc5-git3> checkpatch.pl-next patches/block-umem-ckpatch.patch total: 0 errors, 5 warnings, 530 lines checked All of these are line-length warnings. Only change in generated object file is due to not initializing a static global variable to 0. Signed-off-by: Randy Dun...
```diff diff --git a/drivers/block/umem.c b/drivers/block/umem.c index 5f5095afb06b..c24e1bdbad43 100644 --- a/drivers/block/umem.c +++ b/drivers/block/umem.c @@ -34,7 +34,7 @@ * - set initialised bit then. */ -//#define DEBUG /* uncomment if you want debugging info (pr_debug) */ +#undef DEBUG /* #define DEBUG...
49565124b13bb16607e7f8fc8fb1d9c5c355a1a3
Analyze and fix the following issue in the Linux kernel code: as-iosched: fix write batch start point
Problem Details: New write batches currently start from where the last one completed. We have no idea where the head is after switching batches, so this makes little sense. Instead, start the next batch from the request with the earliest deadline in the hope that we avoid a deadline expiry later on. Signed-off-by: Aa...
```diff diff --git a/block/as-iosched.c b/block/as-iosched.c index 4513fc59c9da..555cd6bf4ce5 100644 --- a/block/as-iosched.c +++ b/block/as-iosched.c @@ -1097,7 +1097,8 @@ dispatch_writes: ad->batch_data_dir = REQ_ASYNC; ad->current_write_count = ad->write_batch_count; ad->write_batch_idled = 0; - rq = ad->n...
8896f3c039b0834ba695d154299b724ee5710b97
Analyze and fix the following issue in the Linux kernel code: as-iosched: fix incorrect comments
Problem Details: Two comments refer to deadlines applying to reads only. This is not the case. Signed-off-by: Aaron Carroll <aaronc@gelato.unsw.edu.au> Acked-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
```diff diff --git a/block/as-iosched.c b/block/as-iosched.c index dc715a562e14..4513fc59c9da 100644 --- a/block/as-iosched.c +++ b/block/as-iosched.c @@ -880,7 +880,7 @@ static void as_remove_queued_request(struct request_queue *q, } /* - * as_fifo_expired returns 0 if there are no expired reads on the fifo, + * a...
24bb8fb99a062213424d3e88842eb07f693378be
Analyze and fix the following issue in the Linux kernel code: block: use jiffies conversion functions in scsi_ioctl.c
Problem Details: Use msecs_to_jiffies() and jiffies_to_msecs() in scsi_ioctl(). Sometimes callers use very large values for e.g. vendor specific media clear command and calculation can overflow. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
```diff diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c index 91c73224f4c6..9675b34638d4 100644 --- a/block/scsi_ioctl.c +++ b/block/scsi_ioctl.c @@ -230,7 +230,7 @@ static int blk_fill_sghdr_rq(struct request_queue *q, struct request *rq, rq->cmd_len = hdr->cmd_len; rq->cmd_type = REQ_TYPE_BLOCK_PC; - rq->t...
041388b54ed95cd169546bd83bacd08ee32bd7ea
Analyze and fix the following issue in the Linux kernel code: [XFS] Put the correct offset in dirent d_off
Problem Details: The recent filldir regression fix was not putting the correct d_off in each dirent. This was resulting in incorrect cookies being passed to dmapi ioctls and the wrong offset appearing in the dirents. readdir was unaffected as the filp->f_pos was being updated with the correct offset and this was being ...
```diff diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c index 54c564693d93..e1fcef2eb928 100644 --- a/fs/xfs/linux-2.6/xfs_file.c +++ b/fs/xfs/linux-2.6/xfs_file.c @@ -356,13 +356,13 @@ xfs_file_readdir( reclen = sizeof(struct hack_dirent) + de->namlen; size -= reclen; - curr_offset =...
c734c79bc397eace039bea406997efa89f879c14
Analyze and fix the following issue in the Linux kernel code: [XFS] Don't wait for pending I/Os when purging blocks beyond eof.
Problem Details: On last close of a file we purge blocks beyond eof. The same code is used when we truncate the file size down. In this case we need to wait for any pending I/Os for dirty pages beyond the new eof. For the last close case we are not changing the file size and therefore do not need to wait for any I/Os t...
```diff diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index abf509a88915..344948082819 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c @@ -1459,8 +1459,10 @@ xfs_itruncate_start( mp = ip->i_mount; vp = XFS_ITOV(ip); - vn_iowait(ip); /* wait for the completion of any pending DIOs */ - + /* wait f...
64396accc2831fcbdc7d793edc25481a5ebc75b2
Analyze and fix the following issue in the Linux kernel code: sysctl: fix ax25 checks
Problem Details: Fix: sysctl table check failed: /net/ax25/ax0/ax25_default_mode .3.9.1.2 Unknown sysctl binary path Pid: 2936, comm: kissattach Not tainted 2.6.24-rc5 #1 [<c012ca6a>] set_fail+0x3b/0x43 [<c012ce7a>] sysctl_check_table+0x408/0x456 [<c012ce8e>] sysctl_check_table+0x41c/0x456 [<c012ce8e>] sysctl_chec...
```diff diff --git a/kernel/sysctl_check.c b/kernel/sysctl_check.c index bed939f82c31..a68425a5cc1d 100644 --- a/kernel/sysctl_check.c +++ b/kernel/sysctl_check.c @@ -428,7 +428,7 @@ static struct trans_ctl_table trans_net_netrom_table[] = { {} }; -static struct trans_ctl_table trans_net_ax25_table[] = { +static s...
421d99193537a6522aac2148286f08792167d5fd
Analyze and fix the following issue in the Linux kernel code: quicklist: Set tlb->need_flush if pages are remaining in quicklist 0
Problem Details: This ensures that the quicklists are drained. Otherwise draining may only occur when the processor reaches an idle state. Fixes fatal leakage of pgd_t's on 2.6.22 and later. Signed-off-by: Christoph Lameter <clameter@sgi.com> Reported-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Cc: <stable@kernel.or...
```diff diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h index f490e43a90b9..799307eea40f 100644 --- a/include/asm-generic/tlb.h +++ b/include/asm-generic/tlb.h @@ -14,6 +14,7 @@ #define _ASM_GENERIC__TLB_H #include <linux/swap.h> +#include <linux/quicklist.h> #include <asm/pgalloc.h> #include <...
087ee8d5bec1aa6d0a1dfe3067c7298375462ceb
Analyze and fix the following issue in the Linux kernel code: Fix compilation warning in dquot.c
Problem Details: Fix compilation warning about discarded const. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/dquot.c b/fs/dquot.c index 2809768d9c41..686ab63a7c6c 100644 --- a/fs/dquot.c +++ b/fs/dquot.c @@ -965,7 +965,7 @@ err_out: } #endif -static inline void flush_warnings(struct dquot **dquots, char *warntype) +static inline void flush_warnings(struct dquot * const *dquots, char *warntype) { ...
7a3f595cc8298df14a7c71b0d876bafd8e9e1cbf
Analyze and fix the following issue in the Linux kernel code: ecryptfs: fix fsx data corruption problems
Problem Details: ecryptfs in 2.6.24-rc3 wasn't surviving fsx for me at all, dying after 4 ops. Generally, encountering problems with stale data and improperly zeroed pages. An extending truncate + write for example would expose stale data. With the changes below I got to a million ops and beyond with all mmap ops di...
```diff diff --git a/fs/ecryptfs/mmap.c b/fs/ecryptfs/mmap.c index 16a7a555f392..32c5711d79a3 100644 --- a/fs/ecryptfs/mmap.c +++ b/fs/ecryptfs/mmap.c @@ -263,14 +263,13 @@ out: return 0; } +/* This function must zero any hole we create */ static int ecryptfs_prepare_write(struct file *file, struct page *page, ...
8998979cc1f90da5a48b2e8a13833217c63f7c4a
Analyze and fix the following issue in the Linux kernel code: fix bloat-o-meter for ppc64
Problem Details: bloat-o-meter assumes that a '.' anywhere in a symbol's name means that it is static and prepends 'static.' to the first part of the symbol name, discarding the portion of the name that follows the '.'. However, the names of function entry points begin with '.' in the ppc64 ABI. This causes all funct...
```diff diff --git a/scripts/bloat-o-meter b/scripts/bloat-o-meter index ce59fc2d8de4..6501a50e17f0 100755 --- a/scripts/bloat-o-meter +++ b/scripts/bloat-o-meter @@ -18,7 +18,8 @@ def getsizes(file): for l in os.popen("nm --size-sort " + file).readlines(): size, type, name = l[:-1].split() if ty...
bb8e8bcce7eceacb52eb0a3ebb64202ad6bcc438
Analyze and fix the following issue in the Linux kernel code: I/OAT: fix null device in call to dev_err()
Problem Details: We can't use the device in a dev_err() after a kzalloc failure or after the kfree, so simplify it to the pdev that was originally passed in. Cc: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-o...
```diff diff --git a/drivers/dma/ioat_dma.c b/drivers/dma/ioat_dma.c index c17ec3276062..45e7b4666c7b 100644 --- a/drivers/dma/ioat_dma.c +++ b/drivers/dma/ioat_dma.c @@ -1363,7 +1363,7 @@ err_completion_pool: err_dma_pool: kfree(device); err_kzalloc: - dev_err(&device->pdev->dev, + dev_err(&pdev->dev, "Intel(R)...
711924b1052a280bd2452c3babb9816e4a77c723
Analyze and fix the following issue in the Linux kernel code: I/OAT: fixups from code comments
Problem Details: A few fixups from Andrew's code comments. - removed "static inline" forward-declares - changed use of min() to min_t() - removed some unnecessary NULL initializations - removed a couple of BUG() calls Fixes this: drivers/dma/ioat_dma.c: In function `ioat1_tx_submit': drivers/dma/ioat_dma.c:17...
```diff diff --git a/drivers/dma/ioat_dma.c b/drivers/dma/ioat_dma.c index c1c2dcc6fc2e..c17ec3276062 100644 --- a/drivers/dma/ioat_dma.c +++ b/drivers/dma/ioat_dma.c @@ -173,10 +173,47 @@ static void ioat_set_dest(dma_addr_t addr, tx_to_ioat_desc(tx)->dst = addr; } +/** + * ioat_dma_memcpy_issue_pending - push po...
81eabcbe0b991ddef5216f30ae91c4b226d54b6d
Analyze and fix the following issue in the Linux kernel code: mm: fix page allocation for larger I/O segments
Problem Details: In some cases the IO subsystem is able to merge requests if the pages are adjacent in physical memory. This was achieved in the allocator by having expand() return pages in physically contiguous order in situations were a large buddy was split. However, list-based anti-fragmentation changed the order...
```diff diff --git a/mm/page_alloc.c b/mm/page_alloc.c index b5a58d476c1a..d73bfad1c32f 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -847,8 +847,19 @@ static int rmqueue_bulk(struct zone *zone, unsigned int order, struct page *page = __rmqueue(zone, order, migratetype); if (unlikely(page == NULL)) br...
a33234735b2bcfb23cf1facb1f0d8656b8edab8f
Analyze and fix the following issue in the Linux kernel code: drivers/cpufreq/cpufreq_stats.c section fix
Problem Details: cpufreq_stats_free_table() mustn't be __cpuexit since it's called by the __cpuinit cpufreq_stat_cpu_callback(). This patch fixes the following section mismatch reported by Chris Clayton: WARNING: vmlinux.o(.init.text+0x143dd): Section mismatch: reference to .exit.text:cpufreq_stats_free_table (betwee...
```diff diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index 8a45d0f93e26..1b8312b02006 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c @@ -164,7 +164,7 @@ freq_table_get_index(struct cpufreq_stats *stat, unsigned int freq) return -1; } -static voi...
bd6cba53c524dccf72900435d29722b22f61d835
Analyze and fix the following issue in the Linux kernel code: cpufreq: fix missing unlocks in cpufreq_add_dev error paths.
Problem Details: Ingo hit some BUG_ONs that were probably caused by these missing unlocks causing an unbalance. He couldn't reproduce the bug reliably, so it's unknown that it's definitly fixing the problem he hit, but it's a fairly good chance, and this fixes an obvious bug. [ Dave: "Ingo followed up that he hit som...
```diff diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 5e626b12b97e..79581fab82d6 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -841,19 +841,25 @@ static int cpufreq_add_dev (struct sys_device * sys_dev) drv_attr = cpufreq_driver->attr; while ((drv_attr) && (*dr...
9548b209a37397f3036aa5bd3d5b4d3b725aa11a
Analyze and fix the following issue in the Linux kernel code: alpha: build fixes
Problem Details: This fixes some of the alpha-specific build problems, except a) modpost warning about COMMON symbol "saved_config" and b) nasty final link failure with gcc-4.x, -Os and scsi-disk driver configured built-in (due to jump table in .rodata referencing discarded .exit.text). - build failure with gcc-4.2.x:...
```diff diff --git a/arch/alpha/Makefile b/arch/alpha/Makefile index 63104ebd1806..4e1a8e2c4541 100644 --- a/arch/alpha/Makefile +++ b/arch/alpha/Makefile @@ -14,13 +14,13 @@ LDFLAGS_vmlinux := -static -N #-relax CHECKFLAGS += -D__alpha__ -m64 cflags-y := -pipe -mno-fp-regs -ffixed-8 -msmall-data -cpuflags-$(CONFIG...
9e2de407bec98fb07040f658f55fb71ba1b594f5
Analyze and fix the following issue in the Linux kernel code: fs/Kconfig: grammar fix
Problem Details: This was introduced in 4af8e944c22d8af92a7548354a9567250cc1a782 Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/Kconfig b/fs/Kconfig index 635f3e286ad8..487236c65837 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -1305,7 +1305,7 @@ config JFFS2_COMPRESSION_OPTIONS help Enabling this option allows you to explicitly choose which compression modules, if any, are enabled in JFFS2. Removing - compress...
2e12a7fb0d79d011ff9e0b09b53ca4438e5604de
Analyze and fix the following issue in the Linux kernel code: Fix lguest documentation
Problem Details: Share net is not supported, Rusty is an "idiot" . Signed-off-by: Sheela Sequeira <sheela.sequeira@gmail.com> Reviewed-by: James Morris <jmorris@namei.org> Acked-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@li...
```diff diff --git a/Documentation/lguest/lguest.txt b/Documentation/lguest/lguest.txt index 7885ab2d5f53..722d4e7fbebe 100644 --- a/Documentation/lguest/lguest.txt +++ b/Documentation/lguest/lguest.txt @@ -109,10 +109,6 @@ Running Lguest: See http://linux-net.osdl.org/index.php/Bridge for general information on ...
60af880339aae440293a0c8e93178fdcb41f8a29
Analyze and fix the following issue in the Linux kernel code: parport: "dev->timeslice" is an unsigned long, not an int
Problem Details: While auditing proc_doulongvec_ms_jiffies_minmax() usage in kernel, I found a bug in drivers/parport/procfs.c, incorrectly using sizeof(int) instead of sizeof(unsigned long) Only 64bit arches are affected by this old bug. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: Andrew Morton ...
```diff diff --git a/drivers/parport/procfs.c b/drivers/parport/procfs.c index ed82e41210d1..d950fc34320a 100644 --- a/drivers/parport/procfs.c +++ b/drivers/parport/procfs.c @@ -384,7 +384,7 @@ parport_device_sysctl_template = { { .procname = "timeslice", .data = NULL, - .maxlen = sizeof(int), + .max...
8d431dbef4e63d54f1965c3ed6ca5f91ee4512de
Analyze and fix the following issue in the Linux kernel code: rtc-at32ap700x: fix irq init oops
Problem Details: Reorder at32_rtc_probe() so that it's safe (no oopsing) to fire the IRQ handler the instant that it's registered. (Bug noted via "Debug shared IRQ handlers" kernel debug option.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: <hcegtvedt...
```diff diff --git a/drivers/rtc/rtc-at32ap700x.c b/drivers/rtc/rtc-at32ap700x.c index 2999214ca534..d3b9b14267ab 100644 --- a/drivers/rtc/rtc-at32ap700x.c +++ b/drivers/rtc/rtc-at32ap700x.c @@ -225,18 +225,12 @@ static int __init at32_rtc_probe(struct platform_device *pdev) goto out; } - ret = request_irq(irq, ...
fe4304baf26e9580ada52e4579b1b7273434d8dd
Analyze and fix the following issue in the Linux kernel code: alpha: strncpy/strncat fixes
Problem Details: First of all, thanks to Bob Tracy <rct@frus.com> and Michael Cree <mcree@orcon.net.nz> for testing. Especially to Bob, as he has done titanic multi-day git-bisect work that finally helped to reproduce and nail down the bug (http://bugzilla.kernel.org/show_bug.cgi?id=9457). [ev6-]stxncpy.S: it's t12, n...
```diff diff --git a/arch/alpha/lib/ev6-stxncpy.S b/arch/alpha/lib/ev6-stxncpy.S index b581a7af2456..1aa6e97e04b5 100644 --- a/arch/alpha/lib/ev6-stxncpy.S +++ b/arch/alpha/lib/ev6-stxncpy.S @@ -362,10 +362,10 @@ $unaligned: extql t2, a1, t2 # U : cmpbge zero, t1, t8 # E : is there a zero? - andnot t2, t6, t12 # ...
4dbed85a35ed37d9608f4f32e5d69efa775d6223
Analyze and fix the following issue in the Linux kernel code: uml: stop gdb from deleting breakpoints when running UML
Problem Details: Sometimes when UML is debugged gdb miss breakpoints. When process traced by gdb do fork, debugger remove breakpoints from child address space. There is possibility to trace more than one fork, but this not work with UML, I guess (only guess) there is a deadlock - gdb waits for UML and UML waits for gd...
```diff diff --git a/arch/um/drivers/net_user.c b/arch/um/drivers/net_user.c index 90d7f2e8ead8..29185cad9fff 100644 --- a/arch/um/drivers/net_user.c +++ b/arch/um/drivers/net_user.c @@ -201,7 +201,7 @@ static int change_tramp(char **argv, char *output, int output_len) close(fds[1]); if (pid > 0) - CATCH_EINTR(e...
755271358cc401eb3db0db52b2c8fb8d71ae4d8f
Analyze and fix the following issue in the Linux kernel code: fix headers_install
Problem Details: make[3]: *** No rule to make target `/usr/src/devel/include/linux/ticable.h', needed by `/usr/src/devel/usr/include/linux/ticable.h'. Stop. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.o...
```diff diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 37bfa19d8064..9abf5a806c15 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild @@ -145,7 +145,6 @@ header-y += sound.h header-y += taskstats.h header-y += telephony.h header-y += termios.h -header-y += ticable.h header-y += times.h hea...
140b5e59119a172a91b5fa13d54ca4f79bbefee1
Analyze and fix the following issue in the Linux kernel code: libata: fix ATAPI draining
Problem Details: With ATAPI transfer chunk size properly programmed, libata PIO HSM should be able to handle full spurious data chunks. Also, it's a good idea to suppress trailing data warning for misc ATAPI commands as there can be many of them per command - for example, if the chunk size is 16 and the drive tries to...
```diff diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 4af939a00e54..4753a1831dbc 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -64,6 +64,7 @@ #include <linux/libata.h> #include <asm/semaphore.h> #include <asm/byteorder.h> +#include <linux/cdrom.h> #include "l...
0e8634bf8e48e50aa96c7e7becafcf9d98c1a28d
Analyze and fix the following issue in the Linux kernel code: libata-acpi: improve _GTF execution error handling and reporting
Problem Details: As _GTF commands can't transfer data, device error never signals transfer error. It indicates that the device vetoed the operation, so it's meaningless to retry. This patch makes libata-acpi to report and continue on device errors when executing _GTF commands. Also commands rejected by device don't ...
```diff diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c index 5932ae24ddc1..d4cb557a727d 100644 --- a/drivers/ata/libata-acpi.c +++ b/drivers/ata/libata-acpi.c @@ -466,7 +466,7 @@ int ata_acpi_cbl_80wire(struct ata_port *ap) EXPORT_SYMBOL_GPL(ata_acpi_cbl_80wire); /** - * taskfile_load_raw - send...
66fa7f2158e84530aa4a1839a3500d6bdb231301
Analyze and fix the following issue in the Linux kernel code: libata-acpi: improve ACPI disabling
Problem Details: * If _GTF evalution fails, it's pointless to retry. If nothing else is wrong, just ignore the error. * After disabling ACPI, return success iff the number of executed _GTF command equals zero. Otherwise, tell EH to retry. This change fixes bogus 1 return bug where ata_acpi_on_devcfg() expects...
```diff diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c index e0dd132fd490..5932ae24ddc1 100644 --- a/drivers/ata/libata-acpi.c +++ b/drivers/ata/libata-acpi.c @@ -346,8 +346,8 @@ EXPORT_SYMBOL_GPL(ata_acpi_stm); * EH context. * * RETURNS: - * Number of taskfiles on success, 0 if _GTF doesn't e...
8cf32ac6578a70025be1103466da9d1d6141429e
Analyze and fix the following issue in the Linux kernel code: sata_sil: fix spurious IRQ handling
Problem Details: Interestingly, sata_sil raises spurious interrupts if it's coupled with Sil SATA_PATA bridge. Currently, sata_sil interrupt handler is strict about spurious interrupts and freezes the port when it occurs. This patch makes it more forgiving. * On SATA PHY event interrupt, serror value is checked to se...
```diff diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c index 4e6e381279cc..025622b14efb 100644 --- a/drivers/ata/sata_sil.c +++ b/drivers/ata/sata_sil.c @@ -390,23 +390,28 @@ static void sil_host_intr(struct ata_port *ap, u32 bmdma2) sil_scr_read(ap, SCR_ERROR, &serror); sil_scr_write(ap, SCR_ERROR,...
53e490936a91940a153e231c3b8288e3ecfcc5aa
Analyze and fix the following issue in the Linux kernel code: iwlwifi: fix rf_kill state inconsistent during suspend and resume
Problem Details: The patch fixes the STATUS_RF_KILL_HW state is not cleared problem if the device goes to suspend when the rf_kill switch is enabled. The bug causes the driver always thinks the rf_kill switch is enabled (although it is disabled) after resume. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Joh...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 1c3ca6ebdc4d..3d1da0759b97 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c @@ -4743,8 +4743,10 @@ static void iwl_irq_tasklet(struct iwl_priv *p...
1a8d122782bdabe4475f29d022c9a0c092ac9878
Analyze and fix the following issue in the Linux kernel code: b43: Fix rfkill radio LED
Problem Details: This fixes Bug #9414 Since addition of the rfkill callback, the LED associated with the off switch on the radio has not worked for several reasons: (1) Essential data in the rfkill structure were missing. (2) The rfkill structure was initialized after the LED initialization. (3) There was a minor mem...
```diff diff --git a/drivers/net/wireless/b43/leds.c b/drivers/net/wireless/b43/leds.c index 19e588582c7c..6c0e2b9f7760 100644 --- a/drivers/net/wireless/b43/leds.c +++ b/drivers/net/wireless/b43/leds.c @@ -163,6 +163,9 @@ static void b43_map_led(struct b43_wldev *dev, b43_register_led(dev, &dev->led_radio, name, ...
cb935cb4bd155d50ac98617b580aadd9d7ef3a0f
Analyze and fix the following issue in the Linux kernel code: bcm43xx_debugfs sscanf fix
Problem Details: ia64: drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c: In function `tsf_write_file': drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c:237: warning: long long int format, u64 arg (arg 3) drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c:237: warning: long long int format, u64 arg (arg 3) We do not know what...
```diff diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c b/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c index 35dbe4554513..76e9dd843faa 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c @@ -219,7 +219,7 @@ static ssize_t tsf_write_file(struct ...
a5acc379e52c78db407c73537daff387b179202c
Analyze and fix the following issue in the Linux kernel code: iwlwifi3945/4965: fix rate control algo reference leak
Problem Details: Fix rate control algo reference leak in case if network device has been failed to register. In this case special flag priv->mac80211_registered is not set and the rate algo reference is not freeing on module unload. That leads to OOPs in further ieee80211 rate register/unregister procedure (by any ca...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 4bdf237f6adc..1c3ca6ebdc4d 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c @@ -6171,6 +6171,7 @@ static void iwl_alive_start(struct iwl_priv *pr...
9313794371ad39e6bf88e1fbef8dfb3bd1ae3fe7
Analyze and fix the following issue in the Linux kernel code: zd1211rw: Fix alignment problems
Problem Details: Shaddy Baddah found an alignment problem with zd1211rw driver at 2007-11-19. This patch fixes it, it is based on the patch proposed by Herbert Xu. The alignment 4 has been the agreed value on the linux-wireless mailing list. Notify that the problem does only affect the old zd1211rw softmac driver and ...
```diff diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index a903645e157a..5298a8bf1129 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c @@ -1130,6 +1130,8 @@ static void zd_mac_rx(struct zd_mac *mac, struct sk_buff *skb) __...
87e417b2f3a061d5eb85906288738f4313f1d924
Analyze and fix the following issue in the Linux kernel code: ucc_geth: really fix section mismatch
Problem Details: Commit ed7e63a51d46e835422d89c687b8a3e419a4212a has tried to fix section mismatch: WARNING: vmlinux.o(.init.text+0x17278): Section mismatch: reference to .exit.text:uec_mdio_exit (between 'ucc_geth_init' and 'uec_mdio_init') But that mismatch still happens. This patch actually fixing section mismatc...
```diff diff --git a/drivers/net/ucc_geth_mii.h b/drivers/net/ucc_geth_mii.h index d83437039919..1e45b2028a50 100644 --- a/drivers/net/ucc_geth_mii.h +++ b/drivers/net/ucc_geth_mii.h @@ -96,5 +96,5 @@ enum enet_tbi_mii_reg { int uec_mdio_read(struct mii_bus *bus, int mii_id, int regnum); int uec_mdio_write(struct mii...
a86370fbb65a0a2cb21d28bf25a748f6cc04385b
Analyze and fix the following issue in the Linux kernel code: ocfs2: fix exit-while-locked bug in ocfs2_queue_orphans()
Problem Details: We're holding the cluster lock when a failure might happen in ocfs2_dir_foreach() so it needs to be released. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
```diff diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c index f9d01e25298d..7e5f7ce4761b 100644 --- a/fs/ocfs2/journal.c +++ b/fs/ocfs2/journal.c @@ -1277,11 +1277,12 @@ static int ocfs2_queue_orphans(struct ocfs2_super *osb, ocfs2_orphan_filldir); if (status) { mlog_errno(status); - goto out; + got...
08cbc706acd2dd601b0663e28fa97ffb0564e105
Analyze and fix the following issue in the Linux kernel code: USB: at91_udc: correct hanging while disconnecting usb cable
Problem Details: Correct hanging while disconnecting the USB device cable. Prevent a race between vbus and UDP interrupts. This bug was tracked on at91sam9260ek boards. A usb resume interrupt was firing after the vbus interrupt : the IP was then already stoped and not able to deal with it (no more clock). A simple ...
```diff diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c index a6adf7e0f6f8..cd62b029d176 100644 --- a/drivers/usb/gadget/at91_udc.c +++ b/drivers/usb/gadget/at91_udc.c @@ -887,6 +887,7 @@ static void pullup(struct at91_udc *udc, int is_on) if (is_on) { clk_on(udc); + at91_udp_write(ud...
442258e2ff69276ff767f3703b30ce6a31fdd181
Analyze and fix the following issue in the Linux kernel code: USB: use IRQF_DISABLED for HCD interrupt handlers
Problem Details: Host controller IRQs are supposed to be serviced with interrupts disabled. This patch (as1026) adds an IRQF_DISABLED flag to all the controller drivers that lack it. It also replaces the spin_lock_irqsave() and spin_unlock_irqrestore() calls in uhci_irq() with simple spin_lock() and spin_unlock(). T...
```diff diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c index 5cf6d5f9acbd..3fb9af80cbf4 100644 --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c @@ -125,7 +125,7 @@ int usb_hcd_pci_probe (struct pci_dev *dev, const struct pci_device_id *id) pci_set_master (dev); - retval = us...
d48bd977e0dd8c17081d12242bfc09d743ea0d26
Analyze and fix the following issue in the Linux kernel code: USB: fix locking loop by avoiding flush_scheduled_work
Problem Details: This patch (as1027) replaces a call to flush_scheduled_work() -- a dangerous routine to invoke, especially while holding any sort of lock -- with calls to cancel_work_sync() and cancel_delayed_work_sync(). This fixes Bugzilla #9532. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: David Brow...
```diff diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 13b326a13377..b04d232d4c65 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -522,9 +522,9 @@ static void hub_quiesce(struct usb_hub *hub) /* (blocking) stop khubd and related activity */ usb_kill_urb(hub->urb); if (hub->...
f88ed90d8627d0d3d93b330d6d2012c2934fb54e
Analyze and fix the following issue in the Linux kernel code: usb.h: fix kernel-doc warning
Problem Details: Fix kernel-doc warning in usb.h: Warning(linux-2.6.24-rc3-git7//include/linux/usb.h:166): No description found for parameter 'sysfs_files_created' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/include/linux/usb.h b/include/linux/usb.h index 416ee7617d9e..5fc8ff73b7bb 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -107,6 +107,7 @@ enum usb_interface_condition { * @condition: binding state of the interface: not bound, binding * (in probe()), bound to a driver, or unbindi...
b5ce18afecda8ce1a9ed5fb8ec6362df6f6f85b8
Analyze and fix the following issue in the Linux kernel code: USB: option: Bind to the correct interface of the Huawei E220
Problem Details: This fixes a bunch of problems we are having with the Huawei devices... Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Jaime Velasco Juan <jsagarribay@gmail.com> Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 4590124cf888..d1185f53447b 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -158,8 +158,8 @@ static struct usb_device_id option_ids[] = { { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_MODEM) }, ...
8be27c2de64e95c3da12a4b002f623570b039874
Analyze and fix the following issue in the Linux kernel code: USB: cp2101: new device id
Problem Details: This adds a device ID for the Aerocomm Radio Modem, which uses the cp2102. I'm sure changing num_bulk_in/num_bulk_out to NUM_DONT_CARE is the wrong fix, but this is the only device I have with a cp2102, so I have no idea what a good global value would be, if there is one. Zero didn't work with this de...
```diff diff --git a/drivers/usb/serial/cp2101.c b/drivers/usb/serial/cp2101.c index 3a83cb4c4bc2..da16b5157816 100644 --- a/drivers/usb/serial/cp2101.c +++ b/drivers/usb/serial/cp2101.c @@ -71,6 +71,7 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */ { U...
33abc04f0420dceed0ebc2d1094019d3bb2b5c29
Analyze and fix the following issue in the Linux kernel code: usb-storage: Fix devices that cannot handle 32k transfers
Problem Details: When a device cannot handle the smallest previously limited transfer size (64 blocks) without stalling, limit the device to the amount of packets that fit in a platform native page. The lowest possible limit is PAGE_CACHE_SIZE, so if the device is ever used on a platform that has larger than 8K pages,...
```diff diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c index 836a34ae6ec6..7c9593b7b04e 100644 --- a/drivers/usb/storage/scsiglue.c +++ b/drivers/usb/storage/scsiglue.c @@ -114,9 +114,15 @@ static int slave_configure(struct scsi_device *sdev) * while others have trouble with more than 6...
b9e13ac30f850313be9232497ff98e90c43bc6b6
Analyze and fix the following issue in the Linux kernel code: USB: sierra: fix product id
Problem Details: Attached is a patch to fix the addition of the new product ids I sent. It is against 2.6.24-rc4, as Linus included the broken version of the patch I sent you in that tree. :( Not sure if this is the right method to go about this, but hopefully I got it right this time. Signed-off-by: Andrew Gilmore ...
```diff diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index 605ebccdcd51..e5c274044a5f 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c @@ -100,6 +100,7 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ { US...
8c4606b1a4f6eb09344294b7f11641f36cd402af
Analyze and fix the following issue in the Linux kernel code: kobject: fix the documentation of how kobject_set_name works
Problem Details: Thanks to Dave Young <hidave.darkstar@gmail.com> for pointing out that I forgot to update the comment when I rewrote kobject_set_name. Cc: Dave Young <hidave.darkstar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/lib/kobject.c b/lib/kobject.c index b52e9f4ef371..3590f022a609 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@ -234,13 +234,13 @@ int kobject_register(struct kobject * kobj) /** - * kobject_set_name - Set the name of an object - * @kobj: object. - * @fmt: format string used to build the name...
553876c802249b21267b78a9b3857d1341a3df87
Analyze and fix the following issue in the Linux kernel code: [ARM] 4694/1: IXP4xx: Update clockevent support for shutdown and resume
Problem Details: Add proper support for CLOCK_EVT_MODE_RESUME and in the process fix CLOCK_EVT_MODE_SHUTDOWN so that only the enable bits are toggled for both. Signed-off-by: Kevin Hilman <khilman@mvista.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index c1271c449246..f6d66dce6852 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c @@ -442,7 +442,8 @@ static int ixp4xx_set_next_event(unsigned long evt, static void ixp4xx_set_mode(enum clock_event_mode mo...
41a9e680717e82c745b1ead979ea008e9134ea68
Analyze and fix the following issue in the Linux kernel code: [ARM] 4710/1: Fix coprocessor 14 usage for debug messages via ICEDCC
Problem Details: According to ARM7TDMI Technical Reference Manual (ARM DDI 0210C) writing to the DCC data write register coproc dest registers are 1 and 0, not 0 and 1. ARM920T TRM (ARM DDI 0151C) agrees on that. Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com> Signed-o...
```diff diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index b9b03eda70e5..5cac46a19bb7 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S @@ -31,7 +31,7 @@ .macro loadsp, rb .endm .macro writeb, ch, rb - mcr p14, 0, \ch, c0, c1, 0 + mcr p14, 0,...
0d01792300c4d7425eabac9095c603cdb411d2a5
Analyze and fix the following issue in the Linux kernel code: [S390] pud_present/pmd_present bug.
Problem Details: Git commit 3610cce87af0693603db171d5b6f6735f5e3dc5b (yeah my own :-/) introduced a bug in regard to pud/pmd table entries. If the address of the page table refered to by a pud/pmd value happens to have zeroes in the lower 32 bits, pud_present and pmd_present return false. The obvious effect is that thi...
```diff diff --git a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h index f2cc25b74adf..1f530f8a6280 100644 --- a/include/asm-s390/pgtable.h +++ b/include/asm-s390/pgtable.h @@ -453,12 +453,12 @@ static inline int pgd_bad(pgd_t pgd) { return 0; } static inline int pud_present(pud_t pud) { - return pud_val...