id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
74c9c0c17dea729d6089c0c82762babd02e65f84
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: Fix {ip,ip6,arp}_tables hook validation
Problem Details: Commit 590bdf7fd2292b47c428111cb1360e312eff207e introduced a regression in match/target hook validation. mark_source_chains builds a bitmask for each rule representing the hooks it can be reached from, which is then used by the matches and targets to make sure they are only called from valid hooks. The...
```diff diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c index 413c2d0a1f3d..71b76ade00e1 100644 --- a/net/ipv4/netfilter/arp_tables.c +++ b/net/ipv4/netfilter/arp_tables.c @@ -375,6 +375,13 @@ static int mark_source_chains(struct xt_table_info *newinfo, && unconditional(&e->arp)) ...
9ebed9d182e03d12d39915b72e4b960046bc4039
Analyze and fix the following issue in the Linux kernel code: [CRYPTO] lrw: round --> lrw_round
Problem Details: Fixes: crypto/lrw.c:99: warning: conflicting types for built-in function ‘round’ Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/crypto/lrw.c b/crypto/lrw.c index 5d043158b903..56642586d84f 100644 --- a/crypto/lrw.c +++ b/crypto/lrw.c @@ -95,7 +95,7 @@ static inline void inc(be128 *iv) iv->a = cpu_to_be64(be64_to_cpu(iv->a) + 1); } -static inline void round(struct sinfo *s, void *dst, const void *src) +static inline vo...
c65f38d911aa301cea109d38d40925750dd6c2da
Analyze and fix the following issue in the Linux kernel code: [PATCH] unwinder: fully support linker generated .eh_frame_hdr section
Problem Details: Now that binutils' ld is able to properly populate .eh_frame_hdr in the Linux kernel case, here's a patch to add some functionality to the Dwarf2 unwinder to actually be able to make use of this (applies on firstfloor tree with the previously sent patch to add debug output, but not on plain 2.6.19). S...
```diff diff --git a/kernel/unwind.c b/kernel/unwind.c index 209e248517db..08645aa7c2d6 100644 --- a/kernel/unwind.c +++ b/kernel/unwind.c @@ -164,7 +164,9 @@ static struct unwind_table *find_table(unsigned long pc) static unsigned long read_pointer(const u8 **pLoc, const void *end...
9dc452ba2d47f376987a99c0819833af0b46cc3f
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: Fix constraints in atomic_add_return()
Problem Details: Following i386 from Duncan Sands Signed-off-by: Andi Kleen <ak@suse.de>
```diff diff --git a/include/asm-x86_64/atomic.h b/include/asm-x86_64/atomic.h index 007e88d6d43f..626d3715fbb5 100644 --- a/include/asm-x86_64/atomic.h +++ b/include/asm-x86_64/atomic.h @@ -189,9 +189,9 @@ static __inline__ int atomic_add_return(int i, atomic_t *v) { int __i = i; __asm__ __volatile__( - LOCK_PRE...
e4b522d7ef144fb2ad6a4cb23d9cb5ec154be8bc
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: fix asm constraints in i386 atomic_add_return
Problem Details: Since v->counter is both read and written, it should be an output as well as an input for the asm. The current code only gets away with this because counter is volatile. Also, according to Documents/atomic_ops.txt, atomic_add_return should provide a memory barrier, in particular a compiler barrier, s...
```diff diff --git a/include/asm-i386/atomic.h b/include/asm-i386/atomic.h index 51a166242522..6aab7a105fad 100644 --- a/include/asm-i386/atomic.h +++ b/include/asm-i386/atomic.h @@ -187,9 +187,9 @@ static __inline__ int atomic_add_return(int i, atomic_t *v) /* Modern 486+ processor */ __i = i; __asm__ __volatile...
d5d2448d896fbb9a427ee12eb8e5f6309f2473f7
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: Fix numaq build error
Problem Details: CC arch/i386/boot/compressed/misc.o arch/i386/boot/compressed/misc.c:120: error: static declaration of 'xquad_portio' follows non-static declaration include/asm/io.h:275: error: previous declaration of 'xquad_portio' was here make[2]: *** [arch/i386/boot/compressed/misc.o] Error 1 Signed-off-by: ...
```diff diff --git a/arch/i386/boot/compressed/misc.c b/arch/i386/boot/compressed/misc.c index c6798c75c67d..1ce7017fd627 100644 --- a/arch/i386/boot/compressed/misc.c +++ b/arch/i386/boot/compressed/misc.c @@ -196,7 +196,7 @@ static int vidport; static int lines, cols; #ifdef CONFIG_X86_NUMAQ -static void * xquad_...
6d0185ea611276fdf81991d7774d396bdc1ae392
Analyze and fix the following issue in the Linux kernel code: [PATCH] unwinder: Add debugging output to the Dwarf2 unwinder
Problem Details: Add debugging printks to the unwinder to allow easier debugging when something goes wrong with it. This can be controlled with the new unwinder_debug=N option Most output is given by N=1 AK: Added documentation of unwinder_debug= Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Andi K...
```diff diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 4e90aa427aea..d34fd6a28faa 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -1735,6 +1735,9 @@ and is between 256 and 4096 characters. It is defined in the file norandmaps ...
d331e739f5ad2aaa9d8553891ba6ca823bdbce37
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: Fix interrupt race in idle callback (3rd try)
Problem Details: Idle callbacks has some races when enter_idle() sets isidle and subsequent interrupts that can happen on that CPU, before CPU goes to idle. Due to this, an IDLE_END can get called before IDLE_START. To avoid these races, disable interrupts before enter_idle and make sure that all idle routines do not e...
```diff diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c index 0b7b4caa4f74..a418ee4c8c62 100644 --- a/arch/x86_64/kernel/process.c +++ b/arch/x86_64/kernel/process.c @@ -127,6 +127,7 @@ static void default_idle(void) */ static void poll_idle (void) { + local_irq_enable(); cpu_relax(); } ...
446f713ba1afd68568139ae4691335ba273fa7f4
Analyze and fix the following issue in the Linux kernel code: [PATCH] unwinder: always use unlocked module list access in unwinder fallback
Problem Details: We're already well protected against module unloads because module unload uses stop_machine(). The only exception is NMIs, but other users already risk lockless accesses here. This avoids some hackery in lockdep and also a potential deadlock This matches what i386 does. Signed-off-by: Andi Kleen <ak...
```diff diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index 75ceccee178c..9864d195c408 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c @@ -317,9 +317,9 @@ void dump_trace(struct task_struct *tsk, struct pt_regs *regs, #define HANDLE_STACK(cond) \ do while (cond) { \ ...
d4c45718b3c0d3045eab803cd15fabbed1ea5bcd
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: Fix kobject_init() WARN_ON on resume from disk
Problem Details: Make mce_remove_device() clean up the kobject in per_cpu(device_mce, cpu) after it has been unregistered. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Andi Kleen <ak@suse.de>
```diff diff --git a/arch/x86_64/kernel/mce.c b/arch/x86_64/kernel/mce.c index bbea88801d88..a7440cb9c14f 100644 --- a/arch/x86_64/kernel/mce.c +++ b/arch/x86_64/kernel/mce.c @@ -652,6 +652,7 @@ static void mce_remove_device(unsigned int cpu) sysdev_remove_file(&per_cpu(device_mce,cpu), &attr_tolerant); sysdev_remo...
c7a3392e9e53e43c44a971de3dd480a8e2788e75
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: Fix comments for MSR_FS_BASE and MSR_GS_BASE.
Problem Details: The comments for MSR_FS_BASE & MSR_GS_BASE were transposed. Signed-off-by: Wink Saville <wink@saville.com> Signed-off-by: Andi Kleen <ak@suse.de>
```diff diff --git a/include/asm-x86_64/msr.h b/include/asm-x86_64/msr.h index a745c5008a60..952783d35c7b 100644 --- a/include/asm-x86_64/msr.h +++ b/include/asm-x86_64/msr.h @@ -169,8 +169,8 @@ static inline unsigned int cpuid_edx(unsigned int op) #define MSR_LSTAR 0xc0000082 /* long mode SYSCALL target */ #define...
9a8cb626a08f2c8251291f3c0a049b29665895d2
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: Avoid boot warning with apic=debug
Problem Details: There are two consumers of apic=: the apic debug level and the low level generic architecture code. early_param would warn when the low level code rejected "debug". Avoid this. Signed-off-by: Andi Kleen <ak@suse.de>
```diff diff --git a/arch/i386/mach-generic/probe.c b/arch/i386/mach-generic/probe.c index 94b1fd9cbe3c..a7b3999bb37a 100644 --- a/arch/i386/mach-generic/probe.c +++ b/arch/i386/mach-generic/probe.c @@ -45,7 +45,9 @@ static int __init parse_apic(char *arg) return 0; } } - return -ENOENT; + + /* Parsed again by...
b0d0a4ba45760b10ecee9035ed45b442c1a6cc84
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86: fix the irqbalance quirk for E7320/E7520/E7525
Problem Details: Move the irqbalance quirks for E7320/E7520/E7525(Errata 23 in http://download.intel.com/design/chipsets/specupdt/30304203.pdf) to early quirks. And add a PCI quirk for these platforms to check(which happens very late during the boot) if the APIC routing is indeed set to default flat mode. This fixes ...
```diff diff --git a/arch/i386/kernel/acpi/earlyquirk.c b/arch/i386/kernel/acpi/earlyquirk.c index c9841692bb7c..4b60af7f91dd 100644 --- a/arch/i386/kernel/acpi/earlyquirk.c +++ b/arch/i386/kernel/acpi/earlyquirk.c @@ -10,6 +10,7 @@ #include <asm/pci-direct.h> #include <asm/acpi.h> #include <asm/apic.h> +#include <a...
274e1bbdeeaf16e71418f11f5f305ab26061f2c2
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86: add write_pci_config_byte() to direct PCI access routines
Problem Details: Mechanism of selecting physical mode in genapic when cpu hotplug is enabled on x86_64, broke the quirk(quirk_intel_irqbalance()) introduced for working around the transposing interrupt message errata in E7520/E7320/E7525 (revision ID 0x9 and below. errata #23 in http://download.intel.com/design/chipse...
```diff diff --git a/arch/i386/pci/early.c b/arch/i386/pci/early.c index 713d6c866cae..42df4b6606df 100644 --- a/arch/i386/pci/early.c +++ b/arch/i386/pci/early.c @@ -45,6 +45,13 @@ void write_pci_config(u8 bus, u8 slot, u8 func, u8 offset, outl(val, 0xcfc); } +void write_pci_config_byte(u8 bus, u8 slot, u8 func, ...
2c22d8baa98a92022acb85b0b7c6f4a60df55f47
Analyze and fix the following issue in the Linux kernel code: [PATCH] relocatable kernel: Fix kallsyms on avr32 after relocatable kernel changes
Problem Details: o On some platforms like avr32, section init comes before .text and not necessarily a symbol's relative position w.r.t _text is positive. In such cases assembler detects the overflow and emits warning. This patch fixes it. Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com> Signed-off-by: Andi Kleen ...
```diff diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 4c1ad0acbb4b..f359b730c2c5 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -277,8 +277,12 @@ static void write_src(void) output_label("kallsyms_addresses"); for (i = 0; i < table_cnt; i++) { if (toupper(table[i].sym[0]) != 'A') { - ...
365bff806e9faba000fb4956c7486fbf3a746d96
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: fix MTRR code
Problem Details: Until not so long ago, there were system log messages pointing to inconsistent MTRR setup of the video frame buffer caused by the way vesafb and X worked. While vesafb was fixed meanwhile, I believe fixing it there only hides a shortcoming in the MTRR code itself, in that that code is not symmetric wit...
```diff diff --git a/arch/i386/kernel/cpu/mtrr/amd.c b/arch/i386/kernel/cpu/mtrr/amd.c index 1a1e04b6fd00..0949cdbf848a 100644 --- a/arch/i386/kernel/cpu/mtrr/amd.c +++ b/arch/i386/kernel/cpu/mtrr/amd.c @@ -7,7 +7,7 @@ static void amd_get_mtrr(unsigned int reg, unsigned long *base, - unsigned int *size, mtrr_t...
b0bfece40b1988aa8e3d910938691dce7859d82d
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: clear_fixmap() should not use set_pte()
Problem Details: While not strictly required with the current code (as the upper half of page table entries generated by __set_fixmap() cannot be non-zero due to the second parameter of this function being 'unsigned long'), the use of set_pte() in __set_fixmap() in the context of clear_fixmap() is still improper with C...
```diff diff --git a/arch/i386/mm/pgtable.c b/arch/i386/mm/pgtable.c index 10126e3f8174..65b5c0959033 100644 --- a/arch/i386/mm/pgtable.c +++ b/arch/i386/mm/pgtable.c @@ -95,8 +95,11 @@ static void set_pte_pfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags) return; } pte = pte_offset_kernel(pmd, vaddr); ...
103efcd9aac1de4da6a1477f2f3b9fcf35273a18
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: fix perms/range of vsyscall vma in /proc/*/maps
Problem Details: The final line of /proc/<pid>/maps on x86_64 for native 64-bit tasks shows an incorrect ending address and incorrect permissions. There is only a single page mapped in this vsyscall region, and it is accessible for both read and execute. The patch below fixes this. (Since 32-bit-compat tasks have a ...
```diff diff --git a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c index 92546c1526f1..c3de9a09cd9f 100644 --- a/arch/x86_64/kernel/vsyscall.c +++ b/arch/x86_64/kernel/vsyscall.c @@ -290,6 +290,7 @@ static void __init map_vsyscall(void) extern char __vsyscall_0; unsigned long physaddr_page0 = __pa_s...
713819989aa4dd141a37074dbc369e7c620bc619
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: Add option to compile for Core2
Problem Details: Add an option to compile for Intel's Core 2 The Kconfig help is a mouthful due to the inventiveness of Intel's product naming department. Mainly for the 64bit cache line sizes because gcc doesn't support optimizing for core2 yet. However it will and then the kernel should be ready by passing the righ...
```diff diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig index 5cb509dbffe4..6eece27d579c 100644 --- a/arch/x86_64/Kconfig +++ b/arch/x86_64/Kconfig @@ -122,7 +122,7 @@ endchoice choice prompt "Processor family" - default MK8 + default GENERIC_CPU config MK8 bool "AMD-Opteron/Athlon64" @@ -130,16 +130,3...
8542b200cbe5609edd7aae0c304c091a1c290452
Analyze and fix the following issue in the Linux kernel code: [PATCH] paravirt: Add option to allow skipping the timer check
Problem Details: Add a way to disable the timer IRQ routing check via a boot option. The VMI timer code uses this to avoid triggering the pester Mingo code, which probes for some very unusual and broken motherboard routings. It fires 100% of the time when using a paravirtual delay mechanism instead of using a realtim...
```diff diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 2e1898e4e8fd..4e90aa427aea 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -599,8 +599,6 @@ and is between 256 and 4096 characters. It is defined in the file hugepages= ...
8ecb8950695e907ed25acffec9e98c6806e311c8
Analyze and fix the following issue in the Linux kernel code: [PATCH] paravirt: fix missing pte update
Problem Details: The function ptep_get_and_clear uses an atomic instruction sequence to get and clear an active pte. Rather than add such an atomic operator to all virtual machine implementations in paravirt-ops, it is easier to support the raw atomic sequence and use either a trapping writable pagetable approach, or ...
```diff diff --git a/include/asm-i386/pgtable-2level.h b/include/asm-i386/pgtable-2level.h index c08cbc4c2d8b..38c3fcc0676d 100644 --- a/include/asm-i386/pgtable-2level.h +++ b/include/asm-i386/pgtable-2level.h @@ -23,8 +23,7 @@ #define pte_clear(mm,addr,xp) do { set_pte_at(mm, addr, xp, __pte(0)); } while (0) #defin...
dfbea0ad50e08c52539bddce977b07f77a762ba4
Analyze and fix the following issue in the Linux kernel code: [PATCH] paravirt: fix parameter names in mmu operations
Problem Details: Make parameter names match function argument names for the yet to be defined pte_update_defer accessor. Signed-off-by: Zachary Amsden <zach@vmware.com> Signed-off-by: Andi Kleen <ak@suse.de> Cc: Andi Kleen <ak@muc.de> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: Chris Wright <chrisw@sous-sol.org> Sig...
```diff diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index efd7d90789d0..04dd39b973ad 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h @@ -277,7 +277,7 @@ static inline pte_t pte_mkhuge(pte_t pte) { (pte).pte_low |= _PAGE_PSE; return p do { \ if (dirty) { ...
bd472c794bbf6771c3fc1c58f188bc16c393d2fe
Analyze and fix the following issue in the Linux kernel code: [PATCH] paravirt: Be careful about touching BIOS address space
Problem Details: BIOS ROM areas may not be mapped into the guest address space, so be careful when touching those addresses to make sure they appear to be mapped. [akpm@osdl.org: fix unused var warning] AK: Changed __get_user to probe_kernel_address Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Signed-off...
```diff diff --git a/arch/i386/kernel/e820.c b/arch/i386/kernel/e820.c index b755255f2721..b704790f7969 100644 --- a/arch/i386/kernel/e820.c +++ b/arch/i386/kernel/e820.c @@ -9,6 +9,7 @@ #include <linux/mm.h> #include <linux/efi.h> #include <linux/pfn.h> +#include <linux/uaccess.h> #include <asm/pgtable.h> #incl...
da181a8b3916aa7f2e3c5775d2bd2fe3454cf82d
Analyze and fix the following issue in the Linux kernel code: [PATCH] paravirt: Add MMU virtualization to paravirt_ops
Problem Details: Add the three bare TLB accessor functions to paravirt-ops. Most amusingly, flush_tlb is redefined on SMP, so I can't call the paravirt op flush_tlb. Instead, I chose to indicate the actual flush type, kernel (global) vs. user (non-global). Global in this sense means using the global bit in the page t...
```diff diff --git a/arch/i386/kernel/paravirt.c b/arch/i386/kernel/paravirt.c index fe82eb3adf42..3dceab5828f1 100644 --- a/arch/i386/kernel/paravirt.c +++ b/arch/i386/kernel/paravirt.c @@ -31,6 +31,7 @@ #include <asm/delay.h> #include <asm/fixmap.h> #include <asm/apic.h> +#include <asm/tlbflush.h> /* nop stub *...
4f205fd45a5c192907188d6f8f6d7e66db859248
Analyze and fix the following issue in the Linux kernel code: [PATCH] paravirt: Allow selected bug checks to be
Problem Details: Allow selected bug checks to be skipped by paravirt kernels. The two most important are the F00F workaround (which is either done by the hypervisor, or not required), and the 'hlt' instruction check, which can break under some hypervisors. Signed-off-by: Zachary Amsden <zach@vmware.com> Signed-off-by...
```diff diff --git a/arch/i386/kernel/cpu/intel.c b/arch/i386/kernel/cpu/intel.c index 798c2f617e87..3ae795e9056d 100644 --- a/arch/i386/kernel/cpu/intel.c +++ b/arch/i386/kernel/cpu/intel.c @@ -107,7 +107,7 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c) * Note that the workaround only should be initiali...
db91b882aabd0b3b55a87cbfb344f2798bb740b4
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: Fix double #includes in arch/i386
Problem Details: Fix double #includes in arch/i386 Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: Andi Kleen <ak@suse.de>
```diff diff --git a/arch/i386/kernel/cpuid.c b/arch/i386/kernel/cpuid.c index ab0c327e79dc..5c5d4507ee7d 100644 --- a/arch/i386/kernel/cpuid.c +++ b/arch/i386/kernel/cpuid.c @@ -34,7 +34,6 @@ #include <linux/major.h> #include <linux/fs.h> #include <linux/smp_lock.h> -#include <linux/fs.h> #include <linux/device.h>...
516d2836434d279fef164bb1b964e83425d312d2
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: Fix race in IO-APIC routing entry setup.
Problem Details: Interrupt could happen between setting the IO-APIC entry and setting its interrupt data. Pointed out by Linus. Signed-off-by: Andi Kleen <ak@suse.de>
```diff diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c index 88fcc4ebbf6e..eaf0b708e67d 100644 --- a/arch/x86_64/kernel/io_apic.c +++ b/arch/x86_64/kernel/io_apic.c @@ -174,14 +174,20 @@ static struct IO_APIC_route_entry ioapic_read_entry(int apic, int pin) * the interrupt, and we need to ma...
d15512f442ef1ea60f6195b0444fb27b3cf8d0e6
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: Fix race in IO-APIC routing entry setup.
Problem Details: Interrupt could happen between setting the IO-APIC entry and setting its interrupt data. Pointed out by Linus. Signed-off-by: Andi Kleen <ak@suse.de>
```diff diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index 3b7a63e0ed1a..e33b7a845299 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c @@ -153,14 +153,20 @@ static struct IO_APIC_route_entry ioapic_read_entry(int apic, int pin) * the interrupt, and we need to make sure ...
b34e90b8f0f30151349134f87b5dc6ef75a5218c
Analyze and fix the following issue in the Linux kernel code: [PATCH] Calgary: use BIOS supplied BBARs and topology information
Problem Details: Find the BBAR register address of each Calgary using the "Extended BIOS Data Area" rather than calculating it ourselves. Also get the bus topology (what PHB each bus is on) from Calgary rather than calculating it ourselves. This patch fixes http://bugzilla.kernel.org/show_bug.cgi?id=7407. Signed-off-...
```diff diff --git a/arch/x86_64/kernel/pci-calgary.c b/arch/x86_64/kernel/pci-calgary.c index f53b581dfd0b..afc0a53505f1 100644 --- a/arch/x86_64/kernel/pci-calgary.c +++ b/arch/x86_64/kernel/pci-calgary.c @@ -41,6 +41,7 @@ #include <asm/pci-direct.h> #include <asm/system.h> #include <asm/dma.h> +#include <asm/rio....
11a4180c0b03e2ee0c948fd8430ee092dc1625b3
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: Use probe_kernel_address instead of __get_user in fault paths
Problem Details: Makes the intention of the code cleaner to read and avoids a potential deadlock on mmap_sem. Also change the types of the arguments to not include __user because they're really not user addresses. Signed-off-by: Andi Kleen <ak@suse.de>
```diff diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index 237f4884a1e1..7b2f9f022089 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c @@ -380,7 +380,7 @@ void show_registers(struct pt_regs *regs) * time of the fault.. */ if (in_kernel) { - u8 __user *eip; + u8 *eip; ...
74b47a7844501445d41d704fe7c626f4b1819508
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: Fix entry.S code with !CONFIG_VM86
Problem Details: The entry.S code at work_notifysig is surely wrong. It drops into unrelated code if the branch to work_notifysig_v86 is taken, and CONFIG_VM86=n. [PATCH] Make vm86 support optional tree 9b5daef5280800a0006343a17f63072658d91a1d pushed to git Jan 8, 2006, and first appears in 2.6.16 The 'fix' here ...
```diff diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S index d7423efaeea4..0220bc8cbb43 100644 --- a/arch/i386/kernel/entry.S +++ b/arch/i386/kernel/entry.S @@ -457,6 +457,7 @@ work_resched: work_notifysig: # deal with pending signals and # notify-resume requests +#ifdef CONFIG_VM86 test...
63cb683c6ed56a420ba60df6a5b206a44e3f85fe
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: PDA: Fix math emulator for new pt_regs
Problem Details: This patch fixes the math emulator, which had not been adjusted to match the changed struct pt_regs. AK: extracted from larger patch by Jeremy. Signed-off-by: Andi Kleen <ak@suse.de>
```diff diff --git a/include/asm-i386/math_emu.h b/include/asm-i386/math_emu.h index 697673b555ce..a4b0aa3320e6 100644 --- a/include/asm-i386/math_emu.h +++ b/include/asm-i386/math_emu.h @@ -21,6 +21,7 @@ struct info { long ___eax; long ___ds; long ___es; + long ___fs; long ___orig_eax; long ___eip; long __...
66e10a44d724f1464b5e8b5a3eae1e2cbbc2cca6
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: Fix places where using %gs changes the usermode ABI
Problem Details: There are a few places where the change in struct pt_regs and the use of %gs affect the userspace ABI. These are primarily debugging interfaces where thread state can be inspected or extracted. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Signed-off-by: Andi Kleen <ak@suse.de> Cc: Chuck ...
```diff diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c index 905364d42847..dc4272545179 100644 --- a/arch/i386/kernel/process.c +++ b/arch/i386/kernel/process.c @@ -315,8 +315,8 @@ void show_regs(struct pt_regs * regs) regs->eax,regs->ebx,regs->ecx,regs->edx); printk("ESI: %08lx EDI: %08lx EB...
da68933e0a999fb13636653c710cca701b457ad2
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: dump_trace() atomicity fix
Problem Details: Fix BUG: using smp_processor_id() in preemptible [00000001] code: in backtracer on preemptible debug kernels. Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Andi Kleen <ak@suse.de>
```diff diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index eedd4e759c3a..e37b4d77d5a8 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c @@ -254,7 +254,7 @@ void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long *stack, struct stacktrace_ops *ops...
fa5cecd111d235819a1d807d43216ae459a0dd6f
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: add missing iounmap in i386 hpet clocksource code
Problem Details: ioremap must be balanced by an iounmap and failing to do so can result in a memory leak. Tested (compilation only): - using allmodconfig - making sure the files are compiling without any warning/error due to new changes Signed-off-by: Amol Lad <amol@verismonetworks.com> Signed-off-by: Andi Kleen <ak@...
```diff diff --git a/arch/i386/kernel/hpet.c b/arch/i386/kernel/hpet.c index 17647a530b2f..45a8685bb60b 100644 --- a/arch/i386/kernel/hpet.c +++ b/arch/i386/kernel/hpet.c @@ -34,6 +34,7 @@ static int __init init_hpet_clocksource(void) unsigned long hpet_period; void __iomem* hpet_base; u64 tmp; + int err; if ...
be44d2aabce2d62f72d5751d1871b6212bf7a1c7
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: espfix cleanup
Problem Details: Clean up the espfix code: - Introduced PER_CPU() macro to be used from asm - Introduced GET_DESC_BASE() macro to be used from asm - Rewrote the fixup code in asm, as calling a C code with the altered %ss appeared to be unsafe - No longer altering the stack from a .fixup section - 16bit per-cpu stack...
```diff diff --git a/arch/i386/kernel/asm-offsets.c b/arch/i386/kernel/asm-offsets.c index c80271f8f084..e94d910a28bd 100644 --- a/arch/i386/kernel/asm-offsets.c +++ b/arch/i386/kernel/asm-offsets.c @@ -58,6 +58,11 @@ void foo(void) OFFSET(TI_sysenter_return, thread_info, sysenter_return); BLANK(); + OFFSET(GDS_s...
d7731c0ff69dc3f18ea020257e627dae4d214fdb
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: i386 rename X86_FEATURE_DTES to X86_FEATURE_DS
Problem Details: Here is a patch (used by perfmon2) that renames X86_FEATURE_DTES to X86_FEATURE_DS to match Intel's documentation for the Debug Store save area on i386. The patch also adds cpu_has_ds. - rename X86_FEATURE_DTES to X86_FEATURE_DS to match documentation - adds cpu_has_ds to test for X86_FEATURE_DS Si...
```diff diff --git a/include/asm-i386/cpufeature.h b/include/asm-i386/cpufeature.h index d314ebb3d59e..69ce35049a07 100644 --- a/include/asm-i386/cpufeature.h +++ b/include/asm-i386/cpufeature.h @@ -31,7 +31,7 @@ #define X86_FEATURE_PSE36 (0*32+17) /* 36-bit PSEs */ #define X86_FEATURE_PN (0*32+18) /* Processor seri...
bd1d599518bf11992cc6d5b0df08da4a2b7b0db5
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: x86_64 rename X86_FEATURE_DTES to X86_FEATURE_DS
Problem Details: Here is a patch (used by perfmon2) that renamed X86_FEATURE_DTES to X86_FEATURE_DS to match Intel's documentation for the Debug Store save area. The patch also adds cpu_has_ds. changelog: - rename X86_FEATURE_DTES to X86_FEATURE_DS to match documentation - adds cpu_has_ds to test for X86_FEATURE_DS ...
```diff diff --git a/include/asm-x86_64/cpufeature.h b/include/asm-x86_64/cpufeature.h index ee792faaca01..65eb39e8f3cc 100644 --- a/include/asm-x86_64/cpufeature.h +++ b/include/asm-x86_64/cpufeature.h @@ -29,7 +29,7 @@ #define X86_FEATURE_PSE36 (0*32+17) /* 36-bit PSEs */ #define X86_FEATURE_PN (0*32+18) /* Proces...
d606f88fa5e529e9dc72be97e79db1e36a6261cb
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: fix must_checks
Problem Details: Fix __must_check warnings in i386/math-emu. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Andi Kleen <ak@suse.de>
```diff diff --git a/arch/i386/math-emu/fpu_emu.h b/arch/i386/math-emu/fpu_emu.h index d62b20a3e660..65120f523853 100644 --- a/arch/i386/math-emu/fpu_emu.h +++ b/arch/i386/math-emu/fpu_emu.h @@ -57,6 +57,7 @@ #define TAG_Special Const(2) /* De-normal, + or - infinity, or Not a Number */ #define TAG_Empty Con...
b615ebdac97c648a2ae7d23c5a0bbb3972adf928
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86: shorten lines in unwinder to be <= 80 characters
Problem Details: Andrew complained about > 80 character lines in the new unwinder. Fix that. Signed-off-by: Andi Kleen <ak@suse.de>
```diff diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index fe9c5e8e7e6f..fe81d89c50d3 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c @@ -173,6 +173,8 @@ dump_trace_unwind(struct unwind_frame_info *info, void *data) return n; } +#define MSG(msg) ops->warning(data, msg) + v...
9b483417527f2e47985856867c5716df013227c7
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: fix buggy MTRR address checks
Problem Details: Fix checks that failed to realize that values are 4-kB-unit-sized (note the format strings in this same diff context which *do* realize the unit size, via appended "000"!). Also fix an incorrect below-1MB area check (as gathered from Jan Beulich's unapplied patch at http://www.ussg.iu.edu/hypermail/li...
```diff diff --git a/arch/i386/kernel/cpu/mtrr/generic.c b/arch/i386/kernel/cpu/mtrr/generic.c index 0b61eed8bbd8..ee8dc6753953 100644 --- a/arch/i386/kernel/cpu/mtrr/generic.c +++ b/arch/i386/kernel/cpu/mtrr/generic.c @@ -366,7 +366,7 @@ int generic_validate_add_page(unsigned long base, unsigned long size, unsigned i ...
36b12fb709d229f277efbbe710031d5a429b2412
Analyze and fix the following issue in the Linux kernel code: JFS: Fix conflicting superblock flags
Problem Details: JFS_NOINTEGRITY and JFS_USRQUOTA are defined to be the same value. Change JFS_NOINTEGRITY to 0x40 and re-order the flags in the header file to avoid repeating this problem. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
```diff diff --git a/fs/jfs/jfs_filsys.h b/fs/jfs/jfs_filsys.h index eb550b339bb8..38f70ac03bec 100644 --- a/fs/jfs/jfs_filsys.h +++ b/fs/jfs/jfs_filsys.h @@ -29,31 +29,21 @@ /* * file system option (superblock flag) */ -/* mount time flag to disable journaling to disk */ -#define JFS_NOINTEGRITY 0x00000010 + +/*...
f9e9dcb38f5106fa8cdac04a9e967d5487f1cd20
Analyze and fix the following issue in the Linux kernel code: x86[-64]:Remove 'volatile' from atomic_t
Problem Details: Any code that relies on the volatile would be a bug waiting to happen anyway. Don't encourage people to think that putting 'volatile' on data structures somehow fixes problems. We should always use proper locking (and other serialization) techniques. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/include/asm-i386/atomic.h b/include/asm-i386/atomic.h index 51a166242522..a6c024e2506f 100644 --- a/include/asm-i386/atomic.h +++ b/include/asm-i386/atomic.h @@ -14,7 +14,7 @@ * on us. We need to use _exactly_ the address the user gave us, * not some alias that contains the same information. ...
c7f570a5eca59575572ee231390df727df207bda
Analyze and fix the following issue in the Linux kernel code: [IA64] Fix pci.c kernel compilation breakage.
Problem Details: The recent change to convert the is_enabled flag in the PCI device to an atomic count broke the IA64 compilation. As pcibios_disable_device is only ever called if the reference count is zero, convert the if to a BUG_ON. Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au> Signed-off-by: Tony Luck <...
```diff diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index f4edfbf27134..eb92cef9cd0d 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c @@ -564,8 +564,8 @@ pcibios_enable_device (struct pci_dev *dev, int mask) void pcibios_disable_device (struct pci_dev *dev) { - if (dev->is_enabled) - acpi_pci_i...
5b70a31708c958cb259e9c6cbecf7190521c856e
Analyze and fix the following issue in the Linux kernel code: [MIPS] pte_offset(dir,addr): parenthesis fix
Problem Details: This patch adds missing parenthesis around 'dir' argument in pte_offset() macro definition. It also removes an extra space in the definition of pte_offset_kernel() macro. Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/include/asm-mips/pgtable-32.h b/include/asm-mips/pgtable-32.h index d20f2e9b28be..2fbd47eba32d 100644 --- a/include/asm-mips/pgtable-32.h +++ b/include/asm-mips/pgtable-32.h @@ -156,9 +156,9 @@ pfn_pte(unsigned long pfn, pgprot_t prot) #define __pte_offset(address) \ (((address) >> PAGE_SHI...
7a87b6c228b8d0cc54b9faa159732fcb2a6c9d0c
Analyze and fix the following issue in the Linux kernel code: [PATCH] hamradio/dmascc: fix up work_struct-induced breakage
Problem Details: Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/net/hamradio/dmascc.c b/drivers/net/hamradio/dmascc.c index 0f8b9afd55b4..e6e721aff6f6 100644 --- a/drivers/net/hamradio/dmascc.c +++ b/drivers/net/hamradio/dmascc.c @@ -252,7 +252,7 @@ static inline void z8530_isr(struct scc_info *info); static irqreturn_t scc_isr(int irq, void *dev_id); ...
c041b5ff8d50c432698d9bfbd68cc4b76c2ea5bc
Analyze and fix the following issue in the Linux kernel code: NLM: fix print format for tk_pid
Problem Details: The tk_pid field is an unsigned short. The proper print format specifier for that type is %5u, not %4d. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c index 3d84f600b633..41c983a05294 100644 --- a/fs/lockd/clntproc.c +++ b/fs/lockd/clntproc.c @@ -729,7 +729,7 @@ static void nlmclnt_cancel_callback(struct rpc_task *task, void *data) goto retry_cancel; } - dprintk("lockd: cancel status %d (task %d)\n...
94efa93435383b08d822a40f24ff6f6ce1a888df
Analyze and fix the following issue in the Linux kernel code: rpcgss: krb5: miscellaneous cleanup
Problem Details: Miscellaneous cosmetic fixes. 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_krb5_seal.c b/net/sunrpc/auth_gss/gss_krb5_seal.c index f42e453e63ea..d0bb5064f8c5 100644 --- a/net/sunrpc/auth_gss/gss_krb5_seal.c +++ b/net/sunrpc/auth_gss/gss_krb5_seal.c @@ -108,17 +108,17 @@ gss_get_mic_kerberos(struct gss_ctx *gss_ctx, struct xdr_buf *text, if (krb5_...
adeb8133dd57f380e70a389a89a2ea3ae227f9e2
Analyze and fix the following issue in the Linux kernel code: rpc: spkm3 update
Problem Details: This updates the spkm3 code to bring it up to date with our current understanding of the spkm3 spec. In doing so, we're changing the downcall format used by gssd in the spkm3 case, which will cause an incompatilibity with old userland spkm3 support. Since the old code a) didn't implement the protocol...
```diff diff --git a/include/linux/sunrpc/gss_spkm3.h b/include/linux/sunrpc/gss_spkm3.h index 2cf3fbb40b4f..e3e6a3437f8b 100644 --- a/include/linux/sunrpc/gss_spkm3.h +++ b/include/linux/sunrpc/gss_spkm3.h @@ -12,27 +12,19 @@ #include <linux/sunrpc/gss_asn1.h> struct spkm3_ctx { - struct xdr_netobj ctx_id; /* per ...
87d918d667e51962938392759aef6ca368d6e96d
Analyze and fix the following issue in the Linux kernel code: rpc: gss: fix a kmap_atomic race in krb5 code
Problem Details: This code is never called from interrupt context; it's always run by either a user thread or rpciod. So KM_SKB_SUNRPC_DATA is inappropriate here. Thanks to Aimé Le Rouzic for capturing an oops which showed the kernel taking an interrupt while we were in this piece of code, resulting in a nested kmap_...
```diff diff --git a/net/sunrpc/auth_gss/gss_krb5_wrap.c b/net/sunrpc/auth_gss/gss_krb5_wrap.c index 0f512e8e0d19..ad243872f547 100644 --- a/net/sunrpc/auth_gss/gss_krb5_wrap.c +++ b/net/sunrpc/auth_gss/gss_krb5_wrap.c @@ -57,9 +57,9 @@ gss_krb5_remove_padding(struct xdr_buf *buf, int blocksize) >>PAGE_CACHE_SHIF...
8fc7500bb8ea3b5c909869d00628635e964ae882
Analyze and fix the following issue in the Linux kernel code: rpc: gss: eliminate print_hexl()'s
Problem Details: Dumping all this data to the logs is wasteful (even when debugging is turned off), and creates too much output to be useful when it's turned on. Fix a minor style bug or two while we're at it. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Trond Myklebust <Trond.Myklebust@neta...
```diff diff --git a/include/linux/sunrpc/auth_gss.h b/include/linux/sunrpc/auth_gss.h index 97b62e97dd8d..2db2fbf34947 100644 --- a/include/linux/sunrpc/auth_gss.h +++ b/include/linux/sunrpc/auth_gss.h @@ -90,8 +90,6 @@ struct gss_cred { #define gc_flags gc_base.cr_flags #define gc_expire gc_base.cr_expire -void...
2b577f1f14c8d83ba9400ec8accaf4a208f4f36a
Analyze and fix the following issue in the Linux kernel code: SUNRPC: another pmap wakeup fix
Problem Details: Don't wake up bind waiters if a task finds that another task is already trying to bind. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/net/sunrpc/pmap_clnt.c b/net/sunrpc/pmap_clnt.c index 8d2e10fc3df9..3946ec3eb517 100644 --- a/net/sunrpc/pmap_clnt.c +++ b/net/sunrpc/pmap_clnt.c @@ -101,14 +101,14 @@ void rpc_getport(struct rpc_task *task) /* Autobind on cloned rpc clients is discouraged */ BUG_ON(clnt->cl_parent != clnt); ...
9cf85e0a243b56f4ef8439a1e6430307fd9dcda6
Analyze and fix the following issue in the Linux kernel code: NFS: Fix up writeback_control->nr_to_write accounting
Problem Details: We're really accounting for the same page twice now: once in generic_writepages(), and once in nfs_scan_dirty(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index 47ae2b4dd1d4..bc9fab68b29c 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c @@ -288,11 +288,10 @@ long nfs_scan_dirty(struct address_space *mapping, struct nfs_page *pgvec[NFS_SCAN_MAXENTRIES]; struct nfs_page *req; pgoff_t idx_start, idx_end;...
3925675cb37cc9c3fd1d3f56ce0fa729f995f863
Analyze and fix the following issue in the Linux kernel code: NFS: Fix up the dirty page accounting
Problem Details: There is now no reason to account for the dirty pages in the NFS code, since the VM code will now do it for us via __set_page_dirty_nobuffers(), and set_page_writeback(). We still need to keep the accounting of stable writes, though. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index e046c9b6a9dd..47ae2b4dd1d4 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c @@ -331,7 +331,6 @@ long nfs_scan_dirty(struct address_space *mapping, nfsi->ndirty--; nfs_list_remove_request(req); nfs_list_add_request(req, dst); - dec_zone...
fa8d8c5b77a2dc467b5365a5651710161b84f16d
Analyze and fix the following issue in the Linux kernel code: NFS: Fix nfs_release_page
Problem Details: invalidate_inode_pages2_range() will clear the PG_dirty bit before calling try_to_release_page(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 238fb6641aae..8e28bffc35a0 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -315,13 +315,14 @@ static void nfs_invalidate_page(struct page *page, unsigned long offset) static int nfs_release_page(struct page *page, gfp_t gfp) { - if (gfp & __GFP_FS) - retur...
bbd5a1f9fc9fad0f8725812d91c51b052e847de8
Analyze and fix the following issue in the Linux kernel code: SUNRPC: Fix up missing BKL in asynchronous RPC callback functions
Problem Details: Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index 14fc813ddd0c..b6b6ad6253b4 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h @@ -252,6 +252,7 @@ void rpc_init_task(struct rpc_task *task, struct rpc_clnt *clnt, void rpc_put_task(struct rpc_task *); vo...
e8e058e830f46a76f837522e5e2df46d4303111f
Analyze and fix the following issue in the Linux kernel code: NFS: Fix nfs_sync_inode_wait(FLUSH_INVALIDATE)
Problem Details: Currently nfs_sync_inode_wait() will fail to loop correctly when we call nfs_sync_inode_wait with the FLUSH_INVALIDATE argument. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 29d88209199d..9b8eb9373ad4 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -1525,9 +1525,10 @@ int nfs_sync_inode_wait(struct inode *inode, unsigned long idx_start, pages = nfs_scan_dirty(inode, &head, idx_start, npages); if (pages != 0) { spin_un...
cf1308ff7829017dab0dbcc817c63dc9c212923e
Analyze and fix the following issue in the Linux kernel code: NFS: Fix missing page_unlock() in nfs_readpage
Problem Details: Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/read.c b/fs/nfs/read.c index e879ee6e1385..29094a545088 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c @@ -145,12 +145,12 @@ static int nfs_readpage_sync(struct nfs_open_context *ctx, struct inode *inode, { unsigned int rsize = NFS_SERVER(inode)->rsize; unsigned int count = PAGE_CACHE_S...
0b67130149b006628389ff3e8f46be9957af98aa
Analyze and fix the following issue in the Linux kernel code: NFS: Fix asynchronous read error handling
Problem Details: We must always call ->read_done() before we truncate the page data, or decide to flag an error. The reasons are that in NFSv2, ->read_done() is where the eof flag gets set. in NFSv3/v4 ->read_done() handles EJUKEBOX-type errors, and v4 state recovery. However, we need to mark the pages as uptoda...
```diff diff --git a/fs/nfs/read.c b/fs/nfs/read.c index 8b58bbf6e39e..e879ee6e1385 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c @@ -460,6 +460,55 @@ nfs_pagein_list(struct list_head *head, int rpages) return error; } +/* + * This is the callback from RPC telling us whether a reply was + * received or some error...
46b9f8e1484352f09f229107ba2a758fe386d7f7
Analyze and fix the following issue in the Linux kernel code: NFS Exclusive open not supported bug
Problem Details: When trying to open a file with the O_EXCL flag over NFS on a server that does not support exclusive mode, the file does not open. The reason, rpc_call_sync returns a errno number, and not the nfs error number. I fixed it by changing the status check in nfs3proc.c. Either this is how it should be fi...
```diff diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index e5f128ffc32d..9d7ff4f83faf 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c @@ -369,7 +369,7 @@ again: /* If the server doesn't support the exclusive creation semantics, * try again with simple 'guarded' mode. */ - if (status == NFSERR_NOTSUP...
8aca67f0ae2d8811165c22326825a645cc8e1b48
Analyze and fix the following issue in the Linux kernel code: SUNRPC: Fix a potential race in rpc_wake_up_task()
Problem Details: Use RCU to ensure that we can safely call rpc_finish_wakeup after we've called __rpc_do_wake_up_task. If not, there is a theoretical race, in which the rpc_task finishes executing, and gets freed first. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/read.c b/fs/nfs/read.c index c2e49c397a27..8b58bbf6e39e 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c @@ -65,13 +65,19 @@ struct nfs_read_data *nfs_readdata_alloc(size_t len) return p; } -static void nfs_readdata_free(struct nfs_read_data *p) +static void nfs_readdata_rcu_free(struct r...
e6b3c4db6fbcd0d33720696f37790d6b8be12313
Analyze and fix the following issue in the Linux kernel code: Fix a second potential rpc_wakeup race...
Problem Details: Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 8118036cc449..93ac05889cbc 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -636,7 +636,7 @@ static int _nfs4_proc_open_confirm(struct nfs4_opendata *data) smp_wmb(); } else status = data->rpc_status; - rpc_release_task(task); + rpc_put_t...
cc4dc59e5580d6c0de1685a25b74d32175f43434
Analyze and fix the following issue in the Linux kernel code: Subject: Re: [PATCH] Fix SUNRPC wakeup/execute race condition
Problem Details: The sunrpc scheduler contains a race condition that can let an RPC task end up being neither running nor on any wait queue. The race takes place between rpc_make_runnable (called from rpc_wake_up_task) and __rpc_execute under the following condition: First __rpc_execute calls tk_action which puts the ...
```diff diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index a1ab4eed41f4..b57d4062d429 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c @@ -295,13 +295,15 @@ EXPORT_SYMBOL(__rpc_wait_for_completion_task); */ static void rpc_make_runnable(struct rpc_task *task) { - int do_ret; - BUG_ON(task->tk_time...
f81cff0d4067e41fd7383d9c013cc82da7c169d2
Analyze and fix the following issue in the Linux kernel code: [PATCH] uclinux: fix mmap() of directory for nommu case
Problem Details: I was playing with blackfin when i hit a neat bug ... doing an open() on a directory and then passing that fd to mmap() would cause the kernel to hang after poking into the code a bit more, i found that mm/nommu.c:validate_mmap_request() checks the length and if it is 0, just returns the address ... t...
```diff diff --git a/mm/nommu.c b/mm/nommu.c index 8bdde9508f3b..6a2a8aada401 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -497,15 +497,17 @@ static int validate_mmap_request(struct file *file, (flags & MAP_TYPE) != MAP_SHARED) return -EINVAL; - if (PAGE_ALIGN(len) == 0) - return addr; - - if (len > TASK_SIZ...
a8b8d57c25eb61a04431324e1a41109925290512
Analyze and fix the following issue in the Linux kernel code: [PATCH] m68knommu: ColdFire serial driver fixes
Problem Details: Some updates for the old ColdFire serial driver: . support 3 and 4 UARTs on some ColdFire parts that have them . enable multifunction pins to serial for 527x CPU's . support the 5272 UART's fractional baud rate divisor . switch driver name to "mcfserial" Signed-off-by: Greg Ungerer <gerg@uclinux....
```diff diff --git a/drivers/serial/mcfserial.c b/drivers/serial/mcfserial.c index aee1b31f1a1c..3db206d29b33 100644 --- a/drivers/serial/mcfserial.c +++ b/drivers/serial/mcfserial.c @@ -60,7 +60,8 @@ struct timer_list mcfrs_timer_struct; #if defined(CONFIG_HW_FEITH) #define CONSOLE_BAUD_RATE 38400 #define DEFAULT_C...
deb77c8501f47ab228bf7cc7fd649e50603ed2cd
Analyze and fix the following issue in the Linux kernel code: [PATCH] m68knommu: fix timer register access on 523x ColdFire platforms
Problem Details: The 523x timer TRR register is a full 32bits, the older register (on other ColdFire parts) was only 16 bits. Use the right type of __raw_read when accessing it. Problem found by Yaroslav Vinogradov <yaroslav.vinogradov@freescale.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linu...
```diff diff --git a/arch/m68knommu/platform/5307/timers.c b/arch/m68knommu/platform/5307/timers.c index 24781f009337..e5668af19789 100644 --- a/arch/m68knommu/platform/5307/timers.c +++ b/arch/m68knommu/platform/5307/timers.c @@ -3,7 +3,7 @@ /* * timers.c -- generic ColdFire hardware timer support. * - * Copyrigh...
ea0f8feaa041f3ccec3d6b8ee51325b177daef06
Analyze and fix the following issue in the Linux kernel code: sh: sh775x/titan fixes for irq header changes.
Problem Details: The following moves the creation of IPR interupts into setup-7750.c and updates a few other things to make it all work after the "Drop CPU subtype IRQ headers" commit. It boots and runs fine on my titan board. - adds an ipr_idx to the ipr_data and uses a function in the subtype code to calculate t...
```diff diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 013732074d35..d83d64af31f2 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -375,6 +375,9 @@ config CPU_HAS_MASKREG_IRQ config CPU_HAS_INTC2_IRQ bool +config CPU_HAS_IPR_IRQ + bool + config CPU_HAS_SR_RB bool "CPU has SR.RB" depends on CPU_SH3 ...
65e5d90de6dba9975332dac4f849b81f663e16fa
Analyze and fix the following issue in the Linux kernel code: sh: compile fixes for header cleanup.
Problem Details: Since some header inclusion paths were cleaned up, compilation broke. Add in the headers we need directly to build again. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/kernel/time.c b/arch/sh/kernel/time.c index 1b91c7214979..c206c9504c4b 100644 --- a/arch/sh/kernel/time.c +++ b/arch/sh/kernel/time.c @@ -13,6 +13,8 @@ #include <linux/module.h> #include <linux/init.h> #include <linux/profile.h> +#include <linux/timex.h> +#include <linux/sched.h> #inclu...
c03c69610bfa728805deceeb624ee4268c722a5a
Analyze and fix the following issue in the Linux kernel code: sh: Fixup movli.l/movco.l atomic ops for gcc4.
Problem Details: gcc4 gets a bit pissy about the outputs: include/asm/atomic.h: In function 'atomic_add': include/asm/atomic.h:37: error: invalid lvalue in asm statement include/asm/atomic.h:30: error: invalid lvalue in asm output 1 ... this ended up being a thinko anyways, so just fix it up. Verified for proper beh...
```diff diff --git a/include/asm-sh/atomic.h b/include/asm-sh/atomic.h index 8bdc1ba56f73..28305c3cbddf 100644 --- a/include/asm-sh/atomic.h +++ b/include/asm-sh/atomic.h @@ -28,11 +28,11 @@ static inline void atomic_add(int i, atomic_t *v) unsigned long tmp; __asm__ __volatile__ ( -"1: movli.l @%3, %0 ! atomic_...
9f650cf2b811cfb605f10483eeb1dc86f43cdbcb
Analyze and fix the following issue in the Linux kernel code: sh: Fix store queue bitmap end.
Problem Details: The end of the store queue bitmap is miscalculated when searching for a free range in sq_remap(), missing the PAGE_SHIFT shift that's done in sq_api_init(). This runs in to workloads where we can scan beyond the end of the bitmap. Spotted by Paul Jackson: http://marc.theaimsgroup.com/?l=linux-kernel...
```diff diff --git a/arch/sh/kernel/cpu/sh4/sq.c b/arch/sh/kernel/cpu/sh4/sq.c index 7bcc73f9b8df..55f43506995a 100644 --- a/arch/sh/kernel/cpu/sh4/sq.c +++ b/arch/sh/kernel/cpu/sh4/sq.c @@ -19,7 +19,7 @@ #include <linux/slab.h> #include <linux/vmalloc.h> #include <linux/mm.h> -#include <asm/io.h> +#include <linux/i...
510c72ad2dd4e05e6908755f51ac89482c6eb987
Analyze and fix the following issue in the Linux kernel code: sh: Fixup various PAGE_SIZE == 4096 assumptions.
Problem Details: There were a number of places that made evil PAGE_SIZE == 4k assumptions that ended up breaking when trying to play with 8k and 64k page sizes, this fixes those up. The most significant change is the way we load THREAD_SIZE, previously this was done via: mov #(THREAD_SIZE >> 8), reg shll8 reg to a...
```diff diff --git a/arch/sh/kernel/cpu/sh3/entry.S b/arch/sh/kernel/cpu/sh3/entry.S index 5de99b498738..7ba3dcbe7504 100644 --- a/arch/sh/kernel/cpu/sh3/entry.S +++ b/arch/sh/kernel/cpu/sh3/entry.S @@ -335,7 +335,7 @@ general_exception: /* This code makes some assumptions to improve performance. * Make sure they ar...
4dfc119f1c0723c54a20ff5ca4ea460ce7a4edb5
Analyze and fix the following issue in the Linux kernel code: sh: dma-sysfs fixes.
Problem Details: Handle the case where no registered DMACs exist somewhat more gracefully. While we're at it, check for sysdev_create_file() failing. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/drivers/dma/dma-sysfs.c b/arch/sh/drivers/dma/dma-sysfs.c index 29b8ef9873d1..eebcd4768bbf 100644 --- a/arch/sh/drivers/dma/dma-sysfs.c +++ b/arch/sh/drivers/dma/dma-sysfs.c @@ -3,7 +3,7 @@ * * sysfs interface for SH DMA API * - * Copyright (C) 2004, 2005 Paul Mundt + * Copyright (C)...
e0969e0c9b609fdfe217e34f3e046179ffe88eb6
Analyze and fix the following issue in the Linux kernel code: sh: Fix syscall tracing ordering.
Problem Details: The implementation of system call tracing in the kernel has a couple of ordering problems: - the validity of the system call number is checked before calling out to system call tracing code, and should be done after - the system call number used when tracing is the one the system call was ...
```diff diff --git a/arch/sh/kernel/entry-common.S b/arch/sh/kernel/entry-common.S index 5bc7fa91d095..8f96d21fcb1c 100644 --- a/arch/sh/kernel/entry-common.S +++ b/arch/sh/kernel/entry-common.S @@ -256,8 +256,7 @@ syscall_trace_entry: mov.l @(OFF_R6,r15), r6 mov.l @(OFF_R7,r15), r7 ! arg3 mov.l @(OFF_R3,r15), ...
9daa0c257d6c200b58092e0bfc32b77c4618a8af
Analyze and fix the following issue in the Linux kernel code: sh: R7780RP push-switch support.
Problem Details: This adds simple push-switch support for the RDBRP-1/RDBREVRP-1 debug boards found on the R7780RP-1. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/boards/renesas/r7780rp/Makefile b/arch/sh/boards/renesas/r7780rp/Makefile index f1776d027978..574b0316ed56 100644 --- a/arch/sh/boards/renesas/r7780rp/Makefile +++ b/arch/sh/boards/renesas/r7780rp/Makefile @@ -3,4 +3,6 @@ # obj-y := setup.o io.o irq.o -obj-$(CONFIG_HEARTBEAT) += led.o ...
9f5e8eee5cfe1328660c71812d87c2a67bda389f
Analyze and fix the following issue in the Linux kernel code: sh: generic push-switch framework.
Problem Details: This adds support for a generic push switch framework. Adaptable for various switches, including GPIO switches and the push switches commonly found on Renesas debug boards. This allows switch states to be trivially reported through sysfs. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index d62183f355a3..a03f155571c8 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -473,6 +473,8 @@ config HEARTBEAT behavior is platform-dependent, but normally the flash frequency is a hyperbolic function of the 5-minute load average. +source "arch/...
f0bc814cfbc212683c882e58b3d1afec6b3e3aa3
Analyze and fix the following issue in the Linux kernel code: sh: gcc4 support.
Problem Details: This fixes up the kernel for gcc4. The existing exception handlers needed some wrapping for pt_regs access, acessing the registers via a RELOC_HIDE() pointer. The strcpy() issues popped up here too, so add -ffreestanding and kill off the symbol export. Signed-off-by: Stuart Menefy <stuart.menefy@st.c...
```diff diff --git a/arch/sh/Makefile b/arch/sh/Makefile index 6b3af5ce66a2..7f4516c3f83d 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile @@ -43,7 +43,7 @@ cflags-$(CONFIG_CPU_SH4A) := -m4a $(call cc-option,-m4a-nofpu,) cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml -cflags-...
710ee0cc45d095f7697821b330a3f8280205c2be
Analyze and fix the following issue in the Linux kernel code: sh: SE7206 build fixes.
Problem Details: A number of API changes happened underneath the 7206 patches, update for everything that broke. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/boards/se/7206/irq.c b/arch/sh/boards/se/7206/irq.c index 8d5b278a124d..3fb0c5f5b23a 100644 --- a/arch/sh/boards/se/7206/irq.c +++ b/arch/sh/boards/se/7206/irq.c @@ -6,12 +6,10 @@ * Hitachi SolutionEngine Support. * */ - -#include <linux/config.h> #include <linux/init.h> #include <l...
720eeb4332e5871c97d390b2fb55a5a74fb18ae6
Analyze and fix the following issue in the Linux kernel code: [PATCH] ipw2200: Fix debug output endian issue
Problem Details: 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/ipw2200.c b/drivers/net/wireless/ipw2200.c index cce55f6b355a..d29f42773a83 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c @@ -8285,7 +8285,7 @@ static void ipw_rx(struct ipw_priv *priv) ("Notification: subtype=%02X flags=%02X size=%d\...
90c009ac30318e607d4f17ba1afb9cbac7fa2954
Analyze and fix the following issue in the Linux kernel code: [PATCH] ipw2200: Fix a typo
Problem Details: Signed-off-by: Pascal Terjan <pterjan@gmail.com> 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/ipw2100.c b/drivers/net/wireless/ipw2100.c index 79607b8b877c..060018e084b4 100644 --- a/drivers/net/wireless/ipw2100.c +++ b/drivers/net/wireless/ipw2100.c @@ -6215,7 +6215,7 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev, /* Allocate and initialize the Tx/Rx que...
cc8ce997d2a4e524b1acea44beaf5bcfefdb1bfe
Analyze and fix the following issue in the Linux kernel code: [PATCH] softmac: fix unbalanced mutex_lock/unlock in ieee80211softmac_wx_set_mlme
Problem Details: Routine ieee80211softmac_wx_set_mlme has one return that fails to release a mutex acquired at entry. Signed-off-by: Maxime Austruy <maxime@tralhalla.org> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/net/ieee80211/softmac/ieee80211softmac_wx.c b/net/ieee80211/softmac/ieee80211softmac_wx.c index 23068a830f7d..5b7b5b41554d 100644 --- a/net/ieee80211/softmac/ieee80211softmac_wx.c +++ b/net/ieee80211/softmac/ieee80211softmac_wx.c @@ -495,7 +495,8 @@ ieee80211softmac_wx_set_mlme(struct net_device *d...
2b50c24554d31c2db2f93b1151b5991e62f96594
Analyze and fix the following issue in the Linux kernel code: [PATCH] softmac: Fixed handling of deassociation from AP
Problem Details: In 2.6.19 a deauthentication from the AP doesn't start a reassociation by the softmac code. It appears that mac->associnfo.associating must be set and the ieee80211softmac_assoc_work function must be scheduled. This patch fixes that. Signed-off-by: Ulrich Kunitz <kune@deine-taler.de> Signed-off-by: Jo...
```diff diff --git a/net/ieee80211/softmac/ieee80211softmac_assoc.c b/net/ieee80211/softmac/ieee80211softmac_assoc.c index cf51c87a971d..614aa8d32985 100644 --- a/net/ieee80211/softmac/ieee80211softmac_assoc.c +++ b/net/ieee80211/softmac/ieee80211softmac_assoc.c @@ -427,6 +427,17 @@ ieee80211softmac_handle_assoc_respon...
9cdac9657fda58ae39c2bbc8be396f5530ed8398
Analyze and fix the following issue in the Linux kernel code: [PATCH] zd1211rw: Support for multicast addresses
Problem Details: Support for multicast adresses is implemented by supporting the set_multicast_list() function of the network device. Address filtering is supported by a group hash table in the device. This is based on earlier work by Benoit Papillaut. Fixes multicast packet reception and ipv6 connectivity: http://bug...
```diff diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c index 8be99ebbe1cd..77e11ddad836 100644 --- a/drivers/net/wireless/zd1211rw/zd_chip.c +++ b/drivers/net/wireless/zd1211rw/zd_chip.c @@ -1673,3 +1673,16 @@ int zd_rfwritev_cr_locked(struct zd_chip *chip, return 0; ...
887bc5d00c02b32763845247024e8db5243ef857
Analyze and fix the following issue in the Linux kernel code: [GFS2] Fix indent in recovery.c
Problem Details: As per comments from Andrew Morton and Jan Engelhardt, this fixes the indent and removes the "static" from a variable declaration since its not needed in this case (now allocated on the stack of the function in question). Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> Cc: Jan Engelhardt <jenge...
```diff diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c index 4acf238e1db6..d0c806b85c86 100644 --- a/fs/gfs2/recovery.c +++ b/fs/gfs2/recovery.c @@ -136,7 +136,7 @@ static int get_log_header(struct gfs2_jdesc *jd, unsigned int blk, { struct buffer_head *bh; struct gfs2_log_header_host lh; -static const u32 n...
ee926b27a01da1c1f0f0017c0e6af6e4fd6c05b5
Analyze and fix the following issue in the Linux kernel code: [SCSI] stex: update device id info
Problem Details: - add comments for various devices - remove unused device ids(0xf350, 0x4301, 0x8301, 0x8302) - add new device id(0xe350) - fix vendor id of st_vsc - modify Kconfig help info Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index 1b4bfaabcfbc..69569096dae5 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig @@ -982,8 +982,13 @@ config SCSI_STEX tristate "Promise SuperTrak EX Series support" depends on PCI && SCSI ---help--- - This driver supports Promise Sup...
4eea9dc45fa7feb42e6dce32d94ea9ea4d64e40b
Analyze and fix the following issue in the Linux kernel code: [SCSI] stex: fix controller_info command handling
Problem Details: This command needs information from both firmware and driver. First copy information from firmware to buffer, then fill in driver information. Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c index 91d484c0dd93..ea0d82461317 100644 --- a/drivers/scsi/stex.c +++ b/drivers/scsi/stex.c @@ -507,6 +507,7 @@ static void stex_controller_info(struct st_hba *hba, struct st_ccb *ccb) size_t count = sizeof(struct st_frame); p = hba->copy_buffer; + st...
b4b8bed12345bc03dfcef80cbbe78582429b063c
Analyze and fix the following issue in the Linux kernel code: [SCSI] stex: fix biosparam calculation
Problem Details: Fix biosparam calculation. Signed-off-by: Ed Lin <ed.lin@promise.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c index 185c270bb043..91d484c0dd93 100644 --- a/drivers/scsi/stex.c +++ b/drivers/scsi/stex.c @@ -1100,18 +1100,18 @@ static int stex_reset(struct scsi_cmnd *cmd) static int stex_biosparam(struct scsi_device *sdev, struct block_device *bdev, sector_t capac...
00769ec40074b753c9b218c2ccaba2bfbfffe056
Analyze and fix the following issue in the Linux kernel code: [SCSI] megaraid: fix MMIO casts
Problem Details: megaraid's MMIO RD*/WR* macros directly call readl() and writel() with an 'unsigned long' argument. This throws a warning, but is otherwise OK because the 'unsigned long' is really the result of ioremap(). This setup is also OK because the variable can hold an ioremap cookie /or/ a PCI I/O port (PIO)...
```diff diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index 86099fde1b2a..77d9d3804ccf 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c @@ -73,10 +73,10 @@ static unsigned short int max_mbox_busy_wait = MBOX_BUSY_WAIT; module_param(max_mbox_busy_wait, ushort, 0); MODULE_PARM_DESC(ma...
e42ebefee15894522f3a84045887573ebc9b764e
Analyze and fix the following issue in the Linux kernel code: [SCSI] tgt: fix undefined flush_dcache_page() problem
Problem Details: drivers/scsi/scsi_tgt_if.c: In function 'tgt_uspace_send_event': drivers/scsi/scsi_tgt_if.c:88: warning: implicit declaration of function 'flush_dcache_page' Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/scsi_tgt_if.c b/drivers/scsi/scsi_tgt_if.c index 28fd2223765b..37bbfbdb870f 100644 --- a/drivers/scsi/scsi_tgt_if.c +++ b/drivers/scsi/scsi_tgt_if.c @@ -29,6 +29,8 @@ #include <scsi/scsi_tgt.h> #include <scsi/scsi_tgt_if.h> +#include <asm/cacheflush.h> + #include "scsi_tgt_priv.h"...
bf8c80a6a5153e7f170f240731c650eeed6d78ff
Analyze and fix the following issue in the Linux kernel code: mmc: fix au1xmmc build error
Problem Details: This patch has fixed the following build error abou au1xmmc. drivers/mmc/au1xmmc.c: In function `au1xmmc_poll_event': drivers/mmc/au1xmmc.c:835: warning: unused variable `status' drivers/mmc/au1xmmc.c: At top level: drivers/mmc/au1xmmc.c:878: error: parse error before "const" drivers/mmc/au1xmmc.c: In...
```diff diff --git a/drivers/mmc/au1xmmc.c b/drivers/mmc/au1xmmc.c index 447fba5825fd..800527cf40d5 100644 --- a/drivers/mmc/au1xmmc.c +++ b/drivers/mmc/au1xmmc.c @@ -875,7 +875,7 @@ static void au1xmmc_init_dma(struct au1xmmc_host *host) host->rx_chan = rxchan; } -struct const mmc_host_ops au1xmmc_ops = { +static...
9e86619b6d58806d1a8b67c12c5e3e3a74818fb6
Analyze and fix the following issue in the Linux kernel code: mmc: pxamci compilation fix
Problem Details: since commit fcaf71fd51f9cfc504455d3e19ec242e4b2073ed struct mmc_host does not have a dev field. Retrieve the device with mmc_dev() instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
```diff diff --git a/drivers/mmc/pxamci.c b/drivers/mmc/pxamci.c index 471e9f4e0530..45a9283ce498 100644 --- a/drivers/mmc/pxamci.c +++ b/drivers/mmc/pxamci.c @@ -355,7 +355,7 @@ static int pxamci_get_ro(struct mmc_host *mmc) struct pxamci_host *host = mmc_priv(mmc); if (host->pdata && host->pdata->get_ro) - ret...
1dd997f8fa5d52a473c77201a96efe3b66abc3d8
Analyze and fix the following issue in the Linux kernel code: [PATCH] pcmcia: fix m32r_cfc.c compilation
Problem Details: More fallout of the post 2.6.19-rc1 IRQ changes... Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
```diff diff --git a/drivers/pcmcia/m32r_cfc.c b/drivers/pcmcia/m32r_cfc.c index 36fdaa58458c..3c22ac4625c2 100644 --- a/drivers/pcmcia/m32r_cfc.c +++ b/drivers/pcmcia/m32r_cfc.c @@ -398,7 +398,7 @@ static irqreturn_t pcc_interrupt(int irq, void *dev) static void pcc_interrupt_wrapper(u_long data) { debug(3, "m32r_...
d9d9ea0169e657a01c3717291d0614220dc0ff9e
Analyze and fix the following issue in the Linux kernel code: [PATCH] pcmcia: ds.c debug enhancements
Problem Details: Add verbose error messages and debug information to ds.c Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
```diff diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 5b302e822ef5..45df12eda3c5 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c @@ -250,6 +250,8 @@ int pcmcia_register_driver(struct pcmcia_driver *driver) driver->drv.bus = &pcmcia_bus_type; driver->drv.owner = driver->owner; + ds_dbg(3,...
9374074f9b8bfe15bd5860019d07d967507c2bb6
Analyze and fix the following issue in the Linux kernel code: [PATCH] pcmcia: handle __copy_from_user() return value in ioctl
Problem Details: Handle __copy_from_user() return value. drivers/pcmcia/pcmcia_ioctl.c:597: warning: ignoring return value of '__copy_from_user', declared with attribute warn_unused_result Noticed and first fix by Randy Dunlap. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
```diff diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c index 310ede575caa..d077870c6731 100644 --- a/drivers/pcmcia/pcmcia_ioctl.c +++ b/drivers/pcmcia/pcmcia_ioctl.c @@ -594,7 +594,12 @@ static int ds_ioctl(struct inode * inode, struct file * file, err = ret = 0; - if (cmd & IOC...
1d2c90425d5b0dcbf4a0fab2053d5087758b76a0
Analyze and fix the following issue in the Linux kernel code: [PATCH] pcmcia: multifunction card handling fixes
Problem Details: s->functions needs to be initialized earlier, for the "let's see how high it increases" approach means that pcmcia_request_irq() (which makes use of this value) is confused, and might request an exclusive IRQ first even though it is not supposed to. Also, a CIS override autoloaded using the firmware l...
```diff diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 7f6e94cd067a..da7ceb523b48 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c @@ -231,65 +231,6 @@ static void pcmcia_check_driver(struct pcmcia_driver *p_drv) } -#ifdef CONFIG_PCMCIA_LOAD_CIS - -/** - * pcmcia_load_firmware - load CIS fr...
5eb5fc97d83ee1f8fcf3490bb81ad14a99fc544c
Analyze and fix the following issue in the Linux kernel code: [PATCH] cm4000_cs: fix return value check
Problem Details: The return value of class_create() need to be checked with IS_ERR(). And register_chrdev() returns errno on failure. This patch includes these fixes for cm4000_cs and cm4040_cs. Signed-off-by: Akinbou Mita <akinobu.mita@gmail.com> Signed-off-by: Harald Welte <laforge@gnumonks.org> Signed-off-by: Domin...
```diff diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c index 50d20aafeb18..d9fdef227910 100644 --- a/drivers/char/pcmcia/cm4000_cs.c +++ b/drivers/char/pcmcia/cm4000_cs.c @@ -1973,14 +1973,14 @@ static int __init cmm_init(void) printk(KERN_INFO "%s\n", version); cmm_class = class_c...
043d58064ac6556a3abd3a74201831f3e9a5b6e8
Analyze and fix the following issue in the Linux kernel code: [PATCH] sk98lin debug build fix
Problem Details: Fix parenthesis mismatch. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/sk98lin/skgesirq.c b/drivers/net/sk98lin/skgesirq.c index ab66d80a4455..3e7aa49afd00 100644 --- a/drivers/net/sk98lin/skgesirq.c +++ b/drivers/net/sk98lin/skgesirq.c @@ -1319,7 +1319,7 @@ SK_BOOL AutoNeg) /* Is Auto-negotiation used ? */ SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_INT_STAT, ...
3b6e8fe7eca12fca2cc7fde46ba2a94a86ab0815
Analyze and fix the following issue in the Linux kernel code: [PATCH] declance: Fix PMAX and PMAD support
Problem Details: The shared buffer used by the LANCE on the PMAX only supports halfword (16-bit) accesses. And the PMAD has the buffer wired differently. This is a change to fix these issues. Tested with a DECstation 2100 (thanks Flo for making this possible) and a DECstation 5000/133 (both the PMAD and the onboard ...
```diff diff --git a/drivers/net/declance.c b/drivers/net/declance.c index 00e2a8a134d7..1167f8f7c272 100644 --- a/drivers/net/declance.c +++ b/drivers/net/declance.c @@ -40,6 +40,10 @@ * * v0.009: Module support fixes, multiple interfaces support, various * bits. macro + * + * v0.010: Fixe...
4e1400796c93df5e7f92d766e4a4332d0c98795f
Analyze and fix the following issue in the Linux kernel code: [PATCH] bonding: incorrect bonding state reported via ioctl
Problem Details: This is a small fix-up to finish out the work done by Jay Vosburgh to add carrier-state support for bonding devices. The output in /proc/net/bonding/bondX was correct, but when collecting the same info via an iotcl it could still be incorrect. Signed-off-by: Andy Gospodarek <andy@greyhouse.net> Cc: J...
```diff diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 488d8ed9e740..6482aed4bb7c 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -3684,7 +3684,7 @@ static int bond_do_ioctl(struct net_device *bond_dev, struct ifreq *ifr, int cmd mii->val_o...
9b9129e73985fe31ee6fd6a5d9f04219d127c186
Analyze and fix the following issue in the Linux kernel code: [POWERPC] typo fix and whitespace cleanup on mpc52xx-uart driver
Problem Details: Single typo fix and whitespace changes. In preparation for heavy changes to this driver when support for arch/powerpc is added. Since the driver will be changing significantly anyway, then may as well take the opportunity to clean it up first. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> S...
```diff diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index 4f80c5b4a753..8e24133166af 100644 --- a/drivers/serial/mpc52xx_uart.c +++ b/drivers/serial/mpc52xx_uart.c @@ -1,6 +1,4 @@ /* - * drivers/serial/mpc52xx_uart.c - * * Driver for the PSC of the Freescale MPC52xx PSCs configured as ...
03dbd2e0b1dcb24d63f64aa234cce3a7fabed328
Analyze and fix the following issue in the Linux kernel code: [MIPS] SWARM: Fix a typo in #error directives
Problem Details: This is a fix for a typo repeated several times in #error directives for invalid SiByte configurations. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/sibyte/swarm/setup.c b/arch/mips/sibyte/swarm/setup.c index ac342f5643c9..defa1f1452ad 100644 --- a/arch/mips/sibyte/swarm/setup.c +++ b/arch/mips/sibyte/swarm/setup.c @@ -43,7 +43,7 @@ #elif defined(CONFIG_SIBYTE_SB1250) || defined(CONFIG_SIBYTE_BCM112X) #include <asm/sibyte/sb1250_reg...