id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
c6caeb7c4544608e8ae62731334661fc396c7f85
Analyze and fix the following issue in the Linux kernel code: proc: fix the threaded /proc/self
Problem Details: Long ago when the CLONE_THREAD support first went it someone thought it would be wise to point /proc/self at /proc/<tgid> instead of /proc/<pid>. Given that /proc/<tgid> can return information about a very different task (if enough things have been unshared) then our current process /proc/<tgid> seems...
```diff diff --git a/fs/proc/base.c b/fs/proc/base.c index 75b1979749a5..de07e959ff2f 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -2102,22 +2102,22 @@ static int proc_self_readlink(struct dentry *dentry, char __user *buffer, int buflen) { struct pid_namespace *ns = dentry->d_sb->s_fs_info; - pid_t ...
488e5bc4560d0b510c1ddc451c51a6cc14e3a930
Analyze and fix the following issue in the Linux kernel code: proc: proper pidns handling for /proc/self
Problem Details: Currently if you access a /proc that is not mounted with your processes current pid namespace /proc/self will point at a completely random task. This patch fixes /proc/self to point to the current process if it is available in the particular mount of /proc or to return -ENOENT if the current process i...
```diff diff --git a/fs/proc/base.c b/fs/proc/base.c index 8a19a8a1a3e6..75b1979749a5 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -2101,15 +2101,23 @@ static const struct file_operations proc_coredump_filter_operations = { static int proc_self_readlink(struct dentry *dentry, char __user *buffer, int ...
df5f8314ca30d6a76735748e5ba4ca9809c0f434
Analyze and fix the following issue in the Linux kernel code: proc: seqfile convert proc_pid_status to properly handle pid namespaces
Problem Details: Currently we possibly lookup the pid in the wrong pid namespace. So seq_file convert proc_pid_status which ensures the proper pid namespaces is passed in. [akpm@linux-foundation.org: coding-style fixes] [akpm@linux-foundation.org: build fix] [akpm@linux-foundation.org: another build fix] [akpm@linux-...
```diff diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index 1a2fdb6991df..a4d29025ddbd 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c @@ -24,6 +24,7 @@ #include <linux/smp.h> #include <linux/init.h> #include <linux/interrupt.h> +#include <linux/seq_file.h> #include <linux/de...
ee992744ea53db0a90c986fd0a70fbbf91e7f8bd
Analyze and fix the following issue in the Linux kernel code: proc: rewrite do_task_stat to correctly handle pid namespaces.
Problem Details: Currently (as pointed out by Oleg) do_task_stat has a race when calling task_pid_nr_ns with the task exiting. In addition do_task_stat is not currently displaying information in the context of the pid namespace that mounted the /proc filesystem. So "cut -d' ' -f 1 /proc/<pid>/stat" may not equal <pid...
```diff diff --git a/fs/proc/array.c b/fs/proc/array.c index 6ba2746e4517..7e9f3b65f25b 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -77,6 +77,7 @@ #include <linux/cpuset.h> #include <linux/rcupdate.h> #include <linux/delayacct.h> +#include <linux/seq_file.h> #include <linux/pid_namespace.h> #include <a...
94413d8807a3c511a3675be4ce27a4d16d6408ee
Analyze and fix the following issue in the Linux kernel code: proc: detect duplicate names on registration
Problem Details: Print a warning if PDE is registered with a name which already exists in target directory. Bug report and a simple fix can be found here: http://bugzilla.kernel.org/show_bug.cgi?id=8798 [\n fixlet and no undescriptive variable usage --adobriyan] [akpm@linux-foundation.org: make printk comprehensible]...
```diff diff --git a/fs/proc/generic.c b/fs/proc/generic.c index e37ea3e53de8..b9dd3628d43a 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c @@ -521,6 +521,7 @@ static const struct inode_operations proc_dir_inode_operations = { static int proc_register(struct proc_dir_entry * dir, struct proc_dir_entry * dp) { ...
74bd59bb39eb08b4379e2590c5f160748d83f812
Analyze and fix the following issue in the Linux kernel code: namespaces: cleanup the code managed with PID_NS option
Problem Details: Just like with the user namespaces, move the namespace management code into the separate .c file and mark the (already existing) PID_NS option as "depend on NAMESPACES" [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Serge Hallyn <serue@us.ib...
```diff diff --git a/include/linux/pid.h b/include/linux/pid.h index e29a900a8499..061abb6c0796 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h @@ -118,10 +118,10 @@ extern struct pid *find_pid(int nr); */ extern struct pid *find_get_pid(int nr); extern struct pid *find_ge_pid(int nr, struct pid_namespac...
aee16ce73c71a241190cef3aaa265f6a3ab8e035
Analyze and fix the following issue in the Linux kernel code: namespaces: cleanup the code managed with the USER_NS option
Problem Details: Make the user_namespace.o compilation depend on this option and move the init_user_ns into user.c file to make the kernel compile and work without the namespaces support. This make the user namespace code be organized similar to other namespaces'. Also mask the USER_NS option as "depend on NAMESPACES...
```diff diff --git a/init/Kconfig b/init/Kconfig index 47879a874966..2a6499d6f283 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -214,15 +214,6 @@ config TASK_IO_ACCOUNTING Say N if unsure. -config USER_NS - bool "User Namespaces (EXPERIMENTAL)" - default n - depends on EXPERIMENTAL - help - Support user nam...
ac74c00e499ed276a965e5b5600667d5dc04a84a
Analyze and fix the following issue in the Linux kernel code: inotify: fix check for one-shot watches before destroying them
Problem Details: As the IN_ONESHOT bit is never set when an event is sent we must check it in the watch's mask and not in the event's mask. Signed-off-by: Ulisses Furquim <ulissesf@gmail.com> Reported-by: "Clem Taylor" <clem.taylor@gmail.com> Tested-by: "Clem Taylor" <clem.taylor@gmail.com> Cc: Amy Griffis <amy.griffi...
```diff diff --git a/fs/inotify_user.c b/fs/inotify_user.c index a336c9709f3c..3ab09a65c456 100644 --- a/fs/inotify_user.c +++ b/fs/inotify_user.c @@ -283,7 +283,7 @@ static void inotify_dev_queue_event(struct inotify_watch *w, u32 wd, u32 mask, /* we can safely put the watch as we don't reference it while * gener...
a890d62b9e8743341f62548104d1ac29fa8a5a88
Analyze and fix the following issue in the Linux kernel code: Enhanced partition statistics: aoe fix
Problem Details: Updates the enhanced partition statistics in ATA over Ethernet driver (not tested). Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
```diff diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c index 4d59d5057734..9e5a37fb36cf 100644 --- a/drivers/block/aoe/aoecmd.c +++ b/drivers/block/aoe/aoecmd.c @@ -648,10 +648,10 @@ aoecmd_ata_rsp(struct sk_buff *skb) struct gendisk *disk = d->gd; const int rw = bio_data_dir(buf->bio); ...
ac17e82a87f4d914cf9f61526b57e21b4a944e09
Analyze and fix the following issue in the Linux kernel code: CRIS v32: Fix minor formatting issue in mach-a3/io.c
Problem Details:
```diff diff --git a/arch/cris/arch-v32/mach-a3/io.c b/arch/cris/arch-v32/mach-a3/io.c index 5e6c1aad8b4f..9eeaf3eca474 100644 --- a/arch/cris/arch-v32/mach-a3/io.c +++ b/arch/cris/arch-v32/mach-a3/io.c @@ -114,8 +114,7 @@ int crisv32_io_get(struct crisv32_iopin *iopin, return 0; } -int crisv32_io_get_name(struct ...
e919a1201c285f27764a5ee5ee06535a61c31d22
Analyze and fix the following issue in the Linux kernel code: CRIS v32: Change name for simulator config in asm-cris/arch-v32/page.h
Problem Details: Also, fix a typo.
```diff diff --git a/include/asm-cris/arch-v32/page.h b/include/asm-cris/arch-v32/page.h index fa454fe12425..20f1b4806bfe 100644 --- a/include/asm-cris/arch-v32/page.h +++ b/include/asm-cris/arch-v32/page.h @@ -7,11 +7,11 @@ #define PAGE_OFFSET KSEG_C /* kseg_c is mapped to physical ram. */ /* - * Macros to convert...
60dead5a8c909a650ade5f92f2649db292486af1
Analyze and fix the following issue in the Linux kernel code: CRIS: Register cpus in kernel/setup.c
Problem Details: Also, fix some white space errors, and constify cpuinfo_op.
```diff diff --git a/arch/cris/kernel/setup.c b/arch/cris/kernel/setup.c index 4da042e100a0..04d48dd91ddf 100644 --- a/arch/cris/kernel/setup.c +++ b/arch/cris/kernel/setup.c @@ -18,7 +18,7 @@ #include <linux/screen_info.h> #include <linux/utsname.h> #include <linux/pfn.h> - +#include <linux/cpu.h> #include <asm/se...
1b7e7da364123e45acb5f697fc0422bafcda13ff
Analyze and fix the following issue in the Linux kernel code: CRIS: Remove useless CVS log from kernel/ptrace.c
Problem Details: Also, fix some whitespace errors.
```diff diff --git a/arch/cris/kernel/ptrace.c b/arch/cris/kernel/ptrace.c index 3ccd20e85dce..b326023baab2 100644 --- a/arch/cris/kernel/ptrace.c +++ b/arch/cris/kernel/ptrace.c @@ -2,65 +2,11 @@ * linux/arch/cris/kernel/ptrace.c * * Parts taken from the m68k port. - * + * * Copyright (c) 2000, 2001, 2002 Ax...
baa69b121a32f2b8ee388b651030f7f3c16df463
Analyze and fix the following issue in the Linux kernel code: CRIS v32: Fix startup oops and replace hardcoded pagesize in vmlinux.lds.S
Problem Details: - Move alignment of init data to page size outside define CONFIG_BLK_DEV_INITRD This avoids oops due to memory on the same page as init data being freed. - Change hardcoded page size to use macro from asm/page.h - Add reserved memory via CONFIG_ETRAX_VMEM_SIZE. - Use available defines for TEXT_TEXT a...
```diff diff --git a/arch/cris/arch-v32/vmlinux.lds.S b/arch/cris/arch-v32/vmlinux.lds.S index fead8c59ea63..d5f28e40717c 100644 --- a/arch/cris/arch-v32/vmlinux.lds.S +++ b/arch/cris/arch-v32/vmlinux.lds.S @@ -9,6 +9,13 @@ */ #include <asm-generic/vmlinux.lds.h> +#include <asm/page.h> + +#ifdef CONFIG_ETRAX_VMEM_...
52d82ef12a172124ee4aab06656c877868efc407
Analyze and fix the following issue in the Linux kernel code: CRIS v32: Avoid work when switching between tasks with shared memory descriptors in mm/tlb.c
Problem Details: There is no need to do all this work if they share memory descriptors. Also, fix some minor whitespace and long lines.
```diff diff --git a/arch/cris/arch-v32/mm/tlb.c b/arch/cris/arch-v32/mm/tlb.c index a076ef6e9389..eda5ebcaea54 100644 --- a/arch/cris/arch-v32/mm/tlb.c +++ b/arch/cris/arch-v32/mm/tlb.c @@ -13,8 +13,8 @@ #include <asm/arch/hwregs/supp_reg.h> #define UPDATE_TLB_SEL_IDX(val) \ -do { \ - unsigned long tlb...
3d44305abe1fe75793a4b42de51d8a0be9bedc3f
Analyze and fix the following issue in the Linux kernel code: CRIS v32: Add workaround for MMU hardware bug for ETRAX FS in mm/mmu.S
Problem Details:
```diff diff --git a/arch/cris/arch-v32/mm/mmu.S b/arch/cris/arch-v32/mm/mmu.S index 27b70e5006af..2238d154bde3 100644 --- a/arch/cris/arch-v32/mm/mmu.S +++ b/arch/cris/arch-v32/mm/mmu.S @@ -1,3 +1,5 @@ +; WARNING : The refill handler has been modified, see below !!! + /* * Copyright (C) 2003 Axis Communications AB...
108ecfbc3110574fe929e9dd1f622580f95359c0
Analyze and fix the following issue in the Linux kernel code: CRIS v32: Fix bug in internal memory allocator mm/intmem.c
Problem Details: - Fix bug where allocated memory didn't account for alignment. - Add support for ARTPEC-3 - Add module_init for crisv32_intmem_init.
```diff diff --git a/arch/cris/arch-v32/mm/intmem.c b/arch/cris/arch-v32/mm/intmem.c index 41ee7f7997fd..9e8b69cdf19e 100644 --- a/arch/cris/arch-v32/mm/intmem.c +++ b/arch/cris/arch-v32/mm/intmem.c @@ -7,11 +7,17 @@ #include <linux/list.h> #include <linux/slab.h> #include <asm/io.h> -#include <asm/arch/memmap.h> +#...
45a4127c10abff5edce4448c7bc951d0a112e67a
Analyze and fix the following issue in the Linux kernel code: CRIS v10: Update drivers/gpio.c, fix locking and general improvements.
Problem Details: - Change all spin_lock/local_irq_save to spin_lock_irqsave. - Change multiple returns in functions where we have a lock to goto out. - Correct number of arguments to gpio_poll_timer_interrupt, gpio_pa_interrupt. - Break out gpio_write logic to smaller functions to make it readable. - In setget_input an...
```diff diff --git a/arch/cris/arch-v10/drivers/gpio.c b/arch/cris/arch-v10/drivers/gpio.c index 0d347a705835..26ae11be208d 100644 --- a/arch/cris/arch-v10/drivers/gpio.c +++ b/arch/cris/arch-v10/drivers/gpio.c @@ -1,138 +1,11 @@ -/* $Id: gpio.c,v 1.17 2005/06/19 17:06:46 starvik Exp $ - * +/* * Etrax general port I/...
f64dd2191d9b64358c0f357b0f28e149ce7f3d83
Analyze and fix the following issue in the Linux kernel code: CRIS v32: Change debug and formatting in kernel/fasttimer.c
Problem Details: - Don't use SANITYCHECK(x) as a macro, test FAST_TIMER_SANITY_CHECKS with ifdef. This makes it possible for automatic indent etc to work. - Correct some whitespace errors. - Don't initialize static variable.
```diff diff --git a/arch/cris/arch-v32/kernel/fasttimer.c b/arch/cris/arch-v32/kernel/fasttimer.c index 30514625eee0..2de9d5849ef0 100644 --- a/arch/cris/arch-v32/kernel/fasttimer.c +++ b/arch/cris/arch-v32/kernel/fasttimer.c @@ -44,10 +44,7 @@ #define FAST_TIMER_SANITY_CHECKS #ifdef FAST_TIMER_SANITY_CHECKS -#def...
635c45c195d95d9e65587b3cd18af9df4d102f52
Analyze and fix the following issue in the Linux kernel code: CRIS v32: Rewrite of stream co-processor driver for ETRAX FS and ARTPEC-3
Problem Details: - Workaround for cachebug (Guinness TR 106). - Add ARTPEC-3 support.
```diff diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c index e8914d401696..9fb58202be99 100644 --- a/arch/cris/arch-v32/drivers/cryptocop.c +++ b/arch/cris/arch-v32/drivers/cryptocop.c @@ -1,8 +1,7 @@ -/* $Id: cryptocop.c,v 1.13 2005/04/21 17:27:55 henriken Exp $ - * +/* ...
3c1d9303a9676fd4f9062f2347f1a6241eb6314b
Analyze and fix the following issue in the Linux kernel code: CRIS: Fix bugs in return value of atomic_inc_return and atomic_dec_return.
Problem Details: Increment and decrement before assigning to return value.
```diff diff --git a/include/asm-cris/atomic.h b/include/asm-cris/atomic.h index 2949a945876a..5fc87768774a 100644 --- a/include/asm-cris/atomic.h +++ b/include/asm-cris/atomic.h @@ -91,7 +91,7 @@ static inline int atomic_inc_return(volatile atomic_t *v) unsigned long flags; int retval; cris_atomic_save(v, flags)...
151f6398301c30670456efd0c4801aa721d557b9
Analyze and fix the following issue in the Linux kernel code: CRIS: Include arch dependent bug.h.
Problem Details:
```diff diff --git a/include/asm-cris/bug.h b/include/asm-cris/bug.h index 8dd6b23c15d6..fee12d4ae683 100644 --- a/include/asm-cris/bug.h +++ b/include/asm-cris/bug.h @@ -1,4 +1,4 @@ #ifndef _CRIS_BUG_H #define _CRIS_BUG_H -#include <asm-generic/bug.h> +#include <asm/arch/bug.h> #endif ```
b1220e2e7f03a0e86078c82819e802c25047638d
Analyze and fix the following issue in the Linux kernel code: CRIS v10: Update kernel/io_interface_mux.c
Problem Details: Fixed a bug where two interfaces using pins in the same pin group could not be allocated at the same time even if there where no pin collisions. Change all restore and returns into goto exit pattern. Also, remove useless CVS id and correct chapter reference for ETRAX100LX Designer's Reference in comm...
```diff diff --git a/arch/cris/arch-v10/kernel/io_interface_mux.c b/arch/cris/arch-v10/kernel/io_interface_mux.c index f3b327d4ed9c..add98e0941b5 100644 --- a/arch/cris/arch-v10/kernel/io_interface_mux.c +++ b/arch/cris/arch-v10/kernel/io_interface_mux.c @@ -1,10 +1,9 @@ /* IO interface mux allocator for ETRAX100LX. -...
4f073eff3fb738dce5ad0d8a3d126e5c09cbfba7
Analyze and fix the following issue in the Linux kernel code: CRIS v10: Don't call get_mmu_context when switching between tasks with shared memory descriptors
Problem Details: Also, cleanup formatting and fix whitespace errors.
```diff diff --git a/arch/cris/arch-v10/mm/tlb.c b/arch/cris/arch-v10/mm/tlb.c index 7d9fec88dee5..6baf5bd209e7 100644 --- a/arch/cris/arch-v10/mm/tlb.c +++ b/arch/cris/arch-v10/mm/tlb.c @@ -4,8 +4,8 @@ * Low level TLB handling * * - * Copyright (C) 2000-2002 Axis Communications AB - * + * Copyright (C) 200...
40316c1fadfcd7856e43029fdbac5df6a1d57063
Analyze and fix the following issue in the Linux kernel code: CRIS v10: Fix bug where error returns didn't restore irqs in mm/fault.c
Problem Details: Don't return when we're inside local_irq_disable(), use goto exit instead. Also, cleanup some whitespace errors.
```diff diff --git a/arch/cris/arch-v10/mm/fault.c b/arch/cris/arch-v10/mm/fault.c index fe2615022b97..65504fd80928 100644 --- a/arch/cris/arch-v10/mm/fault.c +++ b/arch/cris/arch-v10/mm/fault.c @@ -4,10 +4,10 @@ * Low level bus fault handler * * - * Copyright (C) 2000, 2001 Axis Communications AB + * Copyrig...
18b0f3461664f4f8348832d33b481252cf2904f9
Analyze and fix the following issue in the Linux kernel code: CRIS v10: Update and fix bug in kernel/debugport.
Problem Details: - Move local_irq_save to after possible return in console_write_direct. - Remove old raw_printk hack, not needed anymore. - Add watchdog handling. - Make serial_driver use depend on CONFIG_ETRAX_SERIAL. - Remove useless CVS log.
```diff diff --git a/arch/cris/arch-v10/kernel/debugport.c b/arch/cris/arch-v10/kernel/debugport.c index 93679a48c791..04d5eee2c90c 100644 --- a/arch/cris/arch-v10/kernel/debugport.c +++ b/arch/cris/arch-v10/kernel/debugport.c @@ -1,6 +1,6 @@ /* Serialport functions for debugging * - * Copyright (c) 2000 Axis Commun...
34a8e501fe83f3b572eee56a6fca5111ab8cdf65
Analyze and fix the following issue in the Linux kernel code: CRIS v10: Update driver for pcf8563
Problem Details: - Use mutex instead of spinlock, fixes kernel bugzilla report 8339. - Make sure that pcf8563_init can be called multiple times but only setup once. - Change RTC_VLOW_RD -> RTC_VL_READ, RTC_VLOW_SET -> RTC_VL_CLR - Cache the voltage low value at driver init so the battery status information does not g...
```diff diff --git a/arch/cris/arch-v10/drivers/pcf8563.c b/arch/cris/arch-v10/drivers/pcf8563.c index c263b8232dbc..52103d16dc6c 100644 --- a/arch/cris/arch-v10/drivers/pcf8563.c +++ b/arch/cris/arch-v10/drivers/pcf8563.c @@ -8,14 +8,13 @@ * low detector are also provided. All address and data are transferred * se...
e5d5cf2442038b8ad3e0f90b00e5acdd18d5fa98
Analyze and fix the following issue in the Linux kernel code: CRIS v10: Fix bugs in i2c_init and i2c_readreg
Problem Details: - Set the variable first to zero after first setup, so we can stop multiple calls to i2c_init from trying to setup i2c. - The last byte read by the master in an i2c transfer needs to be NACKed, not ACKed. - Also, remove useless CVS log and CVS id tags.
```diff diff --git a/arch/cris/arch-v10/drivers/i2c.c b/arch/cris/arch-v10/drivers/i2c.c index aca81ddaf60f..d6d22067d0c8 100644 --- a/arch/cris/arch-v10/drivers/i2c.c +++ b/arch/cris/arch-v10/drivers/i2c.c @@ -6,85 +6,9 @@ *! kernel modules (i2c_writereg/readreg) and from userspace using *! ...
3d6c03fc223e6ed3b7cb4cf850a7da4a376d02d3
Analyze and fix the following issue in the Linux kernel code: CRIS v10: Cleanup drivers/eeprom.c to avoid import conflicts.
Problem Details: - Remove useless CVS log and CVS id tags. - Whitespace fix and remove C++ comment.
```diff diff --git a/arch/cris/arch-v10/drivers/eeprom.c b/arch/cris/arch-v10/drivers/eeprom.c index be35a70798aa..f1cac9dc75b8 100644 --- a/arch/cris/arch-v10/drivers/eeprom.c +++ b/arch/cris/arch-v10/drivers/eeprom.c @@ -19,77 +19,6 @@ *! Sep 03 1999 Edgar Iglesias Added bail-out stuff if we get interrupted *...
d207cf5bb91351e58b55d02f54a0218a0d8e3736
Analyze and fix the following issue in the Linux kernel code: CRIS v10: Correct and cleanup boot/rescue/testrescue.S
Problem Details: - Correct include path for sv_addr_ag.h, should be asm/arch/ - Fix some whitespace errors. - Remove useless CVS id tag.
```diff diff --git a/arch/cris/arch-v10/boot/rescue/testrescue.S b/arch/cris/arch-v10/boot/rescue/testrescue.S index 566a9f341254..2d937f9afe23 100644 --- a/arch/cris/arch-v10/boot/rescue/testrescue.S +++ b/arch/cris/arch-v10/boot/rescue/testrescue.S @@ -1,13 +1,12 @@ -/* $Id: testrescue.S,v 1.1 2001/12/17 13:59:27 bjo...
0dfb8c35703709ca5e8f58e019d72383110999a7
Analyze and fix the following issue in the Linux kernel code: CRIS: Add architecture dependent bug.h for CRIS v10 and CRIS v32
Problem Details:
```diff diff --git a/include/asm-cris/arch-v10/bug.h b/include/asm-cris/arch-v10/bug.h new file mode 100644 index 000000000000..3485d6b34bb0 --- /dev/null +++ b/include/asm-cris/arch-v10/bug.h @@ -0,0 +1,66 @@ +#ifndef __ASM_CRISv10_ARCH_BUG_H +#define __ASM_CRISv10_ARCH_BUG_H + +#include <linux/stringify.h> + +#ifdef ...
d8ca6b1593382e51f4c245de9040c795be3a0281
Analyze and fix the following issue in the Linux kernel code: CRIS v32: Minor fixes for io.h
Problem Details: - Shorten include paths for machine dependent header files. - Add volatile to hardeware register pointers. - Add spinlocks around critical region. - Expand macros for handling of leds.
```diff diff --git a/include/asm-cris/arch-v32/io.h b/include/asm-cris/arch-v32/io.h index 5efe4d949001..65a287953f50 100644 --- a/include/asm-cris/arch-v32/io.h +++ b/include/asm-cris/arch-v32/io.h @@ -1,9 +1,10 @@ #ifndef _ASM_ARCH_CRIS_IO_H #define _ASM_ARCH_CRIS_IO_H -#include <asm/arch/hwregs/reg_map.h> -#incl...
9ce1ea751f7256b2248321c2427612a295f15137
Analyze and fix the following issue in the Linux kernel code: CRIS v32: Update and improve kernel/traps.c
Problem Details: - Remove watchdog handling, handled elsewhere. - Shorten include paths to machine dependent header files. - Remove raw_printk hack, we now use oops_in_progress instead. - Add handling of BUG for exception handlers (break 14). - Formatting and whitespace changes.
```diff diff --git a/arch/cris/arch-v32/kernel/traps.c b/arch/cris/arch-v32/kernel/traps.c index 17fd3dbd1c80..9003e382cada 100644 --- a/arch/cris/arch-v32/kernel/traps.c +++ b/arch/cris/arch-v32/kernel/traps.c @@ -1,50 +1,45 @@ /* - * Copyright (C) 2003, Axis Communications AB. + * Copyright (C) 2003-2006, Axis Commu...
e867cefbaaac23644414cfe562b4fee7dc604f2e
Analyze and fix the following issue in the Linux kernel code: CRIS v32: Include path fix for timex.h
Problem Details: - Shorten include path for machine dependent header files. - Correct some formatting issues.
```diff diff --git a/include/asm-cris/arch-v32/timex.h b/include/asm-cris/arch-v32/timex.h index 5a4aa285d5fd..2591d3c5ed9d 100644 --- a/include/asm-cris/arch-v32/timex.h +++ b/include/asm-cris/arch-v32/timex.h @@ -1,9 +1,9 @@ #ifndef _ASM_CRIS_ARCH_TIMEX_H #define _ASM_CRIS_ARCH_TIMEX_H -#include <asm/arch/hwregs/...
822641026238421a70ad20af513758ef927527e5
Analyze and fix the following issue in the Linux kernel code: CRIS v32: Update debugport.
Problem Details: - Shorten include paths to machine dependent headers. - Add support for fifth serial port. - Remove CONFIG_ETRAXFS_SIM and CONFIG_ETRAX_DEBUG_PORT_NULL, no longer used. - Remove raw_printk and stupid_debug hack, no longer needed. - Remove dummy console stuff, no longer needed. - Correct some register t...
```diff diff --git a/arch/cris/arch-v32/kernel/debugport.c b/arch/cris/arch-v32/kernel/debugport.c index d1272ad92153..15af4c293157 100644 --- a/arch/cris/arch-v32/kernel/debugport.c +++ b/arch/cris/arch-v32/kernel/debugport.c @@ -4,17 +4,12 @@ #include <linux/console.h> #include <linux/init.h> -#include <linux/maj...
247c3c959f5d5a7edd1d5561ffe29906129dab0b
Analyze and fix the following issue in the Linux kernel code: CRIS v32: Update compressed head.S
Problem Details: - Fixes for NAND and NOR flash booting. - Use assembler macros for common tasks (clocks, general io etc) - Use (EtraxFS or Artpec-3) machine specific include for dram and hardware init.
```diff diff --git a/arch/cris/arch-v32/boot/compressed/head.S b/arch/cris/arch-v32/boot/compressed/head.S index 34cea10a8998..f86208caf32d 100644 --- a/arch/cris/arch-v32/boot/compressed/head.S +++ b/arch/cris/arch-v32/boot/compressed/head.S @@ -2,13 +2,12 @@ * Code that sets up the DRAM registers, calls the * d...
1e4cc2c8c7cb54ce0e5a7002c68aca9e89607117
Analyze and fix the following issue in the Linux kernel code: CRIS v32: Update traps.c
Problem Details: - Remove raw_prink hack, use oops_in_progress instead. - When ETRAX_WATCHDOG_NICE_DOGGY is set, loop in trap after oops dump instead of rebooting. - Break long lines to less than 80 chars. - Fix whitespace errors. - Remove unnecessary comments.
```diff diff --git a/arch/cris/arch-v10/kernel/traps.c b/arch/cris/arch-v10/kernel/traps.c index 4becc1bcced9..9eada5d8893b 100644 --- a/arch/cris/arch-v10/kernel/traps.c +++ b/arch/cris/arch-v10/kernel/traps.c @@ -1,13 +1,10 @@ -/* $Id: traps.c,v 1.4 2005/04/24 18:47:55 starvik Exp $ +/* + * Helper functions for trap ...
32872b203b542f0696b6af4db992a3c320de57e1
Analyze and fix the following issue in the Linux kernel code: CRIS v10: Update and improve axisflashmap.c
Problem Details: - Add config to use mtd0 as whole flash device. - Fix whitespace errors. - Remove braces around single statement ifs. - Break long lines. - Remove unnecessary CVS log.
```diff diff --git a/arch/cris/arch-v10/drivers/axisflashmap.c b/arch/cris/arch-v10/drivers/axisflashmap.c index ea3cf2e39a14..b3bdda93ffef 100644 --- a/arch/cris/arch-v10/drivers/axisflashmap.c +++ b/arch/cris/arch-v10/drivers/axisflashmap.c @@ -10,129 +10,6 @@ * tells us what other partitions to define. If there is...
1ddba0257e0c8fb6cdfa913efd3a433d0e4a762a
Analyze and fix the following issue in the Linux kernel code: CRIS: Minor generic kernel/traps.c changes.
Problem Details: - Collect extern declarations at top of file. - Change raw_printk to printk, use oops_in_progress instead. - Fix formatting and whitespace. - Allow the watchdog to be disabled during oops.
```diff diff --git a/arch/cris/kernel/traps.c b/arch/cris/kernel/traps.c index 520d92205fed..541efbf09371 100644 --- a/arch/cris/kernel/traps.c +++ b/arch/cris/kernel/traps.c @@ -1,66 +1,78 @@ -/* $Id: traps.c,v 1.11 2005/01/24 16:03:19 orjanf Exp $ - * +/* * linux/arch/cris/traps.c * - * Here we handle the break...
3e1fdc4eacfcfb68372301572a28c7370d861795
Analyze and fix the following issue in the Linux kernel code: CRIS: Minor fixes to mm/fault.c
Problem Details: - Only disallow oops if we're in_interrupt context (was in_atomic before) - Use the generic oops_in_progress instead of the raw_printk hack. - Fix whitespace/formatting. - Remove CVS log entries.
```diff diff --git a/arch/cris/mm/fault.c b/arch/cris/mm/fault.c index 3034f3ff950c..c4c76db90f9c 100644 --- a/arch/cris/mm/fault.c +++ b/arch/cris/mm/fault.c @@ -1,130 +1,9 @@ /* * linux/arch/cris/mm/fault.c * - * Copyright (C) 2000, 2001 Axis Communications AB - * - * Authors: Bjorn Wesen - * - * $Log: f...
4a8df1507eaeefc9739e3762db606caa08edba98
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix potential cell IOMMU bug when switching back to default DMA ops
Problem Details: If we get a 64-bit dma mask we switch to the fixed ops and call cell_dma_dev_setup(). If the driver then switches back to a 32-bit dma mask for any reason we don't call cell_dma_dev_setup() again, which has the potential to leave bogus data in dev->archdata.dma_data. Signed-off-by: Michael Ellerman <...
```diff diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c index 1f7b25474086..5cdcd3638250 100644 --- a/arch/powerpc/platforms/cell/iommu.c +++ b/arch/powerpc/platforms/cell/iommu.c @@ -841,19 +841,18 @@ static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask) if (!dev...
ccd05d086f82dba2ab117dcaf4a38cbb2863a439
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix cell IOMMU null pointer explosion on old firmwares
Problem Details: The cell IOMMU fixed mapping support has a null pointer bug if you run it on older firmwares that don't contain the "dma-ranges" properties. Fix it and convert to using of_get_next_parent() while we're there. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulu...
```diff diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c index df330666ccc9..a276064471b3 100644 --- a/arch/powerpc/platforms/cell/iommu.c +++ b/arch/powerpc/platforms/cell/iommu.c @@ -26,6 +26,7 @@ #include <linux/init.h> #include <linux/interrupt.h> #include <linux/notifier.h>...
85687ff2b4eab47f4d637a0d3a482bb955d3cbd4
Analyze and fix the following issue in the Linux kernel code: [POWERPC] spufs: Fix timing dependent false return from spufs_run_spu
Problem Details: Stop bits are only valid when the running bit is not set. Status bits carry over from one invocation of spufs_run_spu() to another, so the RUNNING bit gets added to the previous state of the register which may have been a remote library call. In this case, it looks like another library routine should...
```diff diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c index f401e51a7979..fca22e18069a 100644 --- a/arch/powerpc/platforms/cell/spufs/run.c +++ b/arch/powerpc/platforms/cell/spufs/run.c @@ -53,7 +53,7 @@ int spu_stopped(struct spu_context *ctx, u32 *stat) stopped = S...
eebead5b8ff89340dc18ceec996157d0eb7d0287
Analyze and fix the following issue in the Linux kernel code: [POWERPC] spufs: Fix state_mutex leaks
Problem Details: Fix various state_mutex leaks. The worst one was introduced by the interrutible state_mutex conversion but there've been a few before too. Notably spufs_wait now returns without the state_mutex held when returning an error, which actually cleans up some code. Signed-off-by: Christoph Hellwig <hch@ls...
```diff diff --git a/arch/powerpc/platforms/cell/spufs/fault.c b/arch/powerpc/platforms/cell/spufs/fault.c index eff4d291ba85..e46d300e21a5 100644 --- a/arch/powerpc/platforms/cell/spufs/fault.c +++ b/arch/powerpc/platforms/cell/spufs/fault.c @@ -108,7 +108,7 @@ int spufs_handle_class1(struct spu_context *ctx) u64 ea...
592a607bbc053bc6f614a0e619326009f4b3829e
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Disable G5 NAP mode during SMU commands on U3
Problem Details: It appears that with the U3 northbridge, if the processor is in NAP mode the whole time while waiting for an SMU command to complete, then the SMU will fail. It could be related to the weird backward mechanism the SMU uses to get to system memory via i2c to the northbridge that doesn't operate properl...
```diff diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c index ba931be2175c..5169ecc37123 100644 --- a/arch/powerpc/platforms/powermac/feature.c +++ b/arch/powerpc/platforms/powermac/feature.c @@ -2565,6 +2565,8 @@ static void __init probe_uninorth(void) /* Locate c...
054b0e2b2d5ed460784e8dfbf30ff4768dbf4376
Analyze and fix the following issue in the Linux kernel code: [ISDN]: fix section mismatch warning in enpci_card_msg
Problem Details: Fix following warnings: WARNING: drivers/isdn/hisax/built-in.o(.text+0x3cf50): Section mismatch in reference from the function enpci_card_msg() to the function .devinit.text:Amd7930_init() WARNING: drivers/isdn/hisax/built-in.o(.text+0x3cf85): Section mismatch in reference from the function enpci_card_...
```diff diff --git a/drivers/isdn/hisax/amd7930_fn.c b/drivers/isdn/hisax/amd7930_fn.c index c0d7036404a5..341faf58a65c 100644 --- a/drivers/isdn/hisax/amd7930_fn.c +++ b/drivers/isdn/hisax/amd7930_fn.c @@ -744,8 +744,7 @@ dbusy_timer_handler(struct IsdnCardState *cs) -void __devinit -Amd7930_init(struct IsdnCard...
04f217aca4d803fe72c2c54fe460d68f5233ce52
Analyze and fix the following issue in the Linux kernel code: [TC]: oops in em_meta
Problem Details: If userspace passes a unknown match index into em_meta, then em_meta_change will return an error and the data for the match will not be set. This then causes an null pointer dereference when the cleanup is done in the error path via tcf_em_tree_destroy. Since the tree structure comes kzalloc, it is ini...
```diff diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c index 2a7e648fbcf4..d417ec8e3ca3 100644 --- a/net/sched/em_meta.c +++ b/net/sched/em_meta.c @@ -735,11 +735,13 @@ static int em_meta_match(struct sk_buff *skb, struct tcf_ematch *m, static inline void meta_delete(struct meta_match *meta) { - struct meta...
b80aa7a0c268d3ae0c472f648af1e3e4a359765c
Analyze and fix the following issue in the Linux kernel code: dm raid1: fix EIO after log failure
Problem Details: This patch adds the ability to requeue write I/O to core device-mapper when there is a log device failure. If a write to the log produces and error, the pending writes are put on the "failures" list. Since the log is marked as failed, they will stay on the failures list until a suspend happens. Susp...
```diff diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c index 9978b9f07fe9..ec6d675bf766 100644 --- a/drivers/md/dm-raid1.c +++ b/drivers/md/dm-raid1.c @@ -146,6 +146,7 @@ struct mirror_set { region_t nr_regions; int in_sync; int log_failure; + atomic_t suspend; atomic_t default_mirror; /* Default ...
7e5c1e830b2310359a4cfbbf89895dde4abd996a
Analyze and fix the following issue in the Linux kernel code: dm: add missing memory barrier to dm_suspend
Problem Details: Add memory barrier to fix atomic_read of pending value. Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
```diff diff --git a/drivers/md/dm.c b/drivers/md/dm.c index f2d24eb3208c..466a6bf0742f 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -1410,6 +1410,7 @@ int dm_suspend(struct mapped_device *md, unsigned suspend_flags) while (1) { set_current_state(TASK_INTERRUPTIBLE); + smp_mb(); if (!atomic_read(&md...
4136cd523eb0c0bd53173e16fd7406d31d05824f
Analyze and fix the following issue in the Linux kernel code: [IPV4]: route: fix crash ip_route_input
Problem Details: ip_route_me_harder() may call ip_route_input() with skbs that don't have skb->dev set for skbs rerouted in LOCAL_OUT and TCP resets generated by the REJECT target, resulting in a crash when dereferencing skb->dev->nd_net. Since ip_route_input() has an input device argument, it seems correct to use that...
```diff diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 8842ecb9be48..525787b52b72 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -2041,7 +2041,7 @@ int ip_route_input(struct sk_buff *skb, __be32 daddr, __be32 saddr, int iif = dev->ifindex; struct net *net; - net = skb->dev->nd_net; + net = dev->n...
d9d17578d9f11cdbe41e4559e8f264ec757ddce8
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: xt_iprange: fix typo in address family
Problem Details: The family for iprange_mt4 should be AF_INET, not AF_INET6. Noticed by Jiri Moravec <jim.lkml@gmail.com>. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/netfilter/xt_iprange.c b/net/netfilter/xt_iprange.c index 01035fc0e140..97715e31c016 100644 --- a/net/netfilter/xt_iprange.c +++ b/net/netfilter/xt_iprange.c @@ -148,7 +148,7 @@ static struct xt_match iprange_mt_reg[] __read_mostly = { { .name = "iprange", .revision = 1, - .famil...
86577c661bc01d5c4e477d74567df4470d6c5138
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: nf_conntrack: fix ct_extend ->move operation
Problem Details: The ->move operation has two bugs: - It is called with the same extension as source and destination, so it doesn't update the new extension. - The address of the old extension is calculated incorrectly, instead of (void *)ct->ext + ct->ext->offset[i] it uses ct->ext + ct->ext->offset[i]. Fixes...
```diff diff --git a/include/net/netfilter/nf_conntrack_extend.h b/include/net/netfilter/nf_conntrack_extend.h index 73b5711faf32..49aac6323fbe 100644 --- a/include/net/netfilter/nf_conntrack_extend.h +++ b/include/net/netfilter/nf_conntrack_extend.h @@ -67,7 +67,7 @@ struct nf_ct_ext_type void (*destroy)(struct nf_c...
b2155e7f70b3f058efe94c0c459db023b05057bd
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: nf_conntrack: TCP conntrack reopening fix
Problem Details: TCP connection tracking in netfilter did not handle TCP reopening properly: active close was taken into account for one side only and not for any side, which is fixed now. The patch includes more comments to explain the logic how the different cases are handled. The bug was discovered by Jeff Chua. Si...
```diff diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c index 3e0cccae5636..202d7fa09483 100644 --- a/net/netfilter/nf_conntrack_proto_tcp.c +++ b/net/netfilter/nf_conntrack_proto_tcp.c @@ -125,7 +125,7 @@ enum tcp_bit_set { * CLOSE_WAIT: ACK seen (after FIN) * LAST_ACK:...
3adbefee6fd58a061b2bf1df4f3769701860fc62
Analyze and fix the following issue in the Linux kernel code: SLUB: fix checkpatch warnings
Problem Details: fix checkpatch --file mm/slub.c errors and warnings. $ q-code-quality-compare errors lines of code errors/KLOC mm/slub.c [before] 22 4204 5.2 mm/slub.c [after] 0 4210 ...
```diff diff --git a/mm/slub.c b/mm/slub.c index bccfb6a17864..e2989ae243b5 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -719,9 +719,10 @@ static int check_object(struct kmem_cache *s, struct page *page, endobject, red, s->inuse - s->objsize)) return 0; } else { - if ((s->flags & SLAB_POISON) && s->objsize < s-...
683d0baad3d6e18134927f8c28ee804dbe10fe71
Analyze and fix the following issue in the Linux kernel code: SLUB: Use unique end pointer for each slab page.
Problem Details: We use a NULL pointer on freelists to signal that there are no more objects. However the NULL pointers of all slabs match in contrast to the pointers to the real objects which are in different ranges for different slab pages. Change the end pointer to be a pointer to the first object and set bit 0. Ev...
```diff diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 34023c65d466..bfee0bd1d435 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -64,7 +64,10 @@ struct page { #if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS spinlock_t ptl; #endif - struct kmem_cache *slab; /* SLUB: P...
ef878b11ba245d14b7db7816217a825d6a894182
Analyze and fix the following issue in the Linux kernel code: hwmon: (w83627hf) Enable VBAT monitoring
Problem Details: If VBAT monitoring is disabled, enable it. Bug reported on the lm-sensors trac system: http://lm-sensors.org/ticket/2282 This is the exact same patch that was applied to the w83627ehf driver 6 months ago. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightli...
```diff diff --git a/drivers/hwmon/w83627hf.c b/drivers/hwmon/w83627hf.c index 181f4e8590b1..185ae1b8027d 100644 --- a/drivers/hwmon/w83627hf.c +++ b/drivers/hwmon/w83627hf.c @@ -1515,6 +1515,11 @@ static void __devinit w83627hf_init_device(struct platform_device *pdev) (w83627hf_read_value(data, W83781D...
af221931519571028c98cf7c7030dd973a524011
Analyze and fix the following issue in the Linux kernel code: hwmon: (asb100) Various cleanups
Problem Details: * Drop history, it's incomplete and doesn't belong there * Drop unused version number * Drop trailing spaces * Coding style fixes * Fold long lines * Rename new_client to client * Drop redundant initializations to 0 Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Hans de Goede <j.w.r.degoed...
```diff diff --git a/drivers/hwmon/asb100.c b/drivers/hwmon/asb100.c index 3f434de1d993..db86bc113905 100644 --- a/drivers/hwmon/asb100.c +++ b/drivers/hwmon/asb100.c @@ -47,12 +47,6 @@ #include <linux/mutex.h> #include "lm75.h" -/* - HISTORY: - 2003-12-29 1.0.0 Ported from lm_sensors project for kernel 2.6 -*/ -#d...
345a22245451c0fd2c44b2afb5dfb75628b487fa
Analyze and fix the following issue in the Linux kernel code: hwmon: (dme1737) fix Super-IO device ID override
Problem Details: The dme1737 has a second place where the Super-IO device ID is checked. This has been missed by Jean's initial patch that adds support for user-controlled Super-IO device ID override. This patch fixes this issue. Signed-off-by: Juerg Haefliger <juergh at gmail.com> Acked-by: Jean Delvare <khali@linux-...
```diff diff --git a/drivers/hwmon/dme1737.c b/drivers/hwmon/dme1737.c index 307f48de051f..ddddd9f34c19 100644 --- a/drivers/hwmon/dme1737.c +++ b/drivers/hwmon/dme1737.c @@ -2030,7 +2030,7 @@ static int dme1737_i2c_get_features(int sio_cip, struct dme1737_data *data) /* Check device ID * The DME1737 can return ...
ff8421f733c91a70d8edadf9ce2842fca66172fa
Analyze and fix the following issue in the Linux kernel code: hwmon: (dme1737) fix divide-by-0
Problem Details: This patch fixes a possible divide-by-0 and a minor bug in the FAN_FROM_REG macro (in TPC mode). Signed-off-by: Juerg Haefliger <juergh at gmail.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
```diff diff --git a/drivers/hwmon/dme1737.c b/drivers/hwmon/dme1737.c index 85064fb0b7c2..307f48de051f 100644 --- a/drivers/hwmon/dme1737.c +++ b/drivers/hwmon/dme1737.c @@ -283,14 +283,21 @@ static inline int TEMP_HYST_TO_REG(int val, int ix, int reg) /* Fan input RPM */ static inline int FAN_FROM_REG(int reg, int ...
4b4df95dccdd2c6a573c9dedefb747ed663c074d
Analyze and fix the following issue in the Linux kernel code: hwmon: (lm85) Return standard values in pwmN_enable
Problem Details: The values returned by the lm85 driver in pwmN_enable sysfs files do not match the standard. Fix that. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
```diff diff --git a/drivers/hwmon/lm85.c b/drivers/hwmon/lm85.c index a02480be65f2..194b8fb52f0e 100644 --- a/drivers/hwmon/lm85.c +++ b/drivers/hwmon/lm85.c @@ -519,10 +519,21 @@ static ssize_t show_pwm_enable(struct device *dev, struct device_attribute { int nr = to_sensor_dev_attr(attr)->index; struct lm85_dat...
38a1f0e9aed014be66c474ecd9fe8513646de833
Analyze and fix the following issue in the Linux kernel code: hwmon: (adm1031) Fix register overwrite in set_fan_div()
Problem Details: Don't rely on the register cache when setting a new fan clock divider. For one thing, the cache might not have been initialized at all if the driver has just been loaded. For another, the cached values may be old and you never know what can happen in the driver's back. Also invalidate the cache instea...
```diff diff --git a/drivers/hwmon/adm1031.c b/drivers/hwmon/adm1031.c index 37cfc101da5e..558d83b25b68 100644 --- a/drivers/hwmon/adm1031.c +++ b/drivers/hwmon/adm1031.c @@ -542,18 +542,26 @@ set_fan_div(struct device *dev, const char *buf, size_t count, int nr) return -EINVAL; mutex_lock(&data->update_lock); ...
d5b0b5d62823f08ab4988e1b179fd5a9bddced31
Analyze and fix the following issue in the Linux kernel code: hwmon: (it87) Delete pwmN_freq files on driver removal
Problem Details: In commit f8d0c19a93cea3a26a90f2462295e1e01a4cd250 I forgot to delete the pwmN_freq files on driver removal, here's the fix. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Riku Voipio <riku.voipio@movial.fi> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
```diff diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c index ca0a723cbce5..e12c132ff83a 100644 --- a/drivers/hwmon/it87.c +++ b/drivers/hwmon/it87.c @@ -933,6 +933,9 @@ static struct attribute *it87_attributes_opt[] = { &sensor_dev_attr_pwm1.dev_attr.attr, &sensor_dev_attr_pwm2.dev_attr.attr, &sensor_de...
72240307e988627df46553846936aa89a0f6a283
Analyze and fix the following issue in the Linux kernel code: hwmon: (gl518sm) Fix the reported fan speed
Problem Details: The fan speeds reported by the gl518sm driver are twice as much as they should. It's currently reporting the number of pulses per minute, not rotations per minute, while typical fans emit two pulses per rotation. This explains why all reports with this driver had very high speed values (between 9000 to...
```diff diff --git a/drivers/hwmon/gl518sm.c b/drivers/hwmon/gl518sm.c index c5255118bc16..3b1ac48fce23 100644 --- a/drivers/hwmon/gl518sm.c +++ b/drivers/hwmon/gl518sm.c @@ -96,10 +96,10 @@ static inline u8 FAN_TO_REG(long rpm, int div) long rpmdiv; if (rpm == 0) return 0; - rpmdiv = SENSORS_LIMIT(rpm, 1, 19200...
a5955ed27497385cc491ecbe40af45951e830881
Analyze and fix the following issue in the Linux kernel code: hwmon: (gl518sm) Various cleanups
Problem Details: * Drop history, it doesn't belong there * Drop unused struct member * Drop bogus struct member comment * Drop unused driver ID * Rename new_client to client * Drop redundant initializations to 0 * Drop useless cast * Drop trailing space * Fix comment * Drop duplicate comment Signed-off-by: Jean Delvar...
```diff diff --git a/drivers/hwmon/gl518sm.c b/drivers/hwmon/gl518sm.c index bb58d9866a37..842252eccdaa 100644 --- a/drivers/hwmon/gl518sm.c +++ b/drivers/hwmon/gl518sm.c @@ -30,10 +30,6 @@ * We did not keep that part of the original driver in the Linux 2.6 * version, since it was making the driver significantly mo...
5d47a35600270e7115061cb1320ee60ae9bcb6b8
Analyze and fix the following issue in the Linux kernel code: NFS: Fix a potential file corruption issue when writing
Problem Details: If the inode is flagged as having an invalid mapping, then we can't rely on the PageUptodate() flag. Ensure that we don't use the "anti-fragmentation" write optimisation in nfs_updatepage(), since that will cause NFS to write out areas of the page that are no longer guaranteed to be up to date. A pote...
```diff diff --git a/fs/nfs/write.c b/fs/nfs/write.c index b144b1957dd9..f55c437124a2 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -696,6 +696,17 @@ int nfs_flush_incompatible(struct file *file, struct page *page) return status; } +/* + * If the page cache is marked as unsafe or invalid, then we can't rely ...
38582a62ecd337de4212004c7d4844899dc57890
Analyze and fix the following issue in the Linux kernel code: [SCSI] sr: fix test unit ready responses
Problem Details: Commit 210ba1d1724f5c4ed87a2ab1a21ca861a915f734 updated sr.c to use the scsi_test_unit_ready() function. Unfortunately, this has the wrong characteristic of eating NOT_READY returns which sr.c relies on for tray status. Fix by rolling an internal sr_test_unit_ready() that doesn't do this. Tested-by:...
```diff diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index 50ba49250203..208565bdbe8e 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c @@ -163,6 +163,29 @@ static void scsi_cd_put(struct scsi_cd *cd) mutex_unlock(&sr_ref_mutex); } +/* identical to scsi_test_unit_ready except that it doesn't + * eat the...
d6a451dd4d7ec805f9a21bb1994ce8ceaecc8fe6
Analyze and fix the following issue in the Linux kernel code: [SCSI] u14-34f: fix data direction bug
Problem Details: Direction of data transfer 'DMA_FROM_DEVICE' was tested twice. DTD_OUT means transfer from host to device. This should occur when the direction of data transfer (sc_data_direction) is 'DMA_TO_DEVICE'. Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: James Bottomley <James.Bottomley@HansenP...
```diff diff --git a/drivers/scsi/u14-34f.c b/drivers/scsi/u14-34f.c index 662c00451be4..58d7eee4fe81 100644 --- a/drivers/scsi/u14-34f.c +++ b/drivers/scsi/u14-34f.c @@ -1216,7 +1216,7 @@ static void scsi_to_dev_dir(unsigned int i, unsigned int j) { cpp->xdir = DTD_IN; return; } - else if (SCpnt...
62e9f5c4671a3026639b01ec84a3063f03bead4c
Analyze and fix the following issue in the Linux kernel code: [SCSI] aacraid: pci_set_dma_max_seg_size opened up for late model controllers
Problem Details: This patch ensures that the modern adapters get a maximum sg segment size on par with the maximum transfer size. Added some localized janitor fixes to the discussion patch I used with Fujita. FUJITA Tomonori [mailto:fujita.tomonori@lab.ntt.co.jp] sez: > I think that setting the proper maximum segment ...
```diff diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index fb0886140dd7..e80d2a0c46af 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -1130,31 +1130,29 @@ static int __devinit aac_probe_one(struct pci_dev *pdev, if (error < 0) goto out_deinit; - if (!(a...
4d2de3a50ce19af2008a90636436a1bf5b3b697b
Analyze and fix the following issue in the Linux kernel code: [SCSI] fix BUG when sum(scatterlist) > bufflen
Problem Details: When sending a SCSI command to a tape drive via the SCSI Generic (sg) driver, if the command has a data transfer length more than scatter_elem_sz (32 KB default) and not a multiple of 512, then I either hit BUG_ON(!valid_dma_direction(direction)) in dma_unmap_sg() or else the command never completes (d...
```diff diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index f243fc30c908..135c1d054701 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -301,7 +301,6 @@ static int scsi_req_map_sg(struct request *rq, struct scatterlist *sgl, page = sg_page(sg); off = sg->offset; len = sg->...
76d78300a6eb8b7f08e47703b7e68a659ffc2053
Analyze and fix the following issue in the Linux kernel code: [SCSI] arcmsr: updates (1.20.00.15)
Problem Details: - add arcmsr_enable_eoi_mode()and readl(reg->iop2drv_doorbell_reg) in arcmsr_handle_hbb_isr() on adapter Type B in case of the doorbell interrupt clearance is cached - add conditional declaration for arcmsr_pci_error_detected() and arcmsr_pci_slot_reset - check if the sg list member number exce...
```diff diff --git a/Documentation/scsi/ChangeLog.arcmsr b/Documentation/scsi/ChangeLog.arcmsr index cd8403a33ee6..de2bcacfa870 100644 --- a/Documentation/scsi/ChangeLog.arcmsr +++ b/Documentation/scsi/ChangeLog.arcmsr @@ -68,4 +68,45 @@ ** 2. modify the arcmsr_pci_slot_reset function ** 3. modify the arcms...
8144f2137b7c69055597bb644a3cb6d08ee0de77
Analyze and fix the following issue in the Linux kernel code: [SCSI] dc395x: fix uninitialized var warning
Problem Details: drivers/scsi/dc395x.c: In function 'dc395x_init_one': drivers/scsi/dc395x.c:4270: warning: 'ptr' may be used uninitialized in this function Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
```diff diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index 22ef3716e786..e351db6c0077 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c @@ -4267,7 +4267,7 @@ static int __devinit adapter_sg_tables_alloc(struct AdapterCtlBlk *acb) const unsigned srbs_per_page = PAGE_SIZE/SEGMENTX_LEN; int ...
14f501a4b73c826574cf385f7872762ebcfac899
Analyze and fix the following issue in the Linux kernel code: [SCSI] kernel-doc: fix scsi docbook
Problem Details: Add missing function parameter descriptions. Make function short description fit on one line as required. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
```diff diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index b35d19472caa..fecba05b4e77 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -969,9 +969,10 @@ void starget_for_each_device(struct scsi_target *starget, void *data, EXPORT_SYMBOL(starget_for_each_device); /** - * __starget_for_each_dev...
8b1d03434ee44b08c57f50403eaeab099facebf5
Analyze and fix the following issue in the Linux kernel code: [SCSI] libiscsi: fix session age rollover and remove cid encoding
Problem Details: The session age mask is only 4 bits, but session->age is 32. When it gets larger then 15 and we try to or the bits some bits get dropped and the check for session age in iscsi_verify_itt is useless. The ISCSI_CID_MASK related bits are also useless since cid is always one. Signed-off-by: Mike Christie...
```diff diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index 10ba76285852..59f8445eab0d 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c @@ -160,7 +160,7 @@ static int iscsi_prep_scsi_cmd_pdu(struct iscsi_cmd_task *ctask) hdr->opcode = ISCSI_OP_SCSI_CMD; hdr->flags = ISCSI_ATTR_SIM...
322d739da83bbff0309c202181f79c08d9534880
Analyze and fix the following issue in the Linux kernel code: [SCSI] iscsi: fix up iscsi printk prefix
Problem Details: Some iscsi class messages have the dev_printk prefix and some libiscsi and iscsi_tcp messages have "iscsi" or the module name as a prefix which is normally pretty useless when trying to figure out which session or connection the message is attached to. This patch adds iscsi lib and class dev_printks so...
```diff diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index b6f99dfbb038..8a178674cb18 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c @@ -629,8 +629,9 @@ iscsi_r2t_rsp(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) int rc; if (tcp_conn->in.datalen) { - printk(KERN...
c238c3bba9b422a9b453c75e157b416204f22a71
Analyze and fix the following issue in the Linux kernel code: [SCSI] iscsi class: fix iscsi conn attr counter
Problem Details: There are 13 iscsi conn attrs, but since the IF/OF markers were not being used we did not notice that we forgot to increment the ISCSI_CONN_ATTRS counter. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
```diff diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index af1799723e7b..35834bf4ba86 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c @@ -31,7 +31,7 @@ #include <scsi/iscsi_if.h> #define ISCSI_SESSION_ATTRS 19 -#define ISCSI_CONN_A...
ad294e9cd11d029fc0d09ab129fba5bea46de0dc
Analyze and fix the following issue in the Linux kernel code: [SCSI] libiscsi: fix setting of nop timer
Problem Details: If we rollover then we could get a next_timeout of zero, so we need to set the new timer to that value. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
```diff diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index c8c00e173414..b2a1ec8725b8 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c @@ -1384,14 +1384,11 @@ static void iscsi_check_transport_timeouts(unsigned long data) iscsi_send_nopout(conn, NULL); } next_timeout = last...
921601b7031f8a2c71f49f1b965ee00ebbca6886
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla4xxx: add async scan support
Problem Details: qla4xxx has the old school startup/probe where it finds presetup sessions in its flash and then attempts to log into them before returning from the probe. This however, makes it very simple to add a iscsi class scan finished helper which the driver can use. In future patches Dave or I will rip apart t...
```diff diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index d4dd149b466f..c3c59d763037 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c @@ -89,6 +89,8 @@ static struct scsi_host_template qla4xxx_driver_template = { .slave_alloc = qla4xxx_slave_alloc, .slav...
568d303b5b3f0f6432ae8f56ecdb0beb2341288e
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla4xxx: fix recovery timer and session unblock race
Problem Details: If qla4xxx is resetting up a session and the recovery timer fires we do not want to just set it to dead, because the dpc thread could have just set it to online and is in the middle of resetting it up. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Cc: David Somayajulu <david.somayajulu@qlogic.co...
```diff diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 437d169a9814..d4dd149b466f 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c @@ -124,16 +124,19 @@ static void qla4xxx_recovery_timedout(struct iscsi_cls_session *session) struct ddb_entry *ddb_entry ...
3dfcb701e1ff7aa21d6623e46b6ec3f7d0d306e1
Analyze and fix the following issue in the Linux kernel code: [SCSI] sym53c8xx: fix resid calculation
Problem Details: This patch fixes the calculation of the data transfer residual for the case of a command that is supposed to transfer an odd number of bytes on a wide bus but transfers nothing instead. Signed-off-by: Tony Battersby <tonyb@cybernetics.com> Cc: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Botto...
```diff diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c index 254bdaeb35ff..35142b5341b5 100644 --- a/drivers/scsi/sym53c8xx_2/sym_hipd.c +++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c @@ -3842,7 +3842,7 @@ int sym_compute_residual(struct sym_hcb *np, struct sym_ccb *cp) if (cp->star...
5234e25c35a708708559727b1e3e04de3a538828
Analyze and fix the following issue in the Linux kernel code: [SCSI] aacraid: fib context lock for management ioctls (take 2)
Problem Details: The first patch (a119ee8ee3045bf559d4cf02d72b112f3de2a15b) was a bit too aggressive and nested the locks (!) unit testing was in error. This patch was reverted by 203a512f0976e8ba85df36d76b40af6c80239121. This new patch should fix the locks correctly. Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>...
```diff diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c index f8afa358b6b6..abef05146d75 100644 --- a/drivers/scsi/aacraid/commctrl.c +++ b/drivers/scsi/aacraid/commctrl.c @@ -243,6 +243,7 @@ static int next_getadapter_fib(struct aac_dev * dev, void __user *arg) * Search the list of Ad...
151db1fc23800875c7ac353b106b7dab77061275
Analyze and fix the following issue in the Linux kernel code: Fix compilation of powerpc asm-offsets.c with old gcc
Problem Details: Commit ad7f71674ad7c3c4467e48f6ab9e85516dae2720 ("[POWERPC] Use a sensible default for clock_getres() in the VDSO") corrected the clock resolution reported by the VDSO clock_getres() but introduced another problem in that older versions of gcc (gcc-4.0 and earlier) fail to compile the new code in arch/...
```diff diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index e6e49289f788..4b749c416464 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c @@ -313,7 +313,7 @@ int main(void) DEFINE(CLOCK_REALTIME, CLOCK_REALTIME); DEFINE(CLOCK_MONOTONIC, CLOCK_...
919158d17b42683a5c7368e1e77661c65a20a48a
Analyze and fix the following issue in the Linux kernel code: ACPI: cpufreq: Print _PPC changes via cpufreq debug layer
Problem Details: enabled with CPU_FREQ_DEBUG Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c index f32010bee4d5..b477a4be8a69 100644 --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c @@ -50,6 +50,10 @@ ACPI_MODULE_NAME("processor_perflib"); static DEFINE_MUTEX(performance_mutex); +/* Use cp...
123f794fa7d592644881a20801638d88521d0b06
Analyze and fix the following issue in the Linux kernel code: i915: Fix GR register array size off-by-one bug
Problem Details: Make sure we have enough room for all the GR registers or we'll end up clobbering the AR index register (which should actually be harmless unless the BIOS is making an assumption about it). Noticed-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Jesse Barnes <jesse.barnes@intel.com> Signed-off-b...
```diff diff --git a/drivers/char/drm/i915_drv.h b/drivers/char/drm/i915_drv.h index 37bbf6729b4e..f8308bfb2613 100644 --- a/drivers/char/drm/i915_drv.h +++ b/drivers/char/drm/i915_drv.h @@ -187,7 +187,7 @@ typedef struct drm_i915_private { u32 saveSWF2[3]; u8 saveMSR; u8 saveSR[8]; - u8 saveGR[24]; + u8 saveGR[2...
7d640c4a5b36c4733460065db1554da924044511
Analyze and fix the following issue in the Linux kernel code: Driver core: Revert "Fix Firmware class name collision"
Problem Details: This reverts commit 109f0e93b6b728f03c1eb4af02bc25d71b646c59. The original patch breaks BIOS updates on all Dell machines. The path to the firmware file for the dell_rbu driver changes, which breaks all of the userspace tools which rely on it. Note that this patch re-introduces a problem with i2c nam...
```diff diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index 0295855a3eef..4a1b9bfc5471 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c @@ -292,7 +292,8 @@ firmware_class_timeout(u_long data) static inline void fw_setup_device_id(struct device *f_dev, struct...
f4a00a2c06bc7802f52969cbdd19f4c680a7cd20
Analyze and fix the following issue in the Linux kernel code: Block: Fix whole_disk attribute bug
Problem Details: The "whole_disk" attribute was not properly converted in the block device conversion earlier, and if the file is read, bad things can happen. This patch fixes this, making the attribute an empty one, preserving the original functionality. Many thanks to David Miller for finding this, and pointing me ...
```diff diff --git a/fs/partitions/check.c b/fs/partitions/check.c index 739da701ae7b..9a64045ff845 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c @@ -319,6 +319,14 @@ void delete_partition(struct gendisk *disk, int part) put_device(&p->dev); } +static ssize_t whole_disk_show(struct device *dev, + ...
319fe7c347ad2bdd99ea9b62c65ca81584ed2e1c
Analyze and fix the following issue in the Linux kernel code: Char: stallion, fix compiler warnings
Problem Details: Don't emit warnings on 64 bit platforms from min(). sizeof() on those is not uint, neither 2 pointers difference, cast it to uint by min_t in both cases. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Sig...
```diff diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c index 45758d5b56ef..5050aa5533a2 100644 --- a/drivers/char/stallion.c +++ b/drivers/char/stallion.c @@ -3546,7 +3546,8 @@ static void stl_cd1400txisr(struct stlpanel *panelp, int ioaddr) } else { len = min(len, CD1400_TXFIFOSIZE); portp->sta...
48103c527b2fcf5ead13ef14b34eb8893eaec06a
Analyze and fix the following issue in the Linux kernel code: i8k: Inspiron E1705 fix
Problem Details: Needs the following in order to work correctly on my Inspiron E1705: Add DMI Product name to i8k for Dell MP061 hardware (Inspiron 9400/E1705) Signed-off-by: Frank Sorenson <frank@tuxrocks.com> Cc: Bradley Smith <bradjsmith@btinternet.com> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morto...
```diff diff --git a/drivers/char/i8k.c b/drivers/char/i8k.c index 3d181021a862..8609b8236c67 100644 --- a/drivers/char/i8k.c +++ b/drivers/char/i8k.c @@ -473,6 +473,13 @@ static struct dmi_system_id __initdata i8k_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "MM061"), }, }, + { + .ident = "Dell Inspiron 3", +...
df0f65f02a55888feae52a7e7d59d29f5edd400d
Analyze and fix the following issue in the Linux kernel code: m32r: build fix of arch/m32r/kernel/smpboot.c
Problem Details: This patch is for Mathieu Desnoyers's include/asm-m32r/local.h. Applying the new include/asm-m32r/local.h, inclusion of linux/sched.h is needed to fix a build error of arch/m32r/kernel/smpboot.c. <-- snip --> ... CC arch/m32r/kernel/smpboot.o /project/m32r-linux/kernel/work/linux-2.6_dev.gi...
```diff diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c index 0e383da158e9..2c03ac1d005f 100644 --- a/arch/m32r/kernel/smpboot.c +++ b/arch/m32r/kernel/smpboot.c @@ -43,6 +43,7 @@ #include <linux/init.h> #include <linux/kernel.h> #include <linux/mm.h> +#include <linux/sched.h> #include <linux/e...
f94d1d3a1df125461a16b2888eca46d64f113e3a
Analyze and fix the following issue in the Linux kernel code: Fix m32r __xchg
Problem Details: the #endif /* CONFIG_SMP */ should cover the default condition, or it may cause bad parameter to be silently missed. To make it work correctly, we have to remove the ifdef CONFIG SMP surrounding __xchg_called_with_bad_pointer declaration. Thanks to Adrian Bunk for detecting this. Signed-off-by: Math...
```diff diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h index 7e7eb3703d85..70a57c8c002b 100644 --- a/include/asm-m32r/system.h +++ b/include/asm-m32r/system.h @@ -127,9 +127,7 @@ static inline void local_irq_disable(void) ((__typeof__(*(ptr)))__xchg_local((unsigned long)(x), (ptr), \ sizeof(*(...
4b78fff6e736cae55dc3fb5570c7ef4037eca9b7
Analyze and fix the following issue in the Linux kernel code: Add cmpxchg_local, cmpxchg64 and cmpxchg64_local to ia64
Problem Details: Add the primitives cmpxchg_local, cmpxchg64 and cmpxchg64_local to ia64. They use cmpxchg_acq as underlying macro, just like the already existing ia64 cmpxchg(). Changelog: ia64 cmpxchg_local coding style fix Quoting Keith Owens: As a matter of coding style, I prefer #define cmpxchg_local cmpxchg...
```diff diff --git a/include/asm-ia64/intrinsics.h b/include/asm-ia64/intrinsics.h index 3a95aa432e99..f1135b5b94c3 100644 --- a/include/asm-ia64/intrinsics.h +++ b/include/asm-ia64/intrinsics.h @@ -153,11 +153,17 @@ extern long ia64_cmpxchg_called_with_bad_pointer (void); (__typeof__(old)) _r_; \ }) -#defi...
0a370e5de9e5a48eb4b268e9f5e2286b82f44012
Analyze and fix the following issue in the Linux kernel code: iget: stop HOSTFS from using iget() and read_inode()
Problem Details: Stop the HOSTFS filesystem from using iget() and read_inode(). Provide hostfs_iget(), and call that instead of iget(). hostfs_iget() then uses iget_locked() directly and returns a proper error code instead of an inode in the event of an error. hostfs_fill_sb_common() returns any error incurred when ...
```diff diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 8966b050196e..2b9b35733aac 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c @@ -202,7 +202,7 @@ static char *follow_link(char *link) return ERR_PTR(n); } -static int read_inode(struct inode *ino) +static int hostfs_read_...
b55c460da6df4e8dfc6f68c00fafe7337b54e2f8
Analyze and fix the following issue in the Linux kernel code: iget: stop UFS from using iget() and read_inode()
Problem Details: Stop the UFS filesystem from using iget() and read_inode(). Replace ufs_read_inode() with ufs_iget(), and call that instead of iget(). ufs_iget() then uses iget_locked() directly and returns a proper error code instead of an inode in the event of an error. ufs_fill_super() returns any error incurred...
```diff diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c index 4320782761ae..489f26bc26d9 100644 --- a/fs/ufs/inode.c +++ b/fs/ufs/inode.c @@ -714,26 +714,30 @@ static int ufs2_read_inode(struct inode *inode, struct ufs2_inode *ufs2_inode) return 0; } -void ufs_read_inode(struct inode * inode) +struct inode *ufs_iget(...
b8e1343f67460554ca5321956c440cc064e9889b
Analyze and fix the following issue in the Linux kernel code: iget: stop the SYSV filesystem from using iget() and read_inode()
Problem Details: Stop the SYSV filesystem from using iget() and read_inode(). Replace sysv_read_inode() with sysv_iget(), and call that instead of iget(). sysv_iget() then uses iget_locked() directly and returns a proper error code instead of an inode in the event of an error. [akpm@linux-foundation.org: coding-style...
```diff diff --git a/fs/sysv/inode.c b/fs/sysv/inode.c index 81ec6c548c07..c5d60de0658f 100644 --- a/fs/sysv/inode.c +++ b/fs/sysv/inode.c @@ -169,20 +169,27 @@ void sysv_set_inode(struct inode *inode, dev_t rdev) init_special_inode(inode, inode->i_mode, rdev); } -static void sysv_read_inode(struct inode *inode) ...
78cc9120003d7847ef1abebb771a708c7ae51ffd
Analyze and fix the following issue in the Linux kernel code: iget: stop ROMFS from using iget() and read_inode()
Problem Details: Stop the ROMFS filesystem from using iget() and read_inode(). Replace romfs_read_inode() with romfs_iget(), and call that instead of iget(). romfs_iget() then uses iget_locked() directly and returns a proper error code instead of an inode in the event of an error. romfs_fill_super() returns any error...
```diff diff --git a/fs/romfs/inode.c b/fs/romfs/inode.c index a49cf5b9a195..00b6f0a518c8 100644 --- a/fs/romfs/inode.c +++ b/fs/romfs/inode.c @@ -84,6 +84,8 @@ struct romfs_inode_info { struct inode vfs_inode; }; +static struct inode *romfs_iget(struct super_block *, unsigned long); + /* instead of private super...
2b7e5bcbd9e03f7236d2869f4261059074ea50a2
Analyze and fix the following issue in the Linux kernel code: iget: stop QNX4 from using iget() and read_inode()
Problem Details: Stop the QNX4 filesystem from using iget() and read_inode(). Replace qnx4_read_inode() with qnx4_iget(), and call that instead of iget(). qnx4_iget() then uses iget_locked() directly and returns a proper error code instead of an inode in the event of an error. qnx4_fill_super() returns any error incu...
```diff diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c index 638bdb963213..b31ab78052b3 100644 --- a/fs/qnx4/inode.c +++ b/fs/qnx4/inode.c @@ -125,7 +125,6 @@ static int qnx4_write_inode(struct inode *inode, int unused) static void qnx4_put_super(struct super_block *sb); static struct inode *qnx4_alloc_inode(struct s...
a1d4aebbfa91c55a6b0c629a9ccf6369be0c6e95
Analyze and fix the following issue in the Linux kernel code: iget: stop PROCFS from using iget() and read_inode()
Problem Details: Stop the PROCFS filesystem from using iget() and read_inode(). Merge procfs_read_inode() into procfs_get_inode(), and have that call iget_locked() instead of iget(). [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: David Howells <dhowells@redhat.com> Cc: "Eric W. Biederman" <ebiederm@xm...
```diff diff --git a/fs/proc/inode.c b/fs/proc/inode.c index 1a551d92e1d8..6ecf6396f072 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c @@ -73,11 +73,6 @@ static void proc_delete_inode(struct inode *inode) struct vfsmount *proc_mnt; -static void proc_read_inode(struct inode * inode) -{ - inode->i_mtime = inode-...
a90a088021f8f1e9a9cd83f06ac90e1f3aada4d4
Analyze and fix the following issue in the Linux kernel code: iget: stop the MINIX filesystem from using iget() and read_inode()
Problem Details: Stop the MINIX filesystem from using iget() and read_inode(). Replace minix_read_inode() with minix_iget(), and call that instead of iget(). minix_iget() then uses iget_locked() directly and returns a proper error code instead of an inode in the event of an error. minix_fill_super() returns any error...
```diff diff --git a/fs/minix/inode.c b/fs/minix/inode.c index bf4cd316af81..84f6242ba6fc 100644 --- a/fs/minix/inode.c +++ b/fs/minix/inode.c @@ -18,7 +18,6 @@ #include <linux/highuid.h> #include <linux/vfs.h> -static void minix_read_inode(struct inode * inode); static int minix_write_inode(struct inode * inode, ...
d0b079483dd4cf6373f0ff234d5fdaef80c9588f
Analyze and fix the following issue in the Linux kernel code: iget: stop FreeVXFS from using iget() and read_inode()
Problem Details: Stop the FreeVXFS filesystem from using iget() and read_inode(). Replace vxfs_read_inode() with vxfs_iget(), and call that instead of iget(). vxfs_iget() then uses iget_locked() directly and returns a proper error code instead of an inode in the event of an error. vxfs_fill_super() returns any error ...
```diff diff --git a/fs/freevxfs/vxfs_extern.h b/fs/freevxfs/vxfs_extern.h index 91ccee8723f7..2b46064f66b2 100644 --- a/fs/freevxfs/vxfs_extern.h +++ b/fs/freevxfs/vxfs_extern.h @@ -58,7 +58,7 @@ extern struct inode * vxfs_get_fake_inode(struct super_block *, extern void vxfs_put_fake_inode(struct inode *); exter...
473043dcee1874aab99f66b0362b344618eb3790
Analyze and fix the following issue in the Linux kernel code: iget: stop EXT3 from using iget() and read_inode()
Problem Details: Stop the EXT3 filesystem from using iget() and read_inode(). Replace ext3_read_inode() with ext3_iget(), and call that instead of iget(). ext3_iget() then uses iget_locked() directly and returns a proper error code instead of an inode in the event of an error. ext3_fill_super() returns any error incu...
```diff diff --git a/fs/ext3/ialloc.c b/fs/ext3/ialloc.c index 1bc8cd89c51d..58ae2f943f12 100644 --- a/fs/ext3/ialloc.c +++ b/fs/ext3/ialloc.c @@ -642,14 +642,15 @@ struct inode *ext3_orphan_get(struct super_block *sb, unsigned long ino) unsigned long max_ino = le32_to_cpu(EXT3_SB(sb)->s_es->s_inodes_count); unsign...
52fcf7032935b33158e3998ed399cac97447ab8d
Analyze and fix the following issue in the Linux kernel code: iget: stop EXT2 from using iget() and read_inode()
Problem Details: Stop the EXT2 filesystem from using iget() and read_inode(). Replace ext2_read_inode() with ext2_iget(), and call that instead of iget(). ext2_iget() then uses iget_locked() directly and returns a proper error code instead of an inode in the event of an error. ext2_fill_super() returns any error incu...
```diff diff --git a/fs/ext2/ext2.h b/fs/ext2/ext2.h index bb9948cdd50f..f1e5705e75f1 100644 --- a/fs/ext2/ext2.h +++ b/fs/ext2/ext2.h @@ -124,7 +124,7 @@ extern void ext2_check_inodes_bitmap (struct super_block *); extern unsigned long ext2_count_free (struct buffer_head *, unsigned); /* inode.c */ -extern void ex...