id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
c8fdd247255a3a027cd9f66dcf93e6847d1d2f85
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86: Drop cc-options call for all options supported in gcc 3.2+
Problem Details: The kernel only supports gcc 3.2+ now so it doesn't make sense anymore to explicitely check for options this compiler version already has. This actually fixes a bug. The -mprefered-stack-boundary check never worked because gcc rightly complains CC arch/i386/kernel/asm-offsets.s cc1: -mpreferre...
```diff diff --git a/Makefile b/Makefile index d970cb16545a..387526b69d4f 100644 --- a/Makefile +++ b/Makefile @@ -491,7 +491,7 @@ endif include $(srctree)/arch/$(ARCH)/Makefile ifdef CONFIG_FRAME_POINTER -CFLAGS += -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,) +CFLAGS += -fno-omit-frame-...
d18951834216eae82e2f9112416111b4f55f1849
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86: Fix i386 and x86_64 fault information pollution
Problem Details: a userspace fault or a kernelspace fault which will result in the immediate death of the process. They should not be filled in as a result of a kernelspace fault which can be fixed up. Otherwise, if the process is handling SIGSEGV and examining the fault information, this can result in the kernel spa...
```diff diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index af0d3f70a817..58dfecc8e36c 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c @@ -476,8 +476,6 @@ static void __kprobes do_trap(int trapnr, int signr, char *str, int vm86, siginfo_t *info) { struct task_struct ...
0adad171c2334d43fc2fa208f6b45e88f0679427
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: probe_roms() cleanup
Problem Details: Remove the assumption that if the first page of a legacy ROM is mapped, it'll all be mapped. This'll also stop people reading this code from wondering if they're looking at a bug... Signed-off-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Martin Murray <murrayma@citi.umich.edu> Signed-off-by:...
```diff diff --git a/arch/i386/kernel/e820.c b/arch/i386/kernel/e820.c index 70f39560846a..31f4670ef740 100644 --- a/arch/i386/kernel/e820.c +++ b/arch/i386/kernel/e820.c @@ -161,26 +161,27 @@ static struct resource standard_io_resources[] = { { static int __init romsignature(const unsigned char *rom) { + const uns...
9964cf7d776600724ef5f1b33303ceadc588b8ba
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86: consolidate smp_send_stop()
Problem Details: Synchronize i386's smp_send_stop() with x86-64's in only try-locking the call lock to prevent deadlocks when called from panic(). In both version, disable interrupts before clearing the CPU off the online map to eliminate races with IRQ handlers inspecting this map. Also in both versions, save/restore ...
```diff diff --git a/arch/i386/kernel/smp.c b/arch/i386/kernel/smp.c index 0e8977871b1f..0cd459baad68 100644 --- a/arch/i386/kernel/smp.c +++ b/arch/i386/kernel/smp.c @@ -515,35 +515,14 @@ void unlock_ipi_call_lock(void) static struct call_data_struct *call_data; -/** - * smp_call_function(): Run a function on all...
f18d397e6aa5cde638d164b1d519c3ee903f4867
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: optimize & fix APIC mode setup
Problem Details: Fix a couple of inconsistencies/problems I found while reviewing the x86_64 genapic code (when I was chasing mysterious eth0 timeouts that would only trigger if CPU_HOTPLUG is enabled): - AMD systems defaulted to the slower flat-physical mode instead of the flat-logical mode. The only restriction ...
```diff diff --git a/arch/x86_64/kernel/genapic.c b/arch/x86_64/kernel/genapic.c index 7312ddb84fb4..2f2b8fc6e2f3 100644 --- a/arch/x86_64/kernel/genapic.c +++ b/arch/x86_64/kernel/genapic.c @@ -32,21 +32,20 @@ extern struct genapic apic_cluster; extern struct genapic apic_flat; extern struct genapic apic_physflat; ...
a86f34b49f32b238d16b2e3bf6c9a5391a3f683f
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86: revert x86_64-mm-fix-the-irqbalance-quirk-for-e7320-e7520-e7525
Problem Details: Obsoleted by Ingo's genapic stuff. Cc: Ingo Molnar <mingo@elte.hu> Cc: Suresh Siddha <suresh.b.siddha@intel.com> Cc: Andi Kleen <ak@suse.de> Cc: "Li, Shaohua" <shaohua.li@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Andi Kleen <ak@suse.de>
```diff diff --git a/arch/i386/kernel/acpi/earlyquirk.c b/arch/i386/kernel/acpi/earlyquirk.c index 8f7efd38254d..23f78efc577d 100644 --- a/arch/i386/kernel/acpi/earlyquirk.c +++ b/arch/i386/kernel/acpi/earlyquirk.c @@ -10,7 +10,6 @@ #include <asm/pci-direct.h> #include <asm/acpi.h> #include <asm/apic.h> -#include <a...
fb27145d6ad2548d2d770f33ffa0a268c0afba85
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: revert i386-fix-the-verify_quirk_intel_irqbalance
Problem Details: This is unneeded with Ingo's genapic rework. Cc: Suresh Siddha <suresh.b.siddha@intel.com> Cc: Andi Kleen <ak@suse.de> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Andi Kleen <ak@suse.de>
```diff diff --git a/arch/i386/kernel/quirks.c b/arch/i386/kernel/quirks.c index 34874c398b44..a01320a7b636 100644 --- a/arch/i386/kernel/quirks.c +++ b/arch/i386/kernel/quirks.c @@ -10,38 +10,13 @@ #if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP) && defined(CONFIG_PCI) static void __devinit verify_quirk_intel_...
f32824d8ca9d3f84613ae2422070cc5469fe9e91
Analyze and fix the following issue in the Linux kernel code: spkm3: fix spkm3's use of hmac
Problem Details: I think I botched an attempt to keep an spkm3 patch up-to-date with a recent crypto api change. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/net/sunrpc/auth_gss/gss_spkm3_seal.c b/net/sunrpc/auth_gss/gss_spkm3_seal.c index 104cbf4f769f..36c3bae0c42b 100644 --- a/net/sunrpc/auth_gss/gss_spkm3_seal.c +++ b/net/sunrpc/auth_gss/gss_spkm3_seal.c @@ -152,7 +152,7 @@ make_spkm3_checksum(s32 cksumtype, struct xdr_netobj *key, char *header, ...
eb609e52d188775da738a1ffd1e982e6212c77d7
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Transparently handle <.symbol> lookup for kprobes
Problem Details: When data symbols are not present in kernel image, user needs to add dot(".") before function name explicitly, that he wants to probe in kprobe module on ppc64. for ex:- When data symbols are missing on ppc64, ==================== [root@llm27lp1 ~]# cat /proc/kallsyms | grep do_fork c00000000006283c T...
```diff diff --git a/include/asm-powerpc/kprobes.h b/include/asm-powerpc/kprobes.h index f850ca7020ed..fc713e595982 100644 --- a/include/asm-powerpc/kprobes.h +++ b/include/asm-powerpc/kprobes.h @@ -64,6 +64,12 @@ typedef unsigned int kprobe_opcode_t; addr = *(kprobe_opcode_t **)addr; \ } else if (name[0] != '....
0874dd40bf3c1f291da14b2c554c5640c0b6bf1b
Analyze and fix the following issue in the Linux kernel code: [POWERPC] PS3: Fix system slowdown
Problem Details: The PS3 HV will deliver soft-disabled interrupts at the next HV call or interrupt. Add an HV call to local_irq_restore() to force the timely delivery of any pending interrupts. This fixes the system slowdown bug reported here http://bugzilla.kernel.org/show_bug.cgi?id=8260 Signed-off-by: Geoff Levan...
```diff diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 6c83fe229e60..5719a530f2d1 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c @@ -67,6 +67,7 @@ #ifdef CONFIG_PPC64 #include <asm/paca.h> #include <asm/firmware.h> +#include <asm/lv1call.h> #endif int __irq_offse...
5cddd2e355d0df400782dae80722945c8197b1c5
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix spurious vectors on weird MPIC
Problem Details: The weird TSI 10x MPIC needs an EOI after getting a spurious vector. This patch uses the existing MPIC_SPV_EOI flag to fix this issue. Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 0b84b7c775d8..57b1208ef1c3 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c @@ -1333,8 +1333,11 @@ unsigned int mpic_get_one_irq(struct mpic *mpic) #ifdef DEBUG_LOW DBG("%s: get_one_irq(): %d\n", mpic->name, sr...
be9c94dd7776467813419f49fabe8017bc2d4c81
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix suspend states again
Problem Details: In commit 0fba3a1f39f8b0a50b56c8b068fa52131cbc84c2 (a very long time ago, May 2006), I fixed a bug that caused powermacs to crash when you tried entering standby/mem suspend states. As I'm now getting more familiar with the suspend code I notice a few more things: 1. we previously misunderstood what ...
```diff diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index e0fa80eca366..949f36a62aae 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile @@ -36,6 +36,7 @@ obj-$(CONFIG_GENERIC_TBSYNC) += smp-tbsync.o obj-$(CONFIG_CRASH_DUMP) += crash_dump.o obj-$(CONFIG_6xx) += i...
69d48b409cac747cc0707b05b769e38488a6ad35
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix STRICT_MM_TYPECHECKS
Problem Details: Since we don't have it active by default, the STRICT_MM_TYPECHECKS option has bitrotted again. This patch fixes a couple of simple build fixes if the option is selected. First, pud_t mustn't be defined in page.h on 32-bit systems, because it conflicts with the version in the generic pud-folding code....
```diff diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c index f022862de344..e66064b5093a 100644 --- a/arch/powerpc/kernel/pci_32.c +++ b/arch/powerpc/kernel/pci_32.c @@ -1658,7 +1658,7 @@ pgprot_t pci_phys_mem_access_prot(struct file *file, int i; if (page_is_ram(pfn)) - return prot; + ...
57d7909e0d2dd54567ae775e22b14076b777042a
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Revise PPC44x MMU code for arch/powerpc
Problem Details: This patch takes the definitions for the PPC44x MMU (a software loaded TLB) from asm-ppc/mmu.h, cleans them up of things no longer necessary in arch/powerpc and puts them in a new asm-powerpc/mmu_44x.h file. It also substantially simplifies arch/powerpc/mm/44x_mmu.c and makes a couple of small fixes n...
```diff diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S index a15d4b8cce48..9ee6773cf026 100644 --- a/arch/powerpc/kernel/head_44x.S +++ b/arch/powerpc/kernel/head_44x.S @@ -120,8 +120,8 @@ skpinv: addi r4,r4,1 /* Increment */ * Configure and load pinned entry into TLB slot 63. */ ...
ed16669298b26266fc0c81bcd4ecc4b4126f77eb
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Initialise spinlock in the DEBUG_PAGEALLOC code
Problem Details: Fixes: BUG: spinlock bad magic on CPU#0, swapper/0 lock: c00000000064ec30, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0 Call Trace: [c00000000062b980] [c00000000000f920] .show_stack+0x6c/0x1a0 (unreliable) [c00000000062ba20] [c0000000001c2b40] .spin_bug+0xb0/0xd4 [c00000000062bab0] [c0000000001...
```diff diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index 49618461defb..9b226fa7006f 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c @@ -103,7 +103,7 @@ int mmu_ci_restrictions; #ifdef CONFIG_DEBUG_PAGEALLOC static u8 *linear_map_hash_slots; stati...
650f7b3b2f0ead0673e90452cf3dedde97c537ba
Analyze and fix the following issue in the Linux kernel code: [POWERPC] pseries: Handle null iommu dma-window property correctly
Problem Details: Some versions of pSeries firmware fail to set up a dma-window property for PCI slots that are unoccupied. As a result, the loop searching for this propery, in pci_dma_dev_setup_pSeriesLP(), can run to the end, resulting in a NULL pointer dereference later in the routine. This patch prevents the crash, ...
```diff diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index 66665c82415c..eec684a8e44e 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c @@ -504,6 +504,12 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev) bre...
8fce6dd29fa9d1ac880bf0cb4528e9bd5878cf68
Analyze and fix the following issue in the Linux kernel code: [POWERPC] powermac: Fix G5-cpufreq for cpu on/offline
Problem Details: The original code here is wrong, it applies "previous" knowledge. The way the cpufreq core is designed is that the policy for the secondary CPU that comes online says that it must in fact not use this policy but use the same as the other CPUs that are listed, which in fact is CPU#0. Signed-off-by: Joh...
```diff diff --git a/arch/powerpc/platforms/powermac/cpufreq_64.c b/arch/powerpc/platforms/powermac/cpufreq_64.c index 567d5523b690..00f50298c342 100644 --- a/arch/powerpc/platforms/powermac/cpufreq_64.c +++ b/arch/powerpc/platforms/powermac/cpufreq_64.c @@ -357,13 +357,13 @@ static unsigned int g5_cpufreq_get_speed(un...
cf02f5da9437201d57d93f529839dd40aac8b5f9
Analyze and fix the following issue in the Linux kernel code: [CRYPTO] cryptomgr: Fix parsing of nested templates
Problem Details: This patch allows the use of nested templates by allowing the use of brackets inside a template parameter. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
```diff diff --git a/crypto/cryptomgr.c b/crypto/cryptomgr.c index 7a3df9b41218..6958ea83ee44 100644 --- a/crypto/cryptomgr.c +++ b/crypto/cryptomgr.c @@ -14,17 +14,17 @@ #include <linux/ctype.h> #include <linux/err.h> #include <linux/init.h> +#include <linux/kthread.h> #include <linux/module.h> #include <linux/no...
5b68790cd5e2879067bcbc45b01eeb6081e7d731
Analyze and fix the following issue in the Linux kernel code: i2c-s3c2410: Fix bug in releasing driver
Problem Details: When compiled as a module, the i2c-s3c2410 driver does not free either the IRQ or the i2c adapter it attached to the system. As part of this fix, move to the usual kernel style of freeing items as part of the probe error path making the remove process easier. Signed-off-by: Ben Dooks <ben-linux@fluff...
```diff diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index e8395be0d92c..e68a96f589fd 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -745,26 +745,6 @@ static int s3c24xx_i2c_init(struct s3c24xx_i2c *i2c) return 0; } -static void s3c24xx_i...
e00a8cdf325346c531c841ee85c803792db60157
Analyze and fix the following issue in the Linux kernel code: i2c-s3c2410: Fix I2C SDA to SCL setup time
Problem Details: Fix the setup time for SDA to SCL due to the way the S3C24XX I2C controller works. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jean Delvare <khali@linux-fr.org>
```diff diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index 3eb5958f347d..e8395be0d92c 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -61,6 +61,8 @@ struct s3c24xx_i2c { unsigned int msg_idx; unsigned int msg_ptr; + unsigned int tx_set...
c6e8bb2ca5e50547557650c9251d24f55a8f4cfb
Analyze and fix the following issue in the Linux kernel code: i2c-parport-light: Port to the new device driver model
Problem Details: Also fix a small race on driver unload: we need to unregister the i2c adapter before we power it off. Signed-off-by: Jean Delvare <khali@linux-fr.org>
```diff diff --git a/drivers/i2c/busses/i2c-parport-light.c b/drivers/i2c/busses/i2c-parport-light.c index 4bc42810b9aa..49a95e2887bc 100644 --- a/drivers/i2c/busses/i2c-parport-light.c +++ b/drivers/i2c/busses/i2c-parport-light.c @@ -1,7 +1,7 @@ /* ---------------------------------------------------------------------...
3af07bd297b6ba3d77474fdb3b2656dd3f0404d5
Analyze and fix the following issue in the Linux kernel code: i2c-parport: Fix a minor race on driver unload
Problem Details: When unloading the driver, we really want to unregister the i2c adapter before we power it off, rather than the other way around. Also speed up the bus a bit when we can sense SCL. The slaves will stretch the line as needed. Signed-off-by: Jean Delvare <khali@linux-fr.org>
```diff diff --git a/drivers/i2c/busses/i2c-parport.c b/drivers/i2c/busses/i2c-parport.c index b9f1c5c7b572..8c953707253f 100644 --- a/drivers/i2c/busses/i2c-parport.c +++ b/drivers/i2c/busses/i2c-parport.c @@ -1,7 +1,7 @@ /* ------------------------------------------------------------------------ * * i2c-parport.c ...
4b4686e7a6fe8347938beef518e9b309127945f1
Analyze and fix the following issue in the Linux kernel code: scx200_acb: Fix PCI device reference count
Problem Details: The scx200_acb driver supports two kind of devices, PCI ones and ISA ones. Even ISA ones are detected using the presence of a given PCI device, and we get a reference to it, but never put it back, so we have a leak. Fix it. Signed-off-by: Jean Delvare <khali@linux-fr.org>
```diff diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c index d816ab089fe2..0db56e7bc34e 100644 --- a/drivers/i2c/busses/scx200_acb.c +++ b/drivers/i2c/busses/scx200_acb.c @@ -599,6 +599,7 @@ static __init int scx200_scan_pci(void) else { int i; + pci_dev_put(pdev); for (i ...
46a6730e3ff9add5089ddd007f998b97fb4e8571
Analyze and fix the following issue in the Linux kernel code: mmc-omap: Fix omap to use MMC_POWER_ON
Problem Details: As discussed earlier on LKML: http://lkml.org/lkml/2006/5/4/44 Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
```diff diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index 1b232c6dd016..fc044a5ed64e 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -969,8 +969,10 @@ static void mmc_omap_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) mmc_omap_power(host, 0); break; case MMC_POWER_U...
55556da01284af8c2174b786b3eca8e11301b656
Analyze and fix the following issue in the Linux kernel code: MMC: Fix handling of low-voltage cards
Problem Details: Fix handling of low voltage MMC cards. The latest MMC and SD specs both agree that support for low-voltage operations is indicated by bit 7 in the OCR. The MMC spec states that the low voltage range is 1.65-1.95V while the SD spec leaves the actual voltage range undefined - meaning that there is still...
```diff diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index c528017d6128..c2e120b11bef 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -323,6 +323,17 @@ int mmc_attach_mmc(struct mmc_host *host, u32 ocr) mmc_attach_bus(host, &mmc_ops); + /* + * Sanity check the voltages that th...
27c78b372d05e47bbd059c9bb003c6d716abff54
Analyze and fix the following issue in the Linux kernel code: [libata reset-seq] build and merge fixes
Problem Details: Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c index d472894a983b..ef51940c3adb 100644 --- a/drivers/ata/pata_artop.c +++ b/drivers/ata/pata_artop.c @@ -89,7 +89,8 @@ static int artop6260_pre_reset(struct ata_port *ap, unsigned long deadline) /* Odd numbered device ids are the units with ena...
d2b46f66b4b342be07a4194bd5e82384d07e470d
Analyze and fix the following issue in the Linux kernel code: mmc: allow suspended block driver to be removed
Problem Details: Make sure we don't deadlock when removing a suspended block queue, something that might happen if the card is removed during suspend. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
```diff diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c index aa75ac11a19e..2e77963db334 100644 --- a/drivers/mmc/card/queue.c +++ b/drivers/mmc/card/queue.c @@ -191,6 +191,9 @@ void mmc_cleanup_queue(struct mmc_queue *mq) q->queuedata = NULL; spin_unlock_irqrestore(q->queue_lock, flags); + /* Ma...
de85989511f3a0e15b04d18582b23d428d6ddbbd
Analyze and fix the following issue in the Linux kernel code: mmc: use right timing mode constant
Problem Details: Fix copy-n-paste error. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
```diff diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index e8f896c61b34..2ba46273496b 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -1145,7 +1145,7 @@ static void mmc_process_ext_csds(struct mmc_host *host) mmc_card_set_highspeed(card); - host->ios.timing = MMC_TIMING_SD_HS; + host->ios.ti...
91f8d0118a0e1f25f809f3fde5a7616a1eaabc2b
Analyze and fix the following issue in the Linux kernel code: tifm: layout fixes, small changes to comments and printfs
Problem Details: Cosmetic changes to the code. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
```diff diff --git a/drivers/misc/tifm_7xx1.c b/drivers/misc/tifm_7xx1.c index eafa5575f312..9dcff14e752c 100644 --- a/drivers/misc/tifm_7xx1.c +++ b/drivers/misc/tifm_7xx1.c @@ -10,8 +10,6 @@ */ #include <linux/tifm.h> -#include <linux/dma-mapping.h> -#include <linux/freezer.h> #define DRIVER_NAME "tifm_7xx1" ...
5897d657b58efb244b1f82a912ee93e5141ed14c
Analyze and fix the following issue in the Linux kernel code: tifm_sd: fix resume handler
Problem Details: Resume should not explicitly check for media type. Instead, it may relay on success of socket initialization. Small changes are introduced to tifm_sd_initialize to make it more robust. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
```diff diff --git a/drivers/mmc/tifm_sd.c b/drivers/mmc/tifm_sd.c index 103060f490a6..d20ccfcd911e 100644 --- a/drivers/mmc/tifm_sd.c +++ b/drivers/mmc/tifm_sd.c @@ -36,7 +36,6 @@ module_param(fixed_timeout, bool, 0644); #define TIFM_MMCSD_INAB 0x0080 /* abort / initialize command */ #define TIFM_MMCSD_READ ...
88de1b2fed2bbe9eb1b7310195be84cf143efb4f
Analyze and fix the following issue in the Linux kernel code: tifm_7xx1: fix adapter resume function
Problem Details: Fixes to the adapter resume function to correctly handle all possible cases: 1. Card is removed during suspend 2. Card is inserted during suspend into previously empty socket 3. Card is replaced during suspend by same or different media type card. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off...
```diff diff --git a/drivers/misc/tifm_7xx1.c b/drivers/misc/tifm_7xx1.c index 356386904a5d..eafa5575f312 100644 --- a/drivers/misc/tifm_7xx1.c +++ b/drivers/misc/tifm_7xx1.c @@ -220,7 +220,8 @@ static int tifm_7xx1_suspend(struct pci_dev *dev, pm_message_t state) static int tifm_7xx1_resume(struct pci_dev *dev) { ...
5721dbf217b073b40e31936781379ab2d17ea2ae
Analyze and fix the following issue in the Linux kernel code: wbsd: remove block crc test
Problem Details: Block completion interrupts occur faster than we can process them, so just ignore them competely. Commit also fixes up some incorrect register defines. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
```diff diff --git a/drivers/mmc/wbsd.c b/drivers/mmc/wbsd.c index 7a3e32ec46b8..673c64661d36 100644 --- a/drivers/mmc/wbsd.c +++ b/drivers/mmc/wbsd.c @@ -178,9 +178,8 @@ static void wbsd_init_device(struct wbsd_host *host) ier = 0; ier |= WBSD_EINT_CARD; ier |= WBSD_EINT_FIFO_THRE; - ier |= WBSD_EINT_CCRC; - ier...
14d836e7499c53a1f6a65086c3d11600e871a971
Analyze and fix the following issue in the Linux kernel code: mmc: cull sg list to match mmc request size
Problem Details: mmc layer may introduce additional (compared to block layer) limits on request size. Culling of the sg list to match adjusted request size simplifies the handling of such cases in the low level driver, allowing it to skip block count checks while processing sg entries. (fixes for wbsd and sdhci by Pie...
```diff diff --git a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c index 86439a0bb271..95b0da6abe87 100644 --- a/drivers/mmc/mmc_block.c +++ b/drivers/mmc/mmc_block.c @@ -223,7 +223,7 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) struct mmc_blk_data *md = mq->data; struct mmc_card *c...
617e82e10ccf96a13eb2efd5eac4abef44a87d02
Analyze and fix the following issue in the Linux kernel code: [DLM] lowcomms style
Problem Details: Replace some printk with log_print, and fix some simple cases of lines over 80. Also, return -ENOTCONN if lowcomms_start fails due to no local IP address being available. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
```diff diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 5c33233bc2d5..27970a58d29b 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c @@ -395,7 +395,8 @@ static void sctp_init_failed(void) } /* Something happened to an association */ -static void process_sctp_notification(struct connection *con, struct...
f391a4ead61e4510ff385815ddaf3c0777fbad1b
Analyze and fix the following issue in the Linux kernel code: [GFS2] printk warning fixes
Problem Details: alpha: fs/gfs2/dir.c: In function 'gfs2_dir_read_leaf': fs/gfs2/dir.c:1322: warning: format '%llu' expects type 'long long unsigned int', but argument 3 has type 'sector_t' fs/gfs2/dir.c: In function 'gfs2_dir_read': fs/gfs2/dir.c:1455: warning: format '%llu' expects type 'long long unsigned int', but...
```diff diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index 6c3ed7674a9f..a96fa07b3f3b 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c @@ -1319,9 +1319,11 @@ static int gfs2_dir_read_leaf(struct inode *inode, u64 *offset, void *opaque, if (IS_ERR(dent)) goto out_kfree; if (entries2 != g.offset) { - fs_warn(...
bf126aee6d54fe1e509846abf3b27aba84c6d7ce
Analyze and fix the following issue in the Linux kernel code: [GFS2] Patch to fix mmap of stuffed files
Problem Details: If a stuffed file is mmaped and a page fault is generated at some offset above the initial page, we need to create a zero page to hang the buffer heads off before we can unstuff the file. This is a fix for bz #236087 Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
```diff diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c index 90c287932d58..30c15622174f 100644 --- a/fs/gfs2/ops_address.c +++ b/fs/gfs2/ops_address.c @@ -197,7 +197,19 @@ static int stuffed_readpage(struct gfs2_inode *ip, struct page *page) void *kaddr; int error; - BUG_ON(page->index); + /* + * Due...
30d3a2373f171e62e4032819f55fed2ec887d0b8
Analyze and fix the following issue in the Linux kernel code: [DLM] Lowcomms nodeid range & initialisation fixes
Problem Details: Fix a few range & initialization bugs in lowcomms. - max_nodeid is really the highest nodeid encountered, so all loops must include it in their iterations. - clean dlm_local_count & connection_idr so we can do a clean restart. - Remove a spurious BUG_ON Signed-Off-By: Patrick Caulfield <pcaulfie@redha...
```diff diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 2b32f3c82feb..5c33233bc2d5 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c @@ -219,7 +219,7 @@ static struct connection *assoc2con(int assoc_id) struct connection *con; down(&connections_lock); - for (i=0; i<max_nodeid; i++) { + for (i=0; i<=...
2439fe50724e8693e8b933b3f8125d870bfbdb25
Analyze and fix the following issue in the Linux kernel code: [DLM] Fix dlm_lowcoms_stop hang
Problem Details: When you attempt to release a lockspace in DLM, it will hang trying to down a semaphore that has already been downed. The attached patch fixes the problem. Signed-off-by: Josef Bacik <jwhiter@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> Cc: Patrick Caulfield <pcaulfie@redhat.com...
```diff diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 76399b7819b4..2b32f3c82feb 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c @@ -1407,7 +1407,7 @@ void dlm_lowcomms_stop(void) clean_writequeues(); for (i = 0; i < max_nodeid; i++) { - con = nodeid2con(i, 0); + con = __nodeid2con(i, 0); i...
7d3c1feb80913ba4253c3517d48b9b3741c44fc9
Analyze and fix the following issue in the Linux kernel code: [DLM] fix mode munging
Problem Details: There are flags to enable two specialized features in the dlm: 1. CONVDEADLK causes the dlm to resolve conversion deadlocks internally by changing the granted mode of locks to NL. 2. ALTPR/ALTCW cause the dlm to change the requested mode of locks to PR or CW to grant them if the normal requested ...
```diff diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index eac54d230fdc..d8d6e729f96b 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c @@ -224,6 +224,16 @@ static inline int is_demoted(struct dlm_lkb *lkb) return (lkb->lkb_sbflags & DLM_SBF_DEMOTED); } +static inline int is_altmode(struct dlm_lkb *lkb) +{ + return (lk...
5f8820960cf4fb621483d4a37c24939ad831bfe7
Analyze and fix the following issue in the Linux kernel code: [GFS2] lockdump improvements
Problem Details: The patch below consists of the following changes (in code order): 1. I fixed a minor compiler warning regarding the printing of a kernel symbol address. 2. I implemented a suggestion from Dave Teigland that moves the debugfs information for gfs2 into a subdirectory so we can easily expand ou...
```diff diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index b075f9359c60..7988715b7a07 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -1774,7 +1774,7 @@ static void gfs2_print_symbol(struct glock_iter *gi, const char *fmt, if (gi) { memset(buffer, 0, sizeof(buffer)); - sprintf(buffer, "%p", address); + ...
7a0079d9e3fe8826475a08785f3d348c4b509774
Analyze and fix the following issue in the Linux kernel code: [GFS2] bz 236008: Kernel gpf doing cat /debugfs/gfs2/xxx (lock dump)
Problem Details: This is for Bugzilla Bug 236008: Kernel gpf doing cat /debugfs/gfs2/xxx (lock dump) seen at the "gfs2 summit". This also fixes the bug that caused garbage to be printed by the "initialized at" field. I apologize for the kludge, but that code will all be ripped out anyway when the official sprint_symb...
```diff diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index d2e3094c40f8..b075f9359c60 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -1765,15 +1765,20 @@ static void gfs2_print_symbol(struct glock_iter *gi, const char *fmt, { /* when sprint_symbol becomes available in the new kernel, replace this */ /* func...
a43a49066d36612f3bb46653cdb265a89c235eff
Analyze and fix the following issue in the Linux kernel code: [GFS2] Fix bz 234168 (ignoring rgrp flags)
Problem Details: Ths following patch makes GFS2 use the rgrp flags properly. Although there are also separate flags for both data and metadata as well, I've not implemented these as there seems little use for them. On the otherhand, the "noalloc" flag is generally useful for future changes we might which to make, so th...
```diff diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 2ce48d4f2465..1727f5012efe 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c @@ -698,8 +698,6 @@ struct gfs2_alloc *gfs2_alloc_get(struct gfs2_inode *ip) * @al: the struct gfs2_alloc structure describing the reservation * * If there's room for the requeste...
b9af8a788ade3435b53667873774b5366cf73f58
Analyze and fix the following issue in the Linux kernel code: [GFS2] use log_error before LM_OUT_ERROR
Problem Details: We always want to see the details of the error returned to gfs, but log_debug is often turned off, so use log_error (printk). Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
```diff diff --git a/fs/gfs2/locking/dlm/lock.c b/fs/gfs2/locking/dlm/lock.c index f9c8bda289a8..c305255bfe8a 100644 --- a/fs/gfs2/locking/dlm/lock.c +++ b/fs/gfs2/locking/dlm/lock.c @@ -266,7 +266,7 @@ unsigned int gdlm_do_lock(struct gdlm_lock *lp) } if (error) { - log_debug("%s: gdlm_lock %x,%llx err=%d cur=%...
032067270295cfca11975c0f7b467244aa170c14
Analyze and fix the following issue in the Linux kernel code: [DLM] fix coverity-spotted stupidity
Problem Details: Replacement patch to remove redundant code rather than moving it around. 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 9bfe7fb721e6..919e92a6aebb 100644 --- a/fs/dlm/lowcomms-tcp.c +++ b/fs/dlm/lowcomms-tcp.c @@ -319,8 +319,6 @@ static int receive_from_sock(struct connection *con) if (ret <= 0) goto out_close; - if (ret == -EAGAIN) - goto out_resched; ...
04b933f27bc8e7f3f6423020cec58a4eab3bb7a7
Analyze and fix the following issue in the Linux kernel code: [GFS2] Red Hat bz 228540: owner references
Problem Details: In Testing the previously posted and accepted patch for https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=228540 I uncovered some gfs2 badness. It turns out that the current gfs2 code saves off a process pointer when glocks is taken in both the glock and glock holder structures. Those structures w...
```diff diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index b8aa816bb6eb..d2e3094c40f8 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -25,6 +25,8 @@ #include <asm/uaccess.h> #include <linux/seq_file.h> #include <linux/debugfs.h> +#include <linux/module.h> +#include <linux/kallsyms.h> #include "gfs2.h" #i...
172e045a7fcc3ee647fa70dbd585a3c247b49cb2
Analyze and fix the following issue in the Linux kernel code: [GFS2] flush the log if a transaction can't allocate space
Problem Details: This is a fix for bz #208514. When GFS2 frees up space, the freed blocks aren't available for reuse until the resource group is successfully written to the ondisk journal. So in rare cases, GFS2 operations will fail, saying that the filesystem is out of space, when in reality, you are just waiting for ...
```diff diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 8d9c08b5c4b6..2ce48d4f2465 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c @@ -27,6 +27,7 @@ #include "trans.h" #include "ops_file.h" #include "util.h" +#include "log.h" #define BFITNOENT ((u32)~0) @@ -941,9 +942,13 @@ static int get_local_rgrp(struct ...
6883562588bc6c70776ecc396ee7eda36c2c8da9
Analyze and fix the following issue in the Linux kernel code: [GFS2] Fix log entry list corruption
Problem Details: When glock_lo_add and rg_lo_add attempt to add an element to the log, they check to see if has already been added before locking the log. If another process adds that element to the log in this window between the check and locking the log, the element will be added to the list twice. This causes the lo...
```diff diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index 16bb4b4561ae..f82d84d05d23 100644 --- a/fs/gfs2/lops.c +++ b/fs/gfs2/lops.c @@ -33,16 +33,17 @@ static void glock_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le) tr->tr_touched = 1; - if (!list_empty(&le->le_list)) - return; - gl = container_...
420d2a1028b906f24e836e37089a6ad55ab1848f
Analyze and fix the following issue in the Linux kernel code: [GFS2] Fix a bug on i386 due to evaluation order
Problem Details: Since gcc didn't evaluate the last two terms of the expression in glock.c:1881 as a constant expression, it resulted in an error on i386 due to the lack of a 64bit divide instruction. This adds some brackets to fix the problem. This was reported by Andrew Morton. Signed-off-by: Steven Whitehouse <swh...
```diff diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index e7075945b051..b8aa816bb6eb 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -1880,7 +1880,7 @@ static int dump_glock(struct glock_iter *gi, struct gfs2_glock *gl) if (test_bit(GLF_DEMOTE, &gl->gl_flags)) { print_dbg(gi, " Demotion req to state %u (...
3b8249f6178cb2b68b9d683587797270125cc06a
Analyze and fix the following issue in the Linux kernel code: [GFS2] Fix bz 224480 and cleanup glock demotion code
Problem Details: This patch prevents the printing of a warning message in cases where the fs is functioning normally by handing off responsibility for unlinked, but still open inodes, to another node for eventual deallocation. Also, there is now an improved system for ensuring that such requests to other nodes do not g...
```diff diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index a3a24f2e99d2..e7075945b051 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -54,7 +54,7 @@ struct glock_iter { typedef void (*glock_examiner) (struct gfs2_glock * gl); static int gfs2_dump_lockstate(struct gfs2_sbd *sdp); -static void gfs2_glock_xmot...
1de913909263ba7f7054debeda1b79771a7233db
Analyze and fix the following issue in the Linux kernel code: [GFS2] Fix bz 231380, unlock page before dequeing glocks in gfs2_commit_write
Problem Details: If we are writing a file, and in the middle of writing the file another node attempts to get a shared lock on that file (by doing a du for example) the process doing the writing will hang waiting on lock_page. The reason for this is because when we have waiters on a exclusive glock, we will go through...
```diff diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c index b3b7e8475359..90c287932d58 100644 --- a/fs/gfs2/ops_address.c +++ b/fs/gfs2/ops_address.c @@ -507,7 +507,9 @@ static int gfs2_commit_write(struct file *file, struct page *page, gfs2_quota_unlock(ip); gfs2_alloc_put(ip); } + unlock_page(pag...
89adc934f3f96600e7f31447426c7e99d62c5460
Analyze and fix the following issue in the Linux kernel code: [DLM] Fix uninitialised variable in receiving
Problem Details: The length of the second element of the kvec array was not initialised before being added to the first one. This could cause invalid lengths to be passed to kernel_recvmsg 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 07e0a122c32f..9bfe7fb721e6 100644 --- a/fs/dlm/lowcomms-tcp.c +++ b/fs/dlm/lowcomms-tcp.c @@ -299,6 +299,7 @@ static int receive_from_sock(struct connection *con) */ iov[0].iov_len = con->cb.base - cbuf_data(&con->cb); iov[0].iov_base = pag...
5c7342d894973636f03270673e1fb7b908a421a8
Analyze and fix the following issue in the Linux kernel code: [GFS2] fix bz 231369, gfs2 will oops if you specify an invalid mount option
Problem Details: If you specify an invalid mount option when trying to mount a gfs2 filesystem, gfs2 will oops. The attached patch resolves this problem. Signed-off-by: Josef Whiter <jwhiter@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
```diff diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 9f203ef4da61..a3a24f2e99d2 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -2217,7 +2217,7 @@ int gfs2_create_debugfs_file(struct gfs2_sbd *sdp) void gfs2_delete_debugfs_file(struct gfs2_sbd *sdp) { - if (sdp->debugfs_dentry) + if (sdp && sdp->debug...
7c52b166c588c98cf3d2b2e7e6a0468a98e84d0d
Analyze and fix the following issue in the Linux kernel code: [GFS2] Add gfs2_tool lockdump support to gfs2 (bz 228540)
Problem Details: The attached patch resolves bz 228540. This adds the capability for gfs2 to dump gfs2 locks through the debugfs file system. This used to exist in gfs1 as "gfs_tool lockdump" but it's missing from gfs2 because all the ioctls were stripped out. Please see the bugzilla for more history about the fix. ...
```diff diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 12accb08fe02..9f203ef4da61 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -23,6 +23,8 @@ #include <linux/module.h> #include <linux/rwsem.h> #include <asm/uaccess.h> +#include <linux/seq_file.h> +#include <linux/debugfs.h> #include "gfs2.h" #incl...
83672d392f7bcf556f7920d6715e4174d9373ee0
Analyze and fix the following issue in the Linux kernel code: NFS: Fix directory caching problem - with test case and patch.
Problem Details: Try running this script in an NFS mounted directory (Client relatively recent - 2.6.18 has the problem as does 2.6.20). ------------------------------------------------------ #!/bin/bash # # This script will produce the following errormessage from tar: # # tar: newdir/innerdir/innerfile: file change...
```diff diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index d971547ce609..e59fd31c9a22 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -865,6 +865,10 @@ static int nfs_dentry_delete(struct dentry *dentry) static void nfs_dentry_iput(struct dentry *dentry, struct inode *inode) { nfs_inode_return_delegation(inode); + if (...
a509050bd3b8e0aa269c2241aa10d74ca7701e2f
Analyze and fix the following issue in the Linux kernel code: SUNRPC: introduce rpcbind: replacement for in-kernel portmapper
Problem Details: Introduce a replacement for the in-kernel portmapper client that supports all 3 versions of the rpcbind protocol. This code is not used yet. Original code by Groupe Bull updated for the latest kernel, with multiple bug fixes. Note that rpcb_clnt.c does not yet support registering via versions 3 and ...
```diff diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 32c48a0b0d71..ca7553785932 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h @@ -124,6 +124,8 @@ int rpc_destroy_client(struct rpc_clnt *); void rpc_release_client(struct rpc_clnt *); void rpc_getport(stru...
c5a4dd8b7c15927a8fbff83171b57cad675a79b9
Analyze and fix the following issue in the Linux kernel code: SUNRPC: Eliminate side effects from rpc_malloc
Problem Details: Currently rpc_malloc sets req->rq_buffer internally. Make this a more generic interface: return a pointer to the new buffer (or NULL) and make the caller set req->rq_buffer and req->rq_bufsize. This looks much more like kmalloc and eliminates the side effects. To fix a potential deadlock, this patc...
```diff diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index 3069ecca0129..2047fb202a13 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h @@ -264,7 +264,7 @@ struct rpc_task *rpc_wake_up_next(struct rpc_wait_queue *); void rpc_wake_up_status(struct rpc_wait_queue *...
511d2e8855a065c8251d0c140ebc353854f1929e
Analyze and fix the following issue in the Linux kernel code: NLM: Shrink the maximum request size of NLM4 requests
Problem Details: NLM version 4 requests estimate the call and reply header sizes rather conservatively, using the very maximum size allowed in the protocol even though Linux always uses only a small fraction of the allowable space. Reduce the size of caller and lock arguments to conserve RPC buffer space while XDR enc...
```diff diff --git a/fs/lockd/xdr.c b/fs/lockd/xdr.c index 34dae5d70738..6aac4b2c9ff0 100644 --- a/fs/lockd/xdr.c +++ b/fs/lockd/xdr.c @@ -510,17 +510,20 @@ nlmclt_decode_res(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp) return 0; } +#if (NLMCLNT_OHSIZE > XDR_MAX_NETOBJ) +# error "NLM host name cannot be...
8d5658c949e6d89edc579a1f112aeee3bc232a8e
Analyze and fix the following issue in the Linux kernel code: NFS: Fix a buffer overflow in the allocation of struct nfs_read/writedata
Problem Details: Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index 2877744cb606..889de60f8a84 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c @@ -54,6 +54,7 @@ #include <asm/uaccess.h> #include <asm/atomic.h> +#include "internal.h" #include "iostat.h" #define NFSDBG_FACILITY NFSDBG_VFS @@ -271,7 +272,7 @@ static ...
c63c7b051395368573779c8309aa5c990dcf2f96
Analyze and fix the following issue in the Linux kernel code: NFS: Fix a race when doing NFS write coalescing
Problem Details: Currently we do write coalescing in a very inefficient manner: one pass in generic_writepages() in order to lock the pages for writing, then one pass in nfs_flush_mapping() and/or nfs_sync_mapping_wait() in order to gather the locked pages for coalescing into RPC requests of size "wsize". In fact, it ...
```diff diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index 094537ddd344..ea1a85df9ab1 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c @@ -17,7 +17,6 @@ #include <linux/nfs_page.h> #include <linux/nfs_fs.h> #include <linux/nfs_mount.h> -#include <linux/writeback.h> #define NFS_PARANOIA 1 @@ -353,25 ...
1a0ba9ae485c5fd17d0bff2f14d9dd75b8985593
Analyze and fix the following issue in the Linux kernel code: NFS: statfs error-handling fix
Problem Details: The nfs statfs function returns a success code on error, and fills the output buffer with invalid values. The attached patch makes it return a correct error code instead. Signed-off-by: Amnon Aaronsohn <amnonaar@gmail.com> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Signed-off-by: Andrew Morton ...
```diff diff --git a/fs/nfs/super.c b/fs/nfs/super.c index f1eae44b9a1a..719464a04dda 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -204,9 +204,9 @@ static int nfs_statfs(struct dentry *dentry, struct kstatfs *buf) lock_kernel(); error = server->nfs_client->rpc_ops->statfs(server, fh, &res); - buf->f_type =...
d585158b608248a6ba8ae75e234672e048d3fde9
Analyze and fix the following issue in the Linux kernel code: NFS: Fix nfs_set_page_dirty()
Problem Details: Be more careful about testing page->mapping. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 797558941745..8593965a35ef 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -1531,10 +1531,18 @@ int nfs_wb_page(struct inode *inode, struct page* page) int nfs_set_page_dirty(struct page *page) { - spinlock_t *req_lock = &NFS_I(page->mapping->host)->req...
dc87c3985e9b442c60994308a96f887579addc39
Analyze and fix the following issue in the Linux kernel code: libata: honour host controllers that want just one host
Problem Details: The Marvell IDE interface on my machine would hit a BUG_ON() in lib/iomem.c because it was calling ata_pci_init_one() specifying just a single port on the host, but that would actually end up trying to initialize two ports, the second one with bogus information. This fixes "ata_pci_init_one()" so that...
```diff diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index 8af18ad1ca7f..d211db6b35a2 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c @@ -566,7 +566,7 @@ static int ata_pci_init_bmdma(struct ata_host *host) } host->iomap = pcim_iomap_table(pdev); - for (i = 0; i < 2; i++) ...
4a97d47ef7946cf31b76945c3199b0b5cad6a8ed
Analyze and fix the following issue in the Linux kernel code: RDMA/cxgb3: Fix TERM codes
Problem Details: Fix TERMINATE layer, type, and ecode values based on conformance testing. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/cxgb3/iwch_qp.c b/drivers/infiniband/hw/cxgb3/iwch_qp.c index 0a472c9b44db..714dddbc9a98 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_qp.c +++ b/drivers/infiniband/hw/cxgb3/iwch_qp.c @@ -471,43 +471,62 @@ int iwch_bind_mw(struct ib_qp *qp, return err; } -static void buil...
347fcfbed261fdd11f46fa03d524e1bddddab3a6
Analyze and fix the following issue in the Linux kernel code: IPoIB/cm: Fix error handling in ipoib_cm_dev_open()
Problem Details: If skb allocation fails when we start the device, we call ipoib_cm_dev_stop() even though ipoib_cm_dev_open() did not run to completion, so we pass an invalid pointer to ib_destroy_cm_id and get an oops. Fix by clearing cm.id on error, and testing it in cm_dev_stop(). This fixes <https://bugs.openfabr...
```diff diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c index 0c4e59b906cd..76717410660e 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c @@ -592,7 +592,9 @@ int ipoib_cm_dev_open(struct net_device *dev) priv->cm.id = ib_...
6b66b2da1e821181a001c00b04a807724ad803cd
Analyze and fix the following issue in the Linux kernel code: IB/ipath: Don't corrupt pending mmap list when unmapped objects are freed
Problem Details: Fix the pending mmap code so it doesn't corrupt the list of pending mmaps and crash the machine when pending mmaps are destroyed without first being mapped. Also, remove an unused variable, and use standard kernel lists instead of our own homebrewed linked list implementation to keep the pending mmap ...
```diff diff --git a/drivers/infiniband/hw/ipath/ipath_cq.c b/drivers/infiniband/hw/ipath/ipath_cq.c index ea78e6dddc90..4715f89528cd 100644 --- a/drivers/infiniband/hw/ipath/ipath_cq.c +++ b/drivers/infiniband/hw/ipath/ipath_cq.c @@ -243,33 +243,21 @@ struct ib_cq *ipath_create_cq(struct ib_device *ibdev, int entries,...
c3af664adbe06803931dbc7a3c8588982d72fac1
Analyze and fix the following issue in the Linux kernel code: IB/ipath: Don't put QP in timeout queue if waiting to send
Problem Details: This fixes a problem which causes too many RC timeouts and retransmits. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/ipath/ipath_rc.c b/drivers/infiniband/hw/ipath/ipath_rc.c index e3e533276356..9e68c91130dd 100644 --- a/drivers/infiniband/hw/ipath/ipath_rc.c +++ b/drivers/infiniband/hw/ipath/ipath_rc.c @@ -228,18 +228,13 @@ int ipath_make_rc_req(struct ipath_qp *qp, goto done; if (!(...
35ff032e65ab5cc03bbba46cefece7376c7c562f
Analyze and fix the following issue in the Linux kernel code: IB/ipath: Don't call spin_lock_irq() from interrupt context
Problem Details: This patch fixes the problem reported by Bernd Schubert <bs@q-leap.de> with kernel debug options enabled: BUG: at kernel/lockdep.c:1860 trace_hardirqs_on() This was caused by using spin_lock_irq()/spin_unlock_irq() from interrupt context. Fix all the places that might be called from interrupts t...
```diff diff --git a/drivers/infiniband/hw/ipath/ipath_rc.c b/drivers/infiniband/hw/ipath/ipath_rc.c index b4b88d0b53f5..e3e533276356 100644 --- a/drivers/infiniband/hw/ipath/ipath_rc.c +++ b/drivers/infiniband/hw/ipath/ipath_rc.c @@ -587,6 +587,7 @@ static void send_rc_ack(struct ipath_qp *qp) u32 hwords; struct i...
1173a729fc3ce2fa0d698bd39be8ff7bf6c70bf1
Analyze and fix the following issue in the Linux kernel code: reiserfs: suppress lockdep warning
Problem Details: We're getting lockdep warnings due to a post-2.6.21-rc7 bugfix. The xattr_sem can never be taken in the manner described. Internal inodes are protected by I_PRIVATE. Add the appropriate annotation. Cc: <stable@kernel.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Takashi Iwai <tiwai@suse.de> Si...
```diff diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c index c8178b7b9212..2cac56210e2b 100644 --- a/fs/reiserfs/xattr.c +++ b/fs/reiserfs/xattr.c @@ -68,7 +68,7 @@ static struct dentry *get_xa_root(struct super_block *sb, int flags) if (!privroot) return ERR_PTR(-ENODATA); - mutex_lock(&privroot->d_inod...
42e380832a6911c8a3173ee0172fbc0e4864d80b
Analyze and fix the following issue in the Linux kernel code: Extend print_symbol capability
Problem Details: Today's print_symbol function dumps a kernel symbol with printk. This patch extends the functionality of kallsyms.c so that the symbol lookup function may be used without the printk. This is useful for modules that want to dump symbols elsewhere, for example, to debugfs. I intend to use the new func...
```diff diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h index 1cebcbc28b47..3e3b92dabe3b 100644 --- a/include/linux/kallsyms.h +++ b/include/linux/kallsyms.h @@ -7,6 +7,8 @@ #define KSYM_NAME_LEN 127 +#define KSYM_SYMBOL_LEN (sizeof("%s+%#lx/%#lx [%s]") + KSYM_NAME_LEN + \ + 2*(BITS_PER_LONG*3/...
b7b5f487ab39bc10ed0694af35651a03d9cb97ff
Analyze and fix the following issue in the Linux kernel code: [IPV4] UDP: Fix endianness bugs in hashing changes.
Problem Details: I accidently applied an earlier version of Eric Dumazet's patch, from March 21st. His version from March 30th didn't have these bugs, so this just interdiffs to the correct patch. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 144970704c2c..db313d964884 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -270,10 +270,10 @@ static struct sock *__udp4_lib_lookup(__be32 saddr, __be16 sport, struct sock *sk, *result = NULL; struct hlist_node *node; unsigned int hash, hashwild; - in...
2e4976206396274cf66590328c6913811c271495
Analyze and fix the following issue in the Linux kernel code: [CPUFREQ] Report the number of processors in PowerNow-k8 correctly
Problem Details: The PowerNow! driver for Opteron reports the number of cores in the system, but claims to report the number of processors. Fix this minor cosmetic bug. Signed-off-by: Bhavana Nagendra <bhavana.nagendra@amd.com> Acked-by: Mark Langsdorf <mark.langsdorf@amd.com> Signed-off-by: Dave Jones <davej@redhat.c...
```diff diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c index fe3b67005ebb..7cf3d207b6b3 100644 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c @@ -661,7 +661,8 @@ static int fill_powernow_table(struct powernow_k8_dat...
7297824581755593535fc97d2c8b6c47e2dc2db6
Analyze and fix the following issue in the Linux kernel code: [SCSI] fusion: fix domain validation loops
Problem Details: After host reset, the device are programmed to default asyn narrow nego. We need to reprogram the parameter back to previous values. If the host reset is called as a result of spi_dv_device() commands timing out, its possible to get into an infinite loop of dv to host reset. This will prevent that ca...
```diff diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h index e3a39272aad6..d25d3be8fcd2 100644 --- a/drivers/message/fusion/mptbase.h +++ b/drivers/message/fusion/mptbase.h @@ -994,6 +994,7 @@ typedef struct _MPT_SCSI_HOST { int scandv_wait_done; long last_queue_full; u16...
4e08df3f91837656c36712f559d5ce8d80852760
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla2xxx: fix regression on sparc64
Problem Details: Some sparc64 boxes don't have a valid NVRAM (from which the driver takes its WWPN) try to extract this from open firmware instead and if that fails, fall back to a default, which would be invalid if more than one machine on the same SAN does this, since two machines with the same WWPN would be illegal,...
```diff diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 98c01cd5e1a8..3e296ab845b6 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -11,6 +11,11 @@ #include "qla_devtbl.h" +#ifdef CONFIG_SPARC +#include <asm/prom.h> +#include <asm/pbm.h> +#e...
7dcad376e85b6eff56f29ee21e10e1fe855f1ed7
Analyze and fix the following issue in the Linux kernel code: [ARM] 4341/1: iop13xx: fix i/o address translation
Problem Details: PCI devices were being programmed with an incorrect base address value. This patch moves I/O space into a 16-bit addressable region and corrects the i/o offset. Much thanks to Martin Michlmayr for tracking this issue and testing debug patches. Cc: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: Dan ...
```diff diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c index 89ec70ea3187..d907a2aadfe6 100644 --- a/arch/arm/mach-iop13xx/pci.c +++ b/arch/arm/mach-iop13xx/pci.c @@ -1023,7 +1023,7 @@ int iop13xx_pci_setup(int nr, struct pci_sys_data *sys) << IOP13XX_ATUX_PCIXSR_FUNC_NUM; __raw_writel...
8903fcce9b91bab6bb98adbb57a4edfc372c8bff
Analyze and fix the following issue in the Linux kernel code: [ARM] 4340/1: iop: fix iop_getttimeoffset
Problem Details: Fix a typo which causes a necessary cpwait to be missed on iop3xx, Michael Brunner <mibru@gmx.de> Save a register in the assembly routine, rmk Cc: Lennert Buytenhek <kernel@wantstofly.org> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/plat-iop/time.c b/arch/arm/plat-iop/time.c index 16300adfb4de..0cc26da034a1 100644 --- a/arch/arm/plat-iop/time.c +++ b/arch/arm/plat-iop/time.c @@ -32,22 +32,22 @@ static unsigned long next_jiffy_time; unsigned long iop_gettimeoffset(void) { - unsigned long offset, temp1, temp2; + uns...
34588b4c046c34773e5a1a962da7b78b05c4d1bd
Analyze and fix the following issue in the Linux kernel code: [TCP]: Catch skb with S+L bugs earlier
Problem Details: SACKED_ACKED and LOST are mutually exclusive with SACK, thus having their sum larger than packets_out is bug with SACK. Eventually these bugs trigger traps in the tcp_clean_rtx_queue with SACK but it's much more informative to do this here. Non-SACK TCP, however, could get more than packets_out duplic...
```diff diff --git a/include/net/tcp.h b/include/net/tcp.h index a385797f160a..c6ecd455edab 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -736,9 +736,7 @@ static inline __u32 tcp_current_ssthresh(const struct sock *sk) static inline void tcp_sync_left_out(struct tcp_sock *tp) { - if (tp->rx_opt.sack_ok ...
91fac317a34859986a2359a5a5c0e37dc17a9c3d
Analyze and fix the following issue in the Linux kernel code: cfq-iosched: get rid of cfqq hash
Problem Details: cfq hash is no more necessary. We always can get cfqq from io context. cfq_get_io_context_noalloc() function is introduced, because we don't want to allocate cic on merging and checking may_queue. In order to identify sync queue we've used hash key = CFQ_KEY_ASYNC. Since hash is eliminated we need to...
```diff diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index e859b4966e4c..94f53a1f4677 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -9,7 +9,6 @@ #include <linux/module.h> #include <linux/blkdev.h> #include <linux/elevator.h> -#include <linux/hash.h> #include <linux/rbtree.h> #include <lin...
1e3335de05da3dfbe48b8caa03db1834a2133256
Analyze and fix the following issue in the Linux kernel code: cfq-iosched: improve preemption for cooperating tasks
Problem Details: When testing the syslet async io approach, I discovered that CFQ sometimes didn't perform as well as expected. cfq_should_preempt() needs to better check for cooperating tasks, so fix that by allowing preemption of an equal priority queue if the recently queued request is as good a candidate for IO as ...
```diff diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index f92ba2a869b4..bfb396774cbb 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -867,15 +867,11 @@ static int cfq_arm_slice_timer(struct cfq_data *cfqd) static void cfq_dispatch_insert(request_queue_t *q, struct request *rq) { - struct cf...
fd013ce8d42a6667bea2a3c6dca37da8842ab2bf
Analyze and fix the following issue in the Linux kernel code: Input: wistron - fix typo in keymap for Acer TM610
Problem Details: This patch fixes typo that prevented PROG2 key from working on Acer Travelmate 610. Signed-off-by: Eric Piel <eric.piel@tremplin-utc.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/misc/wistron_btns.c b/drivers/input/misc/wistron_btns.c index 793cee3aa5e7..961aad7a0476 100644 --- a/drivers/input/misc/wistron_btns.c +++ b/drivers/input/misc/wistron_btns.c @@ -490,7 +490,7 @@ static struct key_entry keymap_acer_travelmate_610[] __initdata = { { KE_KEY, 0x01, {KE...
f900e9777fc9b65140cb9570438597bc8fae56ab
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Remove dev_dbg redefinition in drivers/ps3/vuart.c
Problem Details: Commit 404d5b185b4eb56d6fa2f7bd27833f8df1c38ce4 changed the definition of dev_dbg in the !DEBUG case from being a #define to being a static inline. There was code in drivers/ps3/vuart.c to do exactly that, which fails to compile now. This fixes it by removing the redefinition, as the redefinition is ...
```diff diff --git a/drivers/ps3/vuart.c b/drivers/ps3/vuart.c index 6c12744eeb9d..7d7cab1d91b4 100644 --- a/drivers/ps3/vuart.c +++ b/drivers/ps3/vuart.c @@ -82,14 +82,6 @@ struct ports_bmp { u64 unused[3]; } __attribute__ ((aligned (32))); -/* redefine dev_dbg to do a syntax check */ - -#if !defined(DEBUG) -#und...
738925b6855f989d3f90a3330eeff34010309be3
Analyze and fix the following issue in the Linux kernel code: [POWERPC] arch/powerpc/sysdev/timer.c build fix
Problem Details: arch/powerpc/sysdev/timer.c:51: error: variable `timer_sysclass' has initializer but incomplete type arch/powerpc/sysdev/timer.c:52: error: unknown field `resume' specified in initializer <etc> Signed-off-by: Srinivasa Ds <srinivasa@in.ibm.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Cc: B...
```diff diff --git a/arch/powerpc/sysdev/timer.c b/arch/powerpc/sysdev/timer.c index bdbf8fe520e4..4a01748b4217 100644 --- a/arch/powerpc/sysdev/timer.c +++ b/arch/powerpc/sysdev/timer.c @@ -7,6 +7,7 @@ */ #include <linux/time.h> +#include <linux/sysdev.h> #include <asm/rtc.h> static unsigned long suspend_rtc_...
4bd4aa1967628fa85a40936410acab6b8bbae6f5
Analyze and fix the following issue in the Linux kernel code: [POWERPC] cell: cbe_cpufreq cleanup and crash fix
Problem Details: cbe_cpufreq cleanups: * comment format * whitespace * don't init on non-cell platforms Signed-off-by: Olof Johansson <olof@lixom.net> Acked-by: Christian Krafft <krafft@de.ibm.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/platforms/cell/cbe_cpufreq.c b/arch/powerpc/platforms/cell/cbe_cpufreq.c index 4495973bff59..f9ac3fe3be97 100644 --- a/arch/powerpc/platforms/cell/cbe_cpufreq.c +++ b/arch/powerpc/platforms/cell/cbe_cpufreq.c @@ -25,6 +25,7 @@ #include <asm/hw_irq.h> #include <asm/io.h> +#include <...
d818d7ec8bb06c1bc10270962e28fb0cbd93b64a
Analyze and fix the following issue in the Linux kernel code: [POWERPC] bootwrapper: CONFIG_ -> CONFIG_DEVICE_TREE
Problem Details: A usage of CONFIG_DEVICE_TREE got accidentally truncated; this fix allows out-of-tree dts files to work. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 9d7b87778995..3716594ea33e 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -166,7 +166,7 @@ cuboot-plat-$(CONFIG_83xx) += 83xx cuboot-plat-$(CONFIG_85xx) += 85xx cuboot-plat-y += unknown-platform -dts = $(...
c146c958dc953da172231577d7ee81cf06d7eeb4
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Clean up cpufreq Kconfig dependencies
Problem Details: Shuffle Kconfig order, making the platform drivers menu depend on the global option instead of each driver being dependent on it. Also fix dependency of PPC_PMAC on the G5 one. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig index 102a44e3b7ea..51e33347c147 100644 --- a/arch/powerpc/platforms/Kconfig +++ b/arch/powerpc/platforms/Kconfig @@ -148,14 +148,14 @@ config GENERIC_IOMAP bool default n -menu "CPU Frequency support" - depends on PPC64 || CLASS...
749cf76620a8f0d1ab4ff83c8e8f18028045a094
Analyze and fix the following issue in the Linux kernel code: ieee1394: ohci1394: Fix mistake in printk message.
Problem Details: Fix the "attempting to setting" message in ohci1394. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
```diff diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c index 0df8970603f7..5dadfd296f79 100644 --- a/drivers/ieee1394/ohci1394.c +++ b/drivers/ieee1394/ohci1394.c @@ -613,7 +613,7 @@ static void ohci_initialize(struct ti_ohci *ohci) #endif PRINT(KERN_DEBUG, "Serial EEPROM has suspicious va...
c13596b0e5db1135ca22d068eca16ffe1e0ea912
Analyze and fix the following issue in the Linux kernel code: ieee1394: ohci1394: fix cosmetic problem in error logging
Problem Details: If posted write failed, an "Unhandled interrupt(s) 0x00000100" message was logged by mistake. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
```diff diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c index 6833b9801b87..d91ef33171b2 100644 --- a/drivers/ieee1394/ohci1394.c +++ b/drivers/ieee1394/ohci1394.c @@ -2377,6 +2377,7 @@ static irqreturn_t ohci_irq_handler(int irq, void *dev_id) if (event & OHCI1394_postedWriteErr) { PRINT(KE...
809e905ce73eaa13972c2617959f8ec16e7d0d6f
Analyze and fix the following issue in the Linux kernel code: ieee1394: eth1394: fix error path in module_init
Problem Details: This patch fixes some error handlings in eth1394: - check return value of kmem_cache_create() - cleanup resources if hpsb_register_protocol() fails Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (whitespace)
```diff diff --git a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c index 1c26322c25af..bd67c862099e 100644 --- a/drivers/ieee1394/eth1394.c +++ b/drivers/ieee1394/eth1394.c @@ -1667,17 +1667,26 @@ static struct ethtool_ops ethtool_ops = { .get_drvinfo = ether1394_get_drvinfo }; -static int __init ether13...
70093cfde8af52b0b9030d90f9004cbde38f2ff8
Analyze and fix the following issue in the Linux kernel code: ieee1394: eth1394: don't autoload by hotplug when ohci1394 starts
Problem Details: Until now, ieee1394 put an IP-over-1394 capability entry into each new host's config ROM. As soon as the controller was initialized --- i.e. right after modprobe ohci1394 --- this entry triggered a hotplug event which typically caused auto-loading of eth1394. This irritated or annoyed many users and ...
```diff diff --git a/drivers/ieee1394/Kconfig b/drivers/ieee1394/Kconfig index f8ff6b866e6e..5c0b522ae077 100644 --- a/drivers/ieee1394/Kconfig +++ b/drivers/ieee1394/Kconfig @@ -34,23 +34,6 @@ config IEEE1394_VERBOSEDEBUG Say Y if you really want or need the debugging output, everyone else says N. -config IE...
ea9057ad622db41745be416e29c5760d141a6514
Analyze and fix the following issue in the Linux kernel code: ieee1394: send async streams at S100
Problem Details: The comment says it all. This affects only asynchronous streams sent via raw1394; the eth1394 driver has own code and needs an own fix. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
```diff diff --git a/drivers/ieee1394/ieee1394_transactions.c b/drivers/ieee1394/ieee1394_transactions.c index f144133df99e..40078ce930c8 100644 --- a/drivers/ieee1394/ieee1394_transactions.c +++ b/drivers/ieee1394/ieee1394_transactions.c @@ -378,6 +378,13 @@ struct hpsb_packet *hpsb_make_streampacket(struct hpsb_host ...
504945c9c6954b83758272d04797f31437dfce9e
Analyze and fix the following issue in the Linux kernel code: ieee1394: ieee1394_core printk format
Problem Details: Fix printk format string: drivers/ieee1394/ieee1394_core.c:702: warning: format '%d' expects type 'int', but argument 2 has type 'size_t' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
```diff diff --git a/drivers/ieee1394/ieee1394_core.c b/drivers/ieee1394/ieee1394_core.c index d6e3d441f833..d2240a4a1c22 100644 --- a/drivers/ieee1394/ieee1394_core.c +++ b/drivers/ieee1394/ieee1394_core.c @@ -698,7 +698,7 @@ static size_t packet_size_to_data_size(size_t packet_size, size_t header_size, ret = buffe...
fd2f3bddaeb20564f32e59f64e5063fbe0c8f4cc
Analyze and fix the following issue in the Linux kernel code: ieee1394: replace vmalloc by kmalloc in csr1212
Problem Details: The biggest chunk ever allocated by CSR1212_MALLOC is 1024 Bytes + sizeof(struct csr1212_csr_rom_cache) big. Most of the time much smaller data structures are allocated. Therefore vmalloc is a waste. The one exception is csr1212_append_new_cache() which is called to append a chunk of CSR1212_EXTENDE...
```diff diff --git a/drivers/ieee1394/csr1212.c b/drivers/ieee1394/csr1212.c index 6c2f55bb9463..2fd465ec94ec 100644 --- a/drivers/ieee1394/csr1212.c +++ b/drivers/ieee1394/csr1212.c @@ -932,7 +932,9 @@ static void csr1212_fill_cache(struct csr1212_csr_rom_cache *cache) } } -#define CSR1212_EXTENDED_ROM_SIZE (0x10...
f84c922ba16fdadb9e4ebf9dc177e3dbd3282f7c
Analyze and fix the following issue in the Linux kernel code: ieee1394: sbp2: include fixes
Problem Details: drivers/ieee1394/sbp2.c: In function 'sbp2util_access_timeout': drivers/ieee1394/sbp2.c:399: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function) drivers/ieee1394/sbp2.c:399: error: (Each undeclared identifier is reported only once drivers/ieee1394/sbp2.c:399: error: for each function it...
```diff diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index 8c471ca11115..4cb6fa2bcfb7 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c @@ -59,8 +59,10 @@ #include <linux/init.h> #include <linux/kernel.h> #include <linux/list.h> +#include <linux/mm.h> #include <linux/module.h> #i...
04b090d50c88ac8e5ec9c2e985bb65bd153893aa
Analyze and fix the following issue in the Linux kernel code: [AF_IUCV/IUCV]: smp_call_function deadlock
Problem Details: Calling smp_call_function can lead to a deadlock if it is called from tasklet context. Fixing this deadlock requires to move the smp_call_function from the tasklet context to a work queue. To do that queue the path pending interrupts to a separate list and move the path cleanup out of iucv_path_sever ...
```diff diff --git a/include/net/iucv/iucv.h b/include/net/iucv/iucv.h index 746e7416261e..fd70adbb3566 100644 --- a/include/net/iucv/iucv.h +++ b/include/net/iucv/iucv.h @@ -16,7 +16,7 @@ * completed a register, it can exploit the other functions. * For furthur reference on all IUCV functionality, refer to the *...
d0772b70faaf8e9f2013b6c4273d94d5eac8047a
Analyze and fix the following issue in the Linux kernel code: [IPV6]: Fix slab corruption running ip6sic
Problem Details: From: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/xfrm6_tunnel.c b/net/ipv6/xfrm6_tunnel.c index 538499a89975..5502cc948dfb 100644 --- a/net/ipv6/xfrm6_tunnel.c +++ b/net/ipv6/xfrm6_tunnel.c @@ -261,7 +261,7 @@ static int xfrm6_tunnel_rcv(struct sk_buff *skb) __be32 spi; spi = xfrm6_tunnel_spi_lookup((xfrm_address_t *)&iph->saddr); ...
5632c5152aa621885d87ea0b8fdd5a6bb9f69c6f
Analyze and fix the following issue in the Linux kernel code: [IPV6]: Track device renames in snmp6.
Problem Details: When network device's are renamed, the IPV6 snmp6 code gets confused. It doesn't track name changes so it will OOPS when network device's are removed. The fix is trivial, just unregister/re-register in notify handler. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: D...
```diff diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index e04e49373505..3452433cbc96 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -2359,8 +2359,9 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event, break; case NETDEV_CHANGENAME: -#ifdef CONFIG_SYSCTL if ...
aad97f38b71dd2ecd730b3a3dce8264d13fbcd56
Analyze and fix the following issue in the Linux kernel code: [SCTP]: Fix sctp_getsockopt_local_addrs_old() to use local storage.
Problem Details: sctp_getsockopt_local_addrs_old() in net/sctp/socket.c calls copy_to_user() while the spinlock addr_lock is held. this should not be done as copy_to_user() might sleep. the call to sctp_copy_laddrs_to_user() while holding the lock is also problematic as it calls copy_to_user() Signed-off-by: Vlad Yase...
```diff diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 11938fb20395..2fc0a92caa78 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -3987,7 +3987,7 @@ static int sctp_getsockopt_peer_addrs(struct sock *sk, int len, memcpy(&temp, &from->ipaddr, sizeof(temp)); sctp_get_pf_specific(sk->sk_family)->...
5f286e113fa377e50bd18fc45e5a0d4d83f6950c
Analyze and fix the following issue in the Linux kernel code: [NETPOLL]: Fix TX queue overflow in trapped mode.
Problem Details: CONFIG_NETPOLL_TRAP causes the TX queue controls to be completely bypassed in the netpoll's "trapped" mode which easily causes overflows in the drivers with short TX queues (most notably, in 8139too with its 4-deep queue). So, make this option more sensible by making it only bypass the TX softirq wake...
```diff diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index e027a3750a77..24cef42f1e0f 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -654,8 +654,10 @@ static inline void netif_start_queue(struct net_device *dev) static inline void netif_wake_queue(struct net_device *dev...
d94a7f16cad7700f8d2b142cc13cfba5387af3db
Analyze and fix the following issue in the Linux kernel code: ACPI: thinkpad-acpi: improve dock subdriver initialization
Problem Details: The dock sub-driver has split-personality (two subdrivers), and it was doing some unoptimal things on init because of that. Fix it so that the second half of it will only init when necessary, and only if the first half initialized sucessfully in the first place. Signed-off-by: Henrique de Moraes Hols...
```diff diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c index 68f1cc0d7fae..a56526500c18 100644 --- a/drivers/misc/thinkpad_acpi.c +++ b/drivers/misc/thinkpad_acpi.c @@ -1519,6 +1519,33 @@ IBM_HANDLE(dock, root, "\\_SB.GDCK", /* X30, X31, X40 */ /* don't list other alternatives as we install a...
b39fe582eb9252dca9a62f7135bcad2e486083e5
Analyze and fix the following issue in the Linux kernel code: ACPI: thinkpad-acpi: improve fan control documentation
Problem Details: Improve fan control documentation and fix one mistake. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/Documentation/thinkpad-acpi.txt b/Documentation/thinkpad-acpi.txt index bca50d78a425..e3ad7a4f7402 100644 --- a/Documentation/thinkpad-acpi.txt +++ b/Documentation/thinkpad-acpi.txt @@ -795,15 +795,23 @@ Sysfs notes: The sysfs interface follows the hwmon subsystem guidelines for the most part, an...
ca4ac2f48a4502bbbfcb47b86312273c28194f53
Analyze and fix the following issue in the Linux kernel code: ACPI: thinkpad-acpi: fix a fan watchdog invocation
Problem Details: The fan control watchdog was being called in one place even when the fan control operation had failed. Fix it. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c index f824259fa611..b85f0960e608 100644 --- a/drivers/misc/thinkpad_acpi.c +++ b/drivers/misc/thinkpad_acpi.c @@ -2888,9 +2888,10 @@ static ssize_t fan_pwm1_store(struct device *dev, if (!rc && (status & (TP_EC_FAN_AUTO | TP_EC_FA...