id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
90cc301859ea8840634324a7f5b9680312377667
Analyze and fix the following issue in the Linux kernel code: [PATCH] Char: cyclades, fix warnings
Problem Details: fix gcc signed/unsigned warnings Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index 7da6c3babb10..3ffa0807754c 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c @@ -1644,7 +1644,8 @@ cyz_handle_rx(struct cyclades_port *info, char_count = rx_put - rx_get; else char_count = rx_put - rx_get + rx_bu...
140e92abe2bc9a0cd3ccfd11744ff4eb65319bb3
Analyze and fix the following issue in the Linux kernel code: [PATCH] Char: istallion, fix enabling
Problem Details: Enable ISA cards before pci_register_driver and then, enable each PCI card in probe function. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c index c8183ec09412..1050c426dcd0 100644 --- a/drivers/char/istallion.c +++ b/drivers/char/istallion.c @@ -3968,6 +3968,10 @@ static int __devinit stli_pciprobe(struct pci_dev *pdev, brdp->state |= BST_PROBED; pci_set_drvdata(pdev, brdp); + E...
6b2c9457bb377bf843f0a3ca2f4eb2ef69c67985
Analyze and fix the following issue in the Linux kernel code: [PATCH] Char: stallion, variables cleanup
Problem Details: - fix `gcc -W' un/signed warnings by converting some ints -> uints. - move 3 global variables into functions, where are they used. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvald...
```diff diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c index 2db2e9fbb5c6..97c7dc9c0cf0 100644 --- a/drivers/char/stallion.c +++ b/drivers/char/stallion.c @@ -63,7 +63,7 @@ #define BRD_EASYIOPCI 28 struct stlconf { - int brdtype; + unsigned int brdtype; int ioaddr1; int ioaddr2; unsigned lo...
fc06b5cf858787934110b9398d2d5a0c0493c1dd
Analyze and fix the following issue in the Linux kernel code: [PATCH] Char: stallion, fix fail paths
Problem Details: Release everything what was allocated and check return value of isa probing. Release only ISA boards in module exit, since pci have their own pci-probing-remove. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-...
```diff diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c index 4ccf4a5834c9..7612464beeb1 100644 --- a/drivers/char/stallion.c +++ b/drivers/char/stallion.c @@ -143,6 +143,8 @@ static struct stlbrd *stl_brds[STL_MAXBRDS]; * Not really much here! */ #define BRD_FOUND 0x1 +#define STL_PROBED 0x2 + ...
7eb9976f10354f0e3bc1a52b66b9cf857ff41088
Analyze and fix the following issue in the Linux kernel code: [PATCH] Char: sx, fix return in module init
Problem Details: If pci_register_driver fails, but eisa_driver_register doesn't, we don't call misc_deregister, but returns error. Return OK in such cases. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds...
```diff diff --git a/drivers/char/sx.c b/drivers/char/sx.c index 0122b2d93312..f506ee3243d1 100644 --- a/drivers/char/sx.c +++ b/drivers/char/sx.c @@ -2791,6 +2791,7 @@ static int __init sx_init(void) retval = 0; } else if (retval) { #ifdef CONFIG_EISA + retval = retval1; if (retval1) #endif misc_deregis...
42f6384fe4747f65dc27e8a5f96502204558203b
Analyze and fix the following issue in the Linux kernel code: [PATCH] Char: sx, lock boards struct
Problem Details: Fix race condition which may occurs when multiple cards are probed at the same time. Add mutex to critical sections to avoid this situation. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torval...
```diff diff --git a/drivers/char/sx.c b/drivers/char/sx.c index 50cd64262a13..42427f4d2ebd 100644 --- a/drivers/char/sx.c +++ b/drivers/char/sx.c @@ -298,6 +298,7 @@ static int sx_init_drivers(void); static struct tty_driver *sx_driver; +static DEFINE_MUTEX(sx_boards_lock); static struct sx_board boards[SX_NBOAR...
17c4edf0c8ee670de7b33d2a24eddd7c6b7edcf6
Analyze and fix the following issue in the Linux kernel code: [PATCH] Char: isicom, fix tty index check
Problem Details: Since tty->index is signed and may be < 0, we should assign this to int not uint. There is already a check to ensure if it is not negative, but gcc complains with -W flag enabled and it is perfectly correct: drivers/char/isicom.c:953: warning: comparison of unsigned expression < 0 is always false Fix...
```diff diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index adab41cdab65..5a747e685993 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c @@ -946,8 +946,8 @@ static int isicom_open(struct tty_struct *tty, struct file *filp) { struct isi_port *port; struct isi_board *card; - unsigned int li...
64bb6c5e1ddcd47c951740485026ef08975ee2e6
Analyze and fix the following issue in the Linux kernel code: [PATCH] tty_ioctl: use termios for the old structure and termios2 for the new
Problem Details: Having split out the user and kernel structures it turns out that some non glibc C libraries pull their termios struct from the kernel headers directly or indirectly. This means we must keep "struct termios" as the library sees it correct for the old ioctls. Not a big problem just shuffle the names a...
```diff diff --git a/drivers/char/tty_ioctl.c b/drivers/char/tty_ioctl.c index 30486df9fd3f..dee47f40c6a3 100644 --- a/drivers/char/tty_ioctl.c +++ b/drivers/char/tty_ioctl.c @@ -399,23 +399,27 @@ static int set_termios(struct tty_struct * tty, void __user *arg, int opt) if (retval) return retval; + memcpy(&tmp_...
edc6afc5496875a640bef0913604be7550c1795d
Analyze and fix the following issue in the Linux kernel code: [PATCH] tty: switch to ktermios and new framework
Problem Details: This is the core of the switch to the new framework. I've split it from the driver patches which are mostly search/replace and would encourage people to give this one a good hard stare. The references to BOTHER and ISHIFT are the termios values that must be defined by a platform once it wants to turn...
```diff diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 48cee2004e97..4044c864fdd4 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -109,13 +109,15 @@ #define TTY_PARANOIA_CHECK 1 #define CHECK_TTY_COUNT 1 -struct termios tty_std_termios = { /* for the benefit of tty drivers */ +s...
a0564e145525cf1ccbe17e0e3cd38db3b9e1b523
Analyze and fix the following issue in the Linux kernel code: [PATCH] Char: stallion, use pr_debug macro
Problem Details: Use pr_debug kernel macro instead of #ifdef DEBUG | printk() | #endif Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c index 5e2de62bce70..604a2448632d 100644 --- a/drivers/char/stallion.c +++ b/drivers/char/stallion.c @@ -735,9 +735,7 @@ static void __exit stallion_module_exit(void) stlport_t *portp; int i, j, k; -#ifdef DEBUG - printk("cleanup_module()\n");...
95a7b8b9a6453de2c52e469d1afdef80ca4607ae
Analyze and fix the following issue in the Linux kernel code: [PATCH] mxser-workqueue-fixes
Problem Details: Cc: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c index 4555d5973318..369d2742d6be 100644 --- a/drivers/char/mxser_new.c +++ b/drivers/char/mxser_new.c @@ -358,9 +358,9 @@ static void process_txrx_fifo(struct mxser_port *info) } } -static void mxser_do_softint(void *private_) +static void ...
7f5899252b5052387ee983d67bbc55eafd33a516
Analyze and fix the following issue in the Linux kernel code: [PATCH] Char: mxser_new, debug printk dependent on DEBUG
Problem Details: Print some debug info only when DEBUG is enabled (use pr_debug macro). Eliminate verbose kernel parameter which takes care of this. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c index 1ce36dcac86a..0f4660aea260 100644 --- a/drivers/char/mxser_new.c +++ b/drivers/char/mxser_new.c @@ -244,7 +244,6 @@ MODULE_DEVICE_TABLE(pci, mxser_pcibrds); static int ioaddr[MXSER_BOARDS] = { 0, 0, 0, 0 }; static int ttymajor = MXSERMAJOR...
06cc86b5bd4edcf5e7d68624f7d5c9951916f3d1
Analyze and fix the following issue in the Linux kernel code: [PATCH] Char: mxser_new, kill unneeded memsets
Problem Details: mxser_new, kill unneeded memsets There is no need to re-zero static global variables' memory, hence memsets doing this are useless. alloc_tty_struct also zeroes allocated memory: another candidate for removing. This fixes also a bug -- global structures are cleaned up after initialization of some it...
```diff diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c index 5a4c80d38c65..4ca97c4401d5 100644 --- a/drivers/char/mxser_new.c +++ b/drivers/char/mxser_new.c @@ -704,7 +704,6 @@ static int __init mxser_init(void) MXSER_VERSION); /* Initialize the tty_driver structure */ - memset(mxvar_sdriver, 0...
3306ce3d0554e2e59cc429b7133e17e1513307cb
Analyze and fix the following issue in the Linux kernel code: [PATCH] Char: mxser_new, upgrade to 1.9.1
Problem Details: Change cloned experimental driver according to original 1.9.1 moxa driver. Some int->ulong conversions, outb ~UART_IER_THRI constant. Remove commented stuff. I also added printk line with info, if somebody wants to test it, he may contact me as I can potentially debug the driver with him or just to c...
```diff diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c index 993e3a26c406..befff0548da3 100644 --- a/drivers/char/mxser_new.c +++ b/drivers/char/mxser_new.c @@ -1,7 +1,7 @@ /* * mxser.c -- MOXA Smartio/Industio family multiport serial driver. * - * Copyright (C) 1999-2001 Moxa Tec...
08a4ae44a7f5a0106c38de95adfd31b2a654b109
Analyze and fix the following issue in the Linux kernel code: [PATCH] mxser: session warning fix
Problem Details: Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c index a3aff0bd8e23..aae4cb31b9ac 100644 --- a/drivers/char/mxser_new.c +++ b/drivers/char/mxser_new.c @@ -997,7 +997,7 @@ static int mxser_open(struct tty_struct *tty, struct file *filp) mxser_change_speed(info, NULL); } - info->session = c...
8e087929df884dbb13e383d49d192bdd6928ecbf
Analyze and fix the following issue in the Linux kernel code: [PATCH] Generic ioremap_page_range: mips conversion
Problem Details: Convert MIPS to use generic ioremap_page_range() [yoichi_yuasa@tripeaks.co.jp: build fix] Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/arch/mips/mm/ioremap.c b/arch/mips/mm/ioremap.c index cea7d0ea36e4..fc2c96f0a1fd 100644 --- a/arch/mips/mm/ioremap.c +++ b/arch/mips/mm/ioremap.c @@ -6,98 +6,13 @@ * (C) Copyright 1995 1996 Linus Torvalds * (C) Copyright 2001, 2002 Ralf Baechle */ +#include <linux/mm.h> #include <linux/modul...
1ec320afdc9552c92191d5f89fcd1ebe588334ca
Analyze and fix the following issue in the Linux kernel code: [PATCH] add process_session() helper routine: deprecate old field
Problem Details: Add an anonymous union and ((deprecated)) to catch direct usage of the session field. [akpm@osdl.org: fix various missed conversions] [jdike@addtoit.com: fix UML bug] Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Cedric Le Goater <clg@fr.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-...
```diff diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 4ebba7ca1dc9..48cee2004e97 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -3855,7 +3855,7 @@ EXPORT_SYMBOL(proc_clear_tty); void __proc_set_tty(struct task_struct *tsk, struct tty_struct *tty) { if (tty) { - tty->session = ...
f0d1b0b30d250a07627ad8b9fbbb5c7cc08422e8
Analyze and fix the following issue in the Linux kernel code: [PATCH] LOG2: Implement a general integer log2 facility in the kernel
Problem Details: This facility provides three entry points: ilog2() Log base 2 of unsigned long ilog2_u32() Log base 2 of u32 ilog2_u64() Log base 2 of u64 These facilities can either be used inside functions on dynamic data: int do_something(long q) { ...; y = ilog2(x) ...; } Or can be used to statica...
```diff diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 7e55ea66c6d4..84caf50725b5 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig @@ -25,6 +25,14 @@ config RWSEM_XCHGADD_ALGORITHM bool default y +config ARCH_HAS_ILOG2_U32 + bool + default n + +config ARCH_HAS_ILOG2_U64 + bool + default n + c...
30e25b71e725b150585e17888b130e3324f8cf7c
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix generic WARN_ON message
Problem Details: A warning is a warning, not a BUG. Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index 47e3561638b1..a06eecd48292 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h @@ -35,7 +35,7 @@ struct bug_entry { #define WARN_ON(condition) ({ \ typeof(condition) __ret_warn_on = (condition); \ if (unlikel...
a8605aef813f8eb3ef4b80d32cba6a671ef8deb0
Analyze and fix the following issue in the Linux kernel code: [PATCH] use generic BUG for ppc
Problem Details: Switch ppc over to using the generic BUG implementation. Signed-off-by: Judith Lebzelter <judith@osdl.org> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: Michael Ellerman <michael@ellerman.id.au> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: ...
```diff diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index edf71a4ecc95..f76a146cff13 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig @@ -52,6 +52,11 @@ config ARCH_MAY_HAVE_PC_FDC bool default y +config GENERIC_BUG + bool + default y + depends on BUG + source "init/Kconfig" menu "Processor" diff --g...
e182c965b6ce0dffed0967a1be2173825a2ede2f
Analyze and fix the following issue in the Linux kernel code: [PATCH] UML: add generic BUG support
Problem Details: The BUG changes in -mm3 need some arch support. This patch adds the UML support needed. For the most part, it was stolen from the underlying architecture. The exception is the kernel eip < PAGE_OFFSET test, which is wrong for skas mode UMLs. Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Jeremy F...
```diff diff --git a/arch/um/Kconfig b/arch/um/Kconfig index 5ac1f2963ae3..d32a80e6668c 100644 --- a/arch/um/Kconfig +++ b/arch/um/Kconfig @@ -47,6 +47,11 @@ config GENERIC_CALIBRATE_DELAY bool default y +config GENERIC_BUG + bool + default y + depends on BUG + # Used in kernel/irq/manage.c and include/linux/irq...
c31a0bf3e1bc581676618db7492f18798fd0a73f
Analyze and fix the following issue in the Linux kernel code: [PATCH] Generic BUG for x86-64
Problem Details: This makes x86-64 use the generic BUG machinery. The main advantage in using the generic BUG machinery for x86-64 is that the inlined overhead of BUG is just the ud2a instruction; the file+line information are no longer inlined into the instruction stream. This reduces cache pollution. Signed-off-by...
```diff diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig index bfbb9bcae123..3254a616c69e 100644 --- a/arch/x86_64/Kconfig +++ b/arch/x86_64/Kconfig @@ -96,6 +96,11 @@ config AUDIT_ARCH bool default y +config GENERIC_BUG + bool + default y + depends on BUG + source "init/Kconfig" diff --git a/arch/x86_...
91768d6c2bad0d2766a166f13f2f57e197de3458
Analyze and fix the following issue in the Linux kernel code: [PATCH] Generic BUG for i386
Problem Details: This makes i386 use the generic BUG machinery. There are no functional changes from the old i386 implementation. The main advantage in using the generic BUG machinery for i386 is that the inlined overhead of BUG is just the ud2a instruction; the file+line(+function) information are no longer inlined ...
```diff diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index ea70359b02d0..c2362c7ba749 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig @@ -49,6 +49,11 @@ config GENERIC_IOMAP bool default y +config GENERIC_BUG + bool + default y + depends on BUG + config GENERIC_HWEIGHT bool default y diff --git ...
7664c5a1da4711bb6383117f51b94c8dc8f3f1cd
Analyze and fix the following issue in the Linux kernel code: [PATCH] Generic BUG implementation
Problem Details: This patch adds common handling for kernel BUGs, for use by architectures as they wish. The code is derived from arch/powerpc. The advantages of having common BUG handling are: - consistent BUG reporting across architectures - shared implementation of out-of-line file/line data - implement CONFIG_...
```diff diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index c92ae0f166ff..47e3561638b1 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h @@ -4,6 +4,22 @@ #include <linux/compiler.h> #ifdef CONFIG_BUG + +#ifdef CONFIG_GENERIC_BUG +#ifndef __ASSEMBLY__ +struct bug_entry { + u...
c48f70c3d046f021b1c22438604ef2a583380eca
Analyze and fix the following issue in the Linux kernel code: [PATCH] bdev: fix ->bd_part_count leak
Problem Details: Don't leak a ->bd_part_count when the partition open fails with -ENXIO. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/fs/block_dev.c b/fs/block_dev.c index 846f32d51be7..f3c3a44dd8b6 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -902,6 +902,7 @@ EXPORT_SYMBOL(bd_set_size); static int __blkdev_get(struct block_device *bdev, mode_t mode, unsigned flags, int for_part); +static int __blkdev_put(struct blo...
d63a5a74dee87883fda6b7d170244acaac5b05e8
Analyze and fix the following issue in the Linux kernel code: [PATCH] lockdep: avoid lockdep warning in md
Problem Details: md_open takes ->reconfig_mutex which causes lockdep to complain. This (normally) doesn't have deadlock potential as the possible conflict is with a reconfig_mutex in a different device. I say "normally" because if a loop were created in the array->member hierarchy a deadlock could happen. However th...
```diff diff --git a/drivers/md/md.c b/drivers/md/md.c index d2bcb410e3ab..3ce7a5d81d81 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -4423,7 +4423,7 @@ static int md_open(struct inode *inode, struct file *file) mddev_t *mddev = inode->i_bdev->bd_disk->private_data; int err; - if ((err = mddev_lock(mddev)...
24ec839c431eb79bb8f6abc00c4e1eb3b8c4d517
Analyze and fix the following issue in the Linux kernel code: [PATCH] tty: ->signal->tty locking
Problem Details: Fix the locking of signal->tty. Use ->sighand->siglock to protect ->signal->tty; this lock is already used by most other members of ->signal/->sighand. And unless we are 'current' or the tasklist_lock is held we need ->siglock to access ->signal anyway. (NOTE: sys_unshare() is broken wrt ->sighand l...
```diff diff --git a/arch/sparc64/solaris/misc.c b/arch/sparc64/solaris/misc.c index 9ed997982f8d..e84241d5f7f4 100644 --- a/arch/sparc64/solaris/misc.c +++ b/arch/sparc64/solaris/misc.c @@ -423,9 +423,7 @@ asmlinkage int solaris_procids(int cmd, s32 pid, s32 pgid) Solaris setpgrp and setsid? */ ret = sys_se...
562f9c574e0707f9159a729ea41faf53b221cd30
Analyze and fix the following issue in the Linux kernel code: [PATCH] time: re-add verify_pmtmr_rate
Problem Details: This patch re-adds the verify_pmtmr_rate functionality from 2.6.17 that I dropped 2.6.18. This resolves problems seen on older K6 ASUS boards where the ACPI PM timer runs too fast. See: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=211902 http://bugme.osdl.org/show_bug.cgi?id=2375 Thanks to I...
```diff diff --git a/drivers/clocksource/acpi_pm.c b/drivers/clocksource/acpi_pm.c index 7fcb77a9d011..8ab61ef97b4c 100644 --- a/drivers/clocksource/acpi_pm.c +++ b/drivers/clocksource/acpi_pm.c @@ -142,6 +142,39 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_LE, acpi_pm_check_grayl...
a2ee8649ba6d71416712e798276bf7c40b64e6e5
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix linux banner utsname information
Problem Details: utsname information is shown in the linux banner, which also is used for /proc/version (which can have different utsname values inside a uts namespaces). this patch makes the varying data arguments and changes the string to a format string, using those arguments. Signed-off-by: Herbert Poetzl <herber...
```diff diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index 51815cece6f3..9397ff62553e 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c @@ -252,8 +252,8 @@ static int version_read_proc(char *page, char **start, off_t off, { int len; - strcpy(page, linux_banner); - len = strlen(page); + len = spr...
6e2ac66470976ad7f57e0948572669b2bdfea2d0
Analyze and fix the following issue in the Linux kernel code: [PATCH] CPEI gets warning at kernel/irq/migration.c:27/move_masked_irq()
Problem Details: While running my MCA test (hardware error injection) on 2.6.19, I got some warning like following: > BUG: warning at kernel/irq/migration.c:27/move_masked_irq() > > Call Trace: > [<a000000100013d20>] show_stack+0x40/0xa0 > sp=e00000006b2578d0 bsp=e00000006b2510b0 > [<...
```diff diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c index 9a352667007c..61f5c717a8f5 100644 --- a/kernel/irq/proc.c +++ b/kernel/irq/proc.c @@ -54,7 +54,8 @@ static int irq_affinity_write_proc(struct file *file, const char __user *buffer, unsigned int irq = (int)(long)data, full_count = count, err; cpumask_t...
d93f7de8c5dfefb030a5e65d0857176879bf78e9
Analyze and fix the following issue in the Linux kernel code: [PATCH] m32r: bootloader support for OPSPUT platform
Problem Details: This patch supports "m32r-g00ff" bootloader for an OPSPUT platform. Applying this patch, it is possible to do ATA-boot from an IDE drive or HTTP-boot from network by m32r-g00ff. * arch/m32r/boot/compressed/m32r_sio.c: Fix hangup on OPSPUT at boot. * arch/m32r/kernel/io_opsput.c: IDE support ...
```diff diff --git a/arch/m32r/boot/compressed/m32r_sio.c b/arch/m32r/boot/compressed/m32r_sio.c index bce8af5e3bb2..ee3c8be12fa0 100644 --- a/arch/m32r/boot/compressed/m32r_sio.c +++ b/arch/m32r/boot/compressed/m32r_sio.c @@ -2,6 +2,7 @@ * arch/m32r/boot/compressed/m32r_sio.c * * 2003-02-12: Takeo Takahashi + * ...
6b8bd3f4b2e9d0fbfd0e7d75ba1cdc79c6876ecc
Analyze and fix the following issue in the Linux kernel code: [PATCH] m32r: fix ace_handler to pass full 32-bit address
Problem Details: Don't mask the lower 12-bit of the page fault address. In the current m32r kernel implementation, we use an access exception to detect page faults. This patch fixes ace_handler (access exception handler) for m32r. In order to check userspace address in do_page_fault, we have to pass full 32-bit addr...
```diff diff --git a/arch/m32r/kernel/entry.S b/arch/m32r/kernel/entry.S index 5b01fd2096fc..a2c472c0549f 100644 --- a/arch/m32r/kernel/entry.S +++ b/arch/m32r/kernel/entry.S @@ -596,8 +596,6 @@ ENTRY(ace_handler) beqz r1, inst oprand: ld r2, @(low(MDEVA_offset),r2) ; set address - srli r2, #12 - slli r2, #12 sr...
8b03a632ef673bf1069ac9c96c97ff2830289312
Analyze and fix the following issue in the Linux kernel code: [PATCH] m32r: make userspace headers platform-independent
Problem Details: The m32r kernel 2.6.18-rc1 or after cause build errors of "unknown isa configuration" for userspace application programs, such as glibc, gdb, etc. This is because the recent kernel do not include linux/config.h not to expose kernel headers for userspace. To fix the above compile errors, this patch fi...
```diff diff --git a/arch/m32r/kernel/entry.S b/arch/m32r/kernel/entry.S index ac6d840b382b..5b01fd2096fc 100644 --- a/arch/m32r/kernel/entry.S +++ b/arch/m32r/kernel/entry.S @@ -23,35 +23,35 @@ * updated in fork.c:copy_thread, signal.c:do_signal, * ptrace.c and ptrace.h * - * M32Rx/M32R2 M32R - * @(sp) ...
b8b50b6519afa9891b753c4fffa89d89e04df66a
Analyze and fix the following issue in the Linux kernel code: [PATCH] mm: fallback_alloc cpuset_zone_allowed irq fix
Problem Details: fallback_alloc() could end up calling cpuset_zone_allowed() with interrupts disabled (by code in kmem_cache_alloc_node()), but without __GFP_HARDWALL set, leading to a possible call of a sleeping function with interrupts disabled. This results in the BUG report: BUG: sleeping function called from i...
```diff diff --git a/mm/slab.c b/mm/slab.c index 068cb4503c15..e90b6100a927 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -3182,7 +3182,7 @@ retry: for (z = zonelist->zones; *z && !obj; z++) { nid = zone_to_nid(*z); - if (cpuset_zone_allowed(*z, flags) && + if (cpuset_zone_allowed(*z, flags | __GFP_HARDWALL) && ...
8df12925a04194e77081a855d688d6f5638acd9d
Analyze and fix the following issue in the Linux kernel code: [ARM] 4011/1: AT91SAM9260: Fix compilation with NAND driver
Problem Details: Add missing include for NAND device support on AT91SAM9260. Signed-off-by: Wojtek Kaniewski <wojtekka@toxygen.net> Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-at91rm9200/at91sam9260_devices.c b/arch/arm/mach-at91rm9200/at91sam9260_devices.c index a6c596dc4516..f42d3a40ec3c 100644 --- a/arch/arm/mach-at91rm9200/at91sam9260_devices.c +++ b/arch/arm/mach-at91rm9200/at91sam9260_devices.c @@ -18,6 +18,7 @@ #include <asm/arch/gpio.h> #include <...
c16375329c2ab4667df873394c4be7a61d163c62
Analyze and fix the following issue in the Linux kernel code: [S390] more workqueue fixes.
Problem Details: Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/drivers/s390/char/tape.h b/drivers/s390/char/tape.h index 1f4c89967be4..c9f1c4c8bb13 100644 --- a/drivers/s390/char/tape.h +++ b/drivers/s390/char/tape.h @@ -179,6 +179,7 @@ struct tape_char_data { /* Block Frontend Data */ struct tape_blk_data { + struct tape_device * device; /* Block device ...
e45ccc0562e3f391dcba8b2e8a02551e8e42d8db
Analyze and fix the following issue in the Linux kernel code: [S390] workqueue fixes.
Problem Details: Cc: David Howells <dhowells@redhat.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/drivers/s390/char/ctrlchar.c b/drivers/s390/char/ctrlchar.c index 49e9628d9297..c6cbcb3f925e 100644 --- a/drivers/s390/char/ctrlchar.c +++ b/drivers/s390/char/ctrlchar.c @@ -16,14 +16,15 @@ #ifdef CONFIG_MAGIC_SYSRQ static int ctrlchar_sysrq_key; +static struct tty_struct *sysrq_tty; static ...
4a0c50c07a6100ca58d465bac951533347e18d71
Analyze and fix the following issue in the Linux kernel code: [MTD] nandsim: bugfix in page addressing
Problem Details: Number of address bytes for 64-128 MiB NANDs is 4, not 5. Signed-off-by: Artem Bityutskiy <dedekind@infradead.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c index 3d39451ae8f5..c3bca9590ad2 100644 --- a/drivers/mtd/nand/nandsim.c +++ b/drivers/mtd/nand/nandsim.c @@ -160,7 +160,7 @@ MODULE_PARM_DESC(dbg, "Output debug information if not zero"); /* After a command is input, the simulator...
50954ab327a9f860caef1a7c8353346b945cb316
Analyze and fix the following issue in the Linux kernel code: [AVR32] Pass dev parameter to dma_cache_sync()
Problem Details: Fix build breakage resulting from the extra dev parameter added to dma_cache_sync(). Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
```diff diff --git a/include/asm-avr32/dma-mapping.h b/include/asm-avr32/dma-mapping.h index 0580b5d62bba..5c01e27f0b41 100644 --- a/include/asm-avr32/dma-mapping.h +++ b/include/asm-avr32/dma-mapping.h @@ -109,7 +109,7 @@ static inline dma_addr_t dma_map_single(struct device *dev, void *cpu_addr, size_t size, ...
a147c5857c0b591b05d787e59b691c3a4f245f83
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix 440SPe CPU table entry
Problem Details: The 440SPe CPU table entry was missing the CPU_FTR_NODSISRALIGN and really should have been CPU_FTRS_44X. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
```diff diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 11bfbaf655b5..b742013bb9da 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c @@ -1136,8 +1136,7 @@ static struct cpu_spec cpu_specs[] = { .pvr_mask = 0xff000fff, .pvr_value = 0x53000890, ...
5c4064124a5720a2576eb4bd5b7200d70052e9b5
Analyze and fix the following issue in the Linux kernel code: ACPI: ec: Increase timeout from 50 to 500 ms to handle old slow machines.
Problem Details: http://bugzilla.kernel.org/show_bug.cgi?id=7466 Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 3ffe172d1a88..46a132d613bc 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -65,10 +65,10 @@ enum { ACPI_EC_EVENT_IBF_0, /* Input buffer empty */ }; -#define ACPI_EC_DELAY 50 /* Wait 50ms max. during EC ops */ +#define ACPI_EC_DELAY 500 /...
bff19b1d0b2c62882ca4b8f900b52f410c09e967
Analyze and fix the following issue in the Linux kernel code: Input: ucb1400 - fix compile error
Problem Details: try_to_freeze() was moved into include/linux/freezer.h Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/touchscreen/ucb1400_ts.c b/drivers/input/touchscreen/ucb1400_ts.c index 6ef08369f65b..4358a0a78eaa 100644 --- a/drivers/input/touchscreen/ucb1400_ts.c +++ b/drivers/input/touchscreen/ucb1400_ts.c @@ -17,7 +17,6 @@ #include <linux/module.h> #include <linux/moduleparam.h> #include <l...
396a1a5832ae28ce2c4150f98827873cbef554f5
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix mmap of PCI resource with hack for X
Problem Details: The powerpc version of pci_resource_to_user() and associated hooks used by /proc/bus/pci and /sys/bus/pci mmap have been broken for some time on machines that don't have a 1:1 mapping of devices (basically on non-PowerMacs) and have PCI devices above 32 bits. This attempts to fix it as well as possibl...
```diff diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c index 2f54cd81dea5..ab5887bff02a 100644 --- a/arch/powerpc/kernel/pci_32.c +++ b/arch/powerpc/kernel/pci_32.c @@ -1544,7 +1544,7 @@ pci_resource_to_bus(struct pci_dev *pdev, struct resource *res) static struct resource *__pci_mmap_mak...
22b6e590478ae8757f0411cf16a24c25d8dfea86
Analyze and fix the following issue in the Linux kernel code: [POWERPC] cbe_thermal: Fix initialization of sysfs attribute_group
Problem Details: This patch adds NULL to the initialization of the attribute_groups. The spu_attributes and ppe_attributes arrays are arrays of pointers that need to be terminated with a NULL entry. Signed-off-by: Christian Krafft <krafft@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/platforms/cell/cbe_thermal.c b/arch/powerpc/platforms/cell/cbe_thermal.c index 616a0a3fd0e2..70e0d968d30f 100644 --- a/arch/powerpc/platforms/cell/cbe_thermal.c +++ b/arch/powerpc/platforms/cell/cbe_thermal.c @@ -115,6 +115,7 @@ static struct sysdev_attribute attr_spu_temperature = { ...
30d368430e71bbeaa52ae978b10b6f5f6267d912
Analyze and fix the following issue in the Linux kernel code: [POWERPC] of_platform_make_bus_id(): make `magic' int
Problem Details: of_platform_make_bus_id(): Kill a compiler warning which is a real bug on PPC64 by changing `magic' to `int'. Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c index b3189d0161b8..3002ea3a61a2 100644 --- a/arch/powerpc/kernel/of_platform.c +++ b/arch/powerpc/kernel/of_platform.c @@ -169,7 +169,7 @@ static void of_platform_make_bus_id(struct of_device *dev) char *name = dev->dev.bus_id...
d0e70341c05f6c31375530e0ae29b319153004a7
Analyze and fix the following issue in the Linux kernel code: [POWERPC] EEH recovery tweaks
Problem Details: If one attempts to create a device driver recovery sequence that does not depend on a hard reset of the device, but simply just attempts to resume processing, then one discovers that the recovery sequence implemented on powerpc is not quite right. This patch fixes this up. Signed-off-by: Linas Vepstas...
```diff diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index 3c2d63ebf787..da6e5362e7cd 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c @@ -337,6 +337,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev) pri...
1d4454e7ce30239e67b154ae08f6d906b9737334
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Define pci_unmap_addr() et al. when CONFIG_NOT_COHERENT_CACHE=y
Problem Details: The current PowerPC code makes pci_unmap_addr(), pci_unmap_addr_set(), and friends trivial for all 32-bit kernels. This is reasonable, since for those kernels it is true that pci_unmap_single() does not need the DMA address from the original DMA mapping -- in fact, it is a NOP. However, I recently tr...
```diff diff --git a/include/asm-powerpc/pci.h b/include/asm-powerpc/pci.h index 16f13319c769..ac656ee6bb19 100644 --- a/include/asm-powerpc/pci.h +++ b/include/asm-powerpc/pci.h @@ -143,8 +143,13 @@ int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma, /* Tell drivers/pci/proc.c that we have pci_m...
6858f3bf6e856d10a932d2d167d3f34e366042c6
Analyze and fix the following issue in the Linux kernel code: [PATCH] WorkStruct: Fix up some PA-RISC work items
Problem Details: Fix up some PA-RISC work items broken by the workstruct reduction. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
```diff diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c index 8dac2ba82bb9..6818c10c0c46 100644 --- a/drivers/parisc/led.c +++ b/drivers/parisc/led.c @@ -66,8 +66,8 @@ static char lcd_text_default[32] __read_mostly; static struct workqueue_struct *led_wq; -static void led_work_func(void *); -static DECLA...
f8fc18a1323c3f4171a643d6ebf1597f4ba8bc53
Analyze and fix the following issue in the Linux kernel code: [TRIVIAL] [PARISC] Fix module.c printk message, add missing ')'
Problem Details: Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
```diff diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c index f50b982b0834..47ea4e4a2179 100644 --- a/arch/parisc/kernel/module.c +++ b/arch/parisc/kernel/module.c @@ -822,7 +822,8 @@ int module_finalize(const Elf_Ehdr *hdr, me->name, strtab, symhdr); if(me->arch.got_count > MAX_GOTS...
353dfe1290bdce1d40609e35ca6e42829623ff5f
Analyze and fix the following issue in the Linux kernel code: [PARISC] Fix PCI bus numbering in the presence of Cardbus bridges
Problem Details: Firmware ignores Cardbus bridges, so when Linux assigns bus numbers, it must override firmware's notion of what the busses are numbered. This is not sufficient to support the Cardbus bridge as there is also no interrupt routing table entry for them. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signe...
```diff diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c index ad4a1a12a1ae..eae0812f01a5 100644 --- a/drivers/parisc/lba_pci.c +++ b/drivers/parisc/lba_pci.c @@ -1406,13 +1406,20 @@ lba_hw_init(struct lba_device *d) return 0; } - +/* + * Unfortunately, when firmware numbers busses, it doesn't take...
e51ec241784f516ad3a916a24ac936364cd10d63
Analyze and fix the following issue in the Linux kernel code: [PARISC] more sparse fixes
Problem Details: 0/NULL changes, __user annotations, __iomem annotations Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
```diff diff --git a/arch/parisc/hpux/fs.c b/arch/parisc/hpux/fs.c index 4204cd1f3cf9..c7a81a2c014c 100644 --- a/arch/parisc/hpux/fs.c +++ b/arch/parisc/hpux/fs.c @@ -35,13 +35,13 @@ int hpux_execve(struct pt_regs *regs) int error; char *filename; - filename = getname((char *) regs->gr[26]); + filename = getname(...
c2c4798e04ef836b12f5df04e7d1a1710cb39301
Analyze and fix the following issue in the Linux kernel code: [PARISC] sparse fixes
Problem Details: 0/NULL, missing __user, missing __iomem, non-ANSI prototype. Signed-off-by: Matthew Wilcox <willy@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
```diff diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 2f9f9dfa66f7..dfca014b49ba 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c @@ -355,8 +355,8 @@ asmlinkage int sys_execve(struct pt_regs *regs) error = PTR_ERR(filename); if (IS_ERR(filename)) goto ...
423c8ece2941a7ee9b003564d5aab789b9b330d8
Analyze and fix the following issue in the Linux kernel code: [PARISC] parisc-agp: Fix integer/pointer warning
Problem Details: Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
```diff diff --git a/drivers/char/agp/parisc-agp.c b/drivers/char/agp/parisc-agp.c index 17c50b0f83f0..30cc7aeae9ab 100644 --- a/drivers/char/agp/parisc-agp.c +++ b/drivers/char/agp/parisc-agp.c @@ -235,7 +235,7 @@ static int __init agp_ioc_init(void __iomem *ioc_regs) { struct _parisc_agp_info *info = &parisc_agp_...
4bd5d82779466a2969c631ce283bef926680c9f5
Analyze and fix the following issue in the Linux kernel code: [PARISC] [MUX] Mux driver bug fix
Problem Details: This patch addresses the problems identified by Russell King in the following email: http://lists.parisc-linux.org/pipermail/parisc-linux/2005-December/027912.html Signed-off-by: Ryan Bradetich <rbrad@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
```diff diff --git a/drivers/serial/mux.c b/drivers/serial/mux.c index 8ad1b8c5ec5d..ec57a616788b 100644 --- a/drivers/serial/mux.c +++ b/drivers/serial/mux.c @@ -51,7 +51,11 @@ #define MUX_NR 256 static unsigned int port_cnt __read_mostly; -static struct uart_port mux_ports[MUX_NR]; +struct mux_port { + struct uar...
075b8783da0db700868c7b391636a85c06a89678
Analyze and fix the following issue in the Linux kernel code: [PARISC] HPPB bus updates for E-Class systems
Problem Details: This patch addresses the following issues: * Removes an incorrect comment. * Fixes a couple of compiler warnings. * Properly detects the HP-PB bus on E-Class systems. Signed-off-by: Ryan Bradetich <rbrad@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
```diff diff --git a/drivers/parisc/hppb.c b/drivers/parisc/hppb.c index 07dc2b6d4e93..9bb4db552f3c 100644 --- a/drivers/parisc/hppb.c +++ b/drivers/parisc/hppb.c @@ -10,10 +10,6 @@ ** the Free Software Foundation; either version 2 of the License, or ** (at your option) any later version. ** -** This Driver currentl...
328d968e4fbbd439760c04de95998faeb092a9ed
Analyze and fix the following issue in the Linux kernel code: [PARISC] Fix ccio_request_resource when CONFIG_IOMMU_CCIO is not defined
Problem Details: This patch fixes the ccio_request_resource to work properly when the CONFIG_IOMMU_CCIO is not defined. This patch was tested on my E35. Signed-off-by: Ryan Bradetich <rbrad@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
```diff diff --git a/include/asm-parisc/dma-mapping.h b/include/asm-parisc/dma-mapping.h index 66f0b408c669..c6c0e9ff6bde 100644 --- a/include/asm-parisc/dma-mapping.h +++ b/include/asm-parisc/dma-mapping.h @@ -236,7 +236,7 @@ int ccio_allocate_resource(const struct parisc_device *dev, unsigned long min, unsigned lo...
885ed0fb484cc2d0a539558edf47a2a7c4fdd664
Analyze and fix the following issue in the Linux kernel code: [POWERPC] powerpc: fix build error in rom.c
Problem Details: Add missing include in rom.c. Fixes this build error when CONFIG_MTD=y: arch/powerpc/sysdev/rom.c:26: error: implicit declaration of function of_platform_device_create Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/sysdev/rom.c b/arch/powerpc/sysdev/rom.c index bf5b3f10e6c6..c855a3b298a3 100644 --- a/arch/powerpc/sysdev/rom.c +++ b/arch/powerpc/sysdev/rom.c @@ -9,6 +9,7 @@ #include <linux/kernel.h> #include <asm/of_device.h> +#include <asm/of_platform.h> static int __init powerpc_flash_ini...
be9575af7e8ec9040330f57b974e52d6921c08bb
Analyze and fix the following issue in the Linux kernel code: [POWERPC] cell: Fix spu_info.h header export
Problem Details: It uses #ifdef __KERNEL__, so needs to be processed with unifdef. Signed-off-by: Arnd Bergann <arnd.bergmann@de.ibm.com> Acked-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/include/asm-powerpc/Kbuild b/include/asm-powerpc/Kbuild index 1e637381c118..703970fb0ec0 100644 --- a/include/asm-powerpc/Kbuild +++ b/include/asm-powerpc/Kbuild @@ -17,7 +17,6 @@ header-y += ipc.h header-y += poll.h header-y += shmparam.h header-y += sockios.h -header-y += spu_info.h header-y ...
06ba30b6bfb30c84b70fed681b8c920dbff5d5a4
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Cleanup pass over platforms/pseries/hotplug-cpu.c
Problem Details: Purely cosmetic. Change pSeries to pseries inline with other parts of the kernel, and fix an overly long line. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c index e78e8ac95550..f460b9cbfd46 100644 --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c @@ -53,7 +53,7 @@ static void rtas_stop_self(void) panic("Alas,...
a081e126e12f78651499ba0f9944a7df1e9b06b6
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix cell pmu initialisation
Problem Details: Make sure that the pmu is not initialised unless we are running on a cell. Also make the init routine 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/cell/pmu.c b/arch/powerpc/platforms/cell/pmu.c index 99c612025e8f..d04ae1671e6c 100644 --- a/arch/powerpc/platforms/cell/pmu.c +++ b/arch/powerpc/platforms/cell/pmu.c @@ -382,11 +382,14 @@ static irqreturn_t cbe_pm_irq(int irq, void *dev_id) return IRQ_HANDLED; } -int __...
33ec32fae0e2c4433bfd1e74cbde6cb16604a719
Analyze and fix the following issue in the Linux kernel code: [CIFS] Fix NTLMv2 mounts to Windows servers
Problem Details: Windows servers are pickier about NTLMv2 than Samba. This enables more secure mounts to Windows (not just Samba) ie when "sec=ntlmv2" is specified on the mount. Signed-off-by: Steve French <sfrench@us.ibm.com>
```diff diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES index 0b3c37ef52e0..3539d6ef9611 100644 --- a/fs/cifs/CHANGES +++ b/fs/cifs/CHANGES @@ -5,7 +5,8 @@ Allow null user to be specified on mount ("username="). Do not return EINVAL on readdir when filldir fails due to overwritten blocksize (fixes FC problem). Return...
7174d852603ced7a161f47c6e3958073706114a9
Analyze and fix the following issue in the Linux kernel code: [ARM] 3983/2: remove unused argument to __bug()
Problem Details: It appears that include/asm-arm/bug.h requires include/linux/stddef.h for the definition of NULL. It seems that stddef.h was always included indirectly in most cases, and that issue was properly fixed a while ago. Then commit 5047f09b56d0bc3c21aec9cb16de60283da645c6 incorrectly reverted change from co...
```diff diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index bede380c07a9..042a12982e98 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c @@ -631,12 +631,9 @@ baddataabort(int code, unsigned long instr, struct pt_regs *regs) notify_die("unknown data abort code", regs, &info, instr, 0)...
8252bbb1363b7fe963a3eb6f8a36da619a6f5a65
Analyze and fix the following issue in the Linux kernel code: ieee1394: nodemgr: fix deadlock in shutdown
Problem Details: If "modprobe ohci1394" was quickly followed by "modprobe -r ohci1394", say with 1 second pause in between, the modprobe -r got stuck in uninterruptible sleep in kthread_stop. At the same time the knodemgrd slept uninterruptibly in bus_rescan_devices_helper. That's because driver_detach took the semap...
```diff diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c index d672b4db5b74..d90ec6de8183 100644 --- a/drivers/ieee1394/nodemgr.c +++ b/drivers/ieee1394/nodemgr.c @@ -14,6 +14,7 @@ #include <linux/slab.h> #include <linux/delay.h> #include <linux/kthread.h> +#include <linux/module.h> #include <li...
48cfae44b4d6c7ca843d611a93ed2f94b59bcb38
Analyze and fix the following issue in the Linux kernel code: ieee1394: ohci1394: add PPC_PMAC platform code to driver probe
Problem Details: Fixes http://bugzilla.kernel.org/show_bug.cgi?id=7431 iBook G3 threw a machine check exception and put the display backlight to full brightness after ohci1394 was unloaded and reloaded. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
```diff diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c index b8e922b65e2e..453d0be694e4 100644 --- a/drivers/ieee1394/ohci1394.c +++ b/drivers/ieee1394/ohci1394.c @@ -3215,6 +3215,19 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev, struct ti_ohci *ohci; /* shortcut to currently ...
74e86ab884fb491c208905bdc32a9d95740be583
Analyze and fix the following issue in the Linux kernel code: [WATCHDOG] rm9k_wdt: fix interrupt handler arguments
Problem Details: Removed 'struct pt_regs *' from interrupt handler arguments. Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
```diff diff --git a/drivers/char/watchdog/rm9k_wdt.c b/drivers/char/watchdog/rm9k_wdt.c index bc7def48e0e6..7576a13e86bc 100644 --- a/drivers/char/watchdog/rm9k_wdt.c +++ b/drivers/char/watchdog/rm9k_wdt.c @@ -47,7 +47,7 @@ /* Function prototypes */ -static irqreturn_t wdt_gpi_irqhdl(int, void *, struct pt_regs *...
bec4f749cb75d30cebf9837985a06474f595f3ae
Analyze and fix the following issue in the Linux kernel code: [WATCHDOG] rm9k_wdt: fix compilation
Problem Details: Driver did not compile any more. Someone moved the definition of 'struct miscdevice miscdev' to a place near the end of the file, after some code that was refering to this variable. Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
```diff diff --git a/drivers/char/watchdog/rm9k_wdt.c b/drivers/char/watchdog/rm9k_wdt.c index ec3909371c21..bc7def48e0e6 100644 --- a/drivers/char/watchdog/rm9k_wdt.c +++ b/drivers/char/watchdog/rm9k_wdt.c @@ -94,6 +94,26 @@ module_param(nowayout, bool, 0444); MODULE_PARM_DESC(nowayout, "Watchdog cannot be disabled o...
edf1fb213e5df03983b91bb050bdd2914465a843
Analyze and fix the following issue in the Linux kernel code: ieee1394: sbp2: remove debug macros
Problem Details: No need to keep them in released sources. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
```diff diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index ecbb5ee500ab..6bd26a91111e 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c @@ -179,54 +179,9 @@ MODULE_PARM_DESC(workarounds, "Work around device bugs (default = 0" ", override internal blacklist = " __stringify(SBP2_WORKA...
66743e061f6f31ac81fb8a1e9edb2ff92ef24df2
Analyze and fix the following issue in the Linux kernel code: ieee1394: sbp2: remove irritating log message
Problem Details: The queue depth can be read from /sys/bus/scsi/devices/*/queue_depth, so don't log it. And the hint about speed improvements is misleading, at least under current kernels. If serialization is switched off, read performance is typically increased by less than 10%. (I did not test write performance re...
```diff diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index e5ba55bbd935..becd98d411ec 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c @@ -2670,8 +2670,6 @@ static int sbp2_module_init(void) /* Module load debug option to force one command at a time (serializing I/O) */ if (ser...
1f72cf5251a8f806a8930ae2cd152aa79fd0de83
Analyze and fix the following issue in the Linux kernel code: ieee1394: nodemgr: take it easy if bus_rescan_devices fails
Problem Details: This happens. No need to log a BUG trace. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
```diff diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c index 801f60619236..89a4bd4c842d 100644 --- a/drivers/ieee1394/nodemgr.c +++ b/drivers/ieee1394/nodemgr.c @@ -1600,9 +1600,8 @@ static void nodemgr_node_probe(struct host_info *hi, int generation) * just removed. */ if (generation == g...
7f5880394c8ab01854c0cba288352a1a77d5ea82
Analyze and fix the following issue in the Linux kernel code: ieee1394: fix printk format warning
Problem Details: Fix printk format warning: drivers/ieee1394/nodemgr.c:364: warning: long long unsigned int format, u64 arg (arg 3) Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
```diff diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c index e2ca8e92f43f..640d677ae03e 100644 --- a/drivers/ieee1394/nodemgr.c +++ b/drivers/ieee1394/nodemgr.c @@ -362,7 +362,7 @@ static ssize_t fw_show_ne_tlabels_mask(struct device *dev, #endif spin_unlock_irqrestore(&hpsb_tlabel_lock, flags)...
b07375b155a0d2ed21a64db68e737da1f19385f7
Analyze and fix the following issue in the Linux kernel code: ieee1394: nodemgr: revise semaphore protection of driver core data
Problem Details: - The list "struct class.children" is supposed to be protected by class.sem, not by class.subsys.rwsem. - nodemgr_remove_uds() iterated over nodemgr_ud_class.children without proper protection. This was never observed as a bug since the code is usually only accessed by knodemgrd. All knode...
```diff diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c index bffa26e48152..e2ca8e92f43f 100644 --- a/drivers/ieee1394/nodemgr.c +++ b/drivers/ieee1394/nodemgr.c @@ -374,11 +374,11 @@ static ssize_t fw_set_ignore_driver(struct device *dev, struct device_attribute int state = simple_strtoul(buf, N...
b7cffc57a777722941cfd904fcdbb47fc615b808
Analyze and fix the following issue in the Linux kernel code: ieee1394: nodemgr: small fix after sysfs errors patch
Problem Details: One hunk in "ieee1394: handle sysfs errors" was wrong. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
```diff diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c index e95fe400e04d..b79ff695ca3c 100644 --- a/drivers/ieee1394/nodemgr.c +++ b/drivers/ieee1394/nodemgr.c @@ -1233,7 +1233,7 @@ int hpsb_register_protocol(struct hpsb_protocol_driver *driver) if (!ret) nodemgr_create_drv_files(driver); ...
b0f40ea04a85b077193676cec78a86cd61495680
Analyze and fix the following issue in the Linux kernel code: [IA64] Fix DISCONTIGMEM without VIRTUAL_MEM_MAP
Problem Details: make allnoconfig currently fails to build because it selects DISCONTIGMEM without VIRTUAL_MEM_MAP. I see no particular reason this combination ought to fail, so I fixed it by: - Including memory_model.h in all circumstances, except when both DISCONTIGMEM and VIRTUAL_MEM_MAP are enabled. - Defini...
```diff diff --git a/include/asm-ia64/page.h b/include/asm-ia64/page.h index 947cb72b520e..485759ba9e36 100644 --- a/include/asm-ia64/page.h +++ b/include/asm-ia64/page.h @@ -101,7 +101,7 @@ do { \ #ifdef CONFIG_VIRTUAL_MEM_MAP extern int ia64_pfn_valid (unsigned long pfn); -#elif defined(CONFIG_FLATMEM) +#els...
17e77b1cc31454908aa286bb1db3c611295ce25c
Analyze and fix the following issue in the Linux kernel code: [PATCH] Add support for type argument in PAL_GET_PSTATE
Problem Details: PAL_GET_PSTATE accepts a type argument to return different kinds of frequency information. Refer: Intel ItaniumArchitecture Software Developer's Manual - Volume 2: System Architecture, Revision 2.2 (http://developer.intel.com/design/itanium/manuals/245318.htm) Add the support for type argument and use...
```diff diff --git a/arch/ia64/kernel/cpufreq/acpi-cpufreq.c b/arch/ia64/kernel/cpufreq/acpi-cpufreq.c index 86faf221a070..088f130197ae 100644 --- a/arch/ia64/kernel/cpufreq/acpi-cpufreq.c +++ b/arch/ia64/kernel/cpufreq/acpi-cpufreq.c @@ -68,7 +68,8 @@ processor_get_pstate ( dprintk("processor_get_pstate\n"); - r...
6dbfc19b7ea93f94f1efabaae71a921b49d8cae2
Analyze and fix the following issue in the Linux kernel code: [IA64] tidy up return value of ip_fast_csum
Problem Details: While working on implementing csum_ipv6_magic, I noticed that current version of ip_fast_csum will potentially return bits above "unsigned short" as 1. While no harm is done right now because all call sites will chop off the upper bits when it uses the return value. However, this is still dangerous a...
```diff diff --git a/arch/ia64/lib/ip_fast_csum.S b/arch/ia64/lib/ip_fast_csum.S index 4fb132ee207a..1f86aeb2c948 100644 --- a/arch/ia64/lib/ip_fast_csum.S +++ b/arch/ia64/lib/ip_fast_csum.S @@ -68,8 +68,9 @@ GLOBAL_ENTRY(ip_fast_csum) zxt2 r20=r20 ;; add r20=ret0,r20 + mov r9=0xffff ;; - andcm ret0=-1,r20 + an...
68380b581383c028830f79ec2670f4a193854aa6
Analyze and fix the following issue in the Linux kernel code: Add "run_scheduled_work()" workqueue function
Problem Details: This allows workqueue users to run just their own pending work, rather than wait for the whole workqueue to finish running. This solves the deadlock with networking libphy that was due to other workqueue entries possibly needing a lock that was held by the routine that wanted to flush its own work. I...
```diff diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 4044bb1ada86..e175f3910b18 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -587,8 +587,7 @@ int phy_stop_interrupts(struct phy_device *phydev) * Finish any pending work; we might have been scheduled * to be called from keve...
7d1c520bb57e4b5e94ec937c13553dccf473341b
Analyze and fix the following issue in the Linux kernel code: [PATCH] ext3 balloc: fix _with_rsv freeze
Problem Details: Port fix to the off-by-one in find_next_usable_block's memscan from ext2 to ext3; but it didn't cause a serious problem for ext3 because the additional ext3_test_allocatable check rescued it from the error. Signed-off-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: Hugh Dickins <hugh@veritas.com> Cc:...
```diff diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c index 5a2c198762f0..22161740ba29 100644 --- a/fs/ext3/balloc.c +++ b/fs/ext3/balloc.c @@ -730,7 +730,7 @@ find_next_usable_block(ext3_grpblk_t start, struct buffer_head *bh, here = 0; p = ((char *)bh->b_data) + (here >> 3); - r = memscan(p, 0, (maxblocks -...
ff50dc562bf6de00fec264b11531e2745209ba12
Analyze and fix the following issue in the Linux kernel code: [PATCH] ext3 balloc: fix off-by-one against rsv_end
Problem Details: rsv_end is the last block within the reservation, so alloc_new_reservation should accept start_block == rsv_end as success. Signed-off-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: Hugh Dickins <hugh@veritas.com> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-o...
```diff diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c index 0706a45d3c07..57cf47a9420e 100644 --- a/fs/ext3/balloc.c +++ b/fs/ext3/balloc.c @@ -1148,7 +1148,7 @@ retry: * check if the first free block is within the * free space we just reserved */ - if (start_block >= my_rsv->rsv_start && start_block < my_r...
1650242324a0c19d629a8be0d5a8ecdc174d31f8
Analyze and fix the following issue in the Linux kernel code: [PATCH] ext3 balloc: fix off-by-one against grp_goal
Problem Details: grp_goal 0 is a genuine goal (unlike -1), so ext3_try_to_allocate_with_rsv should treat it as such. Signed-off-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: Hugh Dickins <hugh@veritas.com> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <t...
```diff diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c index db8ca34d102a..0706a45d3c07 100644 --- a/fs/ext3/balloc.c +++ b/fs/ext3/balloc.c @@ -1271,7 +1271,7 @@ ext3_try_to_allocate_with_rsv(struct super_block *sb, handle_t *handle, } /* * grp_goal is a group relative block number (if there is a goal) - * 0...
1aa16eeacd6f10c202da1cf0cff5c81107dac942
Analyze and fix the following issue in the Linux kernel code: [PATCH] IPMI: fix PROC_FS=n warnings
Problem Details: Fix build warnings for PROC_FS=n. drivers/char/ipmi/ipmi_poweroff.c:707: warning: label 'out_err' defined but not used drivers/char/ipmi/ipmi_msghandler.c:1774: warning: 'ipmb_file_read_proc' defined but not used drivers/char/ipmi/ipmi_msghandler.c:1790: warning: 'version_file_read_proc' define...
```diff diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index ff0e68f0386b..5703ee28e1cc 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -1769,6 +1769,7 @@ int ipmi_request_supply_msgs(ipmi_user_t user, -1, 0); } ...
168b35a7f67c5a8189e6b92780dfb5262604057c
Analyze and fix the following issue in the Linux kernel code: [PATCH] IPMI: fix pci warning
Problem Details: Change pci_module_init() to the new interface, and check the return code to avoid warnings and give the user useful information if this fails. Signed-off-by: Corey Minyard <minyard@acm.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 8b36b5036391..c7de2e86a6dc 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c @@ -2774,7 +2774,12 @@ static __devinit int init_ipmi_si(void) #endif #ifdef CONFIG_PCI - pci_module_init(&ip...
55162fb165571b3ba4283fe657f1a5968cef361a
Analyze and fix the following issue in the Linux kernel code: [PATCH] IPMI: fix request events
Problem Details: When the IPMI message handler requested that the interface look for events, the ipmi_si driver would request flags, see if the event buffer full flag was set, then request events. It's better to just send the request for events, as it cuts one message out of the transaction if there happens to be even...
```diff diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index f04bee76ba2b..c02f5177a816 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c @@ -684,22 +684,24 @@ static enum si_sm_result smi_event_handler(struct smi_info *smi_info, { /* We are idle...
f0b55da0d2701230e973866c9dfbf932d8b884cb
Analyze and fix the following issue in the Linux kernel code: [PATCH] IPMI: Fix device model name
Problem Details: Add the product id to the driver model platform device name, in addition to the device id. The IPMI spec does not require that individual BMCs in a system have unique devices IDs, but it does require that the product id/device id combination be unique. This also removes a redundant check and cleans u...
```diff diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index c47add8e47df..da13df46e984 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -1817,13 +1817,12 @@ static int __find_bmc_prod_dev_id(struct device *dev, void *data) struct bm...
70e4506765602cca047cfa31933836e354c61a63
Analyze and fix the following issue in the Linux kernel code: [PATCH] lockdep: register_lock_class() fix
Problem Details: The hash_lock must only ever be taken with irqs disabled. This happens in all the important places, except one codepath: register_lock_class(). The race should trigger rarely because register_lock_class() is quite rare and single-threaded (happens during init most of the time). The fix is to disable...
```diff diff --git a/kernel/lockdep.c b/kernel/lockdep.c index 3926c3674354..62e73ce68197 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c @@ -1182,6 +1182,7 @@ register_lock_class(struct lockdep_map *lock, unsigned int subclass, int force) struct lockdep_subclass_key *key; struct list_head *hash_head; struct...
feb189274638ea357750a9e809f5a6e2223a082e
Analyze and fix the following issue in the Linux kernel code: [PATCH] ext4: fix credit calculation in ext4_ext_calc_credits_for_insert
Problem Details: Fix a nit in ext4_ext_calc_credits_for_insert(). Besides, credits for the new root are already added in the index split accounting. Signed-off-by: Johann Lombardi <johann.lombardi@bull.net> Signed-off-by: Alex Tomas <alex@clusterfs.com> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <a...
```diff diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 1442ccbaea79..994a6e450e06 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -1531,16 +1531,17 @@ int inline ext4_ext_calc_credits_for_insert(struct inode *inode, /* * tree can be full, so it would need to grow in depth: - * allocation + o...
15ad7cdcfd76450d4beebc789ec646664238184d
Analyze and fix the following issue in the Linux kernel code: [PATCH] struct seq_operations and struct file_operations constification
Problem Details: - move some file_operations structs into the .rodata section - move static strings from policy_types[] array into the .rodata section - fix generic seq_operations usages, so that those structs may be defined as "const" as well [akpm@osdl.org: couple of fixes] Signed-off-by: Helge Deller <deller...
```diff diff --git a/fs/seq_file.c b/fs/seq_file.c index 555b9ac04c25..10690aa401c7 100644 --- a/fs/seq_file.c +++ b/fs/seq_file.c @@ -26,7 +26,7 @@ * ERR_PTR(error). In the end of sequence they return %NULL. ->show() * returns 0 in case of success and negative number in case of error. */ -int seq_open(struct fi...
4b358e22064b4551aa8b4dcfe3efe70a13548676
Analyze and fix the following issue in the Linux kernel code: [PATCH] cleanup include/asm-generic/atomic.h
Problem Details: cleanup asm-generic/atomic.h - no longer a userspace header - remove the unneeded #include <asm/types.h> - #else/#endif comments [akpm@osdl.org: fix arm build] Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/include/asm-generic/Kbuild b/include/asm-generic/Kbuild index 3c06be381701..fa14f8cd30c5 100644 --- a/include/asm-generic/Kbuild +++ b/include/asm-generic/Kbuild @@ -1,4 +1,3 @@ -header-y += atomic.h header-y += errno-base.h header-y += errno.h header-y += fcntl.h diff --git a/include/asm-generi...
af69c7f924b272927f9aea378f34f4548d3888d9
Analyze and fix the following issue in the Linux kernel code: [PATCH] generic HDLC synclink config mismatch fix
Problem Details: Fix compile errors on mismatch between generic HDLC and synclink drivers. Notes: generic HDLC support for synclink drivers is *optional* so you can't just use depend on in Kconfig This solution is deemed the best after 7 months of review and criticism by many developers including AKPM. Read the thr...
```diff diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index 1bd12296dca5..74d21c1c104f 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c @@ -75,8 +75,10 @@ #include <pcmcia/cisreg.h> #include <pcmcia/ds.h> -#ifdef CONFIG_HDLC_MODULE -#define ...
3908fd2ed920af818aa596672da68ba26173ff27
Analyze and fix the following issue in the Linux kernel code: [PATCH] softirq: remove BUG_ONs which can incorrectly trigger
Problem Details: It is possible to have tasklets get scheduled before softirqd has had a chance to spawn on all CPUs. This is totally harmless; after success during action CPU_UP_PREPARE, action CPU_ONLINE will be called, which immediately wakes softirqd on the appropriate CPU to process the already pending tasklets. ...
```diff diff --git a/kernel/softirq.c b/kernel/softirq.c index bf25015dce16..918e52df090e 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -574,8 +574,6 @@ static int __cpuinit cpu_callback(struct notifier_block *nfb, switch (action) { case CPU_UP_PREPARE: - BUG_ON(per_cpu(tasklet_vec, hotcpu).list); - B...
c949d4eb40ce021b1abc3b63af23aa535662cb17
Analyze and fix the following issue in the Linux kernel code: [PATCH] autofs: fix error code path in autofs_fill_sb()
Problem Details: When kernel is compiled with old version of autofs (CONFIG_AUTOFS_FS), and new (observed at least with 5.x.x) automount deamon is started, kernel correctly reports incompatible version of kernel and userland daemon, but then screws things up instead of correct handling of the error: autofs: kernel do...
```diff diff --git a/fs/autofs/inode.c b/fs/autofs/inode.c index 38ede5c9d6fd..f968d1342808 100644 --- a/fs/autofs/inode.c +++ b/fs/autofs/inode.c @@ -28,10 +28,11 @@ void autofs_kill_sb(struct super_block *sb) /* * In the event of a failure in get_sb_nodev the superblock * info is not present so nothing else h...
2ee91f197c0bc654b24eed5831fd12aa0d566a7d
Analyze and fix the following issue in the Linux kernel code: [PATCH] lockdep: show more details about self-test failures
Problem Details: Make the locking self-test failures (of 'FAILURE' type) easier to debug by printing more information. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h index 952bee79a8f3..a1c10b0c4cf0 100644 --- a/include/linux/debug_locks.h +++ b/include/linux/debug_locks.h @@ -24,7 +24,7 @@ extern int debug_locks_off(void); int __ret = 0; \ \ if (unlikely(c)) { \ - if (debug_loc...
50cc670aebf4fc64afaf533fb9fa1c8570f09d74
Analyze and fix the following issue in the Linux kernel code: [PATCH] lockdep: more chains
Problem Details: Some have reported a chain-table overflow - double its size. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/kernel/lockdep_internals.h b/kernel/lockdep_internals.h index eab043c83bb2..8ce09bc4613d 100644 --- a/kernel/lockdep_internals.h +++ b/kernel/lockdep_internals.h @@ -20,7 +20,7 @@ #define MAX_LOCKDEP_KEYS_BITS 11 #define MAX_LOCKDEP_KEYS (1UL << MAX_LOCKDEP_KEYS_BITS) -#define MAX_LOCKDEP_CHAIN...
ec0837f230e57afde65db72539e748d2a75abed0
Analyze and fix the following issue in the Linux kernel code: [PATCH] ext4 balloc: fix _with_rsv freeze
Problem Details: Port fix to the off-by-one in find_next_usable_block's memscan from ext2 to ext4; but it didn't cause a serious problem for ext4 because the additional ext4_test_allocatable check rescued it from the error. [akpm@osdl.org: build fix] Signed-off-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: Hugh Dic...
```diff diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index 1c8ef0e35f46..c4dd1103ccf1 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c @@ -747,7 +747,7 @@ find_next_usable_block(ext4_grpblk_t start, struct buffer_head *bh, here = 0; p = ((char *)bh->b_data) + (here >> 3); - r = memscan(p, 0, (maxblocks -...
b2f2c76d17b68869914a1ec3ab04c7674668f60d
Analyze and fix the following issue in the Linux kernel code: [PATCH] ext4 balloc: fix off-by-one against rsv_end
Problem Details: rsv_end is the last block within the reservation, so alloc_new_reservation should accept start_block == rsv_end as success. Signed-off-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: Hugh Dickins <hugh@veritas.com> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-o...
```diff diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index 2bcca5261eeb..c5589b3f58e8 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c @@ -1165,7 +1165,7 @@ retry: * check if the first free block is within the * free space we just reserved */ - if (start_block >= my_rsv->rsv_start && start_block < my_r...
e7dc95db2695dc92b223cdc49227ac57e63406d2
Analyze and fix the following issue in the Linux kernel code: [PATCH] ext4 balloc: fix off-by-one against grp_goal
Problem Details: grp_goal 0 is a genuine goal (unlike -1), so ext4_try_to_allocate_with_rsv should treat it as such. Signed-off-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: Hugh Dickins <hugh@veritas.com> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <t...
```diff diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index af3acf3c37b6..2bcca5261eeb 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c @@ -1288,7 +1288,7 @@ ext4_try_to_allocate_with_rsv(struct super_block *sb, handle_t *handle, } /* * grp_goal is a group relative block number (if there is a goal) - * 0...
702a28b1e64be3dc313f5f0ceb6dc95edfbc5e18
Analyze and fix the following issue in the Linux kernel code: [PATCH] lib functions: always build hweight for loadable modules
Problem Details: Always build hweight8/16/32/64() functions into the kernel so that loadable modules may use them. I didn't remove GENERIC_HWEIGHT since ALPHA_EV67, ia64, and some variants of UltraSparc(64) provide their own hweight functions. Fixes config/build problems with NTFS=m and JOYSTICK_ANALOG=m. Kernel: ...
```diff diff --git a/lib/Makefile b/lib/Makefile index cf98fabaa549..fea8f9035f07 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -25,7 +25,7 @@ lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o lib-$(CONFIG_SEMAPHORE_SLEEPERS) += semaphore-sleepers.o lib-$(CON...
bd9b0bac6f601655044fc35978e26231dffee03e
Analyze and fix the following issue in the Linux kernel code: [PATCH] sysctl: string length calculated is wrong if it contains negative numbers
Problem Details: In the functions do_proc_dointvec() and do_proc_doulongvec_minmax(), there seems to be a bug in string length calculation if string contains negative integer. The console log given below explains the bug. Setting negative values may not be a right thing to do for "console log level" but then the test ...
```diff diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 7abe9704e75a..6d7147cf66bb 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -1875,7 +1875,7 @@ static int __do_proc_dointvec(void *tbl_data, ctl_table *table, p = buf; if (*p == '-' && left > 1) { neg = 1; - left--, p++; + p++; } ...
36499dc2bc8025bc931a0fb22bbe0ac0e46ffb14
Analyze and fix the following issue in the Linux kernel code: [PATCH] synclink_gt: fix init error handling
Problem Details: Initialization synclink_gt forgot to unregister pci driver on error path. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Paul Fulghum <paulkf@microgate.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c index 07f34d43dc7f..83b5d37d6c59 100644 --- a/drivers/char/synclink_gt.c +++ b/drivers/char/synclink_gt.c @@ -3522,6 +3522,7 @@ static int __init slgt_init(void) if (!slgt_device_list) { printk("%s no devices found\n",driver_name); + p...
9399575dd30edcb84e821583daf81d4ba774a95b
Analyze and fix the following issue in the Linux kernel code: [PATCH] dz: Fixes to make it work
Problem Details: This a set of fixes mostly to make the driver actually work: 1. Actually select the line for setting parameters and receiver disable/enable. 2. Select the line for receive and transmit interrupt handling correctly. 3. Report the transmitter empty state correctly. 4. Set the I/O type of ports correc...
```diff diff --git a/drivers/char/decserial.c b/drivers/char/decserial.c index 85f404e25c73..8ea2bea2b183 100644 --- a/drivers/char/decserial.c +++ b/drivers/char/decserial.c @@ -23,20 +23,12 @@ extern int zs_init(void); #endif -#ifdef CONFIG_DZ -extern int dz_init(void); -#endif - #ifdef CONFIG_SERIAL_CONSOLE ...
f67637ee4b5d90d41160d755b9a8cca18c394586
Analyze and fix the following issue in the Linux kernel code: [PATCH] Add struct dev pointer to dma_is_consistent()
Problem Details: dma_is_consistent() is ill-designed in that it does not have a struct device pointer argument which makes proper support for systems that consist of a mix of coherent and non-coherent DMA devices hard. Change dma_is_consistent to take a struct device pointer as first argument and fix the sole caller t...
```diff diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt index 8621a064f7e1..3dc1f9125caf 100644 --- a/Documentation/DMA-API.txt +++ b/Documentation/DMA-API.txt @@ -431,10 +431,10 @@ be identical to those passed in (and returned by dma_alloc_noncoherent()). int -dma_is_consistent(dma_addr_t dma_ha...