id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
74beb9db77930be476b267ec8518a642f39a04bf
Analyze and fix the following issue in the Linux kernel code: local_t Documentation update 2
Problem Details: Grant Grundler was asking for more detail about correct usage of local atomic operations and suggested adding the resulting summary to local_ops.txt. "Please add a bit more detail. If DaveM is correct (he normally is), then there must be limits on how the local_t can be used in the kernel process and...
```diff diff --git a/Documentation/local_ops.txt b/Documentation/local_ops.txt index b0aca0705d1e..a134a563db32 100644 --- a/Documentation/local_ops.txt +++ b/Documentation/local_ops.txt @@ -45,6 +45,29 @@ long fails. The definition looks like : typedef struct { atomic_long_t a; } local_t; +* Rules to follow when ...
5a9df732b6a547aa843e8655044db9573d7b4e71
Analyze and fix the following issue in the Linux kernel code: drivers/block/cciss.c: fix check-after-use
Problem Details: The Coverity checker spotted that we have already oops'ed if "disk" was NULL. Since "disk" being NULL seems impossible at this point this patch removes the NULL check. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@linux-found...
```diff diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 5c269c00d6eb..ca56a0e5cd5e 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -1582,38 +1582,36 @@ static int deregister_disk(struct gendisk *disk, drive_info_struct *drv, * allows us to delete disk zero but keep the controller r...
827afdf093cce59bbbf9dc9f1c2eab86e2232b9e
Analyze and fix the following issue in the Linux kernel code: n_hdlc.c: fix check-after-use
Problem Details: The Coverity checker spotted that we'd have already oops'ed if "tty" was NULL. Since "tty" can't be NULL when we reach this line of code this patch removes the NULL check. Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-founda...
```diff diff --git a/drivers/char/n_hdlc.c b/drivers/char/n_hdlc.c index e8332f305d72..82bcfb9c839a 100644 --- a/drivers/char/n_hdlc.c +++ b/drivers/char/n_hdlc.c @@ -229,7 +229,7 @@ static void n_hdlc_release(struct n_hdlc *n_hdlc) wake_up_interruptible (&tty->read_wait); wake_up_interruptible (&tty->write_wait); ...
1a614f505193fcfc1b298643268a5db5b48e297f
Analyze and fix the following issue in the Linux kernel code: cciss: fix error reporting for SG_IO
Problem Details: This fixes a problem with the way cciss was filling out the "errors" field of the request structure upon completion of requests. Previously, it just put a 1 or a 0 in there and used the negation of this as the uptodate parameter to one of the functions in the block layer, being a block device. For th...
```diff diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 3fb7e8bc436d..5c269c00d6eb 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -2365,30 +2365,55 @@ static inline void resend_cciss_cmd(ctlr_info_t *h, CommandList_struct *c) start_io(h); } +static inline unsigned int make_statu...
4b86a872561ad052bdc6f092a06807822d26beb1
Analyze and fix the following issue in the Linux kernel code: NBD: set uninitialized devices to size 0
Problem Details: This fixes errors with utilities (such as LVM's vgscan) that try to scan all devices. Previously this would generate read errors when uninitialized nbd devices were scanned: # vgscan Reading all physical volumes. This may take a while... /dev/nbd0: read failed after 0 of 1024 at 0: Input/outpu...
```diff diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index dc88bcf320e8..89bdafd88dbd 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -578,6 +578,9 @@ static int nbd_ioctl(struct inode *inode, struct file *file, printk(KERN_WARNING "%s: queue cleared\n", lo->disk->disk_name); if (file) ...
bcbba6c10ef6b14b0542d7ed7380e95168175818
Analyze and fix the following issue in the Linux kernel code: add-vmcore: add a prefix "VMCOREINFO_" to the vmcoreinfo macros
Problem Details: Add a prefix "VMCOREINFO_" to the vmcoreinfo macros. Old vmcoreinfo macros were defined as generic names SYMBOL/SIZE/OFFSET /LENGTH/CONFIG, and it is impossible to grep for them. So these names should be changed. This discussion is the following: http://www.ussg.iu.edu/hypermail/linux/kernel/0709.1/...
```diff diff --git a/arch/ia64/kernel/machine_kexec.c b/arch/ia64/kernel/machine_kexec.c index c55a0909b901..0dd3b2394cdd 100644 --- a/arch/ia64/kernel/machine_kexec.c +++ b/arch/ia64/kernel/machine_kexec.c @@ -128,19 +128,19 @@ void machine_kexec(struct kimage *image) void arch_crash_save_vmcoreinfo(void) { #ifdef ...
0e647c04f665e9b3451a1ebe8252b38ffe0207c8
Analyze and fix the following issue in the Linux kernel code: binfmt_flat: warning fixes
Problem Details: Fix this lot: fs/binfmt_flat.c: In function `decompress_exec': fs/binfmt_flat.c:293: warning: label `out' defined but not used fs/binfmt_flat.c: In function `load_flat_file': fs/binfmt_flat.c:462: warning: unsigned int format, long int arg (arg 3) fs/binfmt_flat.c:462: warning: unsigned int format, lo...
```diff diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c index 265fac868067..33764fd6db66 100644 --- a/fs/binfmt_flat.c +++ b/fs/binfmt_flat.c @@ -113,7 +113,7 @@ static unsigned long create_flat_tables( char * p = (char*)pp; int argc = bprm->argc; int envc = bprm->envc; - char dummy; + char uninitialized_var(dum...
6db840fa7887980ef68a649640d506fe069eef0c
Analyze and fix the following issue in the Linux kernel code: exec: RT sub-thread can livelock and monopolize CPU on exec
Problem Details: de_thread() yields waiting for ->group_leader to be a zombie. This deadlocks if an rt-prio execer shares the same cpu with ->group_leader. Change the code to use ->group_exit_task/notify_count mechanics. This patch certainly uglifies the code, perhaps someone can suggest something better. Signed-off-...
```diff diff --git a/fs/exec.c b/fs/exec.c index ab5a4a3ece46..aa470a93540a 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -801,16 +801,15 @@ static int de_thread(struct task_struct *tsk) hrtimer_restart(&sig->real_timer); spin_lock_irq(lock); } + + sig->notify_count = count; + sig->group_exit_task = tsk; while (...
2b47c3611de05c585e2d81204f6c7e3e255a3461
Analyze and fix the following issue in the Linux kernel code: Fix f_version type: should be u64 instead of unsigned long
Problem Details: Fix f_version type: should be u64 instead of long There is a type inconsistency between struct inode i_version and struct file f_version. fs.h: struct inode u64 i_version; and struct file unsigned long f_version; Users do: fs/ext3/dir.c: if (filp->f_version != ...
```diff diff --git a/fs/ext3/dir.c b/fs/ext3/dir.c index c2c3491b18cf..fd4b6dd71150 100644 --- a/fs/ext3/dir.c +++ b/fs/ext3/dir.c @@ -210,7 +210,7 @@ revalidate: * not the directory has been modified * during the copy operation. */ - unsigned long version = filp->f_version; + u64 version = filp...
f44ec6f3f89889a469773b1fd894f8fcc07c29cf
Analyze and fix the following issue in the Linux kernel code: limit minixfs printks on corrupted dir i_size
Problem Details: This attempts to address CVE-2006-6058 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-6058 first reported at http://projects.info-pull.com/mokb/MOKB-17-11-2006.html Essentially a corrupted minix dir inode reporting a very large i_size will loop for a very long time in minix_readdir, minix_fin...
```diff diff --git a/fs/minix/itree_v1.c b/fs/minix/itree_v1.c index 1a5f3bf0bcec..82d6554b02fe 100644 --- a/fs/minix/itree_v1.c +++ b/fs/minix/itree_v1.c @@ -23,11 +23,16 @@ static inline block_t *i_data(struct inode *inode) static int block_to_path(struct inode * inode, long block, int offsets[DEPTH]) { int n = 0...
22590e41cb569add194829c08dc0ceea74b38a65
Analyze and fix the following issue in the Linux kernel code: fix execute checking in permission()
Problem Details: permission() checks that MAY_EXEC is only allowed on regular files if at least one execute bit is set in the file mode. generic_permission() already ensures this, so the extra check in permission() is superfluous. If the filesystem defines it's own ->permission() the check may still be needed. In th...
```diff diff --git a/fs/namei.c b/fs/namei.c index 7cba63295a82..2792e0ca01d4 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -227,10 +227,10 @@ int generic_permission(struct inode *inode, int mask, int permission(struct inode *inode, int mask, struct nameidata *nd) { - umode_t mode = inode->i_mode; int retval, subma...
995e4286a047b32aebf8ce540908edb7fbd93f76
Analyze and fix the following issue in the Linux kernel code: lib/sort.c optimization
Problem Details: Hello, I fixed and tested a small bug in lib/sort.c file, heap sort function. The fix avoids unnecessary swap of contents when i is 0 (saves few loads and stores), which happens every time sort function is called. I felt the fix is worth bringing it to your attention given the importance and frequent...
```diff diff --git a/lib/sort.c b/lib/sort.c index 961567894d16..6abbaf3d5858 100644 --- a/lib/sort.c +++ b/lib/sort.c @@ -67,7 +67,7 @@ void sort(void *base, size_t num, size_t size, } /* sort */ - for (i = n - size; i >= 0; i -= size) { + for (i = n - size; i > 0; i -= size) { swap(base, base + i, size); ...
7ba4b927f5fc9a5642adc5675b6d60c710dc8021
Analyze and fix the following issue in the Linux kernel code: jsm: Remove further unneeded crud
Problem Details: Remove some remaining vestiges of the old hacks jsm had to work around the old tty buffering. With the new tty buffering it simply doesn't matter any more. [michal.k.k.piotrowski@gmail.com: fix warning] Signed-off-by: Alan Cox <alan@redhat.com> Acked-by: Scott Kilau <scottk@digi.com> Cc: Michal Piotr...
```diff diff --git a/drivers/serial/jsm/jsm_tty.c b/drivers/serial/jsm/jsm_tty.c index 281f23a371b2..94ec66372508 100644 --- a/drivers/serial/jsm/jsm_tty.c +++ b/drivers/serial/jsm/jsm_tty.c @@ -500,13 +500,11 @@ void jsm_input(struct jsm_channel *ch) { struct jsm_board *bd; struct tty_struct *tp; - struct tty_ldi...
04c71976500352d02f60616d2b960267d8c5fe24
Analyze and fix the following issue in the Linux kernel code: unicode diacritics support
Problem Details: There have been issues with non-latin1 diacritics and unicode. http://bugzilla.kernel.org/show_bug.cgi?id=7746 Git 759448f459234bfcf34b82471f0dba77a9aca498 `Kernel utf-8 handling' partly resolved it by adding conversion between diacritics and unicode. The patch below goes further by just turning diacr...
```diff diff --git a/drivers/acorn/char/defkeymap-l7200.c b/drivers/acorn/char/defkeymap-l7200.c index 9e18ce742e38..28a5fbc6aa1a 100644 --- a/drivers/acorn/char/defkeymap-l7200.c +++ b/drivers/acorn/char/defkeymap-l7200.c @@ -346,7 +346,7 @@ char *func_table[MAX_NR_FUNC] = { 0, }; -struct kbdiacr accent_table[MAX...
2f4e6e2a814eb1305a873a045401708d73f870bc
Analyze and fix the following issue in the Linux kernel code: wait_task_zombie: fix 2/3 races vs forget_original_parent()
Problem Details: Two threads, T1 and T2. T2 ptraces P, and P is not a child of ptracer's thread group. P exits and goes to TASK_ZOMBIE. T1 does wait_task_zombie(P): P->exit_state = TASK_DEAD; ... read_unlock(&tasklist_lock); T2 does exit(), takes tasklist, forget_original_parent() does __ptrace_u...
```diff diff --git a/kernel/exit.c b/kernel/exit.c index 9d6e0897a447..b4d569675d4b 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -1158,8 +1158,7 @@ static int wait_task_zombie(struct task_struct *p, int noreap, int __user *stat_addr, struct rusage __user *ru) { unsigned long state; - int retval; - int s...
a8b0ac0873cd911b3bf3d6e2db98f80d0b158d56
Analyze and fix the following issue in the Linux kernel code: pnp: avoid a small unlikely memory leak in proc_read_escd()
Problem Details: There's a small and unlikely memory leak in drivers/pnp/pnpbios/proc.c::proc_read_escd(). It's inside a sanity check, so it probably won't trigger often (if at all), however it *is* a potential leak and it's easy to avoid, so let's just fix it :) Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Sig...
```diff diff --git a/drivers/pnp/pnpbios/proc.c b/drivers/pnp/pnpbios/proc.c index 9d9841f24a85..bb19bc957bad 100644 --- a/drivers/pnp/pnpbios/proc.c +++ b/drivers/pnp/pnpbios/proc.c @@ -94,8 +94,9 @@ static int proc_read_escd(char *buf, char **start, off_t pos, /* sanity check */ if (escd_size > MAX_SANE_ESCD_SI...
48ef09a16edcc98d1de60f66ed7f650c571907f4
Analyze and fix the following issue in the Linux kernel code: ufs: Fix mount check in ufs_fill_super()
Problem Details: The current code skips the check to verify whether the filesystem was previously cleanly unmounted, if (flags & UFS_ST_MASK) == UFS_ST_44BSD or UFS_ST_OLD. This looks like an inadvertent bug that slipped in due to parantheses in the compound conditional to me, especially given that ufs_get_fs_state() ...
```diff diff --git a/fs/ufs/super.c b/fs/ufs/super.c index 4d72933661b7..584cf12cc40f 100644 --- a/fs/ufs/super.c +++ b/fs/ufs/super.c @@ -933,19 +933,20 @@ magic_found: goto again; } - sbi->s_flags = flags;/*after that line some functions use s_flags*/ + /* Set sbi->s_flags here, used by ufs_get_fs_state() belo...
bcd6d4ecf6868ed57d4daae5d48e52d0752566d2
Analyze and fix the following issue in the Linux kernel code: ufs: move non-layout parts of ufs_fs.h to fs/ufs/
Problem Details: Move prototypes and in-core structures to fs/ufs/ similar to what most other filesystems already do. I made little modifications: move also ufs debug macros and mount options constants into fs/ufs/ufs.h, this stuff also private for ufs. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Evg...
```diff diff --git a/fs/ufs/balloc.c b/fs/ufs/balloc.c index 841ac25fd950..f63a09ce8683 100644 --- a/fs/ufs/balloc.c +++ b/fs/ufs/balloc.c @@ -19,6 +19,7 @@ #include <linux/bitops.h> #include <asm/byteorder.h> +#include "ufs.h" #include "swab.h" #include "util.h" diff --git a/fs/ufs/cylinder.c b/fs/ufs/cylinder...
0b15d04af3dd996035d8fa81fc849d049171f9c3
Analyze and fix the following issue in the Linux kernel code: printk: add interfaces for external access to the log buffer
Problem Details: Add two new functions for reading the kernel log buffer. The intention is for them to be used by recovery/dump/debug code so the kernel log can be easily retrieved/parsed in a crash scenario, but they are generic enough for other people to dream up other fun uses. [akpm@linux-foundation.org: buncha f...
```diff diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 5fdbc814c2eb..c680e1e6e9a3 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -172,6 +172,9 @@ asmlinkage int vprintk(const char *fmt, va_list args) __attribute__ ((format (printf, 1, 0))); asmlinkage int printk(const char * ...
a4d63e729edad704af95e5f2a56e8c8eaaa5216b
Analyze and fix the following issue in the Linux kernel code: kernel/rtmutex-debug.c: cleanups
Problem Details: This patch contains the following cleanups: - make the needlessly global variable rt_trace_on static - remove the unused global function deadlock_trace_off() Signed-off-by: Adrian Bunk <bunk@stusta.de> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morto...
```diff diff --git a/kernel/rtmutex-debug.c b/kernel/rtmutex-debug.c index 5aedbee014df..6b0703db152d 100644 --- a/kernel/rtmutex-debug.c +++ b/kernel/rtmutex-debug.c @@ -82,12 +82,7 @@ do { \ * into the tracing code when doing error printk or * executing a BUG(): */ -int rt_trace_on = 1; - -void deadlock_tr...
323211371073ce4a99b6efc69379589d6a640d35
Analyze and fix the following issue in the Linux kernel code: core_pattern: fix up a few miscellaneous bugs
Problem Details: Fix do_coredump to detect a crash in the user mode helper process and abort the attempt to recursively dump core to another copy of the helper process, potentially ad-infinitum. [akpm@linux-foundation.org: cleanups] Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Cc: <martin.pitt@ubuntu.com> Cc: <w...
```diff diff --git a/fs/exec.c b/fs/exec.c index 6450157062ea..cbd183daaad4 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -1762,14 +1762,27 @@ int do_coredump(long signr, int exit_code, struct pt_regs * regs) goto fail_unlock; if (ispipe) { - core_limit = RLIM_INFINITY; helper_argv = argv_split(GFP_KERNEL, core...
7dc0b22e3c54f1f4730354fef84a20f5944f6c5e
Analyze and fix the following issue in the Linux kernel code: core_pattern: ignore RLIMIT_CORE if core_pattern is a pipe
Problem Details: For some time /proc/sys/kernel/core_pattern has been able to set its output destination as a pipe, allowing a user space helper to receive and intellegently process a core. This infrastructure however has some shortcommings which can be enhanced. Specifically: 1) The coredump code in the kernel shou...
```diff diff --git a/arch/mips/kernel/irixelf.c b/arch/mips/kernel/irixelf.c index 5a3fe43e3019..b997af713eb3 100644 --- a/arch/mips/kernel/irixelf.c +++ b/arch/mips/kernel/irixelf.c @@ -44,7 +44,7 @@ static int load_irix_binary(struct linux_binprm * bprm, struct pt_regs * regs); static int load_irix_library(struct f...
8e2b705649e294f43a8cd1ea79e4c594c0bd1d9d
Analyze and fix the following issue in the Linux kernel code: argv_split: allow argv_split to handle NULL pointer in argcp parameter gracefully
Problem Details: It would be nice if the argv_split library function could gracefully handle a NULL pointer in the argcp parameter, so as to allow functions using it that did not care about the value of argc to not have to declare a useless variable. This patch accomplishes that. Tested by me, with successful results...
```diff diff --git a/lib/argv_split.c b/lib/argv_split.c index 4096ed42f490..fad6ce4f7b57 100644 --- a/lib/argv_split.c +++ b/lib/argv_split.c @@ -75,7 +75,9 @@ char **argv_split(gfp_t gfp, const char *str, int *argcp) if (argv == NULL) goto out; - *argcp = argc; + if (argcp) + *argcp = argc; + argvp = argv; ...
252e211e90ce56bf005cb533ad5a297c18c19407
Analyze and fix the following issue in the Linux kernel code: Add in SunOS 4.1.x compatible mode for UFS
Problem Details: Add in support for SunOS 4.1.x flavor of BSD 4.2 UFS filing system Macros have been put in to alow suport for the old static table Cylinder Groups but this implementation does not use them yet. This also fixes Solaris UFS filing system access by disabling fast symbolic links as Sun's version of UFS do...
```diff diff --git a/fs/ufs/super.c b/fs/ufs/super.c index c5bdea7c23a9..87f6b51a895d 100644 --- a/fs/ufs/super.c +++ b/fs/ufs/super.c @@ -286,7 +286,7 @@ void ufs_warning (struct super_block * sb, const char * function, } enum { - Opt_type_old, Opt_type_sunx86, Opt_type_sun, Opt_type_44bsd, + Opt_type_old, Opt_typ...
1d99493b3a68e40e56459ea3565d4402fb6e5f3a
Analyze and fix the following issue in the Linux kernel code: Fix CONFIG_DEBUG_SHIRQ trigger on free_irq()
Problem Details: Andy Gospodarek pointed out that because we return in the middle of the free_irq() function, we never actually do call the IRQ handler that just got deregistered. This should fix it, although I expect Andrew will want to convert those 'return's to 'break'. That's a separate change though. Signed-off-b...
```diff diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 7230d914eaa2..80eab7a04205 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -405,7 +405,6 @@ void free_irq(unsigned int irq, void *dev_id) struct irq_desc *desc; struct irqaction **p; unsigned long flags; - irqreturn_t (*handler)(in...
93d44cb275f3eba720617a8c5b00d51a8e0e9049
Analyze and fix the following issue in the Linux kernel code: ext2: show all mount options
Problem Details: Using mtab is problematic for various reasons, one of them is that unprivileged mounts won't turn up in there. So we want to get rid of it, and use /proc/mounts instead. But most filesystems are lazy, and are not showing all mount options. Which means, that without mtab, the user won't be able to se...
```diff diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 04bc96caa7b2..3e78af2ae7d8 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -203,10 +203,66 @@ static void ext2_clear_inode(struct inode *inode) static int ext2_show_options(struct seq_file *seq, struct vfsmount *vfs) { - struct ext2_sb_info *sbi = E...
2b571a066a2fee14189a297ce8adc5212c58074c
Analyze and fix the following issue in the Linux kernel code: pcmcia: CompactFlash driver for PA Semi Electra boards
Problem Details: Driver for the CompactFlash slot on the PA Semi Electra eval board. It's a simple device sitting on localbus, with interrupts and detect/voltage control over GPIO. The driver is implemented as an of_platform driver, and adds localbus as a bus being probed by the of_platform framework. [akpm@linux-fou...
```diff diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c index 5ddf40a66ae8..3a5d112af5e0 100644 --- a/arch/powerpc/platforms/pasemi/setup.c +++ b/arch/powerpc/platforms/pasemi/setup.c @@ -37,6 +37,10 @@ #include <asm/time.h> #include <asm/of_platform.h> +#include <pcmcia/s...
252e5725cfb55a89e54888317856903fef9d5031
Analyze and fix the following issue in the Linux kernel code: do_sys_poll: simplify playing with on-stack data
Problem Details: Cleanup. Lessens both the source and compiled code (100 bytes) and imho makes the code much more understandable. With this patch "struct poll_list *head" always points to on-stack stack_pps, so we can remove all "is it on-stack" and "was it initialized" checks. Also, move poll_initwait/poll_freewait ...
```diff diff --git a/fs/select.c b/fs/select.c index 46dca31c607a..41c3571e64ed 100644 --- a/fs/select.c +++ b/fs/select.c @@ -651,86 +651,66 @@ static int do_poll(unsigned int nfds, struct poll_list *list, int do_sys_poll(struct pollfd __user *ufds, unsigned int nfds, s64 *timeout) { struct poll_wqueues table; - ...
c4f3b63fe15b4629aa1ec163c95ab30423d0f76a
Analyze and fix the following issue in the Linux kernel code: softlockup: add a /proc tuning parameter
Problem Details: Control the trigger limit for softlockup warnings. This is useful for debugging softlockups, by lowering the softlockup_thresh to identify possible softlockups earlier. This patch: 1. Adds a sysctl softlockup_thresh with valid values of 1-60s (Higher value to disable false positives) 2. Changes th...
```diff diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index 111fd28727ec..8984a5396271 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt @@ -320,6 +320,14 @@ kernel. This value defaults to SHMMAX. =====================================================...
43581a10075492445f65234384210492ff333eba
Analyze and fix the following issue in the Linux kernel code: softlockup: improve debug output
Problem Details: Improve the debuggability of kernel lockups by enhancing the debug output of the softlockup detector: print the task that causes the lockup and try to print a more intelligent backtrace. The old format was: BUG: soft lockup detected on CPU#1! [<c0105e4a>] show_trace_log_lvl+0x19/0x2e [<c0105f...
```diff diff --git a/kernel/softlockup.c b/kernel/softlockup.c index e423b3a918fd..65839c54abf5 100644 --- a/kernel/softlockup.c +++ b/kernel/softlockup.c @@ -15,6 +15,8 @@ #include <linux/notifier.h> #include <linux/module.h> +#include <asm/irq_regs.h> + static DEFINE_SPINLOCK(print_lock); static DEFINE_PER_CP...
a115d5caca1a2905ba7a32b408a6042b20179aaa
Analyze and fix the following issue in the Linux kernel code: fix the softlockup watchdog to actually work
Problem Details: this Xen related commit: commit 966812dc98e6a7fcdf759cbfa0efab77500a8868 Author: Jeremy Fitzhardinge <jeremy@goop.org> Date: Tue May 8 00:28:02 2007 -0700 Ignore stolen time in the softlockup watchdog broke the softlockup watchdog to never report any lockups. (!) print_timestamp d...
```diff diff --git a/kernel/softlockup.c b/kernel/softlockup.c index 68f7606b4160..e423b3a918fd 100644 --- a/kernel/softlockup.c +++ b/kernel/softlockup.c @@ -82,10 +82,11 @@ void softlockup_tick(void) print_timestamp = per_cpu(print_timestamp, this_cpu); /* report at most once a second */ - if (print_timestamp <...
5a3135c2e77fe88cdea20b5e3f4761068b799ac2
Analyze and fix the following issue in the Linux kernel code: oom: move prototypes to appropriate header file
Problem Details: Move the OOM killer's extern function prototypes to include/linux/oom.h and include it where necessary. [clg@fr.ibm.com: build fix] Cc: Andrea Arcangeli <andrea@suse.de> Acked-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Cedric Le Goater <...
```diff diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c index fabc50adc46a..d4ed93dfb9c7 100644 --- a/arch/s390/mm/cmm.c +++ b/arch/s390/mm/cmm.c @@ -17,6 +17,7 @@ #include <linux/ctype.h> #include <linux/swap.h> #include <linux/kthread.h> +#include <linux/oom.h> #include <asm/pgalloc.h> #include <asm/uacce...
3e26c149c358529b1605f8959341d34bc4b880a3
Analyze and fix the following issue in the Linux kernel code: mm: dirty balancing for tasks
Problem Details: Based on ideas of Andrew: http://marc.info/?l=linux-kernel&m=102912915020543&w=2 Scale the bdi dirty limit inversly with the tasks dirty rate. This makes heavy writers have a lower dirty limit than the occasional writer. Andrea proposed something similar: http://lwn.net/Articles/152277/ The main...
```diff diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 513bc3e489f0..3a619f57a2b2 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h @@ -171,6 +171,7 @@ extern struct group_info init_groups; [PIDTYPE_PGID] = INIT_PID_LINK(PIDTYPE_PGID), \ [PIDTYPE_SID] = INIT_PID_LI...
04fbfdc14e5f48463820d6b9807daa5e9c92c51f
Analyze and fix the following issue in the Linux kernel code: mm: per device dirty threshold
Problem Details: Scale writeback cache per backing device, proportional to its writeout speed. By decoupling the BDI dirty thresholds a number of problems we currently have will go away, namely: - mutual interference starvation (for any number of BDIs); - deadlocks with stacked BDIs (loop, FUSE and local NFS mounts...
```diff diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index 4d9222c2f222..48a62baace58 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h @@ -10,6 +10,7 @@ #include <linux/percpu_counter.h> #include <linux/log2.h> +#include <linux/proportions.h> #include <asm/atomic...
e0bf68ddec4f4f90e5871404be4f1854c17f3120
Analyze and fix the following issue in the Linux kernel code: mm: bdi init hooks
Problem Details: provide BDI constructor/destructor hooks [akpm@linux-foundation.org: compile fix] Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index 9eabac95fbe0..524404bd08c1 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c @@ -1786,6 +1786,7 @@ static void blk_release_queue(struct kobject *kobj) blk_trace_shutdown(q); + bdi_destroy(&q->backing_dev_info); kmem_cache_free(requestq_cachep...
c4dc4beed23827e155d7cbc2a1ffa3949eddd194
Analyze and fix the following issue in the Linux kernel code: nfs: remove congestion_end()
Problem Details: These patches aim to improve balance_dirty_pages() and directly address three issues: 1) inter device starvation 2) stacked device deadlocks 3) inter process starvation 1 and 2 are a direct result from removing the global dirty limit and using per device dirty limits. By giving each device its o...
```diff diff --git a/fs/nfs/write.c b/fs/nfs/write.c index e2bb66c34406..82d7ee98c675 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -242,10 +242,8 @@ static void nfs_end_page_writeback(struct page *page) struct nfs_server *nfss = NFS_SERVER(inode); end_page_writeback(page); - if (atomic_long_dec_return(&nfs...
eead19115329c5615ba03cbaf1c3fe24c14858a3
Analyze and fix the following issue in the Linux kernel code: partially fix up the lookup_one_noperm mess
Problem Details: Try to fix the mess created by sysfs braindamage. - refactor code internal to fs/namei.c a little to avoid too much duplication: o __lookup_hash_kern is renamed back to __lookup_hash o the old __lookup_hash goes away, permission checks moves to the two callers o useless inline qualifiers on ...
```diff diff --git a/fs/namei.c b/fs/namei.c index b40b8084eefc..bab0d19a2e36 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1273,7 +1273,8 @@ int __user_path_lookup_open(const char __user *name, unsigned int lookup_flags, return err; } -static inline struct dentry *__lookup_hash_kern(struct qstr *name, struct dentr...
b9dca1e0fcb696716840a3bc8f20a6941b484dbf
Analyze and fix the following issue in the Linux kernel code: sched: fix new task startup crash
Problem Details: Child task may be added on a different cpu that the one on which parent is running. In which case, task_new_fair() should check whether the new born task's parent entity should be added as well on the cfs_rq. Patch below fixes the problem in task_new_fair. This could fix the put_prev_task_fair() cras...
```diff diff --git a/kernel/sched.c b/kernel/sched.c index 975436435b42..0ec9521a8e70 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -1712,7 +1712,7 @@ void fastcall wake_up_new_task(struct task_struct *p, unsigned long clone_flags) p->prio = effective_prio(p); - if (!p->sched_class->task_new || !current->se...
b1a8c172c318534b96d0f0f1aecdad3898118b98
Analyze and fix the following issue in the Linux kernel code: sched: fix !SYSFS build breakage
Problem Details: When CONFIG_SYSFS is not set, CONFIG_FAIR_USER_SCHED fails to build with kernel/built-in.o: In function `uids_kobject_init': (.init.text+0x1488): undefined reference to `kernel_subsys' kernel/built-in.o: In function `uids_kobject_init': (.init.text+0x1490): undefined reference to `kernel_subsys' kerne...
```diff diff --git a/include/linux/sched.h b/include/linux/sched.h index 592e3a55f818..4ac7d51ad0e1 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -530,10 +530,12 @@ struct user_struct { #ifdef CONFIG_FAIR_USER_SCHED struct task_group *tg; +#ifdef CONFIG_SYSFS struct kset kset; struct subsys...
908a7c1b9b80d06708177432020c80d147754691
Analyze and fix the following issue in the Linux kernel code: sched: fix improper load balance across sched domain
Problem Details: We recently discovered a nasty performance bug in the kernel CPU load balancer where we were hit by 50% performance regression. When tasks are assigned to a subset of CPUs that span across sched_domains (either ccNUMA node or the new multi-core domain) via cpu affinity, kernel fails to perform proper ...
```diff diff --git a/kernel/sched.c b/kernel/sched.c index 5e220bf7d4c4..975436435b42 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -2336,7 +2336,7 @@ find_busiest_group(struct sched_domain *sd, int this_cpu, unsigned long max_pull; unsigned long busiest_load_per_task, busiest_nr_running; unsigned long this...
f6b80769109d5b2d9291dd788f4c250cc8b7a55b
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix vmemmap warning in init_64.c
Problem Details: Use the right printk format to silence the following warning. CC arch/powerpc/mm/init_64.o arch/powerpc/mm/init_64.c: In function 'vmemmap_populate': arch/powerpc/mm/init_64.c:243: warning: format '%p' expects type 'void *', but argument 4 has type 'long unsigned int' Signed-off-by: Tony Breed...
```diff diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index 702d884a338a..6720b1c93f18 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c @@ -240,7 +240,7 @@ int __meminit vmemmap_populate(struct page *start_page, return -ENOMEM; printk(KERN_WARNING "vmemmap %08lx alloc...
081c11a5d0cc24ab58adc7de2ddf209149bf176f
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix 64 bits vDSO DWARF info for CR register
Problem Details: The current DWARF info for CR are incorrect, causing the gcc unwinder to go to lunch if we take a segfault in the vdso. This fixes it. Problem identified by Andrew Haley, and fix provided by Jakub Jelinek (thanks !). Unfortunately, a bug in gcc cause it to not quite work either, but that is being fi...
```diff diff --git a/arch/powerpc/kernel/vdso64/sigtramp.S b/arch/powerpc/kernel/vdso64/sigtramp.S index 17a83fa6dc52..59eb59bb4082 100644 --- a/arch/powerpc/kernel/vdso64/sigtramp.S +++ b/arch/powerpc/kernel/vdso64/sigtramp.S @@ -134,13 +134,16 @@ V_FUNCTION_END(__kernel_sigtramp_rt64) 9: /* This is where the pt_r...
f66bce5e6aa1388289c04496c3fcae7bebf5f905
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Add 1TB workaround for PA6T
Problem Details: PA6T has a bug where the slbie instruction does not honor the large segment bit. As a result, we have to always use slbia when switching context. We don't have to worry about changing the slbie's during fault processing, since they should never be replacing one VSID with another using the same ESID. ...
```diff diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 0ec134034899..148a3547c9aa 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S @@ -408,6 +408,12 @@ END_FTR_SECTION_IFSET(CPU_FTR_1T_SEGMENT) std r7,SLBSHADOW_STACKVSID(r9) /* Save VSID */ std r0...
309a109255cce65a99ced7a2bcabce24f4752db4
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Enable SLUB in *_defconfig
Problem Details: When checking out the new NO_HZ support in powerpc, I noticed we never slept for more than 2 seconds. It turns out SLAB has a 2 second per cpu timer that causes this. After switching to SLUB I see some nice 4 second sleeps which is the limit on this POWER6 box (the decrementer ticks at 512MHz): slep...
```diff diff --git a/arch/powerpc/configs/bamboo_defconfig b/arch/powerpc/configs/bamboo_defconfig index b592dec4640f..d22fed6d2cd9 100644 --- a/arch/powerpc/configs/bamboo_defconfig +++ b/arch/powerpc/configs/bamboo_defconfig @@ -91,8 +91,9 @@ CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y CONFIG_VM_EVENT_COUNTER...
f5534004e5296496aa559d65c91befd02bf91d05
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix 1TB segment detection
Problem Details: Buglet in the 1TB detection makes it return after checking the first property word, even if it's not a match. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index 611ad084b7e7..09da90b53850 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c @@ -209,8 +209,8 @@ static int __init htab_dt_scan_seg_sizes(unsigned long node, if (prop[0] == 40) { DBG("1T ...
dc6adfb33faf3ca517bf882d859e15b005460961
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix iSeries_hpte_insert prototype
Problem Details: Commit 1189be6508d45183013ddb82b18f4934193de274 ([POWERPC] Use 1TB segments) added an argument to hpte_insert. Also make iSeries_hpte_insert static. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/platforms/iseries/htab.c b/arch/powerpc/platforms/iseries/htab.c index 15a7097e5dd7..f99c6c4b6985 100644 --- a/arch/powerpc/platforms/iseries/htab.c +++ b/arch/powerpc/platforms/iseries/htab.c @@ -39,9 +39,9 @@ static inline void iSeries_hunlock(unsigned long slot) spin_unlock(&iSeri...
bfce5c3ce5923f4583ae10b18e4667668c0201dd
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix copyright symbol
Problem Details: It seems to have been munged by patchwork. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/platforms/iseries/vio.c b/arch/powerpc/platforms/iseries/vio.c index 910b00b4703e..d6435b03971f 100644 --- a/arch/powerpc/platforms/iseries/vio.c +++ b/arch/powerpc/platforms/iseries/vio.c @@ -2,7 +2,7 @@ * Legacy iSeries specific vio initialisation * that needs to be built in (not...
5804509e652fd26227f6da732d5445af444730d3
Analyze and fix the following issue in the Linux kernel code: Fix loop terminating conditions in fill_sg().
Problem Details: Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
```diff diff --git a/arch/sparc64/kernel/iommu.c b/arch/sparc64/kernel/iommu.c index 5d4e96dba412..29af777d7ac9 100644 --- a/arch/sparc64/kernel/iommu.c +++ b/arch/sparc64/kernel/iommu.c @@ -475,12 +475,11 @@ static void dma_4u_unmap_single(struct device *dev, dma_addr_t bus_addr, #define SG_ENT_PHYS_ADDRESS(SG) \ (...
8bf50f71cbfc7d043f0f135da72b3feefeaa0eb8
Analyze and fix the following issue in the Linux kernel code: cciss: disable DMA refetch on Smart Array P600
Problem Details: This patch disables DMA refetch in the PCI bridge. We have disabled DMA prefetch for quite some time. Testing with XEN revealed another ASIC bug. If dom0 resides on a P600 the board can can an MCA bi accessing invalid memory addresses. Apparently, we need to disable both prefetch and refetch. My unders...
```diff diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 3fb7e8bc436d..e330c26c5ad9 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -3035,15 +3035,20 @@ static int cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev) } #endif - /* Disabling DMA prefetch for the P600 - * An ASIC b...
9e91fdb32d449a6b57f8236a793ae2f3df79b4d8
Analyze and fix the following issue in the Linux kernel code: swiotlb: fix map_sg failure handling
Problem Details: sg list elements might not be continuous. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
```diff diff --git a/lib/swiotlb.c b/lib/swiotlb.c index c419ecf334c3..752fd95323f3 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c @@ -696,7 +696,7 @@ swiotlb_map_sg(struct device *hwdev, struct scatterlist *sgl, int nelems, /* Don't panic here, we expect map_sg users to do proper error handling. */ s...
24c31eede658c30e4fcc93505589fd519c3aa4b8
Analyze and fix the following issue in the Linux kernel code: SPARC64: fix iommu sg chaining
Problem Details: Commit 2c941a204070ab32d92d40318a3196a7fb994c00 looks incomplete. The helper functions like prepare_sg() need to support sg chaining too. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
```diff diff --git a/arch/sparc64/kernel/iommu.c b/arch/sparc64/kernel/iommu.c index db3ffcf7a120..5d4e96dba412 100644 --- a/arch/sparc64/kernel/iommu.c +++ b/arch/sparc64/kernel/iommu.c @@ -10,7 +10,6 @@ #include <linux/device.h> #include <linux/dma-mapping.h> #include <linux/errno.h> -#include <linux/scatterlist.h...
adbc03587c17e8f50478c1d7744a454cfb9e0653
Analyze and fix the following issue in the Linux kernel code: [CIFS] endian fixes
Problem Details: Signed-off-by: Steve French <sfrench@us.ibm.com>
```diff diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index 9c4a29690cca..b1f448f2e071 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c @@ -115,8 +115,8 @@ int compare_sids(struct cifs_sid *ctsid, struct cifs_sid *cwsid) } /* compare all of the subauth values if any */ - num_sat = cpu_to_le32(ctsid->nu...
68f3e6622bb60c6b477971b56d1913077834fdcd
Analyze and fix the following issue in the Linux kernel code: fix adbhid mismerge
Problem Details: This fixes a lost 'key' variable declaration that went missing in a mismerge (commit b981d8b3f5e008ff10d993be633ad00564fc22cd) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/macintosh/adbhid.c b/drivers/macintosh/adbhid.c index 8cce016b3d09..2766e4fc4ea8 100644 --- a/drivers/macintosh/adbhid.c +++ b/drivers/macintosh/adbhid.c @@ -282,7 +282,7 @@ static void adbhid_input_keycode(int id, int scancode, int repeat) { struct adbhid *ahid = adbhid[id]; - int keyc...
107acb23ba763197d390ae9ffd347f3e2a524d39
Analyze and fix the following issue in the Linux kernel code: [PATCH] mac80211: honor IW_SCAN_THIS_ESSID in siwscan ioctl
Problem Details: This patch fixes the problem of associating with wpa_secured hidden AP. Please try out. The original author of this patch is Bill Moss <bmoss@clemson.edu> Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c index 6b4b0d5880db..a57fed77db27 100644 --- a/net/mac80211/ieee80211_ioctl.c +++ b/net/mac80211/ieee80211_ioctl.c @@ -511,32 +511,40 @@ static int ieee80211_ioctl_giwap(struct net_device *dev, static int ieee80211_ioctl_siwscan(stru...
1dd84aa213d0f98a91a1ec9be2f750f5f48e75a0
Analyze and fix the following issue in the Linux kernel code: [PATCH] mac80211: reorder association debug output
Problem Details: There's no reason to warn about an invalid AID field when the association was denied. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Michael Wu <flamingice@sourmilk.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index 1641e8fe44b7..8dae26bbfdf9 100644 --- a/net/mac80211/ieee80211_sta.c +++ b/net/mac80211/ieee80211_sta.c @@ -1203,15 +1203,11 @@ static void ieee80211_rx_mgmt_assoc_resp(struct net_device *dev, capab_info = le16_to_cpu(mgmt->u.assoc...
1a1769f32349a188db48cf81fe306b6f841fc246
Analyze and fix the following issue in the Linux kernel code: WOL bugfix for 3c59x.c
Problem Details: Some NICs (3c905B) can not generate PME in power state PCI_D0, while others like 3c905C can. Call pci_enable_wake() with PCI_D3hot should give proper WOL for 3c905B. Signed-off-by: Steffen Klassert <klassert@mathematik.tu-chemnitz.de> Tested-by: Harry Coin <hcoin@n4comm.com> Signed-off-by: Andrew Mor...
```diff diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index 8d3893da06f5..862f47223fdc 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c @@ -3118,7 +3118,13 @@ static void acpi_set_WOL(struct net_device *dev) iowrite16(SetRxFilter|RxStation|RxMulticast|RxBroadcast, ioaddr + EL3_CMD); iowrite16(R...
678aa1f6ac8699ad69b347a22d9580425a587c14
Analyze and fix the following issue in the Linux kernel code: skge: add a debug interface
Problem Details: Add a debugfs interface to look at internal ring state. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 8f99a0626616..83d52c8acab0 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -2173,6 +2173,16 @@ config SKGE To compile this driver as a module, choose M here: the module will be called skge. This is recommended. +config SKGE_DE...
501fb72d052d2a302b423bef7dec98d9d98c8a36
Analyze and fix the following issue in the Linux kernel code: skge: XM PHY handling fixes
Problem Details: Change how PHY is managed on SysKonnect fibre based boards. Poll for PHY coming up 1 per second, but use interrupt to detect loss. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/skge.c b/drivers/net/skge.c index d5c10fd93bf4..180e82f85ac8 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c @@ -57,7 +57,7 @@ #define TX_WATCHDOG (5 * HZ) #define NAPI_WEIGHT 64 #define BLINK_MS 250 -#define LINK_HZ (HZ/2) +#define LINK_HZ HZ MODULE_DESCRIPTION("S...
7fb7ac241162dc51ec0f7644d4a97b2855213c32
Analyze and fix the following issue in the Linux kernel code: skge: fix ram buffer size calculation
Problem Details: This fixes problems with transmit hangs on older fiber based SysKonnect boards. Adjust ram buffer sizing calculation to make it correct on all boards and make it like the code in sky2 driver. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.or...
```diff diff --git a/drivers/net/skge.c b/drivers/net/skge.c index 2aae9fe38c5a..e593585f8bf7 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c @@ -2403,32 +2403,31 @@ static int skge_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) return err; } -static void skge_ramset(struct skge_hw *hw, u16 q, ...
298e1a9ebe37662f2145c07b678ebd09b86c020a
Analyze and fix the following issue in the Linux kernel code: gianfar: Fix compile regression caused by 09f75cd7
Problem Details: Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 558440c15b6c..cc288d8f6a53 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c @@ -1237,8 +1237,6 @@ static int gfar_change_mtu(struct net_device *dev, int new_mtu) * starting over will fix the problem. */ static void gfar_timeout(st...
b3e441c6ed8655a42e7b4da1b6dc7939f259d9c9
Analyze and fix the following issue in the Linux kernel code: net: Fix new EMAC driver for NAPI changes
Problem Details: net: Fix new EMAC driver for NAPI changes This fixes the new EMAC driver for the NAPI updates. The previous patch by Roland Dreier (already applied) to do that doesn't actually work. This applies on top of it makes it work on my test Ebony machine. This patch depends on "net: Add __napi_sycnhronize()...
```diff diff --git a/drivers/net/ibm_newemac/mal.c b/drivers/net/ibm_newemac/mal.c index 39f4cb6b0cf3..a680eb05ba60 100644 --- a/drivers/net/ibm_newemac/mal.c +++ b/drivers/net/ibm_newemac/mal.c @@ -45,6 +45,8 @@ int __devinit mal_register_commac(struct mal_instance *mal, return -EBUSY; } + if (list_empty(&mal->...
1284cd3a2b740d0118458d2ea470a1e5bc19b187
Analyze and fix the following issue in the Linux kernel code: bonding: two small fixes for IPoIB support
Problem Details: Two small fixes to IPoIB support for bonding: 1- copy header_ops from slave to bonding for IPoIB slaves 2- move release and destroy logic to UNREGISTER from GOING_DOWN notifier to avoid double release Set bonding to version 3.2.1. Signed-off-by: Moni Shoua <monis at voltaire.com> Signed-off-b...
```diff diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index db80f243dd37..6f85cc31f8a2 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1263,6 +1263,7 @@ static void bond_setup_by_slave(struct net_device *bond_dev, struct bonding *bond = bond_dev-...
e265522ca7d7a0cfa24aa2c811d22a1764a90783
Analyze and fix the following issue in the Linux kernel code: e1000e: fix error checks
Problem Details: Spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c index b7a7e2ae5e13..ca06c354b53c 100644 --- a/drivers/net/e1000e/ethtool.c +++ b/drivers/net/e1000e/ethtool.c @@ -1451,11 +1451,11 @@ static int e1000_loopback_test(struct e1000_adapter *adapter, u64 *data) } *data = e1000_setup_desc...
121244a7bfbc739a8d6823aa52c074d1766b895f
Analyze and fix the following issue in the Linux kernel code: e1000e: Fix debug printk macro
Problem Details: Spotted by Joe Perches. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/e1000e/hw.h b/drivers/net/e1000e/hw.h index aa82f1afb7fb..64515789fd4d 100644 --- a/drivers/net/e1000e/hw.h +++ b/drivers/net/e1000e/hw.h @@ -852,7 +852,7 @@ struct e1000_hw { #ifdef DEBUG #define hw_dbg(hw, format, arg...) \ - printk(KERN_DEBUG, "%s: " format, e1000e_get_hw_dev_nam...
9be4bfb974b37410466db605abe3402236167e05
Analyze and fix the following issue in the Linux kernel code: [PATCH] ssb: fix build failure
Problem Details: fix build failure if PCMCIA=m but SSB=y: drivers/built-in.o: In function `ssb_pcmcia_switch_coreidx': : undefined reference to `pcmcia_access_configuration_register' (fix symmetric bug for PCI too.) Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Michael Buesch <mb@bu3sch.de> Acked-by: Ran...
```diff diff --git a/drivers/ssb/Kconfig b/drivers/ssb/Kconfig index b4a5e5e9d9fc..d976660cb7f0 100644 --- a/drivers/ssb/Kconfig +++ b/drivers/ssb/Kconfig @@ -22,7 +22,7 @@ config SSB config SSB_PCIHOST_POSSIBLE bool - depends on SSB && PCI + depends on SSB && (PCI = y || PCI = SSB) default y config SSB_PCIHO...
7007d00caca268e1ba2bcaa6bed4a6456a96884b
Analyze and fix the following issue in the Linux kernel code: [PATCH] ssb: Fix a null pointer check in mipscore init
Problem Details: Fix a null pointer check in ssb mipscore init Signed-off-by: Felix Fietkau <nbd@openwrt.org> Acked-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/ssb/driver_mipscore.c b/drivers/ssb/driver_mipscore.c index ab8691a32580..3d3dd32bf3ab 100644 --- a/drivers/ssb/driver_mipscore.c +++ b/drivers/ssb/driver_mipscore.c @@ -173,7 +173,7 @@ u32 ssb_cpu_clock(struct ssb_mipscore *mcore) void ssb_mipscore_init(struct ssb_mipscore *mcore) { - ...
58a9ac17ed7a78958d03f3b4af107f0ef075cbed
Analyze and fix the following issue in the Linux kernel code: [PATCH] mac80211: fix set_channel regression
Problem Details: Adam Baker reported that the prism2 ioctl removal changed behaviour in that now the selection order was the other way around as before. New API is planned but not done yet, so for now just use the first matching channel in any mode as was previous behaviour with an unset next_mode. Signed-off-by: Joha...
```diff diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c index f0224c2311d2..6b4b0d5880db 100644 --- a/net/mac80211/ieee80211_ioctl.c +++ b/net/mac80211/ieee80211_ioctl.c @@ -306,9 +306,12 @@ int ieee80211_set_channel(struct ieee80211_local *local, int channel, int freq) ((chan->chan...
e797aa1b7da6bfcb2e19a10ae5ead9aa7aea732b
Analyze and fix the following issue in the Linux kernel code: [PATCH] ieee80211: fix TKIP QoS bug
Problem Details: The commit 65b6a277 titled "ieee80211: Fix header->qos_ctl endian issue" *introduced* an endianness bug. Partially revert it. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/net/ieee80211/ieee80211_crypt_tkip.c b/net/ieee80211/ieee80211_crypt_tkip.c index 6cc54eeca3ed..72e6ab66834f 100644 --- a/net/ieee80211/ieee80211_crypt_tkip.c +++ b/net/ieee80211/ieee80211_crypt_tkip.c @@ -586,7 +586,7 @@ static void michael_mic_hdr(struct sk_buff *skb, u8 * hdr) if (stype & IEEE...
bcb5febb248f7cc1e4a39ff61507f6343ba1c594
Analyze and fix the following issue in the Linux kernel code: forcedeth: fix NAPI rx poll function
Problem Details: fix the forcedeth NAPI poll function to not emit this warning: [ 186.635916] WARNING: at net/core/dev.c:2166 net_rx_action() [ 186.641351] [<c060d9f5>] net_rx_action+0x145/0x1b0 [ 186.646191] [<c011d752>] __do_softirq+0x42/0x90 [ 186.650784] [<c011d7c6>] do_softirq+0x26/0x30 [ 186.655202] [<c...
```diff diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index dae30b731342..2e708150b014 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c @@ -2268,13 +2268,13 @@ static int nv_rx_process(struct net_device *dev, int limit) { struct fe_priv *np = netdev_priv(dev); u32 flags; - u32 rx...
d91f5bb69adde86173071cf7fffbdf705ae8c6e7
Analyze and fix the following issue in the Linux kernel code: fix cirrusfb breakage
Problem Details: Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c index ce22bf5de350..f99cb77e7b42 100644 --- a/drivers/video/cirrusfb.c +++ b/drivers/video/cirrusfb.c @@ -2225,8 +2225,9 @@ static void cirrusfb_pci_unmap(struct fb_info *info) #endif /* CONFIG_PCI */ #ifdef CONFIG_ZORRO -static void __devexit...
83431cba3d847fc2296d3f38ce7feb623a1cfc45
Analyze and fix the following issue in the Linux kernel code: firewire: fw-cdev: reorder wakeup vs. spinlock
Problem Details: Signed-off-by: Jay Fenlason <fenlason@redhat.com> Prompted by https://bugzilla.redhat.com/show_bug.cgi?id=323411 Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
```diff diff --git a/drivers/firewire/fw-cdev.c b/drivers/firewire/fw-cdev.c index 290d9f036199..60f1a8924a95 100644 --- a/drivers/firewire/fw-cdev.c +++ b/drivers/firewire/fw-cdev.c @@ -143,11 +143,10 @@ static void queue_event(struct client *client, struct event *event, event->v[1].size = size1; spin_lock_irqsa...
c26f02340e89c55390c9044ea65d9aef610b38f5
Analyze and fix the following issue in the Linux kernel code: firewire: fw-ohci: fix includes
Problem Details: Add used includes, remove unused includes. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
```diff diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c index a7947baeee48..48768b5b0280 100644 --- a/drivers/firewire/fw-ohci.c +++ b/drivers/firewire/fw-ohci.c @@ -24,12 +24,12 @@ #include <linux/interrupt.h> #include <linux/pci.h> #include <linux/delay.h> -#include <linux/poll.h> #include <l...
df8ec2490fed5dd23316bbb2c2e90e59e7d37126
Analyze and fix the following issue in the Linux kernel code: firewire: fw-sbp2: use an own workqueue (fix system responsiveness)
Problem Details: Firewire-sbp2 did very uncooperative things in the kernel's shared workqueue: Sleeping until reception of management status from the target for up to 2 seconds, and performing SCSI inquiry and all of the setup of SCSI command set drivers via scsi_add_device. If there were transient or permanent error...
```diff diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c index f96f19293dd1..5596df65c8ed 100644 --- a/drivers/firewire/fw-sbp2.c +++ b/drivers/firewire/fw-sbp2.c @@ -39,6 +39,7 @@ #include <linux/string.h> #include <linux/stringify.h> #include <linux/timer.h> +#include <linux/workqueue.h> #in...
638d5bb8167c2c88552257d5af23f7f65ab4defd
Analyze and fix the following issue in the Linux kernel code: ieee1394: nodemgr: fix leak of struct csr1212_keyval
Problem Details: csr1212_keep_keyval(kv) in nodemgr_process_root_directory was unbalanced if ne->vendor_name_kv already exists. This happens for example if eth1394 or raw1394 modify the local config ROM and it is parsed again. As a bonus, the attempt to add the vendor_name_kv sysfs attribute when it already exists is...
```diff diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c index 11712a3ae0ad..ec8edd2f19de 100644 --- a/drivers/ieee1394/nodemgr.c +++ b/drivers/ieee1394/nodemgr.c @@ -1112,7 +1112,7 @@ static void nodemgr_process_root_directory(struct host_info *hi, struct node_ent { unsigned int ud_id = 0; str...
69e2b602966533256edce1ed1b24fec23fe05962
Analyze and fix the following issue in the Linux kernel code: ieee1394: Fix kthread stopping in nodemgr_host_thread
Problem Details: The nodemgr host thread can exit on its own even when kthread_should_stop is not true, on receiving a signal (might never happen in practice, as it ignores signals). But considering kthread_stop() must not be mixed with kthreads that can exit on their own, I think changing the code like this is clearer...
```diff diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c index 1939fee616ec..11712a3ae0ad 100644 --- a/drivers/ieee1394/nodemgr.c +++ b/drivers/ieee1394/nodemgr.c @@ -1712,7 +1712,8 @@ static int nodemgr_host_thread(void *__hi) * to make sure things settle down. */ g = get_hpsb_generation(hos...
261b5f664c6c68c5209656a71c41823eda0d938b
Analyze and fix the following issue in the Linux kernel code: ieee1394: sbp2: fix unsafe iteration over list of devices
Problem Details: sbp2_host_reset and sbp2_handle_status_write are not serialized against sbp2_alloc_device and sbp2_remove_device. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
```diff diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index a81ba8fca0db..1b353b964b33 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c @@ -242,6 +242,8 @@ static int sbp2_max_speed_and_size(struct sbp2_lu *); static const u8 sbp2_speedto_max_payload[] = { 0x7, 0x8, 0x9, 0xA, 0xB, ...
661afcae1b6b6493e4ea69f81bae78397c066f25
Analyze and fix the following issue in the Linux kernel code: ieee1394: eth1394: fix lock imbalance
Problem Details: bad_proto can be reached from points which did not take priv->lock. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
```diff diff --git a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c index 7aa0bf3e1028..b166b3575fa6 100644 --- a/drivers/ieee1394/eth1394.c +++ b/drivers/ieee1394/eth1394.c @@ -1220,23 +1220,19 @@ static int ether1394_data_handler(struct net_device *dev, int srcid, int destid, priv->stats.rx_errors++; p...
7eebb9348655b55553d65fc7cb6cfad292d28dbb
Analyze and fix the following issue in the Linux kernel code: x86: fix boot error introduced by kbuild
Problem Details: x86 uses target specific assignment of EXTRA_AFLAGS, EXTRA_CFLAGS - this caused troubles with introducing asflags-y, ccflags-y. Fixed the target specific assignments in arch/x86/boot/Makefile and auditted the rest of the kernel for similar usage. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index d6ed8e5e1ccc..e8756e5f6b29 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile @@ -64,10 +64,10 @@ KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \ KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ $(obj)/zImage: ...
ce51ae14ae141eacecf2801f9a3646a737ce64a0
Analyze and fix the following issue in the Linux kernel code: [CIFS] endian fixes in new acl code
Problem Details: Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
```diff diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index 4735e9b47590..9c4a29690cca 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c @@ -34,11 +34,11 @@ static struct cifs_wksid wksidarr[NUM_WK_SIDS] = { {{1, 0, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0} }, "null user"}, {{1, 1, {0, 0, 0, 0, 0, 1}, {0, 0, 0...
9ff6f72f432364991d68e99cae72cb141c166e70
Analyze and fix the following issue in the Linux kernel code: ide: remove hwif->autodma and drive->autodma
Problem Details: * hpt34x.c: disable DMA masks for HPT345 (hwif->autodma is zero so DMA won't be enabled anyway). * trm290.c: disable IDE_HFLAG_TRUST_BIOS_FOR_DMA flag (hwif->autodma is zero so DMA won't be enabled anyway). * Check noautodma global variable instead of drive->autodma in ide_tune_dma(). This fix...
```diff diff --git a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c index 0c6ce2faf8f5..e4875cef78bb 100644 --- a/drivers/ide/arm/icside.c +++ b/drivers/ide/arm/icside.c @@ -415,8 +415,6 @@ static void icside_dma_lost_irq(ide_drive_t *drive) static void icside_dma_init(ide_hwif_t *hwif) { - printk(" %s: SG-...
c58e79dd44243ec919d789193ffb35a220c54695
Analyze and fix the following issue in the Linux kernel code: ide: remove CONFIG_BLK_DEV_IDEDMA_FORCED
Problem Details: This code doesn't use pci_assign_resource() and ide_get_or_set_dma_base() uses pci_resource_start() to get DMA base address so it has no chance of working. Moreover this belongs to PCI quirks (in case somebody would like to fix it). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Ba...
```diff diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index 8982c0932438..5fbd06b7893d 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig @@ -435,14 +435,6 @@ config BLK_DEV_IDEDMA_PCI bool select BLK_DEV_IDEPCI -config BLK_DEV_IDEDMA_FORCED - bool "Force enable legacy 2.0.X HOSTS to use DMA" - d...
3f019eea9ccff0e81d3226759a619ceec26e2e00
Analyze and fix the following issue in the Linux kernel code: cs5530/sc1200: add PIO autotune fallback to ->ide_dma_check
Problem Details: * Add PIO autotune fallback to ->ide_dma_check. Since cs5530/sc1200 allow separate PIO and DMA timings, and cs5530/sc1200 always set ->autotune this change shouldn't have any other effect than bringing these drivers in-line with other host drivers wrt ->ide_dma_check implementations. * Fix ->...
```diff diff --git a/drivers/ide/pci/cs5530.c b/drivers/ide/pci/cs5530.c index c972eb9bd457..1c82cd51f6d5 100644 --- a/drivers/ide/pci/cs5530.c +++ b/drivers/ide/pci/cs5530.c @@ -1,5 +1,5 @@ /* - * linux/drivers/ide/pci/cs5530.c Version 0.75 Aug 2 2007 + * linux/drivers/ide/pci/cs5530.c Version 0.76 Aug 3 2007 * ...
d3b90baf0924c13045c56c3d0a766f9374fe7a9e
Analyze and fix the following issue in the Linux kernel code: ide: remove drive->init_speed zeroing
Problem Details: Several host drivers used to reset drive->init_speed in their ->ide_dma_check implementations which resulted in incorrect init speed being reported to the user, fix it. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index 0b83443bf250..9582794eb65a 100644 --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c @@ -446,8 +446,6 @@ static void ali_set_dma_mode(ide_drive_t *drive, const u8 speed) static int ali15x3_config_drive_for_dma(ide_drive...
8446f65988b48d19cf419aa4def9a9ccfed17b76
Analyze and fix the following issue in the Linux kernel code: au1xxx-ide: use ide_tune_dma()
Problem Details: * Remove needless setting of drive->using_dma from auide_dma_check(). * Split off auide_mdma_filter() from auide_dma_check(). * Use ide_tune_dma() in auide_dma_check(), this fixes following issues: - device's DMA capability bit not being checked - device not being checked against generic DMA blac...
```diff diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c index 892d08f61dc0..1c4732958fb2 100644 --- a/drivers/ide/mips/au1xxx-ide.c +++ b/drivers/ide/mips/au1xxx-ide.c @@ -351,11 +351,18 @@ static int auide_dma_setup(ide_drive_t *drive) return 0; } -static int auide_dma_check(ide_drive_t...
94c7fa0fcc89571b24c90e0a7545ad31aa390f24
Analyze and fix the following issue in the Linux kernel code: atiixp: DMA setup fixes
Problem Details: * Fix handling of unsupported/invalid modes in atiixp_set_dma_mode(). * ATI controllers allow separate PIO and DMA timings so remove programming of PIO modes from atiixp_set_dma_mode(). Also remove no longer needed atiixp_dma_2_pio() helper. * SWDMA timings are not programmed by atiixp_set_dma_m...
```diff diff --git a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c index 0eb97f021d39..14a61b1c80ac 100644 --- a/drivers/ide/pci/atiixp.c +++ b/drivers/ide/pci/atiixp.c @@ -1,5 +1,5 @@ /* - * linux/drivers/ide/pci/atiixp.c Version 0.02 Jun 16 2007 + * linux/drivers/ide/pci/atiixp.c Version 0.03 Aug 3 2007 * ...
c77a89cd98d99819f23a4a08e5e17ee1f13f6e4d
Analyze and fix the following issue in the Linux kernel code: sis5513: DMA setup fixes
Problem Details: * Add sis_ata133_get_base() helper function for obtaining the address of the drive control registers on chipset_family == ATA_133 chipsets. * Add three helper functions for programming PIO/MWDMA timings: - sis_ata16_program_timings() (for ATA_16/33/66/100a chipset families) - sis_ata100_program...
```diff diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c index b375ee53d66d..db8d96bd5a64 100644 --- a/drivers/ide/pci/sis5513.c +++ b/drivers/ide/pci/sis5513.c @@ -1,5 +1,5 @@ /* - * linux/drivers/ide/pci/sis5513.c Version 0.27 Jul 14, 2007 + * linux/drivers/ide/pci/sis5513.c Version 0.28 Aug 1, 200...
0c824b51b338c808de650b440ba5f9f4a725f7fc
Analyze and fix the following issue in the Linux kernel code: ide: fix serverworks.c UDMA regression
Problem Details: The patch described by the following excerpt from ChangeLog-2.6.22 makes it impossible to use UDMA on a Tyan S2707 motherboard (SvrWks CSB5): commit 2d5eaa6dd744a641e75503232a01f52d0768884c Author: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Date: Thu May 10 00:01:08 2007 +0200 ide: rework t...
```diff diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c index 49ec0ac64a4b..40b03836755c 100644 --- a/drivers/ide/pci/serverworks.c +++ b/drivers/ide/pci/serverworks.c @@ -97,6 +97,7 @@ static u8 svwks_udma_filter(ide_drive_t *drive) mode = 2; switch(mode) { + case 3: mask = 0x3f; ...
4d1efed540df1ccd3077df6f2bffba9d506b7d7b
Analyze and fix the following issue in the Linux kernel code: [IA64] Fix build for CONFIG_SMP=n
Problem Details: d5a7430ddcdb598261d70f7eb1bf450b5be52085 missed a spot where we use cpu_sibling_map and cpu_core_map. These don't exist on a uni-processor build. Wrap #ifdef CONFIG_SMP ... #endif around it. Signed-off-by: Tony Luck <tony.luck@intel.com>
```diff diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index 777c8d8bd5e7..c5cfcfa4c87c 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c @@ -869,6 +869,7 @@ cpu_init (void) void *cpu_data; cpu_data = per_cpu_init(); +#ifdef CONFIG_SMP /* * insert boot cpu into sibling an...
33ff910f0f466184ffc3514628f18403dcd86761
Analyze and fix the following issue in the Linux kernel code: Fix powerpc breakage in sg chaining code
Problem Details: Commit 78bdc3106a877cfa50439fa66b52acbc4e7868df ("PPC: sg chaining support") looks to have removed some unrelated ppc code. Lets put it back in. Signed-off-by: Anton Blanchard <anton@samba.org> Acked-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/include/asm-powerpc/dma-mapping.h b/include/asm-powerpc/dma-mapping.h index 2af321f36aba..65be95dd03a5 100644 --- a/include/asm-powerpc/dma-mapping.h +++ b/include/asm-powerpc/dma-mapping.h @@ -6,6 +6,149 @@ */ #ifndef _ASM_DMA_MAPPING_H #define _ASM_DMA_MAPPING_H +#ifdef __KERNEL__ + +#include...
d02d1f5359e795bac9a4461698521680cddd782b
Analyze and fix the following issue in the Linux kernel code: RDMA/cma: Fix deadlock destroying listen requests
Problem Details: Deadlock condition reported by Kanoj Sarcar <kanoj@netxen.com>. The deadlock occurs when a connection request arrives at the same time that a wildcard listen is being destroyed. A wildcard listen maintains per device listen requests for each RDMA device in the system. The per device listens are autom...
```diff diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 01ae052ac3f4..ee946cc2576b 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -114,11 +114,12 @@ struct rdma_id_private { struct rdma_bind_list *bind_list; struct hlist_node node; - struct list_...
c5483388bb4d771007ef36478db038e07922a020
Analyze and fix the following issue in the Linux kernel code: RDMA/cma: Add locking around QP accesses
Problem Details: If a user allocates a QP on an rdma_cm_id, the rdma_cm will automatically transition the QP through its states (RTR, RTS, error, etc.) While the QP state transitions are occurring, the QP itself must remain valid. Provide locking around the QP pointer to prevent its destruction while accessing the poi...
```diff diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 93644f82592c..01ae052ac3f4 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -121,6 +121,8 @@ struct rdma_id_private { enum cma_state state; spinlock_t lock; + struct mutex qp_mutex; + str...
a122d6230e8d8ac7cffdf0bc9cc4b256b928fe49
Analyze and fix the following issue in the Linux kernel code: xen: add some debug output for failed multicalls
Problem Details: Multicalls are expected to never fail, and the normal response to a failed multicall is very terse. In the interests of better debuggability, add some more verbose output. It may be worth turning this off once it all seems more tested. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
```diff diff --git a/arch/x86/xen/multicalls.c b/arch/x86/xen/multicalls.c index ce9c4b41f02d..5e6f36f6d876 100644 --- a/arch/x86/xen/multicalls.c +++ b/arch/x86/xen/multicalls.c @@ -26,11 +26,16 @@ #include "multicalls.h" +#define MC_DEBUG 1 + #define MC_BATCH 32 #define MC_ARGS (MC_BATCH * 16 / sizeof(u64)) ...
e3d2697669abbe26c08dc9b95e2a71c634d096ed
Analyze and fix the following issue in the Linux kernel code: xen: fix incorrect vcpu_register_vcpu_info hypercall argument
Problem Details: The kernel's copy of struct vcpu_register_vcpu_info was out of date, at best causing the hypercall to fail and the guest kernel to fall back to the old mechanism, or worse, causing random memory corruption. [ Stable folks: applies to 2.6.23 ] Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> ...
```diff diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index bc7bf5f8d077..c89e5b407f90 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -113,7 +113,7 @@ static void __init xen_vcpu_setup(int cpu) info.mfn = virt_to_mfn(vcpup); info.offset = offset_in_page(vcpup); - printk...
74260714c56de4f967fcb2f17a8656bc574b75be
Analyze and fix the following issue in the Linux kernel code: xen: lock pte pages while pinning/unpinning
Problem Details: When a pagetable is created, it is made globally visible in the rmap prio tree before it is pinned via arch_dup_mmap(), and remains in the rmap tree while it is unpinned with arch_exit_mmap(). This means that other CPUs may race with the pinning/unpinning process, and see a pte between when it gets ma...
```diff diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index e334bf7cb327..4186cb6a7f5a 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -666,6 +666,15 @@ static __init void xen_alloc_pt_init(struct mm_struct *mm, u32 pfn) make_lowmem_page_readonly(__va(PFN_PHYS(pfn))); } +...
9f79991d4186089e228274196413572cc000143b
Analyze and fix the following issue in the Linux kernel code: xen: deal with stale cr3 values when unpinning pagetables
Problem Details: When a pagetable is no longer in use, it must be unpinned so that its pages can be freed. However, this is only possible if there are no stray uses of the pagetable. The code currently deals with all the usual cases, but there's a rare case where a vcpu is changing cr3, but is doing so lazily, and th...
```diff diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 75fd36971d0b..e334bf7cb327 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -53,7 +53,23 @@ EXPORT_SYMBOL_GPL(hypercall_page); DEFINE_PER_CPU(struct vcpu_info *, xen_vcpu); DEFINE_PER_CPU(struct vcpu_info, xen_vcpu...
91e0c5f3dad47838cb2ecc1865ce789a0b7182b1
Analyze and fix the following issue in the Linux kernel code: xen: add batch completion callbacks
Problem Details: This adds a mechanism to register a callback function to be called once a batch of hypercalls has been issued. This is typically used to unlock things which must remain locked until the hypercall has taken place. [ Stable folks: pre-req for 2.6.23 bugfix "xen: deal with stale cr3 values when unpinn...
```diff diff --git a/arch/x86/xen/multicalls.c b/arch/x86/xen/multicalls.c index c837e8e463db..ce9c4b41f02d 100644 --- a/arch/x86/xen/multicalls.c +++ b/arch/x86/xen/multicalls.c @@ -32,7 +32,11 @@ struct mc_buffer { struct multicall_entry entries[MC_BATCH]; u64 args[MC_ARGS]; - unsigned mcidx, argidx; + struct ca...
af6f4612fdfd782c6d35272836a2b97e7e5b790e
Analyze and fix the following issue in the Linux kernel code: [CIFS] Fix some endianness problems in new acl code
Problem Details: Signed-off-by: Steve French <sfrench@us.ibm.com>
```diff diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index 601587724f9d..4735e9b47590 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c @@ -31,7 +31,7 @@ #ifdef CONFIG_CIFS_EXPERIMENTAL -struct cifs_wksid wksidarr[NUM_WK_SIDS] = { +static struct cifs_wksid wksidarr[NUM_WK_SIDS] = { {{1, 0, {0, 0, 0, 0...
6345a3a88012b0060ddeca8874e51cb442e1fb20
Analyze and fix the following issue in the Linux kernel code: [CIFS] formatting fixes
Problem Details: Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
```diff diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index c0cd3ce56e9f..494455ed4352 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -1468,7 +1468,7 @@ ipv4_connect(struct sockaddr_in *psin_server, struct socket **csocket, if (psin_server->sin_port) { /* user overrode default port */ rc = (*csocke...
64bfca5cd8c40fa138ad5db2513e8bcf8bd54ebd
Analyze and fix the following issue in the Linux kernel code: [MIPS] Cache: Provide more information on cache policy on bootup.
Problem Details: This should help making bug reports for the gadzillion of cores with all their configuration and synthesis options more useful. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index 971f6c047b8a..d7088331fb0f 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c @@ -983,11 +983,15 @@ static void __init probe_pcache(void) printk("Primary instruction cache %ldkB, %s, %s, linesize %d bytes.\n", icache_size >> 1...
985c30ef4d7c2a4f0e979a507a7e2f7f09b096c3
Analyze and fix the following issue in the Linux kernel code: [MIPS] Fix aliasing bug in copy_user_highpage, take 2.
Problem Details: Turns out b868868ae0f7272228c95cc760338ffe35bb739d wasn't quite right. When called for a page that isn't marked dirty it would artificially create an alias instead of doing the obvious thing and access the page via KSEG0. The same issue also exists in copy_to_user_page and copy_from_user_page which w...
```diff diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index 5240432e6d1d..110ee7656b41 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c @@ -211,7 +211,7 @@ void copy_user_highpage(struct page *to, struct page *from, void *vfrom, *vto; vto = kmap_atomic(to, KM_USER1); - if (cpu_has_dc_aliases &&...