id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
6cb9a8350aee789100a365794272ed20cc8f2401
Analyze and fix the following issue in the Linux kernel code: [PATCH] vmi: sched clock paravirt op fix
Problem Details: The custom_sched_clock hook is broken. The result from sched_clock needs to be in nanoseconds, not in CPU cycles. The TSC is insufficient for this purpose, because TSC is poorly defined in a virtual environment, and mostly represents real world time instead of scheduled process time (which can be int...
```diff diff --git a/arch/i386/kernel/paravirt.c b/arch/i386/kernel/paravirt.c index c156ecfa3872..31bbe70d1e02 100644 --- a/arch/i386/kernel/paravirt.c +++ b/arch/i386/kernel/paravirt.c @@ -32,6 +32,7 @@ #include <asm/fixmap.h> #include <asm/apic.h> #include <asm/tlbflush.h> +#include <asm/timer.h> /* nop stub *...
7507ba34e827ca3c6bbcd34d20a8df8ba365fca6
Analyze and fix the following issue in the Linux kernel code: [PATCH] vmi: timer fixes round two
Problem Details: Critical bugfixes for the VMI-Timer code. 1) Do not setup a one shot alarm if we are keeping the periodic alarm armed. Additionally, since the periodic alarm can be run at a lower rate than HZ, let's fixup the guard to the no-idle-hz mode appropriately. This fixes the bug where the no-idle-...
```diff diff --git a/arch/i386/kernel/vmi.c b/arch/i386/kernel/vmi.c index bb5a7abf949c..8417f741fac8 100644 --- a/arch/i386/kernel/vmi.c +++ b/arch/i386/kernel/vmi.c @@ -54,6 +54,7 @@ static int disable_pse; static int disable_sep; static int disable_tsc; static int disable_mtrr; +static int disable_noidle; /* C...
0dc952dc3e6d96d554a19fa7bee3f3b1d55e3cff
Analyze and fix the following issue in the Linux kernel code: [PATCH] Page migration: Fix vma flag checking
Problem Details: Currently we do not check for vma flags if sys_move_pages is called to move individual pages. If sys_migrate_pages is called to move pages then we check for vm_flags that indicate a non migratable vma but that still includes VM_LOCKED and we can migrate mlocked pages. Extract the vma_migratable check...
```diff diff --git a/include/linux/migrate.h b/include/linux/migrate.h index 48148e0cdbd1..75e55dcdeb18 100644 --- a/include/linux/migrate.h +++ b/include/linux/migrate.h @@ -5,6 +5,14 @@ typedef struct page *new_page_t(struct page *, unsigned long private, int **); +/* Check if a vma is migratable */ +static inli...
49015bee4071d56456ef59f1f82be6531615341c
Analyze and fix the following issue in the Linux kernel code: [PATCH] gpio_keys driver shouldn't be ARM-specific
Problem Details: The gpio_keys driver is wrongly ARM-specific; it can't build on other platforms with GPIO suport. This fixes that problem. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: pHilipp Zabel <philipp.zabel@gmail.com> Cc: Haavard Skinnemoen <hskinnemoen...
```diff diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index fa03a00b4c6d..ccf6df387b62 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -23,11 +23,9 @@ #include <linux/platform_device.h> #include <linux/input.h> #include <linux/irq.h> ...
0a938b9768d1fc0e12a884a6820a2e15df5a612c
Analyze and fix the following issue in the Linux kernel code: [PATCH] add CONFIG_GENERIC_GPIO
Problem Details: Most drivers using GPIOs already know they are running on a system that supports the generic GPIO calls, because of other platform dependencies. But the generic GPIO-based LED and input button drivers can't know that. So this patch adds a Kconfig hook, GENERIC_GPIO, to mark the platforms where <asm/gp...
```diff diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index ac2ffdcfbbb4..e7baca29f3fb 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -21,6 +21,10 @@ config ARM config SYS_SUPPORTS_APM_EMULATION bool +config GENERIC_GPIO + bool + default n + config GENERIC_TIME bool default n @@ -163,6 +167,7 @@ c...
1ad7c311079412541bebaf1c8436d405cc8c6b2c
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix soft lockup with iSeries viocd driver
Problem Details: Fix soft lockup with iSeries viocd driver, caused by eventually calling end_that_request_first() with nr_bytes 0. Some versions of hald do an SG_IO ioctl on the viocd device which becomes a request with hard_nr_sectors and hard_cur_sectors set to zero. Passing zero as the number of sectors to end_req...
```diff diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c index dc13ebacedfb..44cd7b2ddf09 100644 --- a/drivers/cdrom/viocd.c +++ b/drivers/cdrom/viocd.c @@ -376,6 +376,25 @@ static int send_request(struct request *req) return 0; } +static void viocd_end_request(struct request *req, int uptodate) +{ + int...
ad5f1196792653dadf09c07a5fa917092b469c1c
Analyze and fix the following issue in the Linux kernel code: [PATCH] ecryptfs: check xattr operation support fix
Problem Details: - ecryptfs_write_inode_size_to_metadata() error code was ignored. - i_op->setxattr() must be supported by lower fs because used below. Signed-off-by: Monakhov Dmitriy <dmonakhov@openvz.org> Acked-by: Michael Halcrow <mhalcrow@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signe...
```diff diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 0cfff4fefa9e..e62f3fc7241e 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c @@ -168,9 +168,9 @@ static int grow_file(struct dentry *ecryptfs_dentry, struct file *lower_file, goto out; } i_size_write(inode, 0); - ecryptfs_write_inode_s...
b1cbf4e4dddd708ba268c3a2bf38383a269d490a
Analyze and fix the following issue in the Linux kernel code: [PATCH] msi: fix up the msi enable/disable logic
Problem Details: enable/disable_msi_mode have several side effects which keeps them from being generally useful. So this patch replaces them with with two much more targeted functions: msi_set_enable and msix_set_enable. This patch makes pci_dev->msi_enabled and pci_dev->msix_enabled the definitive way to test if lin...
```diff diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index fd1068b59b0c..c43e7d22e180 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -38,6 +38,36 @@ static int msi_cache_init(void) return 0; } +static void msi_set_enable(struct pci_dev *dev, int enable) +{ + int pos; + u16 control; + + pos = pci_f...
d5dedf99e4ca9860ce8a1dd42db1cb666c360632
Analyze and fix the following issue in the Linux kernel code: [PATCH] cyclades: return closing_wait
Problem Details: In http://bugzilla.kernel.org/show_bug.cgi?id=8065, Shen points out that the cyclades driver forget to return closing_wait to userspace. Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Shen <shanlu@cs.uiuc.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org...
```diff diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index 54df35527bc5..16dc5d1d3cb4 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c @@ -3501,6 +3501,7 @@ get_serial_info(struct cyclades_port *info, tmp.irq = cinfo->irq; tmp.flags = info->flags; tmp.close_delay = info->close_...
238576e12fef1d52751c6e08db2d0bdb0e248caf
Analyze and fix the following issue in the Linux kernel code: backlight: Fix nvidia backlight initial brightness
Problem Details: Fix a mix up when the nvidia driver was converted resulting in the backlight having an incorrect initial brightness. Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
```diff diff --git a/drivers/video/nvidia/nv_backlight.c b/drivers/video/nvidia/nv_backlight.c index b7016e9b9e13..a50b303093a7 100644 --- a/drivers/video/nvidia/nv_backlight.c +++ b/drivers/video/nvidia/nv_backlight.c @@ -23,8 +23,6 @@ #define MAX_LEVEL 0x534 #define LEVEL_STEP ((MAX_LEVEL - MIN_LEVEL) / FB_BACKLIGH...
e6bcf562e58662b9765748d346e4c076b20e3aa5
Analyze and fix the following issue in the Linux kernel code: sh: Fix kernel thread stack corruption with preempt.
Problem Details: When I run a preemptive kernel-2.6.20 for SH7780, a created kthread(pdflush) can not exit by do_exit() in kernel_thread_helper. I think that the created kthread should have a room for 'struct pt_regs' space on the stack top, because __switch_to() will refer to the space as follows using 'regs = task_pt...
```diff diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c index 9d6a438b3eaf..e7607366ac4e 100644 --- a/arch/sh/kernel/process.c +++ b/arch/sh/kernel/process.c @@ -250,12 +250,11 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, childregs->regs[15] = usp; ti->addr_limit = USE...
c8bfa1fdc84af7b5e3c7f825a9f0bc6e8a19f5d5
Analyze and fix the following issue in the Linux kernel code: sh: Fix sigmask trampling in signal delivery.
Problem Details: There was a missing return in do_signal() that caused the saved sigmask to be written back after having successfully delivered the signal. Signed-off-by: Ryusuke Sakato <sakato@hsdv.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/kernel/signal.c b/arch/sh/kernel/signal.c index 32f10a03fbb5..9f39ef1f73da 100644 --- a/arch/sh/kernel/signal.c +++ b/arch/sh/kernel/signal.c @@ -589,6 +589,8 @@ static void do_signal(struct pt_regs *regs, unsigned int save_r0) if (test_thread_flag(TIF_RESTORE_SIGMASK)) clear_threa...
9432f96803139adaff0cd9f4fa38b7fb99cda366
Analyze and fix the following issue in the Linux kernel code: sh: Clear UBC when not in use.
Problem Details: This takes care of tearing down the UBC so it's not inadvertently left configured at the next context switch time. Failure to do this results in spurious SIGTRAPs in certain debug sequences. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/kernel/entry-common.S b/arch/sh/kernel/entry-common.S index ab4ebb856c2a..b46728027195 100644 --- a/arch/sh/kernel/entry-common.S +++ b/arch/sh/kernel/entry-common.S @@ -224,7 +224,7 @@ work_resched: syscall_exit_work: ! r0: current_thread_info->flags ! r8: current_thread_info - tst #_...
23d046f43a05155e050a68f3ad1f19b672713374
Analyze and fix the following issue in the Linux kernel code: [ARM] ARM SCSI: Don't try to dma_map_sg too many scatterlist entries
Problem Details: An off-by-one bug meant we were always trying to map one too many scatterlist entries. This was mostly harmless prior to the checks going in to consistent_sync(), but now causes the kernel to BUG. Also, powertec.c was missing an assignment to info->ec. Signed-off-by: Russell King <rmk+kernel@arm.lin...
```diff diff --git a/drivers/scsi/arm/cumana_2.c b/drivers/scsi/arm/cumana_2.c index d2d51dc51ab8..82add77ad131 100644 --- a/drivers/scsi/arm/cumana_2.c +++ b/drivers/scsi/arm/cumana_2.c @@ -178,10 +178,10 @@ cumanascsi_2_dma_setup(struct Scsi_Host *host, struct scsi_pointer *SCp, dma_dir = DMA_MODE_READ, alatc...
bb71f99f8daefb4a2c2441298bc127aaff9af947
Analyze and fix the following issue in the Linux kernel code: [ARM] rtc-pcf8583: Final fixes for this RTC on RiscPC
Problem Details: Replace the I2C bus address, as per drivers/acorn/char/pcf8583.c. Also, since this driver also contains Acorn RiscPC specific code for obtaining the current year from the SRAM (and updating the platform specific checksum when writing new data back) this is NOT a platform independent driver. Document ...
```diff diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index deef29646e0e..95826b92ca4b 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -207,10 +207,12 @@ config RTC_DRV_PCF8563 config RTC_DRV_PCF8583 tristate "Philips PCF8583" - depends on RTC_CLASS && I2C + depends on RTC_CLASS && I2C && AR...
8b4ac6f316b493fae511921e25c72119f7b03170
Analyze and fix the following issue in the Linux kernel code: [MIPS] MTX1: clear PCI errors
Problem Details: This patch clears PCI errors after showing more debug informations. Signed-off-by: Florian Fainelli <florian.fainelli@int-evry.fr> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/pci/ops-au1000.c b/arch/mips/pci/ops-au1000.c index 8ae46481fcb7..7932dfe5eb9b 100644 --- a/arch/mips/pci/ops-au1000.c +++ b/arch/mips/pci/ops-au1000.c @@ -172,7 +172,11 @@ static int config_access(unsigned char access_type, struct pci_bus *bus, error = -1; DBG("Au1x Master Abort\n"...
a9b6590ced1370537edad8dc60be32c044b2380e
Analyze and fix the following issue in the Linux kernel code: [MIPS] DMA: Fix a bunch of warnings due to missing inline keywords.
Problem Details: Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/include/asm-mips/mach-generic/dma-coherence.h b/include/asm-mips/mach-generic/dma-coherence.h index df71822fd27b..76e04e7feb84 100644 --- a/include/asm-mips/mach-generic/dma-coherence.h +++ b/include/asm-mips/mach-generic/dma-coherence.h @@ -11,22 +11,24 @@ struct device; -static dma_addr_t pl...
69f282765735b1df5e27b373e64e5238caca8c49
Analyze and fix the following issue in the Linux kernel code: [MIPS] jmr3927: build fix
Problem Details: Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/pci/fixup-jmr3927.c b/arch/mips/pci/fixup-jmr3927.c index f8696081c5b1..6e72d213f4cd 100644 --- a/arch/mips/pci/fixup-jmr3927.c +++ b/arch/mips/pci/fixup-jmr3927.c @@ -38,6 +38,10 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) { unsigned char irq = pin; + /* SMSC...
49fa3c0869677facd846adc928c332b4c20cdc25
Analyze and fix the following issue in the Linux kernel code: [MIPS] SNI: Fix mc146818_decode_year
Problem Details: Big endian RMs uses a different mc146818_decode_year than little endian RMs Correct mc146818_decode_year for years before 2000 Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/include/asm-mips/mach-atlas/mc146818rtc.h b/include/asm-mips/mach-atlas/mc146818rtc.h index a73a5698420c..51d337e1bbd1 100644 --- a/include/asm-mips/mach-atlas/mc146818rtc.h +++ b/include/asm-mips/mach-atlas/mc146818rtc.h @@ -55,6 +55,6 @@ static inline void CMOS_WRITE(unsigned char data, unsigned ...
58e690e6fd47a682b49aed3510443d6797a03021
Analyze and fix the following issue in the Linux kernel code: KVM: Fix bogus failure in kvm.ko module initialization
Problem Details: A bogus 'return r' can cause an otherwise successful module load to fail. This both denies users the use of kvm, and it also denies them the use of their machine, as it leaves a filesystem registered with its callbacks pointing into now-freed module memory. Fix by returning a zero like a good module. ...
```diff diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index e48b4d7a350e..ca82ba359e1a 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c @@ -2540,7 +2540,7 @@ static __init int kvm_init(void) bad_page_address = page_to_pfn(bad_page) << PAGE_SHIFT; memset(__va(bad_page_address), 0, PAGE...
cd1a4a982a78e793125db2f386e91dc7c89c9ed1
Analyze and fix the following issue in the Linux kernel code: KVM: Fix dirty page log bitmap size/access calculation
Problem Details: Since dirty_bitmap is an unsigned long array, the alignment and size need to take that into account. Signed-off-by: Uri Lublin <uril@qumranet.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
```diff diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index edff4055b32b..e7108105c50b 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c @@ -792,9 +792,9 @@ static int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, if (!memslot->dirty_bitmap) goto out; - n = ALIGN(memslot->npages, 8) /...
de979caacca51c929d2cc2f0f79611ee4a1bc8a5
Analyze and fix the following issue in the Linux kernel code: KVM: vmx: hack set_cr0_no_modeswitch() to actually do modeswitch
Problem Details: The whole thing is rotten, but this allows vmx to boot with the guest reboot fix. Signed-off-by: Markus Rechberger <markus.rechberger@amd.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
```diff diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index ff3bfc5c390a..e02c59807a7e 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c @@ -791,6 +791,9 @@ static void vmx_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0) */ static void vmx_set_cr0_no_modeswitch(struct kvm_vcpu *vcpu, unsigned long cr0) ...
bf3f8e86c2e22b9bd1375be1bbbd67384dba4342
Analyze and fix the following issue in the Linux kernel code: KVM: mmu: add missing dirty page tracking cases
Problem Details: We fail to mark a page dirty in three cases: - setting the accessed bit in a pte - setting the dirty bit in a pte - emulating a write into a pagetable This fix adds the missing cases. Signed-off-by: Avi Kivity <avi@qumranet.com>
```diff diff --git a/drivers/kvm/paging_tmpl.h b/drivers/kvm/paging_tmpl.h index b6b90e9e1301..6507ccb1ea2a 100644 --- a/drivers/kvm/paging_tmpl.h +++ b/drivers/kvm/paging_tmpl.h @@ -128,8 +128,10 @@ static int FNAME(walk_addr)(struct guest_walker *walker, goto access_error; #endif - if (!(*ptep & PT_ACCESSED_M...
849138827c962589ac50496fa7feeb2a2d51b467
Analyze and fix the following issue in the Linux kernel code: ide: make legacy IDE VLB modules check for the "probe" kernel params (v2)
Problem Details: Legacy IDE VLB host drivers didn't check for "probe" options when compiled as modules, which was obviously wrong as we don't want module to poke at random I/O ports by simply loading it. Fix it by adding "probe" module param to legacy IDE VLB host drivers. v2: * don't obsolete old "ide0=dtc2278/ht656...
```diff diff --git a/Documentation/ide.txt b/Documentation/ide.txt index 82349f5cd3d7..3bb9f9c98611 100644 --- a/Documentation/ide.txt +++ b/Documentation/ide.txt @@ -294,13 +294,8 @@ The following are valid ONLY on ide0, which usually corresponds to the first ATA interface found on the particular host, and the defaul...
b6209a90eca8c9a464bf9c5b91741fb125185619
Analyze and fix the following issue in the Linux kernel code: ide: remove some obsoleted kernel params (v2)
Problem Details: Remove * "hdx=serialize" * "idex=noautotune" * "idex=autotune" kernel params, they have been obsoleted for ages. "idex=serialize", "hdx=noautotune" and "hdx=autotune" are still available so there is no funcionality loss caused by this patch. v2: * fix CONFIG_BLK_DEV_4DRIVES=y build broken by versi...
```diff diff --git a/Documentation/ide.txt b/Documentation/ide.txt index 786c3a766995..82349f5cd3d7 100644 --- a/Documentation/ide.txt +++ b/Documentation/ide.txt @@ -232,7 +232,9 @@ Summary of ide driver parameters for kernel command line "hdx=remap63" : remap the drive: add 63 to all sector numbers (for DM...
06a9952b8379c48df972023f648014a82582c23a
Analyze and fix the following issue in the Linux kernel code: scc_pata: bugfix for checking DMA IRQ status
Problem Details: On Tuesday 27 February 2007, Akira Iguchi wrote: > > But since I sent the first patch, I found a bug for checking DMA IRQ status. > (http://www.spinics.net/lists/linux-ide/msg06903.html) > Then I sent the fixed patch for libata only. So my drivers/ide patch > still has same bug and I want to fix it, to...
```diff diff --git a/drivers/ide/ppc/scc_pata.c b/drivers/ide/ppc/scc_pata.c index de64b022478b..f84bf791f72e 100644 --- a/drivers/ide/ppc/scc_pata.c +++ b/drivers/ide/ppc/scc_pata.c @@ -509,6 +509,32 @@ static int scc_ide_dma_end(ide_drive_t * drive) return __ide_dma_end(drive); } +/* returns 1 if dma irq issued,...
9e5755bce00bb563739aeb0f09932a1907521167
Analyze and fix the following issue in the Linux kernel code: ide: fix pmac breakage
Problem Details: Fix breakage added in the IDE devel tree. Add header, then fix drivers/ide/ppc/pmac.c: In function `pmac_ide_setup_dma': drivers/ide/ppc/pmac.c:2044: warning: assignment from incompatible pointer type drivers/ide/ppc/pmac.c: In function `pmac_ide_dma_host_on': drivers/ide/ppc/pmac.c:1989: warning: co...
```diff diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index b3c0818c5c6c..25487691c9f1 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c @@ -1840,8 +1840,8 @@ static void __init probe_for_hwifs (void) #endif /* CONFIG_BLK_DEV_CMD640 */ #ifdef CONFIG_BLK_DEV_IDE_PMAC { - extern void pmac_ide_probe(void); ...
81d368e0e2591497106b2543918c79dd6d78277b
Analyze and fix the following issue in the Linux kernel code: ide: ide_get_best_pio_mode() returns incorrect IORDY setting (take 2)
Problem Details: The function ide_get_best_pio_mode() fails to return the correct IORDY setting for the explicitly specified modes -- fix this along with the heading comment, and also remove the long commented out code. Also, while at it, correct the misliading comment about the PIO cycle time in <linux/ide.h> -- it a...
```diff diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c index 8afce4ceea31..68719314df3f 100644 --- a/drivers/ide/ide-lib.c +++ b/drivers/ide/ide-lib.c @@ -345,16 +345,16 @@ static int ide_scan_pio_blacklist (char *model) /** * ide_get_best_pio_mode - get PIO mode from drive - * @driver: drive to consid...
07af427606667c304a2e965cd51d2c03642e8cae
Analyze and fix the following issue in the Linux kernel code: piix/slc90e66: more tuneproc() fixing (take 2)
Problem Details: The tuneproc() method in both these drivers failed to set the drive's own speed. Fix this by renaming the function and "wrapping around it" the new tuneproc() method. Switch back to calling tuneproc() in the PIO fallback code. While at it, also convert the rest of the PIO timing code into proper C. :-...
```diff diff --git a/drivers/ide/pci/piix.c b/drivers/ide/pci/piix.c index 569822f4cf55..061d300ab8be 100644 --- a/drivers/ide/pci/piix.c +++ b/drivers/ide/pci/piix.c @@ -1,10 +1,10 @@ /* - * linux/drivers/ide/pci/piix.c Version 0.46 December 3, 2006 + * linux/drivers/ide/pci/piix.c Version 0.47 February 8, 2007 *...
fab59375b9543f84d1714f7dd00f5d11e531bd3e
Analyze and fix the following issue in the Linux kernel code: ide: fix drive side 80c cable check, take 2
Problem Details: eighty_ninty_three() had word 93 validitity check but not the 80c bit test itself (bit 13). This increases the chance of incorrect wire detection especially because host side cable detection is often unreliable and we sometimes soley depend on drive side cable detection. Fix it. [ bart: fix off-by-1...
```diff diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index c67b3b1e6f4c..bd513f5a2323 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c @@ -583,6 +583,8 @@ u8 eighty_ninty_three (ide_drive_t *drive) if(!(drive->id->hw_config & 0x4000)) return 0; #endif /* CONFIG_IDEDMA_IVB */ + if (...
f92d50e6fd14f6e4601f59aac4cffe617b7b2ce6
Analyze and fix the following issue in the Linux kernel code: cmd64x: fix PIO mode setup (take 3)
Problem Details: The driver's tuneproc() method fails to set the drive's own speed -- fix this by renaming the function to cmd64x_tune_pio(), making it return the mode set, and "wrapping" the new tuneproc() method around it; while at it, also get rid of the non-working prefetch control code (filtering out related argum...
```diff diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c index 49df27513da7..b0d4825c56a9 100644 --- a/drivers/ide/pci/cmd64x.c +++ b/drivers/ide/pci/cmd64x.c @@ -1,6 +1,6 @@ /* $Id: cmd64x.c,v 1.21 2000/01/30 23:23:16 * - * linux/drivers/ide/pci/cmd64x.c Version 1.30 Sept 10, 2002 + * linux/drivers...
21b824771309927172247546b0bff0c4e6831875
Analyze and fix the following issue in the Linux kernel code: alim15x3: fix PIO mode setup
Problem Details: The driver's tuneproc() method fails to set the drive's own speed -- fix this by renaming the function to ali15x3_tune_pio() and "wrapping" the new tuneproc() method around it and making it return the mode set, update the heading comment. Also, setting PIO mode via the speedproc() method does not work...
```diff diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index 4debd18d52f8..83e0aa65a431 100644 --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c @@ -1,5 +1,5 @@ /* - * linux/drivers/ide/pci/alim15x3.c Version 0.17 2003/01/02 + * linux/drivers/ide/pci/alim15x3.c Version 0.21 2007...
527e1e1879cb10958b7ad4e04b3877abf54df3bd
Analyze and fix the following issue in the Linux kernel code: [libata] pata_jmicron: build fix
Problem Details: Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/ata/pata_jmicron.c b/drivers/ata/pata_jmicron.c index 033319e8b6cf..43763c99ea02 100644 --- a/drivers/ata/pata_jmicron.c +++ b/drivers/ata/pata_jmicron.c @@ -244,7 +244,6 @@ static void __exit jmicron_exit(void) { pci_unregister_driver(&jmicron_pci_driver); } -#endif module_init(jmic...
48dc30a148b837bcfff0902011633a94789a64fa
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5366): Pvrusb2: Fix compilation warning for amd64 builds (use %zu instead of %u)
Problem Details: Signed-off-by Mike Isely <isely@pobox.com> Signed-off-by Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 1cd4bb3ae260..1ff5138e4bb6 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c @@ -1268,7 +1268,7 @@ int pvr2_upload_firmware2(struct pvr2_hdw *hdw) if (f...
b5284e5aa94be2f88dc92b29e97aff3da0c45f9f
Analyze and fix the following issue in the Linux kernel code: [HDLC] Fix dev->header_cache_update having a random value.
Problem Details: Switching HDLC devices from Ethernet-framing mode caused stale ethernet function assignments within net_device. Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/wan/hdlc.c b/drivers/net/wan/hdlc.c index 9040d7cf651e..65ad2e24caf0 100644 --- a/drivers/net/wan/hdlc.c +++ b/drivers/net/wan/hdlc.c @@ -38,7 +38,7 @@ #include <linux/hdlc.h> -static const char* version = "HDLC support module revision 1.20"; +static const char* version = "HDLC sup...
248f06726e866942b3d8ca8f411f9067713b7ff8
Analyze and fix the following issue in the Linux kernel code: [AF_UNIX]: Test against sk_max_ack_backlog properly.
Problem Details: This brings things inline with the sk_acceptq_is_full() bug fix. The limit test should be x >= sk_max_ack_backlog. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 606971645b33..51ca4383c388 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -934,7 +934,7 @@ static long unix_wait_for_peer(struct sock *other, long timeo) sched = !sock_flag(other, SOCK_DEAD) && !(other->sk_shutdown & RCV_SHUTDOWN) &&...
8488df894d05d6fa41c2bd298c335f944bb0e401
Analyze and fix the following issue in the Linux kernel code: [NET]: Fix bugs in "Whether sock accept queue is full" checking
Problem Details: when I use linux TCP socket, and find there is a bug in function sk_acceptq_is_full(). When a new SYN comes, TCP module first checks its validation. If valid, send SYN,ACK to the client and add the sock to the syn hash table. Next time if received the valid ACK for SYN,ACK from the client. server wil...
```diff diff --git a/include/net/sock.h b/include/net/sock.h index 2c7d60ca3548..849c7df23181 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -426,7 +426,7 @@ static inline void sk_acceptq_added(struct sock *sk) static inline int sk_acceptq_is_full(struct sock *sk) { - return sk->sk_ack_backlog > sk->sk...
8b453397da923eae4aeb3b41e49793295e09eedf
Analyze and fix the following issue in the Linux kernel code: [netdrvr] tulip, de2104x: fix typo: s/__sparc_/__sparc__/
Problem Details: Noticed by Doug Nazar (via David Miller). Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c index 9d67f11422ec..dacea4fd3337 100644 --- a/drivers/net/tulip/de2104x.c +++ b/drivers/net/tulip/de2104x.c @@ -63,7 +63,7 @@ MODULE_PARM_DESC (debug, "de2104x bitmapped message enable number"); /* Set the copy breakpoint for the copy-onl...
471a567144b91c8f2b7a71a1cf8babe7331590b1
Analyze and fix the following issue in the Linux kernel code: Fix mv643xx_eth compilation.
Problem Details: Commit 908b637fe793165b6aecdc875cdca67c4959a1ad removed ETH_DMA_ALIGN but missed a usage of it in a macro, which broke the build. Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/mv643xx_eth.h b/drivers/net/mv643xx_eth.h index 7cb0a41c5cb4..7d4e90cf49e8 100644 --- a/drivers/net/mv643xx_eth.h +++ b/drivers/net/mv643xx_eth.h @@ -9,6 +9,8 @@ #include <linux/mv643xx.h> +#include <asm/dma-mapping.h> + /* Checksum offload for Tx works for most packets, but * f...
63f779261f9aa16a0196c51092bedfdd32493f9d
Analyze and fix the following issue in the Linux kernel code: qla3xxx: bugfix for line omitted in previous patch.
Problem Details: This missing line caused transmit errors on the Qlogic 4032 chip. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c index 3a14d19b72bd..d3f65dab306c 100755 --- a/drivers/net/qla3xxx.c +++ b/drivers/net/qla3xxx.c @@ -2210,7 +2210,7 @@ static int ql_send_map(struct ql3_adapter *qdev, { struct oal *oal; struct oal_entry *oal_entry; - int len = skb->len; + int len =...
e0e20a1a0822aa64335c05013f0966de6a8fc2c6
Analyze and fix the following issue in the Linux kernel code: NetXen: Fix second rmmod failure observed on PowerPC machines.
Problem Details: Signed-off by: Mithlesh Thukral <mithlesh@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index deec796f90da..a2877f33fa85 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c @@ -508,8 +508,8 @@ void netxen_nic_pci_change_crbwindow(struct netxen_adapter *adapter, u32 wndw) void ...
0c25cfe18afffbc88a2bef28732be9e4846153fe
Analyze and fix the following issue in the Linux kernel code: NetXen: Updates, removal of unsupported features and minor bug fixes.
Problem Details: Signed-off-by: Mithlesh Thukral <mithlesh@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index 2807ef400fb5..81742e4e5610 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h @@ -72,6 +72,8 @@ #define FLASH_SECTOR_SIZE (64 * 1024) #define FLASH_TOTAL_SIZE (NUM_FLASH_SECTORS * FLASH_SECTOR...
4a2e612a3b0cb6502d2317fa3e9d8f22be5db434
Analyze and fix the following issue in the Linux kernel code: myri10ge: fix copyright and license
Problem Details: Fix copyright and license ("regents" should not have ever been used). Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index 954842e85ab9..b05dc6ed7fb7 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c @@ -1,7 +1,7 @@ /************************************************************************* * myri10ge.c: Myricom M...
c8d64f8a058d6d9fde0291348fa5ac4d29c52da2
Analyze and fix the following issue in the Linux kernel code: jmr3927: do not call tc35815_killall().
Problem Details: No need to stop tc35815 before resetting the board. This fixes the build of tc35815 as a module. This also means there is no caller of tc35815_killall left, so remove that function also. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/arch/mips/jmr3927/rbhma3100/setup.c b/arch/mips/jmr3927/rbhma3100/setup.c index 7ca3d6d07b34..ecabe5b08489 100644 --- a/arch/mips/jmr3927/rbhma3100/setup.c +++ b/arch/mips/jmr3927/rbhma3100/setup.c @@ -137,10 +137,6 @@ int jmr3927_ccfg_toeon = 0; static inline void do_reset(void) { -#ifdef CONF...
7ab876703dcbe852652db6441f0aadb3d6b75e94
Analyze and fix the following issue in the Linux kernel code: [RADEON]: Fix blanking return value.
Problem Details: If you'll recall, over a year ago, I pointed out that the current Radeon driver erroneously returns -EINVAL for valid blanking codes, here is a link to that thread: http://lkml.org/lkml/2006/1/28/6 No other driver does this, and it confuses the X server into thinking that the device does not support...
```diff diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c index 7e228aded4c2..46ba1235f03a 100644 --- a/drivers/video/aty/radeon_base.c +++ b/drivers/video/aty/radeon_base.c @@ -1026,8 +1026,7 @@ int radeon_screen_blank(struct radeonfb_info *rinfo, int blank, int mode_switch) break; } ...
b85cdd490ac52ee039636f809b9b98b1300fcf3d
Analyze and fix the following issue in the Linux kernel code: [SPARC]: Fix bus handling in build_device_resources().
Problem Details: We mistakedly modify 'bus' in the innermost loop. What should happen is that at each register index iteration, we start with the same 'bus'. So preserve it's value at the top level, and use a loop local variable 'dbus' for iteration. This bug causes registers other than the first to be decoded impro...
```diff diff --git a/arch/sparc/kernel/of_device.c b/arch/sparc/kernel/of_device.c index dab6169e31ca..798b140fabeb 100644 --- a/arch/sparc/kernel/of_device.c +++ b/arch/sparc/kernel/of_device.c @@ -495,7 +495,7 @@ static void __init build_device_resources(struct of_device *op, u32 *reg = (preg + (index * ((na + ns)...
cc7c15ec167767b440c1de4dbd2200467b7a493b
Analyze and fix the following issue in the Linux kernel code: pata_qdi: Fix initialisation
Problem Details: The QDI init code contains some bugs which mean it only works if you have a test setup that causes both a successful and failed probe. Fix this Found by Philip Guo (Who found it working on code analysis tools not running VLB IDE controllers) Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: J...
```diff diff --git a/drivers/ata/pata_qdi.c b/drivers/ata/pata_qdi.c index c2f87da60336..c3810012f3f4 100644 --- a/drivers/ata/pata_qdi.c +++ b/drivers/ata/pata_qdi.c @@ -363,7 +363,8 @@ static __init int qdi_init(void) release_region(port, 2); continue; } - ct += qdi_init_one(port, 6500, ide_port[r...
fb9f8905a8865679f1fb757380b4169571def0ca
Analyze and fix the following issue in the Linux kernel code: [libata] pata_cmd64x: fix driver description in comments
Problem Details: Trivial comment fix, taken out of a larger Alan Cox patch. Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c index da098282b5f6..adc21ce5b3b9 100644 --- a/drivers/ata/pata_cmd64x.c +++ b/drivers/ata/pata_cmd64x.c @@ -1,5 +1,5 @@ /* - * pata_cmd64x.c - ATI PATA for new ATA layer + * pata_cmd64x.c - CMD64x PATA for new ATA layer * (C) 2005 Red H...
bf7551c441d4b7b0de867d21b96881f3911e89b0
Analyze and fix the following issue in the Linux kernel code: [libata] pata_{legacy,sc1200,sl82c105}: add missing hooks
Problem Details: Alan Cox noticed several hooks in pata_* drivers were missing, when he authored his ->cable_detect hook patches. This patch extracts just those fixes from Alan's patches, adding the necessary hooks (usually ->freeze, ->thaw, and ->post_internal_cmd) to the drivers. Signed-off-by: Jeff Garzik <jeff@ga...
```diff diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c index 6ee61c67163a..fc5b73d78e00 100644 --- a/drivers/ata/pata_legacy.c +++ b/drivers/ata/pata_legacy.c @@ -186,7 +186,10 @@ static struct ata_port_operations legacy_port_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_s...
032af1ce16d496b825adde0fa03948785ee16830
Analyze and fix the following issue in the Linux kernel code: libata-core: Fix simplex handling
Problem Details: The initial simplex handling code is fooled if you suspend and resume. This also causes problems with some single channel controllers which claim to be simplex. The fix is fairly simple, instead of keeping a flag to remember if we gave away the simplex channel we remember the actual owner. As the owne...
```diff diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index ac3d1204ea35..eb59f167d666 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -2556,12 +2556,11 @@ int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev) * host channels are not permitted to do so...
f0930a37f1c096c3a8f6a17b1e251c7fdf4d4457
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix extent code to use merge during delete
Problem Details: Remove implicit commit in del_item and insert_item Add implicit commit to close() Add commit op in random-test Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 57fa505fb9f6..3c5f4c2dd525 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -1065,11 +1065,7 @@ int insert_item(struct ctree_root *root, struct key *key, ret = search_slot(root, key, &path, data_size); if (ret == 0) { release_path(root, &path)...
53037f4c1009c9cf5e6c95a616d1952a240f6540
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP: dmtimer.c omap1 register fix
Problem Details: When I went to use dmtimer7 it did not seem to work. I noticed that the base addresses for dmtimers 7 and 8 were set wrong. A simple patch to correct a small error. Confirmed to fix the problem on an OSK. Signed-off-by: Matthew Percival <matthew@capgo.com> Signed-off-by: Tony Lindgren <tony@atomide...
```diff diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index 6795f04d17b0..45f0439bffba 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c @@ -90,8 +90,8 @@ static struct omap_dm_timer dm_timers[] = { { .phys_base = 0xfffb2c00, .irq = INT_1610_GPTIMER4 }, { .phys_...
2f5c4b6f1ce6595fd977963051a3030911ae4461
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP: Fix warning in mach-omap1
Problem Details: Fix warning arch/arm/mach-omap1/pm.c: In function 'omap_pm_init': arch/arm/mach-omap1/pm.c:765: warning: ignoring return value of 'subsys_create_file', declared with attribute warn_unused_result Signed-off-by: Dirk Behme <dirk.behme_at_gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
```diff diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index 8ff232034871..49efe903dacd 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c @@ -706,6 +706,8 @@ static struct pm_ops omap_pm_ops ={ static int __init omap_pm_init(void) { + int error; + printk("Power Management for ...
ef772f2ee31e0993dca2d59d9ee27682d39902fa
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP: Fix CONFIG_DEBUG_LL
Problem Details: Fix broken CONFIG_DEBUG_LL. In case of low level debugging reconfigure some clocks early. See http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=commitdiff;h=3bfb289ccc6c4624fd5ff0381546935e105f4093 too. Signed-off-by: Dirk Behme <dirk.behme_at_gmail.com> Signed-off-by: Tony Lindgren <t...
```diff diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c index 8aee42c3f5bf..b67ba34c5636 100644 --- a/arch/arm/mach-omap1/clock.c +++ b/arch/arm/mach-omap1/clock.c @@ -649,6 +649,13 @@ int __init omap1_clk_init(void) int crystal_type = 0; /* Default 12 MHz */ u32 reg; +#ifdef CONFIG_DEBUG_L...
e6687290ae9ba935c1435e2ae54cf2f92e1f5f3b
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP: Fix warning in mach-omap2
Problem Details: Fix warning arch/arm/mach-omap2/timer-gp.c: In function 'omap2_gp_timer_init': arch/arm/mach-omap2/timer-gp.c:70: warning: implicit declaration of function 'setup_irq' Signed-off-by: Dirk Behme <dirk.behme_at_gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
```diff diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c index 973189cd9766..6a813f059c89 100644 --- a/arch/arm/mach-omap2/timer-gp.c +++ b/arch/arm/mach-omap2/timer-gp.c @@ -24,6 +24,7 @@ #include <linux/err.h> #include <linux/clk.h> #include <linux/delay.h> +#include <linux/irq.h> #i...
2121880e8816b9b50b04e8b3085bbcce229c37d0
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP: Fix warnings in plat-omap
Problem Details: Fix warnings arch/arm/plat-omap/dmtimer.c: In function 'omap_dm_timer_modify_idlect_mask': arch/arm/plat-omap/dmtimer.c:317: warning: no return statement in function returning non-void arch/arm/plat-omap/mailbox.c: In function 'omap_mbox_init': arch/arm/plat-omap/mailbox.c:231: warning: ignoring retu...
```diff diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index bcbb8d7392be..6795f04d17b0 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c @@ -314,6 +314,8 @@ struct clk *omap_dm_timer_get_fclk(struct omap_dm_timer *timer) __u32 omap_dm_timer_modify_idlect_mask(__u32...
681e9940da89633bd25a6d155118fa5340260bc5
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP: Proper handling of DMA4_IRQSTATUS_L0
Problem Details: The register bits are reset by writing one. Remove the unneeded reads and fix writes to not clear too many bits. Signed-off-by: Timo Teras <timo.teras@solidboot.com> Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
```diff diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index bb045e5ddbd8..f3f84fbf8b87 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -557,7 +557,7 @@ int omap_request_dma(int dev_id, const char *dev_name, omap_enable_channel_irq(free_ch); /* Clear the CSR register and ...
6f9c92f1b9930dd400c79872036d1d8636e6e4b9
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP: Fix warning in clock.c
Problem Details: Fix warning: arch/arm/mach-omap1/clock.c: In function 'omap1_clk_enable_generic': arch/arm/mach-omap1/clock.c:499: warning: 'return' with no value, in function returning non-void Signed-off-by: Dirk Behme <dirk.behme_at_gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
```diff diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c index f8e12946862c..8aee42c3f5bf 100644 --- a/arch/arm/mach-omap1/clock.c +++ b/arch/arm/mach-omap1/clock.c @@ -432,8 +432,7 @@ static int omap1_clk_enable(struct clk *clk) } if (clk->flags & CLOCK_NO_IDLE_PARENT) - if (!cpu_is_...
ef557d76dfbdf74c240f76be15fa90d62f1ae61f
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP: correct misc 15xx and non-15xx platform code
Problem Details: Disable accesses to SOFT_REQ_REG2 and ULPD_SOFT_DISABLE_REQ_REG registers for 15xx processors that don't have these registers. Enable level 2 interrupt handler for processors that identify as OMAP 15xx (e.g 310) and not 1510 specifically. Also fix the following compiler warning (only visible with CONFI...
```diff diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c index 638490e62d5f..f8e12946862c 100644 --- a/arch/arm/mach-omap1/clock.c +++ b/arch/arm/mach-omap1/clock.c @@ -496,7 +496,7 @@ static int omap1_clk_enable_generic(struct clk *clk) } } - return 0; + return; } static void omap1_clk...
d701d8a3bc1c0f56fa2759f631f86a320b66f13e
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix sysfs build breakage if !CONFIG_SYSFS
Problem Details: B0rkage introduced by dfa87c824a9a5430008acd1ed2e8111ed164fcbe. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 21805b500aa2..523405e1e1f6 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h @@ -211,9 +211,8 @@ static inline int sysfs_add_file_to_group(struct kobject *kobj, } static inline void sysfs_remove_file_from_group(struct kobject *kob...
516dffdcd8827a40532798602830dfcfc672294c
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix get_unmapped_area and fsync for hugetlb shm segments
Problem Details: This patch provides the following hugetlb-related fixes to the recent stacked shm files changes: - Update is_file_hugepages() so it will reconize hugetlb shm segments. - get_unmapped_area must be called with the nested file struct to handle the sfd->file->f_ops->get_unmapped_area == NULL case. - ...
```diff diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index a60995afe334..3f3e7a648da3 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -4,6 +4,7 @@ #ifdef CONFIG_HUGETLB_PAGE #include <linux/mempolicy.h> +#include <linux/shm.h> #include <asm/tlbflush.h> struct ctl_table; @...
1aa56cca5bfa396c791e93b38e4776ef39b590a7
Analyze and fix the following issue in the Linux kernel code: libata: clear drvdata in ata_host_release(), take#2
Problem Details: Clearing drvdata in ->remove_one causes NULL pointer deference. Clear drvdata only in ata_host_release() after all resources are freed. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index c8d44a7c403f..17ad152714e6 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -5680,6 +5680,8 @@ static void ata_host_release(struct device *gendev, void *res) if (host->ops->host_stop) host->ops->host_stop(ho...
7b965e0884cee430ffe5dc81cdb117b9316b0549
Analyze and fix the following issue in the Linux kernel code: [PATCH] VM: invalidate_inode_pages2_range() should not exit early
Problem Details: Fix invalidate_inode_pages2_range() so that it does not immediately exit just because a single page in the specified range could not be removed. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@...
```diff diff --git a/mm/truncate.c b/mm/truncate.c index ebf3fcb4115b..0f4b6d18ab0e 100644 --- a/mm/truncate.c +++ b/mm/truncate.c @@ -375,10 +375,10 @@ int invalidate_inode_pages2_range(struct address_space *mapping, pagevec_init(&pvec, 0); next = start; - while (next <= end && !ret && !wrapped && + while (next ...
5a39e8c6d655b4fe8305ef8cc2d9bbe782bfee5f
Analyze and fix the following issue in the Linux kernel code: [PATCH] tty_io: fix race in master pty close/slave pty close path
Problem Details: This patch fixes a possible race that leads to double freeing an idr index. When the master begin to close, release_dev() is called and then pty_close() is called: if (tty->driver->close) tty->driver->close(tty, filp); This is done without helding any locks other than BKL. I...
```diff diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index f24c26d2dba1..e45326856680 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -1901,6 +1901,20 @@ static int init_dev(struct tty_driver *driver, int idx, /* check whether we're reopening an existing tty */ if (driver->flags & TT...
3a0ee2ce8cc4f962031d7520df960431c2f26a9c
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix memory leak in dma_declare_coherent_memory()
Problem Details: When it goes to free1_out, dev->dma_mem has not been freed. Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/arch/cris/arch-v32/drivers/pci/dma.c b/arch/cris/arch-v32/drivers/pci/dma.c index 426b09878a05..70d3bf0c92e8 100644 --- a/arch/cris/arch-v32/drivers/pci/dma.c +++ b/arch/cris/arch-v32/drivers/pci/dma.c @@ -111,7 +111,7 @@ int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, re...
17f0cd2f350b90b28301e27fe0e39f34bfe7e730
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix buffer overflow and races in capi debug functions
Problem Details: The CAPI trace debug functions were using a fixed size buffer, which can be overflowed if wrong formatted CAPI messages were sent to the kernel capi layer. The code was also not protected against multiple callers. This fix bug 8028. Additionally the patch make the CAPI trace functions optional. Sig...
```diff diff --git a/drivers/isdn/capi/Kconfig b/drivers/isdn/capi/Kconfig index 8b6c9a431ffa..c921d6c522f5 100644 --- a/drivers/isdn/capi/Kconfig +++ b/drivers/isdn/capi/Kconfig @@ -2,13 +2,25 @@ # Config.in for the CAPI subsystem # config ISDN_DRV_AVMB1_VERBOSE_REASON - bool "Verbose reason code reporting (kernel ...
7355690ead6d61f6344072ae61060f985060da29
Analyze and fix the following issue in the Linux kernel code: [PATCH] sched: fix SMT scheduler bug
Problem Details: The SMT scheduler incorrectly skips kernel threads even if they are runnable (but they are preempted by a higher-prio user-space task which got SMT-delayed by an even higher-priority task running on a sibling CPU). Fix this for now by only doing the SMT-nice optimization if the to-be-delayed task is t...
```diff diff --git a/kernel/sched.c b/kernel/sched.c index 0c5ebf59b8bc..5f102e6c7a4c 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -3547,7 +3547,7 @@ need_resched_nonpreemptible: } } next->sleep_type = SLEEP_NORMAL; - if (dependent_sleeper(cpu, rq, next)) + if (rq->nr_running == 1 && dependent_sleeper(cpu...
8a2bfdcbfa441d8b0e5cb9c9a7f45f77f80da465
Analyze and fix the following issue in the Linux kernel code: [PATCH] ext[34]: EA block reference count racing fix
Problem Details: There are race issues around ext[34] xattr block release code. ext[34]_xattr_release_block() checks the reference count of xattr block (h_refcount) and frees that xattr block if it is the last one reference it. Unlike ext2, the check of this counter is unprotected by any lock. ext[34]_xattr_release_b...
```diff diff --git a/fs/ext3/xattr.c b/fs/ext3/xattr.c index 99857a400f4b..12f7dda1232c 100644 --- a/fs/ext3/xattr.c +++ b/fs/ext3/xattr.c @@ -475,8 +475,15 @@ ext3_xattr_release_block(handle_t *handle, struct inode *inode, struct buffer_head *bh) { struct mb_cache_entry *ce = NULL; + int error = 0; ce = mb...
1463fdbcc797dfcb8574ababbd39cf6205f6ed00
Analyze and fix the following issue in the Linux kernel code: [PATCH] uml: pte_mkread fix
Problem Details: Fix the fact that pte_mkread set _PAGE_RW instead of _PAGE_USER (the logic is copied from i386 in most place, so it is really as bad as you're thinking). Thus currently page tables are more permissive than they should. Such a change may trigger other latent bugs, so be careful with this. Signed-off-...
```diff diff --git a/include/asm-um/pgtable.h b/include/asm-um/pgtable.h index e57ff136ee51..1b1090a91a58 100644 --- a/include/asm-um/pgtable.h +++ b/include/asm-um/pgtable.h @@ -270,7 +270,7 @@ static inline pte_t pte_wrprotect(pte_t pte) static inline pte_t pte_mkread(pte_t pte) { - pte_set_bits(pte, _PAGE_RW); ...
14251809b1921b1216568700f1be2f91a1cbb5c7
Analyze and fix the following issue in the Linux kernel code: [PATCH] uml: host VDSO fix
Problem Details: This fixes a problem seen by a number of people running UML on newer host kernels. init would hang with an infinite segfault loop. It turns out that the host kernel was providing a AT_SYSINFO_EHDR of 0xffffe000, which faked UML into believing that the host VDSO page could be reused. However, AT_SYSI...
```diff diff --git a/arch/um/os-Linux/elf_aux.c b/arch/um/os-Linux/elf_aux.c index 3a8d7e3aae0a..608784d4ec57 100644 --- a/arch/um/os-Linux/elf_aux.c +++ b/arch/um/os-Linux/elf_aux.c @@ -39,6 +39,9 @@ __init void scan_elf_aux( char **envp) switch ( auxv->a_type ) { case AT_SYSINFO: __kernel_vsyscall = auxv-...
d1af65d13f3625543916a85c86d02826df910fcf
Analyze and fix the following issue in the Linux kernel code: [PATCH] Bug in MM_RB debugging
Problem Details: The code is seemingly trying to make sure that rb_next() brings us to successive increasing vma entries. But the two variables, prev and pend, used to perform these checks, are never advanced. Signed-off-by: David S. Miller <davem@davemloft.net> Cc: Andrea Arcangeli <andrea@novell.com> Signed-off-by:...
```diff diff --git a/mm/mmap.c b/mm/mmap.c index eb509ae76553..84f997da78d7 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -299,6 +299,8 @@ static int browse_rb(struct rb_root *root) printk("vm_end %lx < vm_start %lx\n", vma->vm_end, vma->vm_start); i++; pn = nd; + prev = vma->vm_start; + pend = vma->vm_end; }...
af727902212343211627da14d17c85592feb0e18
Analyze and fix the following issue in the Linux kernel code: [PATCH] uml: fix host LDT lookup initialization locking, try 2
Problem Details: Add some locking to host_ldt_entries to prevent racing when reading LDT information from the host. The locking is somewhat more careful than my previous attempt. Now, only the check of host_ldt_entries is locked. The lock is dropped immediately afterwards, and if the LDT needs initializing, that (an...
```diff diff --git a/arch/um/sys-i386/ldt.c b/arch/um/sys-i386/ldt.c index 5db7737df0ff..4a8b4202ef9e 100644 --- a/arch/um/sys-i386/ldt.c +++ b/arch/um/sys-i386/ldt.c @@ -7,6 +7,7 @@ #include "linux/slab.h" #include "linux/types.h" #include "linux/errno.h" +#include "linux/spinlock.h" #include "asm/uaccess.h" #inc...
dae9f8e63cbb532e8c4b9c54bda0bf511af9c01c
Analyze and fix the following issue in the Linux kernel code: [PATCH] drivers/isdn/gigaset: build asyncdata.o into the gigaset module (fix)
Problem Details: a) Remove #define acrobatics that have become unnecessary by the move of asyncdata.o into the common part. b) Correct the rule for building the common part into the kernel when some or all hardware specific parts are built as modules. Signed-off-by: Tilman Schmidt <tilman@imap.cc> Cc: Adrian Bu...
```diff diff --git a/drivers/isdn/gigaset/Makefile b/drivers/isdn/gigaset/Makefile index 5158be0b7ab4..e9d3189f56b7 100644 --- a/drivers/isdn/gigaset/Makefile +++ b/drivers/isdn/gigaset/Makefile @@ -1,8 +1,9 @@ gigaset-y := common.o interface.o proc.o ev-layer.o i4l.o asyncdata.o usb_gigaset-y := usb-gigaset.o -bas_g...
e109ebd1eed2b91e3c9bb3b42cc27961f0dc22b3
Analyze and fix the following issue in the Linux kernel code: [PATCH] rtc_cmos oops fix
Problem Details: Fix an oops on the rtc_device_unregister() path by waiting until the last moment before nulling the rtc->ops vector. Fix some potential oopses by having the rtc_class_open()/rtc_class_close() interface increase the RTC's reference count while an RTC handle is available outside the RTC framework. Sign...
```diff diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index 7a0d8ee2de9c..04aaa6347234 100644 --- a/drivers/rtc/class.c +++ b/drivers/rtc/class.c @@ -113,10 +113,16 @@ EXPORT_SYMBOL_GPL(rtc_device_register); */ void rtc_device_unregister(struct rtc_device *rtc) { - mutex_lock(&rtc->ops_lock); - rtc->ops = ...
1499993cc7bfd568f471bd697499cff394e46822
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix section mismatch warning in lockdep
Problem Details: lockdep_init() is marked __init but used in several places outside __init code. This causes following warnings: $ scripts/mod/modpost kernel/lockdep.o WARNING: kernel/built-in.o - Section mismatch: reference to .init.text:lockdep_init from .text.lockdep_init_map after 'lockdep_init_map' (at offset 0x10...
```diff diff --git a/kernel/lockdep.c b/kernel/lockdep.c index a08a17218dfa..8dc24c92dc6d 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c @@ -2602,7 +2602,7 @@ out_restore: raw_local_irq_restore(flags); } -void __init lockdep_init(void) +void lockdep_init(void) { int i; ```
93a6fefe2f6fc380870c0985b246bec7f37a06f7
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix the SYSCTL=n compilation
Problem Details: /home/bunk/linux/kernel-2.6/linux-2.6.20-mm2/kernel/sysctl.c:1411: error: conflicting types for 'register_sysctl_table' /home/bunk/linux/kernel-2.6/linux-2.6.20-mm2/include/linux/sysctl.h:1042: error: previous declaration of 'register_sysctl_table' was here make[2]: *** [kernel/sysctl.o] Error 1 Cause...
```diff diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 3ca1d5ff0319..34b2301276ce 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -1359,8 +1359,7 @@ void unregister_sysctl_table(struct ctl_table_header * header) } #else /* !CONFIG_SYSCTL */ -struct ctl_table_header * register_sysctl_table(ctl_table * ta...
c1e16aa2792a129d8920e22210ef21eb62a0f80a
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix posix-cpu-timer breakage caused by stale p->last_ran value
Problem Details: Problem description at: http://bugzilla.kernel.org/show_bug.cgi?id=8048 Commit b18ec80396834497933d77b81ec0918519f4e2a7 [PATCH] sched: improve migration accuracy optimized the scheduler time calculations, but broke posix-cpu-timers. The problem is that the p->last_ran value is not updated after a...
```diff diff --git a/kernel/sched.c b/kernel/sched.c index 0dc757246d89..0c5ebf59b8bc 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -3566,7 +3566,7 @@ switch_tasks: sched_info_switch(prev, next); if (likely(prev != next)) { - next->timestamp = now; + next->timestamp = next->last_ran = now; rq->nr_switc...
05fb6bf0b29552b64dc86f405a484de2514e0ac2
Analyze and fix the following issue in the Linux kernel code: [PATCH] kernel-doc fixes for 2.6.20-git15 (non-drivers)
Problem Details: Fix kernel-doc warnings in 2.6.20-git15 (lib/, mm/, kernel/, include/). Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 37f9279192a9..3bef961b58b1 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h @@ -140,6 +140,7 @@ struct hrtimer_sleeper { /** * struct hrtimer_base - the timer base for a specific clock + * @cpu_base: per cpu clock base ...
64a742bc61f9115b0bb270fa081e5b5b9c35dcd0
Analyze and fix the following issue in the Linux kernel code: [PATCH] md: fix raid10 recovery problem.
Problem Details: There are two errors that can lead to recovery problems with raid10 when used in 'far' more (not the default). Due to a '>' instead of '>=' the wrong block is located which would result in garbage being written to some random location, quite possible outside the range of the device, causing the newly ...
```diff diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index a9401c017e35..82249a69014f 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -429,7 +429,7 @@ static sector_t raid10_find_virt(conf_t *conf, sector_t sector, int dev) if (dev < 0) dev += conf->raid_disks; } else { - while (sector...
5a243e0e97edce27c12f87354fd987526ba1ce95
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix failure paths in modules init in umem.c
Problem Details: If register_blkdev() or alloc-disk fail in mm_init() after pci_register_driver() succeeds, then mm_pci_driver is not unregistered properly: Cc: Philip Guo <pg@cs.stanford.edu> Signed-off-by: Neil Brown <neilb@suse.de> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foun...
```diff diff --git a/drivers/block/umem.c b/drivers/block/umem.c index dff3766f117f..5872036e8ae6 100644 --- a/drivers/block/umem.c +++ b/drivers/block/umem.c @@ -1179,8 +1179,10 @@ static int __init mm_init(void) return -ENOMEM; err = major_nr = register_blkdev(0, "umem"); - if (err < 0) + if (err < 0) { + pci...
88171cfed5810a2354eb1977883589a05ce8d304
Analyze and fix the following issue in the Linux kernel code: IB/mthca: Fix error path in mthca_alloc_memfree()
Problem Details: The garbled logic in mthca_alloc_memfree() causes it to return 0, even if it fails to allocate all doorbell records. Fix it to return -ENOMEM when it fails. Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c index 71dc84bd4254..1c6b63aca268 100644 --- a/drivers/infiniband/hw/mthca/mthca_qp.c +++ b/drivers/infiniband/hw/mthca/mthca_qp.c @@ -1088,21 +1088,21 @@ static void mthca_unmap_memfree(struct mthca_dev *dev, static in...
31726798bd8fbef6244b28cf962f4a4c45793dea
Analyze and fix the following issue in the Linux kernel code: IB/ehca: Fix sync between completion handler and destroy cq
Problem Details: This patch fixes two issues reported by Roland Dreier and Christoph Hellwig: - Mismatched sync/locking between completion handler and destroy cq We introduced a counter nr_events per cq to track number of irq events seen. This counter is incremented when an event queue entry is seen and decremen...
```diff diff --git a/drivers/infiniband/hw/ehca/ehca_classes.h b/drivers/infiniband/hw/ehca/ehca_classes.h index 40404c9e2817..82ded44c6cee 100644 --- a/drivers/infiniband/hw/ehca/ehca_classes.h +++ b/drivers/infiniband/hw/ehca/ehca_classes.h @@ -52,6 +52,8 @@ struct ehca_mw; struct ehca_pd; struct ehca_av; +#inclu...
1d1370a48ca285ebe197ecd3197a8d5f161bc291
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5276): Cxusb: fix firmware patch for big endian systems
Problem Details: Without this patch, the device will not be detected after firmware download on big endian systems. Signed-off-by: Jin-Bong lee <jinbong.lee@samsung.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c index 15d12fce34df..127a94b9a1b5 100644 --- a/drivers/media/dvb/dvb-usb/cxusb.c +++ b/drivers/media/dvb/dvb-usb/cxusb.c @@ -469,9 +469,9 @@ static int bluebird_patch_dvico_firmware_download(struct usb_device *udev, fw->data...
b9109b758231c6c7fd8a5094099e8195d43b583a
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5258): Cafe_ccic: fix compiler warning
Problem Details: Fix the following warning: drivers/media/video/cafe_ccic.c: In function `cafe_vidioc_reqbufs': drivers/media/video/cafe_ccic.c:1197: warning: 'ret' might be used uninitialized in this function Probably not a real bug, but the warning can be avoided easily. Signed-off-by: Jean Delvare <khali@linux-fr.o...
```diff diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c index 682dc7ce48d9..710c11a68296 100644 --- a/drivers/media/video/cafe_ccic.c +++ b/drivers/media/video/cafe_ccic.c @@ -1022,7 +1022,7 @@ static ssize_t cafe_v4l_read(struct file *filp, char __user *buffer, size_t len, loff_t *pos...
2fe22dcdc79b8dd34e61a3f1231caffd6180a626
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5295): Digitv: open nxt6000 i2c_gate for TDED4 tuner handling
Problem Details: dvb-pll normally opens the i2c gate before attempting to communicate with the pll, but the code for this device is not using dvb-pll. This should be cleaned up in the future, but for now, just open the i2c gate at the appropriate place in order to fix this driver bug. Signed-off-by: Michael Krufky <m...
```diff diff --git a/drivers/media/dvb/dvb-usb/digitv.c b/drivers/media/dvb/dvb-usb/digitv.c index 4a198d4755b0..b5acb11c0bc9 100644 --- a/drivers/media/dvb/dvb-usb/digitv.c +++ b/drivers/media/dvb/dvb-usb/digitv.c @@ -119,6 +119,8 @@ static int digitv_nxt6000_tuner_set_params(struct dvb_frontend *fe, struct dvb_f st...
d55c7aec666658495e5b57a6b194c8c2a1ac255f
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5255): Fix cx25840 firmware loading.
Problem Details: Due to changes in the i2c handling in 2.6.20 this cx25840 bug surfaced, causing the firmware load to fail for the ivtv driver. The correct sequence is to first attach the i2c client, then use the client's device to load the firmware. Acked-by: Mike Isely <isely@pobox.com> Signed-off-by: Hans Verkuil <...
```diff diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index cc535ca713d2..3ff5fc00c09d 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c @@ -903,13 +903,13 @@ static int cx25840_detect_client(struct i2c_adapter...
25914662b7e86f8cf8abdde0497e7fe8bdddf2ae
Analyze and fix the following issue in the Linux kernel code: HID: fix Logitech DiNovo Edge touchwheel and Logic3 /SpectraVideo middle button
Problem Details: Dongle shipped with Logitech DiNovo Edge (0x046d/0xc714) behaves in a weird non-standard way - it contains multiple reports with the same usage, which results in remapping of GenericDesktop.X and GenericDesktop.Y usages to GenericDesktop.Z and GenericDesktop.RX respectively, thus rendering the touchwhe...
```diff diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index eeba66513997..c8434023ba65 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -71,7 +71,6 @@ static const struct { #define map_led(c) do { usage->code = c; usage->type = EV_LED; bit = input->ledbit; max = LED_MAX; } while (...
b55fd23ccdf32f969a7b4180c6e52d62d8e99972
Analyze and fix the following issue in the Linux kernel code: HID: fix broken Logitech S510 keyboard report descriptor; make extra keys work
Problem Details: This patch makes extra keys (F1-F12 in special mode, zooming, rotate, shuffle) on Logitech S510 keyboard work. Logitech S510 keyboard sends in report no. 3 keys which are far above the logical maximum described in descriptor for given report. This patch introduces a HID quirk for this wireless USB re...
```diff diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 25d180a24fc4..eeba66513997 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -2,7 +2,7 @@ * $Id: hid-input.c,v 1.2 2002/04/23 00:59:25 rdamazio Exp $ * * Copyright (c) 2000-2001 Vojtech Pavlik - * Copyright (c) 2006...
776c0e96edecf77f827a62d2a1641cc2ca479043
Analyze and fix the following issue in the Linux kernel code: HID: fix possible double-free on error path in hid parser
Problem Details: Freeing of device->collection is properly done in hid_free_device() (as this function is supposed to free all the device resources and could be called from transport specific code, e.g. usb_hid_configure()). Remove all kfree() calls preceeding the hid_free_device() call. Signed-off-by: Jiri Kosina <j...
```diff diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index aeeb6798e2f1..f4ee1afe488f 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -667,7 +667,6 @@ struct hid_device *hid_parse_report(__u8 *start, unsigned size) if (item.format != HID_ITEM_FORMAT_SHORT) { dbg("unexpected ...
4330eb2e5fb6d3c9c0a0be8ed14793f72334d1d4
Analyze and fix the following issue in the Linux kernel code: HID: hid-debug.c should #include <linux/hid-debug.h>
Problem Details: Every file should include the headers containing the prototypes for it's global functions. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c index 89241be4ec9b..83c4126b37c3 100644 --- a/drivers/hid/hid-debug.c +++ b/drivers/hid/hid-debug.c @@ -29,6 +29,7 @@ */ #include <linux/hid.h> +#include <linux/hid-debug.h> struct hid_usage_entry { unsigned page; ```
4237081e573b99a48991aa71364b0682c444651c
Analyze and fix the following issue in the Linux kernel code: HID: fix bug in zeroing the last field byte in output reports
Problem Details: d4ae650a904612ffb7edd3f28b69b022988d2466 introduced zeroing of the last field byte in output reports in order to make sure the unused bits are set to 0. This is done in a wrong way, resulting in a wrong bits being zeroed out (not properly shifted by the field offset in the report). Fix this. Signed-of...
```diff diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 7452399501b4..aeeb6798e2f1 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -880,7 +880,7 @@ static void hid_output_field(struct hid_field *field, __u8 *data) /* make sure the unused bits in the last byte are zeros */ if...
fdc9c566161c119febe4fab0f7c382416681fd8f
Analyze and fix the following issue in the Linux kernel code: USB HID: use CONFIG_HID_DEBUG for outputting report descriptor
Problem Details: Report descriptor should be output when CONFIG_HID_DEBUG is defined. This also mitigates the need for DEBUG and DEBUG_DATA defines, so let's remove them. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c index 905156c52ad3..378af7ae2bfb 100644 --- a/drivers/usb/input/hid-core.c +++ b/drivers/usb/input/hid-core.c @@ -27,9 +27,6 @@ #include <linux/input.h> #include <linux/wait.h> -#undef DEBUG -#undef DEBUG_DATA - #include <linux/usb.h>...
9fa2ad5ff4d8ded8c29c7b6cc92a1c3a8d8a2079
Analyze and fix the following issue in the Linux kernel code: USB HID: Fix USB vendor and product IDs endianness for USB HID devices
Problem Details: The USB vendor and product IDs are not byteswapped appropriately, and thus come out in the wrong endianness when fetched through the evdev using ioctl() on big endian platforms. Signed-off-by: Julien BLACHE <jb@jblache.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c index ef09952f2039..905156c52ad3 100644 --- a/drivers/usb/input/hid-core.c +++ b/drivers/usb/input/hid-core.c @@ -1225,8 +1225,8 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf) le16_to_cpu(dev->descriptor.id...
3acaf540a33199141695f2e2fcfa8829053159bf
Analyze and fix the following issue in the Linux kernel code: Input: HIL - various fixes for HIL drivers
Problem Details: - mark some structures const or __read_mostly - hilkbd.c: fix uninitialized spinlock in HIL keyboard driver - hil_mlc.c: use USEC_PER_SEC instead of 1000000 - hp_sdc: bugfix for request_irq()/free_irq() parameters, this prevented multiple load/unload cycles as module Signed-off-by: Helge...
```diff diff --git a/drivers/input/keyboard/hil_kbd.c b/drivers/input/keyboard/hil_kbd.c index 7cc9728b04df..7143f37927cd 100644 --- a/drivers/input/keyboard/hil_kbd.c +++ b/drivers/input/keyboard/hil_kbd.c @@ -51,7 +51,7 @@ MODULE_LICENSE("Dual BSD/GPL"); #define HIL_KBD_SET1_UPBIT 0x01 #define HIL_KBD_SET1_SHIFT ...
c7af1857ef74873bf5a9c8fcab0cfd79883492ac
Analyze and fix the following issue in the Linux kernel code: [CIFS] Fix set file size to zero when doing chmod to Samba 3.0.26pre
Problem Details: In fixing a bug Samba 3.0.26pre allowed some clients (including Linux cifs client) to change file size to zero in SET_FILE_UNIX_BASIC (which Linux cifs client uses for chmod). The server has been "fixed" now but that also fixes the client to net send file size zero on chmod. Fixes Samba bugzilla bug ...
```diff diff --git a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h index 2498d644827c..0efdf35aab2c 100644 --- a/fs/cifs/cifspdu.h +++ b/fs/cifs/cifspdu.h @@ -220,6 +220,9 @@ */ #define CIFS_NO_HANDLE 0xFFFF +#define NO_CHANGE_64 0xFFFFFFFFFFFFFFFFULL +#define NO_CHANGE_32 0xFFFFFFFFUL + /* IPC$ ...
74bd7d093b8e87f35eaf3b14459b96a0e20d1d10
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix parport_pc build.
Problem Details: Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/asm-sparc64/dma.h b/include/asm-sparc64/dma.h index 93e5a062df88..1bf4f7a8fbe1 100644 --- a/include/asm-sparc64/dma.h +++ b/include/asm-sparc64/dma.h @@ -205,10 +205,6 @@ do { u32 tmp = sbus_readl((__regs) + DMA_CSR); \ #define for_each_dvma(dma) \ for((dma) = dma_chain; (dma); (d...
a9948a7e15015e7f2cb602190322b8ebb00c54c8
Analyze and fix the following issue in the Linux kernel code: [TCP]: Fix minisock tcp_create_openreq_child() typo.
Problem Details: On 2/28/07, KOVACS Krisztian <hidden@balabit.hu> wrote: > > Hi, > > While reading TCP minisock code I've found this suspiciously looking > code fragment: > > - 8< - > struct sock *tcp_create_openreq_child(struct sock *sk, struct request_sock *req, struct sk_buff *skb) > { > struct sock *new...
```diff diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index 30b1e520ad94..6b5c64f3c925 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c @@ -381,7 +381,7 @@ struct sock *tcp_create_openreq_child(struct sock *sk, struct request_sock *req, if (newsk != NULL) { const struct inet_...
b08d5840d2c5a6ac0bce172f4c861974d718e34b
Analyze and fix the following issue in the Linux kernel code: [NET]: Fix kfree(skb)
Problem Details: Signed-off-by: Patrick McHardy <kaber@trash.net> Acked-by: Paul Moore <paul.moore@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/core/skbuff.c b/net/core/skbuff.c index f89ff151cfab..820761f9eeef 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -2037,7 +2037,7 @@ struct sk_buff *skb_segment(struct sk_buff *skb, int features) err: while ((skb = segs)) { segs = skb->next; - kfree(skb); + kfree_skb(skb); ...
4498121ca3acbf928681b71261227d28dc29b6f6
Analyze and fix the following issue in the Linux kernel code: [NET]: Handle disabled preemption in gfp_any()
Problem Details: ctnetlink uses netlink_unicast from an atomic_notifier_chain (which is called within a RCU read side critical section) without holding further locks. netlink_unicast calls netlink_trim with the result of gfp_any() for the gfp flags, which are passed down to pskb_expand_header. gfp_any() only checks for...
```diff diff --git a/include/net/sock.h b/include/net/sock.h index 03684e702d13..2c7d60ca3548 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -1278,7 +1278,7 @@ static inline int sock_writeable(const struct sock *sk) static inline gfp_t gfp_any(void) { - return in_softirq() ? GFP_ATOMIC : GFP_KERNEL; + ...
6548cda289b549ed60c35f16a0051609aeee2fd0
Analyze and fix the following issue in the Linux kernel code: [BRIDGE]: Fix locking of set path cost.
Problem Details: This change goes with earlier change to get rid of work queue for path cost. Now stp_set_path_cost does its own locking. This is to allow it to call br_path_cost() which calls ethtool interfaces (might sleep). Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. M...
```diff diff --git a/net/bridge/br_ioctl.c b/net/bridge/br_ioctl.c index 3ab153d3c508..147015fe5c75 100644 --- a/net/bridge/br_ioctl.c +++ b/net/bridge/br_ioctl.c @@ -291,12 +291,11 @@ static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) if (!capable(CAP_NET_ADMIN)) return -EPERM; - spi...