id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
d1bda0455478a9e2a13381044e9bb80a17ec92d2
Analyze and fix the following issue in the Linux kernel code: [ALSA] usb-audio: simplify MIDI quirk handling
Problem Details: Modules: USB generic driver Simplify the handling of MIDI quirks by treating an interface without quirks as a QUIRK_MIDI_STANDARD_INTERFACE. This also fixes the bug where a MIDI_STANDARD quirk would not be recognized. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
```diff diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index 2ead878bcb8f..ea1b1f87c1b6 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c @@ -2755,9 +2755,9 @@ static int create_fixed_stream_quirk(snd_usb_audio_t *chip, /* * create a stream for an interface with proper descriptors */ -static i...
eb9b4142b3af98d808012081c4dd6d36e2964d43
Analyze and fix the following issue in the Linux kernel code: [ALSA] Fix a typo
Problem Details: Modules: AC97 Codec Fix a typo in the last patch. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c index ffc8d6521073..b24beb32961e 100644 --- a/sound/pci/ac97/ac97_patch.c +++ b/sound/pci/ac97/ac97_patch.c @@ -170,7 +170,7 @@ static inline int is_surround_on(ac97_t *ac97) static inline int is_clfe_on(ac97_t *ac97) { - return a97->cha...
4525c9f31f4606881ed49d822b44c2c5d6080ef4
Analyze and fix the following issue in the Linux kernel code: [ALSA] Fix surround control of CMI9761
Problem Details: Modules: AC97 Codec - Fixed surround controls of CMI9761 (model 83) in update_jacks callback. - Clean up ad1888 and ad1985 update_jacks callbacks. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c index 0238cc65d32a..ffc8d6521073 100644 --- a/sound/pci/ac97/ac97_patch.c +++ b/sound/pci/ac97/ac97_patch.c @@ -163,14 +163,24 @@ static int ac97_channel_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t .private_value = 1, \ } ...
c6ea2ba7b8acdb6c4a883b2d38607c8078dff4ee
Analyze and fix the following issue in the Linux kernel code: [BLOCK] iosched: fix setting of default io scheduler
Problem Details: With the recent reorg of the io scheduler selection, it unfortunately became possible to select an io scheduler to be the default even if it wasn't builtin. Fix this by requiring the default scheduler to be builtin. Signed-off-by: Jens Axboe <axboe@suse.de>
```diff diff --git a/block/Kconfig.iosched b/block/Kconfig.iosched index 5b90d2fa63b8..f3b7753aac99 100644 --- a/block/Kconfig.iosched +++ b/block/Kconfig.iosched @@ -46,13 +46,13 @@ choice block devices. config DEFAULT_AS - bool "Anticipatory" if IOSCHED_AS + bool "Anticipatory" if IOSCHED_AS=y config DE...
30415f6a63f3383a18e9adf7c144acabe6893f63
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix random memory corruption in merged elf.h
Problem Details: The merged verison of ELF_CORE_COPY_REGS is basically the PPC64 version, with a memset that came from PPC and a few types abstracted out into #defines. But it's not _quite_ right. The first problem is we calculate the number of registers with: nregs = sizeof(struct pt_regs) / sizeof(ELF_GREG_T...
```diff diff --git a/include/asm-powerpc/elf.h b/include/asm-powerpc/elf.h index d22b10021b5d..d140577d0a05 100644 --- a/include/asm-powerpc/elf.h +++ b/include/asm-powerpc/elf.h @@ -178,18 +178,22 @@ typedef elf_vrreg_t elf_vrregset_t32[ELF_NVRREG32]; static inline void ppc_elf_core_copy_regs(elf_gregset_t elf_regs, ...
05db218a27c955880dce6d080d5159247aad3629
Analyze and fix the following issue in the Linux kernel code: [XFS] Fix an inode32 regression - if no options are presented, must still
Problem Details: set default flags. SGI-PV: 945242 SGI-Modid: xfs-linux-melb:xfs-kern:24292a Signed-off-by: Nathan Scott <nathans@sgi.com>
```diff diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c index 94f0858699b5..7bdbd991ab1c 100644 --- a/fs/xfs/xfs_vfsops.c +++ b/fs/xfs/xfs_vfsops.c @@ -1687,7 +1687,7 @@ xfs_parseargs( #endif if (!options) - return 0; + goto done; iosize = dsunit = dswidth = vol_dsunit = vol_dswidth = 0; @@ -1867,9 ...
b2281abf115031a5242647e0b5b170ffd3bca994
Analyze and fix the following issue in the Linux kernel code: [SERIAL] 8250_early.c passing 0 instead of NULL
Problem Details: Fix sparse warning about passing `0` to simple_strtoul() Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/drivers/serial/8250_early.c b/drivers/serial/8250_early.c index b7a5dd710228..59ba5d993b4b 100644 --- a/drivers/serial/8250_early.c +++ b/drivers/serial/8250_early.c @@ -164,7 +164,7 @@ static int __init parse_options(struct early_uart_device *device, char *options) if ((options = strchr(option...
8b5f4f06eecc081892b05cd6077314d68872dfd6
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix IXDP2x01 config files
Problem Details: IXDP2401 config file has wrong baudrate and both boards have 3 UARTs. Signed-off-by: Deepak Saxena <dsaxena@plexity.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/configs/ixdp2401_defconfig b/arch/arm/configs/ixdp2401_defconfig index 38c9a721d5c9..32bd552e0986 100644 --- a/arch/arm/configs/ixdp2401_defconfig +++ b/arch/arm/configs/ixdp2401_defconfig @@ -152,7 +152,7 @@ CONFIG_ALIGNMENT_TRAP=y # CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 -...
0c99cb6d5fe77872c5a32cff837c05f70158ce15
Analyze and fix the following issue in the Linux kernel code: [IB] umad: fix hot remove of IB devices
Problem Details: Fix hotplug of devices for ib_umad module: when a device goes away, kill off all MAD agents for open files associated with that device, and make sure that the device is not touched again after ib_umad returns from its remove_one function. Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/core/user_mad.c b/drivers/infiniband/core/user_mad.c index 97128e25f78b..aed5ca23fb22 100644 --- a/drivers/infiniband/core/user_mad.c +++ b/drivers/infiniband/core/user_mad.c @@ -94,6 +94,9 @@ struct ib_umad_port { struct class_device *sm_class_dev; struct semaphore s...
089311e117adb8ffe13984d122e33287ffa8c7ec
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix another build error with IOP3xx platforms
Problem Details: ld doesn't like comments starting with // in its scripts Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/include/asm-arm/arch-iop3xx/iop321.h b/include/asm-arm/arch-iop3xx/iop321.h index 200621ff3690..f8df778a356f 100644 --- a/include/asm-arm/arch-iop3xx/iop321.h +++ b/include/asm-arm/arch-iop3xx/iop321.h @@ -40,7 +40,7 @@ #define IOP321_PCI_UPPER_IO_BA (IOP321_PCI_LOWER_IO_BA + IOP321_PCI_IO_WI...
ca82d85bc2512b759ff6356300b46e6de5b106da
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix more 3016/1 breakage
Problem Details: Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-clps711x/edb7211-mm.c b/arch/arm/mach-clps711x/edb7211-mm.c index 72f8bb05d55e..0d52e0851251 100644 --- a/arch/arm/mach-clps711x/edb7211-mm.c +++ b/arch/arm/mach-clps711x/edb7211-mm.c @@ -55,22 +55,22 @@ static struct map_desc edb7211_io_desc[] __initdata = { .virtual = EP7211_VI...
87cfe32375e0b69b999b59bf8287f501df3e43f7
Analyze and fix the following issue in the Linux kernel code: [IB] mthca: fix format of FW version
Problem Details: Mellanox has decided that the components of the firmware version are really meant to be displayed in decimal, e.g. 0x000400070190 is version 4.7.400. Change the format we use from "%x.%x.%x" to "%d.%d.%d" to match this convention. Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c index 883d1e5a79bc..45c6328e780c 100644 --- a/drivers/infiniband/hw/mthca/mthca_main.c +++ b/drivers/infiniband/hw/mthca/mthca_main.c @@ -1057,7 +1057,7 @@ static int __devinit mthca_init_one(struct pci_dev *pdev, ...
457e04ca5cb6efa9392c48409bee802eaa394d8c
Analyze and fix the following issue in the Linux kernel code: [PATCH] ppc32: Fixed warning in m8xx_setup.c
Problem Details: This adds missing header and thus fix the warning issued by ming prototype. Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c index 97ffbc70574f..1cc3abe6fa43 100644 --- a/arch/ppc/syslib/m8xx_setup.c +++ b/arch/ppc/syslib/m8xx_setup.c @@ -45,6 +45,7 @@ #include <asm/bootinfo.h> #include <asm/time.h> #include <asm/xmon.h> +#include <asm/ppc_sys.h> #include ...
3d9e9dc49d9e6d10ad4a2f4ababc899fc527584c
Analyze and fix the following issue in the Linux kernel code: [PATCH] ppc32 8xx: fix cpm_dpalloc() comment
Problem Details: Current comment on top of m8xx_cpm_dpinit is wrong. Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/ppc/8xx_io/commproc.c b/arch/ppc/8xx_io/commproc.c index b42789f8eb76..579cd40258b9 100644 --- a/arch/ppc/8xx_io/commproc.c +++ b/arch/ppc/8xx_io/commproc.c @@ -388,9 +388,8 @@ void m8xx_cpm_dpinit(void) /* * Allocate the requested size worth of DP memory. - * This function used to return...
38dc16186433ba961ace39c97ac6f7071250f981
Analyze and fix the following issue in the Linux kernel code: [PATCH] ppc32 8xx: Fix harmless warning in 8xx_io/commproc.c
Problem Details: Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/include/asm-ppc/commproc.h b/include/asm-ppc/commproc.h index 5bbb8e2c1c6d..973e60908234 100644 --- a/include/asm-ppc/commproc.h +++ b/include/asm-ppc/commproc.h @@ -83,6 +83,8 @@ extern uint m8xx_cpm_hostalloc(uint size); extern int m8xx_cpm_hostfree(uint start); extern void m8xx_cpm_hostdump(v...
7ed3463b6192e9542983be4ba4d913d74b3ecea6
Analyze and fix the following issue in the Linux kernel code: [PATCH] ppc32 8xx: export symbols required for modular IDE
Problem Details: This fixes these warnings: Building modules, stage 2. MODPOST *** Warning: "__ide_mm_insl" [drivers/ide/ide-core.ko] undefined! *** Warning: "__ide_mm_outsw" [drivers/ide/ide-core.ko] undefined! *** Warning: "__ide_mm_insw" [drivers/ide/ide-core.ko] undefined! *** Warning: ...
```diff diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c index ae24196d78f6..e0ca61b37f4f 100644 --- a/arch/ppc/kernel/ppc_ksyms.c +++ b/arch/ppc/kernel/ppc_ksyms.c @@ -131,6 +131,11 @@ EXPORT_SYMBOL(outw); EXPORT_SYMBOL(outl); EXPORT_SYMBOL(outsl);*/ +EXPORT_SYMBOL(__ide_mm_insl); +EXPORT_SYM...
9122ee33c6688491c65dcb1973e86b943883a8ab
Analyze and fix the following issue in the Linux kernel code: [PATCH] ppc: Fix build warnings in arch/ppc/kernel/traps.c
Problem Details: The latest updates to bug.h generate build warnings in traps.c in arch/ppc. Fix print format specifiers to account for change of line type to long from int. Signed-off-by: Becky Bruce <becky.bruce@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c index f265b81e7008..16adde6b429d 100644 --- a/arch/ppc/kernel/traps.c +++ b/arch/ppc/kernel/traps.c @@ -606,22 +606,22 @@ int check_bug_trap(struct pt_regs *regs) if (bug->line & BUG_WARNING_TRAP) { /* this is a WARN_ON rather than BUG/BUG_ON *...
8902e87f1fc72740a40686a31ca07e6c2cf1f0f2
Analyze and fix the following issue in the Linux kernel code: [PATCH] ppc64: Fix add notifier crashes
Problem Details: The extraction of PCI stuff from struct device_node left some false assumptions in notifier code. As a result, dynamic add crashes when non-PCI nodes are added. This patch fixes these assumptions. Signed-off-by: John Rose <johnrose@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index 9e90d41131d8..a73faafaac8c 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c @@ -498,7 +498,7 @@ static int iommu_reconfig_notifier(struct notifier_block *nb, unsigne...
8ae5a8a24f7fe797027d481f88c1464b0e47eede
Analyze and fix the following issue in the Linux kernel code: [IPoIB] don't compile debug code if debugging isn't enabled
Problem Details: Don't build ipoib_mcast_iter_ functions if CONFIG_INFINIBAND_IPOIB_DEBUG is not enabled -- their only callers will not be built either. Also move the prototype for ipoib_open() to ipoib.h to fix a sparse warning. Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h index c994a916a58a..0095acc0fbbe 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib.h +++ b/drivers/infiniband/ulp/ipoib/ipoib.h @@ -235,6 +235,7 @@ static inline void ipoib_put_ah(struct ipoib_ah *ah) kref_put(&ah->ref, ipo...
52ab4ac258ff10a362d78a3f8160a7c4d0721b51
Analyze and fix the following issue in the Linux kernel code: [PKT_SCHED]: Rework QoS and/or fair queueing configuration
Problem Details: Make "QoS and/or fair queueing" have its own menu, it's too big to be inlined into "Network options". Remove the obsolete NET_QOS option. Automatically select NET_CLS if needed. Do the same for NET_ESTIMATOR but allow it to be selected manually for statistical purposes. Add comments to separate queuein...
```diff diff --git a/net/sched/Kconfig b/net/sched/Kconfig index 81510da31792..7f34e7fd767c 100644 --- a/net/sched/Kconfig +++ b/net/sched/Kconfig @@ -2,13 +2,15 @@ # Traffic control configuration. # -menuconfig NET_SCHED +menu "QoS and/or fair queueing" + +config NET_SCHED bool "QoS and/or fair queueing" ---h...
0aeafa77558fc1b44b0f39a4d9e5bd9316420788
Analyze and fix the following issue in the Linux kernel code: Input: lkkbd - miscellaneous fixes
Problem Details: * Hide debugging code into #ifdef, which allows to simplify the large switch statement * Update macros to not reference variables not given as arguments Signed-off-by: Jan-Benedict Glaw <jbglaw@lug-owl.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/keyboard/lkkbd.c b/drivers/input/keyboard/lkkbd.c index 9481132532d0..77c4d9669ad0 100644 --- a/drivers/input/keyboard/lkkbd.c +++ b/drivers/input/keyboard/lkkbd.c @@ -273,11 +273,11 @@ static lk_keycode_t lkkbd_keycode[LK_NUM_KEYCODES] = { [0xfb] = KEY_APOSTROPHE, }; -#define CH...
d7a767dddcbd690a6c0e2b3b395858dc116db2e6
Analyze and fix the following issue in the Linux kernel code: Input: locomokbd - fix wrong bustype
Problem Details: Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/keyboard/locomokbd.c b/drivers/input/keyboard/locomokbd.c index a6ddd9472602..2c510881874a 100644 --- a/drivers/input/keyboard/locomokbd.c +++ b/drivers/input/keyboard/locomokbd.c @@ -230,7 +230,7 @@ static int locomokbd_probe(struct locomo_dev *dev) input_dev->name = "LoCoMo keyb...
47610602c2ebe16ec99063b06bc019f18c8923a9
Analyze and fix the following issue in the Linux kernel code: Input: fix input device deregistration
Problem Details: Remove main attribute group (name, phys, uniq) when unregistering input devices. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/input.c b/drivers/input/input.c index d543c0ce5229..0879915b14d5 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -805,6 +805,7 @@ void input_unregister_device(struct input_dev *dev) sysfs_remove_group(&dev->cdev.kobj, &input_dev_caps_attr_group); sysfs_remove_g...
06024f217d607369f0ee0071034ebb03071d5fb2
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86-64: bitops fix for -Os
Problem Details: This fixes the x86-64 find_[first|next]_zero_bit() function for the end-of-range case. It didn't test for a zero size, and the "rep scas" would do entirely the wrong thing. Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/arch/x86_64/lib/bitops.c b/arch/x86_64/lib/bitops.c index a29fb75b33ac..95b6d9639fba 100644 --- a/arch/x86_64/lib/bitops.c +++ b/arch/x86_64/lib/bitops.c @@ -5,19 +5,23 @@ #undef find_first_bit #undef find_next_bit -/** - * find_first_zero_bit - find the first zero bit in a memory region - * @a...
538524aed09fd2c52094afadf0160cef8954d4c8
Analyze and fix the following issue in the Linux kernel code: [XFS] fix XFS quota for modular XFS builds
Problem Details: Cannot build XFS filesystem support as module with quota support. It works only when the XFS filesystem support is compiled into the kernel. Menuconfig prevents from setting CONFIG_XFS_FS=m and CONFIG_XFS_QUOTA=y. How to reproduce: configure the XFS filesystem with quota support as module. The resul...
```diff diff --git a/fs/xfs/Kconfig b/fs/xfs/Kconfig index 8e8f32dabe53..bac27d66151d 100644 --- a/fs/xfs/Kconfig +++ b/fs/xfs/Kconfig @@ -24,7 +24,7 @@ config XFS_EXPORT default y config XFS_QUOTA - tristate "XFS Quota support" + bool "XFS Quota support" depends on XFS_FS help If you say Y here, you will ...
c75d721c761ad0f2d8725c40af9e4f376efefd24
Analyze and fix the following issue in the Linux kernel code: [NET]: Fix zero-size datagram reception
Problem Details: The recent rewrite of skb_copy_datagram_iovec broke the reception of zero-size datagrams. This patch fixes it. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
```diff diff --git a/net/core/datagram.c b/net/core/datagram.c index 81987df536eb..d219435d086c 100644 --- a/net/core/datagram.c +++ b/net/core/datagram.c @@ -213,6 +213,10 @@ int skb_copy_datagram_iovec(const struct sk_buff *skb, int offset, { int i, err, fraglen, end = 0; struct sk_buff *next = skb_shinfo(skb)->...
c2da8acaf488b8651edfb04ebf3ab089f3a7830f
Analyze and fix the following issue in the Linux kernel code: [ETHERNET]: Add ether stuff to docbook
Problem Details: Fix up etherdevice docbook comments and make them (and other networking stuff) get dragged into the kernel-api. Delete the old 8390 stuff, it really isn't interesting anymore. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
```diff diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl index 4d9b66d8b4db..ec474e5a25ed 100644 --- a/Documentation/DocBook/kernel-api.tmpl +++ b/Documentation/DocBook/kernel-api.tmpl @@ -239,9 +239,9 @@ X!Ilib/string.c <title>Network device support</title> <sect1>...
8713dbf05754aa777f31bf491cb60a111f7ad828
Analyze and fix the following issue in the Linux kernel code: [MCAST]: ip[6]_mc_add_src should be called when number of sources is zero
Problem Details: And filter mode is exclude. Further explanation by David Stevens: Multicast source filters aren't widely used yet, and that's really the only feature that's affected if an application actually exercises this bug, as far as I can tell. An ordinary filter-less multicast join should still work, and only...
```diff diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 8b6d3939e1e6..c6247fc84060 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c @@ -1908,8 +1908,11 @@ int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf, int ifindex) sock_kfree_s(sk, newpsl, IP_SFLSIZE(newpsl->sl_max)); goto done; } - } el...
273c2cdb2b6d6743d85ddbde82e71f8adbf5bf10
Analyze and fix the following issue in the Linux kernel code: [ARM SMP] Fix a couple of warnings
Problem Details: Use *cpus_addr() to display the mask of pending/to be called CPUs. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 45877f5d5717..b40915dcd533 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c @@ -315,8 +315,8 @@ int smp_call_function_on_cpu(void (*func)(void *info), void *info, int retry, printk(KERN_CRIT "CPU%u: smp_call_function tim...
7e86df273292b3a88c14b9aed1006cddac2b4c23
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix ARM rwlock implementations
Problem Details: fb1c8f93d869b34cacb8b8932e2b83d96a19d720 broke the ARM rwlock code since it only partially updated the rwlock implementation. Properly update it. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h index cb4906b45555..6ed4f916b166 100644 --- a/include/asm-arm/spinlock.h +++ b/include/asm-arm/spinlock.h @@ -80,7 +80,7 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock) */ #define rwlock_is_locked(x) (*((volatile unsigned int ...
1ffedce7e83540e2d2fe1cacd1922ee337073d28
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix Realview machine for patch 3016/1
Problem Details: 3016/1 changed the map_desc structure to take a PFN instead of a physical address. Fixup Realview machine support for this change. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index 01b264be5029..267bb07e39b7 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c @@ -43,14 +43,44 @@ #include "clock.h" static struct map_desc realview_eb_io_desc[] __initdat...
6bf7bd6967b1cdde1fe953b0edb951966799fb44
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix mm initialisation with write buffered write allocate caches
Problem Details: It seems that without the extra tlb flush, we may end up faulting during the early kernel initialisation because the TLB can't see the updated page tables. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index fd079ff1fc53..c168f322ef8c 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -486,10 +486,17 @@ static void __init devicemaps_init(struct machine_desc *mdesc) /* * Ask the machine support to map in the statically mapped devices. - * Af...
bfca94590bfd3dcd958c542d2fb6406518150fee
Analyze and fix the following issue in the Linux kernel code: [ARM] 3083/1: include/asm-arm/arch-ixp4xx/io.h: eliminate warnings for pointer passed to integral function argument
Problem Details: Patch from John Bowler Fix for a compiler warning, this wasn't apparent in 2.6.12, I believe the compiler options have been changed (somewhere) so that passing a (void*) to a (u32) argument is now warned. This accounts for the majority of the warnings in my builds of the 2.6.14 kernel for NSLU2. The...
```diff diff --git a/include/asm-arm/arch-ixp4xx/io.h b/include/asm-arm/arch-ixp4xx/io.h index 80d05ecad2f0..688f7f90d93e 100644 --- a/include/asm-arm/arch-ixp4xx/io.h +++ b/include/asm-arm/arch-ixp4xx/io.h @@ -80,9 +80,9 @@ __ixp4xx_iounmap(void __iomem *addr) #define __arch_ioremap(a, s, f, x) __ixp4xx_ioremap(a, s,...
9dc2d0f55fb693ae6d50c8dd3d934fe3133ca183
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix realview machine type for patch 3060/1
Problem Details: Realview was missed in this cleanup... Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/include/asm-arm/arch-realview/memory.h b/include/asm-arm/arch-realview/memory.h index 99667d5cc617..ed370abb638f 100644 --- a/include/asm-arm/arch-realview/memory.h +++ b/include/asm-arm/arch-realview/memory.h @@ -23,7 +23,7 @@ /* * Physical DRAM offset. */ -#define PHYS_OFFSET (0x00000000UL)...
398382999bcff46ec1c7e7ab7574b10b087481c7
Analyze and fix the following issue in the Linux kernel code: powerpc: Compile fixes for chrp/nvram.c
Problem Details: Include asm/rtas.h for prototype for rtas_call etc., and make the `done' variable unsigned int since that's what rtas_call wants. Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/platforms/chrp/nvram.c b/arch/powerpc/platforms/chrp/nvram.c index 65266b46db9b..150f67d6f90c 100644 --- a/arch/powerpc/platforms/chrp/nvram.c +++ b/arch/powerpc/platforms/chrp/nvram.c @@ -17,6 +17,7 @@ #include <asm/uaccess.h> #include <asm/prom.h> #include <asm/machdep.h> +#includ...
b7fb358c7c36a14927d5523ea674e69f90c51d1d
Analyze and fix the following issue in the Linux kernel code: [CPUFREQ] Fix up compile of cpufreq_stats
Problem Details: Whoops, I lost a hunk of the last patch somehow. Signed-off-by: Dave Jones <davej@redhat.com>
```diff diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index 19b4c3e7c390..7ddf714c4d43 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c @@ -247,6 +247,7 @@ cpufreq_stats_create_table (struct cpufreq_policy *policy, return 0; error_out: cpufreq_cpu_...
ca23509fbaac0ea662ab0e287bebb72f743f9e1f
Analyze and fix the following issue in the Linux kernel code: [PATCH] blk: fix dangling pointer access in __elv_add_request
Problem Details: cfq's add_req_fn callback may invoke q->request_fn directly and depending on low-level driver used and timing, a queued request may be finished & deallocated before add_req_fn callback returns. So, __elv_add_request must not access rq after it's passed to add_req_fn callback. This patch moves rq_merg...
```diff diff --git a/drivers/block/elevator.c b/drivers/block/elevator.c index 36f1057084b0..d4a49a3df829 100644 --- a/drivers/block/elevator.c +++ b/drivers/block/elevator.c @@ -369,9 +369,14 @@ void __elv_add_request(request_queue_t *q, struct request *rq, int where, case ELEVATOR_INSERT_SORT: BUG_ON(!blk_fs_req...
6c2af71f7f6ac10ab45e9461e1dd7aa09079643a
Analyze and fix the following issue in the Linux kernel code: [PATCH] ibmveth fix panic in initial replenish cycle
Problem Details: This patch fixes a panic in the current tree caused by a race condition between the initial replenish cycle and the rx processing of the first packets trying to replenish the buffers. Signed-off-by: Santiago Leon <santil@us.ibm.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c index e5246f227c98..94239f67f3a3 100644 --- a/drivers/net/ibmveth.c +++ b/drivers/net/ibmveth.c @@ -535,7 +535,7 @@ static int ibmveth_open(struct net_device *netdev) } ibmveth_debug_printk("initial replenish cycle\n"); - ibmveth_replenish_task(ad...
ce4633704038f9bf39f20c10691747d6fc127bf4
Analyze and fix the following issue in the Linux kernel code: [PATCH] tlclk build fix
Problem Details: drivers/char/tlclk.c: In function `tlclk_init': drivers/char/tlclk.c:775: warning: implicit declaration of function `platform_device_register_simple' Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/char/tlclk.c b/drivers/char/tlclk.c index 18cdd4361dc6..12167c04fa4c 100644 --- a/drivers/char/tlclk.c +++ b/drivers/char/tlclk.c @@ -43,6 +43,7 @@ #include <linux/sysfs.h> #include <linux/device.h> #include <linux/miscdevice.h> +#include <linux/platform_device.h> #include <asm/io.h> /...
faba278fb003dbe772f6c04526f1f096f43c995e
Analyze and fix the following issue in the Linux kernel code: [PATCH] TPM compile fix
Problem Details: CC drivers/char/tpm/tpm_nsc.o drivers/char/tpm/tpm_nsc.c:277: error: `platform_bus_type' undeclared here (not in a function) ... CC drivers/char/tpm/tpm_atmel.o drivers/char/tpm/tpm_atmel.c:175: error: `platform_bus_type' undeclared here (not in a function) Make sure to include proper head...
```diff diff --git a/drivers/char/tpm/tpm_atmel.c b/drivers/char/tpm/tpm_atmel.c index 8cb42e84723c..32e01450c425 100644 --- a/drivers/char/tpm/tpm_atmel.c +++ b/drivers/char/tpm/tpm_atmel.c @@ -19,6 +19,7 @@ * */ +#include <linux/platform_device.h> #include "tpm.h" /* Atmel definitions */ diff --git a/drive...
10e8805716698596f5b6445d76bbb7ed1adb7295
Analyze and fix the following issue in the Linux kernel code: fix incorrect dir
Problem Details: Signed-off-by: Kelly Daly <kelly@au.ibm.com>
```diff diff --git a/include/asm-powerpc/iseries/mf.h b/include/asm-powerpc/iseries/mf.h index 166cd73f5c15..dc6843e72aff 100644 --- a/include/asm-powerpc/iseries/mf.h +++ b/include/asm-powerpc/iseries/mf.h @@ -29,7 +29,7 @@ #include <linux/types.h> #include <asm/iseries/hv_types.h> -#include <asm/iSeries/iseries/h...
104dd65fef378773ec0510c788bd4b5ad6ea1121
Analyze and fix the following issue in the Linux kernel code: powerpc: clean up bug.h further
Problem Details: This simplifies the macros which are different between 32-bit and 64-bit. It also fixes a couple of printks on the bug->line element, which is now a long. Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index bb0d00284a7e..07e5ee40b870 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -749,22 +749,22 @@ static int check_bug_trap(struct pt_regs *regs) if (bug->line & BUG_WARNING_TRAP) { /* this is a WARN_ON r...
a749ee86152a0caed3b0c2fbc50a00277e306ec6
Analyze and fix the following issue in the Linux kernel code: [XFS] Fix calculation of reserved AGs for inodes in 32-bit inode mode
Problem Details: Spotted by Roger Willcocks <willcor @at@ gmail.com> SGI-PV: 944858 SGI-Modid: xfs-linux:xfs-kern:201213a Signed-off-by: Eric Sandeen <sandeen@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
```diff diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index 02b1892aaf74..541d5dd474be 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c @@ -352,7 +352,7 @@ xfs_initialize_perag( icount = sbp->sb_dblocks * sbp->sb_imax_pct; do_div(icount, 100); icount += sbp->sb_agblocks - 1; - do_div(icount...
fdc7ed75c08d507aa64c603b8bb7ef478dcc0000
Analyze and fix the following issue in the Linux kernel code: [XFS] Fix boundary conditions when issuing direct IOs from large userspace
Problem Details: buffers. SGI-PV: 944820 SGI-Modid: xfs-linux:xfs-kern:24223a Signed-off-by: Nathan Scott <nathans@sgi.com>
```diff diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index 26c346d9de51..1f38b528f0bd 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c @@ -935,15 +935,18 @@ __linvfs_get_block( { vnode_t *vp = LINVFS_GET_VP(inode); xfs_iomap_t iomap; + xfs_off_t offset; + ssi...
cfcbbbd089eadcaa86abb2c0f352e1ab23e16f72
Analyze and fix the following issue in the Linux kernel code: [XFS] Remove old, broken nolog-mode code - noone plans to ever fix it.
Problem Details: SGI-PV: 944821 SGI-Modid: xfs-linux:xfs-kern:24213a Signed-off-by: Nathan Scott <nathans@sgi.com>
```diff diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index a9e0c38d18a4..29af51275ca9 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c @@ -111,8 +111,7 @@ STATIC xlog_ticket_t *xlog_ticket_get(xlog_t *log, uint flags); STATIC void xlog_ticket_put(xlog_t *log, xlog_ticket_t *ticket); -/* local debug f...
e94af02a9cd7b6590bec81df9d6ab857d6cf322f
Analyze and fix the following issue in the Linux kernel code: [XFS] fix old xfs_setattr mis-merge from irix; mostly harmless esp if not
Problem Details: using xfs rt SGI-PV: 944632 SGI-Modid: xfs-linux:xfs-kern:200983a Signed-off-by: Eric Sandeen <sandeen@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
```diff diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index b564c1b25e5e..7c1f74531463 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c @@ -533,8 +533,7 @@ xfs_setattr( /* * Can't change extent size if any extents are allocated. */ - if ((ip->i_d.di_nextents || ip->i_delayed_blks)...
9af0a70c07a0e7575ebbdb42ca9fb29ffaaf77c9
Analyze and fix the following issue in the Linux kernel code: [XFS] Fixed a bug in reporting extent list for attribute fork running
Problem Details: xfs_bmap -a. SGI-PV: 944075 SGI-Modid: xfs-linux:xfs-kern:200860a Signed-off-by: Yingping Lu <yingping@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
```diff diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c index fbd48f9b797e..e52387b3abef 100644 --- a/fs/xfs/xfs_bmap.c +++ b/fs/xfs/xfs_bmap.c @@ -5725,12 +5725,13 @@ xfs_getbmap( out.bmv_offset = XFS_FSB_TO_BB(mp, map[i].br_startoff); out.bmv_length = XFS_FSB_TO_BB(mp, map[i].br_blockcount); ASSERT(map...
4750ddb0ba781006f149fdd87bbe997cb8c07e2e
Analyze and fix the following issue in the Linux kernel code: [XFS] Fix sparse warnings in ktrace.[ch]
Problem Details: SGI-PV: 943556 SGI-Modid: xfs-linux:xfs-kern:200113a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
```diff diff --git a/fs/xfs/support/ktrace.c b/fs/xfs/support/ktrace.c index 0ebb872d7da8..841aa4c15b8a 100644 --- a/fs/xfs/support/ktrace.c +++ b/fs/xfs/support/ktrace.c @@ -50,7 +50,7 @@ ktrace_uninit(void) * number of entries. */ ktrace_t * -ktrace_alloc(int nentries, int sleep) +ktrace_alloc(int nentries, unsi...
bccfd588423bb610fb1fde987da3ad23af1c46d7
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix compile error with CONFIG_TAU=y
Problem Details: A couple of instances of "i" that needed to be changed to "cpu_id" got missed in the merge, because they were in CONFIG_TAU code. Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 1292460fcde2..14ebe3bc48c3 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c @@ -201,11 +201,11 @@ static int show_cpuinfo(struct seq_file *m, void *v) #ifdef CONFIG_TAU_AVERAGE ...
f2cad7a8cdbe66d313059824d61ef1f455031566
Analyze and fix the following issue in the Linux kernel code: [PATCH] ppc bug.h namespace pollution
Problem Details: DATA_TYPE is really not a good thing to put into header that gets included all over the tree... Just make the cast always (long) and get rid of DATA_TYPE altogether. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/include/asm-powerpc/bug.h b/include/asm-powerpc/bug.h index 943e3d7dbcc7..f49f46271ba6 100644 --- a/include/asm-powerpc/bug.h +++ b/include/asm-powerpc/bug.h @@ -15,12 +15,10 @@ #define BUG_TABLE_ENTRY(label, line, file, func) \ ".llong " #label ", " #line ", " #file ", " #func "\n" #define TRA...
fa7e7d71e05f12921fefdc23386183578d3ed8c7
Analyze and fix the following issue in the Linux kernel code: [XFS] Show additional mount options in /proc/mounts, fix up some debug
Problem Details: code. SGI-PV: 941645 SGI-Modid: xfs-linux:xfs-kern:23926a Signed-off-by: Nathan Scott <nathans@sgi.com>
```diff diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c index 4b8b54dfe876..d3c99ac64afc 100644 --- a/fs/xfs/xfs_vfsops.c +++ b/fs/xfs/xfs_vfsops.c @@ -1883,6 +1883,7 @@ xfs_showargs( { XFS_MOUNT_OSYNCISOSYNC, "," MNTOPT_OSYNCISOSYNC }, { XFS_MOUNT_BARRIER, "," MNTOPT_BARRIER }, { XFS_MOUNT_IDELETE, "...
da087bad810b48dd889a504e6af0a582ba18df0d
Analyze and fix the following issue in the Linux kernel code: [XFS] Fix up a 32/64 local flags variable issue when enabling attr2 mode.
Problem Details: SGI-PV: 941645 SGI-Modid: xfs-linux:xfs-kern:23925a Signed-off-by: Nathan Scott <nathans@sgi.com>
```diff diff --git a/fs/xfs/xfs_attr_leaf.c b/fs/xfs/xfs_attr_leaf.c index 52a847e6abf7..35e557b00db2 100644 --- a/fs/xfs/xfs_attr_leaf.c +++ b/fs/xfs/xfs_attr_leaf.c @@ -117,12 +117,6 @@ xfs_attr_shortform_bytesfit(xfs_inode_t *dp, int bytes) int maxforkoff; /* upper limit on valid forkoff locations */ xfs_mount_t...
847aeb6bad0876ff9c250725e905a41c6050157c
Analyze and fix the following issue in the Linux kernel code: [PATCH] powerpc: Fix merged ipcbuf.h
Problem Details: Oops, when merging ipcbuf.h, I forgot that 'u64' can't be used in user-visible headers. This patch corrects the problem, replacing the unused fields with an array of four __u32s. Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/include/asm-powerpc/ipcbuf.h b/include/asm-powerpc/ipcbuf.h index dc0f4d16d05e..71382c1ec6e3 100644 --- a/include/asm-powerpc/ipcbuf.h +++ b/include/asm-powerpc/ipcbuf.h @@ -27,8 +27,7 @@ struct ipc64_perm __kernel_mode_t mode; unsigned int seq; unsigned int __pad1; - u64 __unused1; - u64 _...
380b5dc0e59340e7ed36dcc95dd1022aca75bbe2
Analyze and fix the following issue in the Linux kernel code: [XFS] Fix up an internal sort function name collision issue.
Problem Details: SGI-PV: 942986 SGI-Modid: xfs-linux:xfs-kern:23859a Signed-off-by: Nathan Scott <nathans@sgi.com>
```diff diff --git a/fs/xfs/linux-2.6/xfs_linux.h b/fs/xfs/linux-2.6/xfs_linux.h index 68c5d885ed9c..960a626dd1e3 100644 --- a/fs/xfs/linux-2.6/xfs_linux.h +++ b/fs/xfs/linux-2.6/xfs_linux.h @@ -254,11 +254,11 @@ static inline void set_buffer_unwritten_io(struct buffer_head *bh) #define MAX(a,b) (max(a,b)) #define ho...
c310ab6c071a688e5291028972d1ae8314f67536
Analyze and fix the following issue in the Linux kernel code: [XFS] Fix signedness issues in dquot ID handling, allowing uids/gids above
Problem Details: MAXINT SGI-PV: 942528 SGI-Modid: xfs-linux:xfs-kern:23828a Signed-off-by: Nathan Scott <nathans@sgi.com>
```diff diff --git a/fs/xfs/quota/xfs_dquot.c b/fs/xfs/quota/xfs_dquot.c index e2e8d35fa4d0..9987977a4927 100644 --- a/fs/xfs/quota/xfs_dquot.c +++ b/fs/xfs/quota/xfs_dquot.c @@ -563,8 +563,7 @@ xfs_qm_dqtobp( */ if (dqp->q_blkno == (xfs_daddr_t) 0) { /* We use the id as an index */ - dqp->q_fileoffset = (xfs_...
739cafd316235fc55463849e80710f2ca308b9ae
Analyze and fix the following issue in the Linux kernel code: [XFS] fix PBF_NONE handling
Problem Details: SGI-PV: 908809 SGI-Modid: xfs-linux:xfs-kern:198669a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
```diff diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index 489b7f63fd1f..188cbbd5b74a 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c @@ -458,7 +458,8 @@ _pagebuf_lookup_pages( unlock_page(bp->pb_pages[i]); } - bp->pb_flags &= ~PBF_NONE; + if (page_count) + bp->...
73ee723e4c6d179c2e9496cc4caf160a18d95603
Analyze and fix the following issue in the Linux kernel code: [ARM] 3081/1: Remove GTWX5715 from ixp4xx_defconfig
Problem Details: Patch from Deepak Saxena CONFIG_MACH_GTWX5715 hardcodes the machine type in head-xscale.S so we can no longer boot on any other machine types. The proper fix would be to remove the hardcoding, but that machine is an off-the-shelf system and most users won't have access to the bootloader. :( Signed-of...
```diff diff --git a/arch/arm/configs/ixp4xx_defconfig b/arch/arm/configs/ixp4xx_defconfig index c279e41ed10e..f74c926beb42 100644 --- a/arch/arm/configs/ixp4xx_defconfig +++ b/arch/arm/configs/ixp4xx_defconfig @@ -104,7 +104,7 @@ CONFIG_ARCH_IXCDP1100=y CONFIG_ARCH_PRPMC1100=y CONFIG_ARCH_IXDP4XX=y CONFIG_CPU_IXP46...
fbd9a6d7a927b2059d1d65441384ffb095f68e58
Analyze and fix the following issue in the Linux kernel code: [ARM] 3079/1: Fix typo in i2c-iop3xx.c (invalid pointer passed to release_mem_region)
Problem Details: Patch from Dan Williams * If request_irq fails then a call to release_mem_region will be made with an invalid pointer. * Two formatting fixes Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Deepak Saxena <dsaxena@plexity.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org...
```diff diff --git a/drivers/i2c/busses/i2c-iop3xx.c b/drivers/i2c/busses/i2c-iop3xx.c index 9888fae1f37a..53c649445102 100644 --- a/drivers/i2c/busses/i2c-iop3xx.c +++ b/drivers/i2c/busses/i2c-iop3xx.c @@ -11,7 +11,7 @@ * * Copyright (C) 1995-1997 Simon G. Vogl, 1998-2000 Hans Berglund * - * And which acknowle...
7b28b0d000eeb62d77add636f5d6eb0da04e48aa
Analyze and fix the following issue in the Linux kernel code: [IB] ucm: 32/64 compatibility fixes
Problem Details: Fix structure layouts to ensure same size on 32-bit and 64-bit architectures. This permits 32-bit userspace apps on a 64-bit kernel. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/include/rdma/ib_user_cm.h b/include/rdma/ib_user_cm.h index 3037588b8464..19be116047f6 100644 --- a/include/rdma/ib_user_cm.h +++ b/include/rdma/ib_user_cm.h @@ -38,7 +38,7 @@ #include <linux/types.h> -#define IB_USER_CM_ABI_VERSION 3 +#define IB_USER_CM_ABI_VERSION 4 enum { IB_USER_CM_CM...
fa87cedd4e89ea29bda622d5cd6dbf19a915fc40
Analyze and fix the following issue in the Linux kernel code: [ARM] 3065/1: ixp2000 typo and whitespace fixes
Problem Details: Patch from Lennert Buytenhek Misc ixp2000 typo and whitespace fixes. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Deepak Saxena <dsaxena@plexity.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c index 69c6cf81a44d..c93a98b2a32c 100644 --- a/arch/arm/mach-ixp2000/core.c +++ b/arch/arm/mach-ixp2000/core.c @@ -1,5 +1,5 @@ /* - * arch/arm/mach-ixp2000/common.c + * arch/arm/mach-ixp2000/core.c * * Common routines used by all IXP24...
d05101738a4e23fa6f22460150a6ef4775d6473f
Analyze and fix the following issue in the Linux kernel code: [WATCHDOG] w83627hf_wdt trivial typo
Problem Details: The most trivial typo fix in the world. Signed-off-by: Pozsar Balazs <pozsy@uhulinux.hu> Signed-off-by: Pdraig Brady <P@draigBrady.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
```diff diff --git a/drivers/char/watchdog/w83627hf_wdt.c b/drivers/char/watchdog/w83627hf_wdt.c index b5d821015421..d15ca9a3986f 100644 --- a/drivers/char/watchdog/w83627hf_wdt.c +++ b/drivers/char/watchdog/w83627hf_wdt.c @@ -359,5 +359,5 @@ module_exit(wdt_exit); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Pdraig Brady...
3aebf25bdcf030f3e4afeb9340486d5b46deb46e
Analyze and fix the following issue in the Linux kernel code: NTFS: Fix a stupid bug causing writes to non-initialized pages to segfault.
Problem Details: Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
```diff diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c index cf3e6ced2d01..727533891813 100644 --- a/fs/ntfs/file.c +++ b/fs/ntfs/file.c @@ -668,10 +668,10 @@ map_buffer_cached: * to, we need to read it in before the write, * i.e. now. */ - if (!buffer_uptodate(bh) && ((bh_pos < pos && - bh_end ...
a39dbcf71eba6e00ac6ae5482f499f9b57f1075e
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix pseries (64-bit) build
Problem Details: A recent commit that removed rtas-fw.h and moved its contents to include/asm-powerpc/rtas.h forgot to also remove the inclusion of it in arch/powerpc/platforms/pseries/setup.c. Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 10cb0f2d9b5b..c0a3d918148a 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c @@ -67,8 +67,6 @@ #include <asm/i8259.h> #include <asm/udbg.h> -#include "rtas-fw.h" ...
89003ebf9e6a9ccb2327caf72955edd86b274c14
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix BUG/WARN macros for 64-bit
Problem Details: The bug_entry struct had an int in the middle of pointers and unsigned longs, and the inline asm that generated the bug table entries didn't insert the necessary padding, so the fields following it didn't get initialized properly and an oops resulted. This changes the int field (the line number) to a ...
```diff diff --git a/include/asm-powerpc/bug.h b/include/asm-powerpc/bug.h index e4d028e87020..943e3d7dbcc7 100644 --- a/include/asm-powerpc/bug.h +++ b/include/asm-powerpc/bug.h @@ -13,7 +13,7 @@ #ifdef __powerpc64__ #define BUG_TABLE_ENTRY(label, line, file, func) \ - ".llong " #label "\n .long " #line "\n .llong...
5015b49448cbe5352b9cc232333ab26f3e608a07
Analyze and fix the following issue in the Linux kernel code: powerpc: fix __strnlen_user in merge tree
Problem Details: Change USER/KERNEL_DS so that the merged version of __strnlen_user can be used which allows us to complete the removal of arch/ppc64/lib/. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
```diff diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile index e6b2be3bcec1..dfb33915ad61 100644 --- a/arch/powerpc/lib/Makefile +++ b/arch/powerpc/lib/Makefile @@ -9,7 +9,7 @@ endif obj-y += strcase.o obj-$(CONFIG_PPC32) += div64.o copy_32.o checksum_32.o obj-$(CONFIG_PPC64) += checksum_64.o cop...
ee807c2d43b54183c16580857837dae8ccb2ed22
Analyze and fix the following issue in the Linux kernel code: [SCSI] ips: Fix initialization bug with kdump
Problem Details: If I/O is active on the adapter, and an unexpected interrupt is pending during initialization, the driver blows it's brains out. Since the driver didn't initiate the I/O, the data in it's internal tables will contain NULL pointers. When this condition is detected, a "flush cache and reset" is performe...
```diff diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index 0a252e7aca6e..749c95bb7df7 100644 --- a/drivers/scsi/ips.c +++ b/drivers/scsi/ips.c @@ -355,6 +355,9 @@ static int ips_init_phase2(int index); static int ips_init_phase1(struct pci_dev *pci_dev, int *indexPtr); static int ips_register_scsi(int index);...
d83c671fb7023f69a9582e622d01525054f23b66
Analyze and fix the following issue in the Linux kernel code: [PATCH] Creative Audigy 2 cardbus: Add IO window wakeup magic
Problem Details: This adds the magic IO wakeup code for the CardBus version of the Creative Labs Audigy 2 to the snd-emu10k1 driver. Without the magic IO enable sequence, reading from the IO region of the card will fail spectacularly, and the machine will hang. My next task will be getting the driver to actually play...
```diff diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h index 14cb2718cb77..46e3c0bf3c94 100644 --- a/include/sound/emu10k1.h +++ b/include/sound/emu10k1.h @@ -1055,6 +1055,7 @@ typedef struct { unsigned char emu10k2_chip; /* Audigy 1 or Audigy 2. */ unsigned char ca0102_chip; /* Audigy 1 or Audigy ...
659603ef692d3f6c7c216e80310990253864bf2e
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix __writeback_single_inode WARN_ON
Problem Details: When the inode count is zero in inode writeback, the WARN_ON(!(inode->i_state & I_WILL_FREE)); is broken, and needs to test for either I_WILL_FREE|I_FREEING. When the inode is in I_FREEING state, it's already out of the visibility of the vm so it can't be freed so it doesn't require the __iget and ...
```diff diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index ffab4783ac64..c27f8d4098be 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -247,7 +247,7 @@ __writeback_single_inode(struct inode *inode, struct writeback_control *wbc) wait_queue_head_t *wqh; if (!atomic_read(&inode->i_count)) - WARN_ON(...
9d17f218936a0fee43ad9493a841136589c942cd
Analyze and fix the following issue in the Linux kernel code: [IPV6]: Fix behavior of ip6_route_input() for link local address
Problem Details: I find that linux will reply echo request destined to an address which belongs to an interface other than the one from which the request received. This behavior doesn't make sense for link local address. YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> said: Please note that sender does need to setup neig...
```diff diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 5d5bbb49ec78..227e99ed510c 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -483,7 +483,7 @@ restart: goto out; } - rt = rt6_device_match(rt, skb->dev->ifindex, 0); + rt = rt6_device_match(rt, skb->dev->ifindex, strict); BACKTRACK(); if ...
a3d7a9d77533d7516a8cfb8e2b612cd5ead4fa59
Analyze and fix the following issue in the Linux kernel code: [ROSE]: rose_heartbeat_expiry() locking fix
Problem Details: Missing unlock, as noted by Ted Unangst <tedu@coverity.com>. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
```diff diff --git a/net/rose/rose_timer.c b/net/rose/rose_timer.c index 50ae0371dab8..b6c8f38cc26c 100644 --- a/net/rose/rose_timer.c +++ b/net/rose/rose_timer.c @@ -138,6 +138,7 @@ static void rose_heartbeat_expiry(unsigned long param) is accepted() it isn't 'dead' so doesn't get removed. */ if (sock_flag(sk...
4fc207419d95e0e16fdc78e2f48f7c0b3640ffe5
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix on-the-fly switch from cfq i/o scheduler
Problem Details: Don't clear ->elevator_data on exit, if we are switching queues we are overwriting the data of the new io scheduler. Signed-off-by: Jens Axboe <axboe@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/block/cfq-iosched.c b/drivers/block/cfq-iosched.c index 5281f8e70510..ecacca9c877e 100644 --- a/drivers/block/cfq-iosched.c +++ b/drivers/block/cfq-iosched.c @@ -2059,10 +2059,8 @@ static void cfq_put_cfqd(struct cfq_data *cfqd) if (!atomic_dec_and_test(&cfqd->ref)) return; - blk_put...
3bc12e75b23c0499cc2c0873a5f77494be173761
Analyze and fix the following issue in the Linux kernel code: [IPoIB] cleanups: fix comment, remove useless variables
Problem Details: Minor cleanups: fix a misleading comment, and get rid of attr_mask variables that are only used to hold constants (just use the constants directly). Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c index 192fef884e21..0a6f578f18c8 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c @@ -486,15 +486,16 @@ int ipoib_ib_dev_stop(struct net_device *dev) { struct ipoib...
e5b251a24a9cd34a7ef98e361eb94e7ab122a554
Analyze and fix the following issue in the Linux kernel code: [IB] mthca: Avoid SRQ free WQE list corruption
Problem Details: Fix wqe_to_link() to use a structure field that we know is definitely always unused for receive work requests, so that it really avoids the free list corruption bug that the comment claims it does. Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/mthca/mthca_srq.c b/drivers/infiniband/hw/mthca/mthca_srq.c index 64f70aa1b3c0..292f55be8cbd 100644 --- a/drivers/infiniband/hw/mthca/mthca_srq.c +++ b/drivers/infiniband/hw/mthca/mthca_srq.c @@ -75,15 +75,16 @@ static void *get_wqe(struct mthca_srq *srq, int n) /* * Retu...
7162a3e0db34e914a8bc5bf74bbae0b386310cf8
Analyze and fix the following issue in the Linux kernel code: [IB] uverbs: Avoid NULL pointer deref on CQ async event
Problem Details: Userspace CQs that have no completion event channel attached end up with their cq_context set to NULL. However, asynchronous events like "CQ overrun" can still occur on such CQs, so add a uverbs_file member to struct ib_ucq_object that we can follow to deliver these events. Signed-off-by: Roland Drei...
```diff diff --git a/drivers/infiniband/core/uverbs.h b/drivers/infiniband/core/uverbs.h index 031cdf3c066d..ecb830127865 100644 --- a/drivers/infiniband/core/uverbs.h +++ b/drivers/infiniband/core/uverbs.h @@ -113,6 +113,7 @@ struct ib_uevent_object { struct ib_ucq_object { struct ib_uobject uobject; + struct ib_...
913ade51eca369553a8ffbdaf1f426fade84f6ae
Analyze and fix the following issue in the Linux kernel code: [SERIAL] Fix port numbering
Problem Details: The PORT_* macros must be uniquely numbered. This fixes the definitions. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 2b0401b93f2b..9d2579230689 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -39,8 +39,7 @@ #define PORT_RSA 13 #define PORT_NS16550A 14 #define PORT_XSCALE 15 -#define PORT_IP3106 16 -#define PORT_MAX_82...
eb16292ba8a6655a560ab10a7d73a7816f0c0ac0
Analyze and fix the following issue in the Linux kernel code: Input: adbhid - fix OOPS introduced by dynalloc conversion
Problem Details: The problem is that adbhid[]->input is NULL, so the kernel oopses with a null pointer dereference as soon as a key is pressed. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/macintosh/adbhid.c b/drivers/macintosh/adbhid.c index cdb6d0283195..8f02c155fdc0 100644 --- a/drivers/macintosh/adbhid.c +++ b/drivers/macintosh/adbhid.c @@ -723,6 +723,7 @@ adbhid_input_register(int id, int default_id, int original_handler_id, sprintf(hid->phys, "adb%d:%d.%02x/input", ...
76440d5e13d7dacd5763394ddb2071424e0b6921
Analyze and fix the following issue in the Linux kernel code: Input: lkkbd - fix debug message in lkkbd_interrupt()
Problem Details: Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/keyboard/lkkbd.c b/drivers/input/keyboard/lkkbd.c index 7f06780a437f..9481132532d0 100644 --- a/drivers/input/keyboard/lkkbd.c +++ b/drivers/input/keyboard/lkkbd.c @@ -441,7 +441,7 @@ lkkbd_interrupt (struct serio *serio, unsigned char data, unsigned int flags, input_sync (lk->dev...
1259f2b3657e21f18a7f31f9b1c027e304838b18
Analyze and fix the following issue in the Linux kernel code: Input: pcspkr - fix setting name and phys for the device
Problem Details: Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/misc/pcspkr.c b/drivers/input/misc/pcspkr.c index e34633c37fdd..68ac97f101b0 100644 --- a/drivers/input/misc/pcspkr.c +++ b/drivers/input/misc/pcspkr.c @@ -71,7 +71,7 @@ static int __init pcspkr_init(void) return -ENOMEM; pcspkr_dev->name = "PC Speaker"; - pcspkr_dev->name = "i...
995fc4df0bc8d88417742e4b1d17889fc64b6ef3
Analyze and fix the following issue in the Linux kernel code: Input: fix input_dev registration message
Problem Details: Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/input.c b/drivers/input/input.c index 3b1685ff9d10..1a1654caedd5 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -730,7 +730,7 @@ static void input_register_classdevice(struct input_dev *dev) "input%ld", (unsigned long) atomic_inc_return(&input_no) - 1); path...
005a5a06a6dd13a0ca3f2c6a0218e8d94ed36d8a
Analyze and fix the following issue in the Linux kernel code: [libata] locking rewrite (== fix)
Problem Details: A lot of power packed into a little patch. This change eliminates the sharing between our controller-wide spinlock and the SCSI core's Scsi_Host lock. As the locking in libata was already highly compartmentalized, always referencing our own lock, and never scsi_host::host_lock. As a side effect, thi...
```diff diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index a17e12032f65..ff18fa7044c5 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -4089,8 +4089,6 @@ static void ata_host_init(struct ata_port *ap, struct Scsi_Host *host, host->unique_id = ata_unique_id++; host-...
e2f2e58e7968f8446b1078a20a18bf8ea12b4fbc
Analyze and fix the following issue in the Linux kernel code: powerpc: import a fix from arch/ppc/mm/pgtable.c
Problem Details: ... namely, the change to the 2-argument pte_alloc_kernel. Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c index f54fb9d3927a..f4e5ac122615 100644 --- a/arch/powerpc/mm/pgtable_32.c +++ b/arch/powerpc/mm/pgtable_32.c @@ -279,18 +279,16 @@ map_page(unsigned long va, phys_addr_t pa, int flags) pte_t *pg; int err = -ENOMEM; - spin_lock(&init...
cf00a8d18b9a1c2d55b2728e89125c234e821db5
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix bug arising from having multiple memory_limit variables
Problem Details: We had a static memory_limit in prom.c, and then another one defined in setup_64.c and used in numa.c, which resulted in the kernel crashing when mem=xxx was given on the command line. This puts the declaration in system.h and the definition in mem.c. This also moves the definition of tce_alloc_start...
```diff diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 6309a1a17c4a..2eccd0e159e3 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -78,15 +78,13 @@ extern struct rtas_t rtas; extern struct lmb lmb; extern unsigned long klimit; -static unsigned long memory_limit...
3e6716e748609a3a899e8d670e42832921bd45bc
Analyze and fix the following issue in the Linux kernel code: [PATCH] hpet: hpet driver cleanups
Problem Details: - Use kzalloc() instead of kmalloc + memset. - Clean/fix some printk's. - Use NULL for pointers instead of 0. - Combine hpet busy searching locations into a function call. Signed-off-by: Randy Dunlap <randy_d_dunlap@linux.intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Tor...
```diff diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index 86a2ee40078b..3808d9572619 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c @@ -284,7 +284,8 @@ static int hpet_mmap(struct file *file, struct vm_area_struct *vma) if (io_remap_pfn_range(vma, vma->vm_start, addr >> PAGE_SHIFT, PAGE...
3d5640d1c7584689227256beeb63354c9a5baf2d
Analyze and fix the following issue in the Linux kernel code: [PATCH] hpet: fix access to multiple HPET devices
Problem Details: Fix two instances where a function would access the first HPET device instead of the current one. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Cc: Bob Picco <bob.picco@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index 73e6614cdf84..cdf2ec842e2c 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c @@ -430,7 +430,7 @@ static int hpet_ioctl_ieon(struct hpet_dev *devp) } if (devp->hd_flags & HPET_SHARED_IRQ) { - isr = 1 << (devp - hpets->hp_dev); + isr = ...
7522e4ecdfdf86b9816f06d55766a6f88baa0348
Analyze and fix the following issue in the Linux kernel code: [PATCH] hpet: fix uninitialized variable in hpet_register()
Problem Details: Clear the ht_opaque field in the hpet_register() function before searching for a free timer to prevent the function from incorrectly assuming that the search succeeded afterwards. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Cc: Bob Picco <bob.picco@hp.com> Signed-off-by: Andrew Morton <akpm@os...
```diff diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index bc5ee99b9c23..73e6614cdf84 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c @@ -587,6 +587,8 @@ int hpet_register(struct hpet_task *tp, int periodic) return -EINVAL; } + tp->ht_opaque = NULL; + spin_lock_irq(&hpet_task_lock); spin...
af95eade68da4dfa29c5b64d79cffc9709facf00
Analyze and fix the following issue in the Linux kernel code: [PATCH] hpet: fix division by zero in HPET_INFO
Problem Details: Fix a division by zero that happened when the HPET_INFO ioctl was called before a timer frequency had been set. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Cc: Bob Picco <bob.picco@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index c85d11de5feb..bc5ee99b9c23 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c @@ -494,8 +494,11 @@ hpet_ioctl_common(struct hpet_dev *devp, int cmd, unsigned long arg, int kernel) { struct hpet_info info; - info.hi_ireqfreq = hpet_t...
8e8505be9c0ba608cbd634faa8fba361f17d2512
Analyze and fix the following issue in the Linux kernel code: [PATCH] hpet: fix HPET_INFO calls from kernel space
Problem Details: Fix a wrong memory access in hpet_ioctl_common(). It was not possible to use the HPET_INFO ioctl from kernel space because it always called copy_to_user(). Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Cc: Bob Picco <bob.picco@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: ...
```diff diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index 8e59639fb03c..c85d11de5feb 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c @@ -500,8 +500,12 @@ hpet_ioctl_common(struct hpet_dev *devp, int cmd, unsigned long arg, int kernel) readq(&timer->hpet_config) & Tn_PER_INT_CAP_MASK; i...
5f819949ee4e5a06c2e0054cbb42f3f0d170d779
Analyze and fix the following issue in the Linux kernel code: [PATCH] hpet-RTC: fix timer config register accesses
Problem Details: Make sure that the RTC timer is in non-periodic mode; some stupid BIOS might have initialized it to periodic mode. Furthermore, don't set the SETVAL bit in the config register. This wouldn't have any effect unless the timer was in period mode (which it isn't), and then the actual timer frequency woul...
```diff diff --git a/arch/i386/kernel/time_hpet.c b/arch/i386/kernel/time_hpet.c index 23e81fcbeaea..cb1f313858e3 100644 --- a/arch/i386/kernel/time_hpet.c +++ b/arch/i386/kernel/time_hpet.c @@ -309,7 +309,8 @@ int hpet_rtc_timer_init(void) local_irq_restore(flags); cfg = hpet_readl(HPET_T1_CFG); - cfg |= HPET_TN...
ba3f213f8a31af953b7e86b1d102c919e9935cd4
Analyze and fix the following issue in the Linux kernel code: [PATCH] HPET: make frequency calculations 32 bit safe
Problem Details: On 32-bit architectures, the multiplication in the argument for hpet_time_div() often overflows. In the typical case of a 14.32 MHz timer, this happens when the desired frequency exceeds 61 Hz. To avoid this multiplication, we can precompute and store the hardware timer frequency, instead of the peri...
```diff diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index b619ca5eaf8c..a1eb14e6d9f7 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c @@ -78,7 +78,7 @@ struct hpets { struct hpet __iomem *hp_hpet; unsigned long hp_hpet_phys; struct time_interpolator *hp_interpolator; - unsigned long hp_period...
874ec33ff9ccf3651590697a2c2923b911bf31d0
Analyze and fix the following issue in the Linux kernel code: [PATCH] sparse cleanups: NULL pointers, C99 struct init.
Problem Details: Convert most of the remaining "Using plain integer as NULL pointer" sparse warnings to use NULL. (Not duplicating patches that are already in -mm, -bird, or -kj.) Convert isdn driver struct initializer to use C99 syntax. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Andrew Morton...
```diff diff --git a/arch/i386/kernel/reboot_fixups.c b/arch/i386/kernel/reboot_fixups.c index 1b183b378c2c..c9b87330aeea 100644 --- a/arch/i386/kernel/reboot_fixups.c +++ b/arch/i386/kernel/reboot_fixups.c @@ -44,7 +44,7 @@ void mach_reboot_fixups(void) for (i=0; i < (sizeof(fixups_table)/sizeof(fixups_table[0]));...
b888c87b7498557d1dbb9de3d4b8402b1bb89193
Analyze and fix the following issue in the Linux kernel code: [PATCH] tpm-tidies
Problem Details: - Various whitespace fixes - Use kzalloc() Acked-by: Kylene Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c index e3919c353f3d..303f15880466 100644 --- a/drivers/char/tpm/tpm.c +++ b/drivers/char/tpm/tpm.c @@ -162,7 +162,8 @@ ssize_t tpm_show_pcrs(struct device *dev, struct device_attribute *attr, < READ_PCR_RESULT_SIZE){ dev_dbg(chip->dev, "A TP...
70a6a0cb92f24fd6bbe2e75299168909f735676a
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix build on nls free systems
Problem Details: I made a patch that detects if libintl.h (needed for nls) is present on the host system and if it's not, it nls support is disabled by providing dummies for the used nls functions. This way if there is nls support on the host system the *config targets will build according to Arnaldo Carvalho de Melo'...
```diff diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 2fcb244a9e18..0dd96919de3e 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -116,6 +116,15 @@ endif clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \ .tmp_gtkcheck zconf.tab.c zconf.tab.h lex.zconf.c +# Neede...
82da2c372712c772134d01317aa2517c923a74f8
Analyze and fix the following issue in the Linux kernel code: [PATCH] lib/string.c cleanup: restore useful memmove const
Problem Details: A couple of (char *) casts removed in a previous cleanup patch in lib/string.c:memmove() were actually useful, as they suppressed a couple of warnings: assignment discards qualifiers from pointer target type Fix by declaring the local variable const in the first place, so casts aren't needed to stri...
```diff diff --git a/lib/string.c b/lib/string.c index d7a5ff9b81ea..037a48acedbb 100644 --- a/lib/string.c +++ b/lib/string.c @@ -488,7 +488,8 @@ EXPORT_SYMBOL(memcpy); */ void *memmove(void *dest, const void *src, size_t count) { - char *tmp, *s; + char *tmp; + const char *s; if (dest <= src) { tmp = dest;...
a3e713b5fdd0e54c2e3c8909ccde2a98839e3a52
Analyze and fix the following issue in the Linux kernel code: [PATCH] __bread oops fix
Problem Details: If a filesystem passes an idiotic blocksize into bread(), __getblk_slow() will warn and will return NULL. We have a report (from Hubert Tonneau <hubert.tonneau@fullpliant.org>) of isofs_fill_super() doing this (passing in a silly block size) against an unplugged CDROM drive. But a couple of __getblk_...
```diff diff --git a/fs/buffer.c b/fs/buffer.c index 75cac9ada026..35fa34977e81 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -1478,8 +1478,10 @@ EXPORT_SYMBOL(__getblk); void __breadahead(struct block_device *bdev, sector_t block, int size) { struct buffer_head *bh = __getblk(bdev, block, size); - ll_rw_block(READ...
708f430dcc50787d1c0b5c31962a5ff0dd8e35eb
Analyze and fix the following issue in the Linux kernel code: [PATCH] posix-cpu-timers: fix overrun reporting
Problem Details: This change corrects an omission in posix_cpu_timer_schedule, so that it correctly propagates the overrun calculation to where it will get reported to the user. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.o...
```diff diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c index bf374fceb39c..91a894264941 100644 --- a/kernel/posix-cpu-timers.c +++ b/kernel/posix-cpu-timers.c @@ -1225,7 +1225,7 @@ void posix_cpu_timer_schedule(struct k_itimer *timer) /* * The task was cleaned up already, no future firings. ...
b3099b48da23686d8378133b0264ee00385ee5fa
Analyze and fix the following issue in the Linux kernel code: [PATCH] fs/attr.c: remove BUG()
Problem Details: Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/fs/attr.c b/fs/attr.c index b1796fb9e524..67bcd9b14ea5 100644 --- a/fs/attr.c +++ b/fs/attr.c @@ -117,9 +117,6 @@ int notify_change(struct dentry * dentry, struct iattr * attr) struct timespec now; unsigned int ia_valid = attr->ia_valid; - if (!inode) - BUG(); - mode = inode->i_mode; now...
c0398ee6c2fe3c1743ecc74a6378b67ba0880a4f
Analyze and fix the following issue in the Linux kernel code: [PATCH] include/linux/kernel.h:BUILD_BUG_ON(): fix a comment
Problem Details: Fix comment describing BUILD_BUG_ON: BUG_ON is not an assertion (unfortunately). Signed-off-by: Nikita Danilov <nikita@clusterfs.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 4367ce4db52a..f1925ccc9fe1 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -307,7 +307,7 @@ struct sysinfo { char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */ }; -/* Force a compilation error if co...
1a66ddcb770fbd20ce115910c7828cafdba099c1
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix vgacon blanking
Problem Details: This patch fixes a long-standing vgacon bug: characters with the bright bit set were left on the screen and not blacked out. All I did was that I lookuped up some examples on the net about setting the vga palette, and added the call missing from the linux kernel, but included in all other ones. It wo...
```diff diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index 809fee2140ac..56cd199605f4 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c @@ -579,6 +579,7 @@ static void vga_set_palette(struct vc_data *vc, unsigned char *table) { int i, j; + vga_w(state....
2973dfdb877c17b36c27ba66d71028ff1eb2f32e
Analyze and fix the following issue in the Linux kernel code: [PATCH] Test for sb_getblk return value
Problem Details: This patch adds tests for the return value of sb_getblk() in the ext2/3 filesystems. In fs/buffer.c it is stated that the getblk() function never fails. However, it does can return NULL in some situations due to I/O errors, which may lead us to NULL pointer dereferences Signed-off-by: Glauber de Oli...
```diff diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index fdba4d1d3c60..e7d3f0522d01 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c @@ -440,6 +440,10 @@ static int ext2_alloc_branch(struct inode *inode, * the pointer to new one, then send parent to disk. */ bh = sb_getblk(inode->i_sb, parent); + if (...
7f04c26d715a2467a49a2384268de8f70f787b51
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix nr_unused accounting, and avoid recursing in iput with I_WILL_FREE set
Problem Details: list_move(&inode->i_list, &inode_in_use); } else { list_move(&inode->i_list, &inode_unused); + inodes_stat.nr_unused++; } } wake_up_inode(inode); Are you sure the above diff is correct? It was added somewhere between 2.6.5 and 2.6.8. I think it's wrong. The only way I can imagine the ...
```diff diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index e94ab398b717..ffab4783ac64 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -230,7 +230,6 @@ __sync_single_inode(struct inode *inode, struct writeback_control *wbc) * The inode is clean, unused */ list_move(&inode->i_list, &inode_un...