id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
972aa45ceaf65376f33aa75958fcaefc9e752fa4
Analyze and fix the following issue in the Linux kernel code: dma-debug: add add checking for map/unmap_sg
Problem Details: Impact: add debug callbacks for dma_{un}map_sg Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
```diff diff --git a/include/linux/dma-debug.h b/include/linux/dma-debug.h index 65f73526ba2c..ee9fdb328549 100644 --- a/include/linux/dma-debug.h +++ b/include/linux/dma-debug.h @@ -23,6 +23,7 @@ #include <linux/types.h> struct device; +struct scatterlist; #ifdef CONFIG_DMA_API_DEBUG @@ -36,6 +37,11 @@ extern...
f62bc980e6fd26434012c0d5676ecb17179d9ee4
Analyze and fix the following issue in the Linux kernel code: dma-debug: add checking for map/unmap_page/single
Problem Details: Impact: add debug callbacks for dma_{un}map_[page|single] Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
```diff diff --git a/include/linux/dma-debug.h b/include/linux/dma-debug.h index 345d5387a30d..65f73526ba2c 100644 --- a/include/linux/dma-debug.h +++ b/include/linux/dma-debug.h @@ -28,12 +28,35 @@ struct device; extern void dma_debug_init(u32 num_entries); +extern void debug_dma_map_page(struct device *dev, stru...
2d62ece14fe04168a7d16688ddd2d17ac472268c
Analyze and fix the following issue in the Linux kernel code: dma-debug: add core checking functions
Problem Details: Impact: add functions to check on dma unmap and sync Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
```diff diff --git a/lib/dma-debug.c b/lib/dma-debug.c index 20d6cdbcacdc..d0cb47a4211e 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c @@ -17,10 +17,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <linux/dma-mapping.h> #include <linux/dma-debug.h> #include <linu...
788dcfa6f17424695823152890d30da09f62f9c3
Analyze and fix the following issue in the Linux kernel code: dma-debug: add debugfs interface
Problem Details: Impact: add debugfs interface for configuring DMA-API debugging Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
```diff diff --git a/lib/dma-debug.c b/lib/dma-debug.c index 2ede46308024..20d6cdbcacdc 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c @@ -19,6 +19,7 @@ #include <linux/dma-debug.h> #include <linux/spinlock.h> +#include <linux/debugfs.h> #include <linux/types.h> #include <linux/list.h> #include <linux/slab.h...
59d3daafa17265f01149df8eab3fb69b9b42cb2e
Analyze and fix the following issue in the Linux kernel code: dma-debug: add kernel command line parameters
Problem Details: Impact: add dma_debug= and dma_debug_entries= kernel parameters Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
```diff diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 54f21a5c262b..0fa3c0545994 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -491,6 +491,16 @@ and is between 256 and 4096 characters. It is defined in the file Range: 0 -...
6bf078715c1998d4d10716251cc10ce45908594c
Analyze and fix the following issue in the Linux kernel code: dma-debug: add initialization code
Problem Details: Impact: add code to initialize dma-debug core data structures Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
```diff diff --git a/include/linux/dma-debug.h b/include/linux/dma-debug.h index ce4ace707c7b..345d5387a30d 100644 --- a/include/linux/dma-debug.h +++ b/include/linux/dma-debug.h @@ -20,6 +20,20 @@ #ifndef __DMA_DEBUG_H #define __DMA_DEBUG_H +#include <linux/types.h> + struct device; +#ifdef CONFIG_DMA_API_DEBUG...
3b1e79ed734f58ac41ca0a287ff03ca355f120ad
Analyze and fix the following issue in the Linux kernel code: dma-debug: add allocator code
Problem Details: Impact: add allocator code for struct dma_debug_entry Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
```diff diff --git a/lib/dma-debug.c b/lib/dma-debug.c index 5ff7d2e2b60e..b60914669656 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c @@ -52,6 +52,16 @@ struct hash_bucket { /* Hash list to save the allocated dma addresses */ static struct hash_bucket dma_entry_hash[HASH_SIZE]; +/* List of pre-allocated dma_de...
30dfa90cc8c4c9621d8d5aa9499f3a5df3376307
Analyze and fix the following issue in the Linux kernel code: dma-debug: add hash functions for dma_debug_entries
Problem Details: Impact: implement necessary functions for the core hash Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
```diff diff --git a/lib/dma-debug.c b/lib/dma-debug.c index 31099712328c..5ff7d2e2b60e 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c @@ -18,9 +18,14 @@ */ #include <linux/dma-debug.h> +#include <linux/spinlock.h> #include <linux/types.h> #include <linux/list.h> +#define HASH_SIZE 1024ULL +#define H...
c9a0c8a6845b5efb64841f40b8efb4c387051d46
Analyze and fix the following issue in the Linux kernel code: [WATCHDOG] orion5x_wdt.c: 'ORION5X_TCLK' undeclared
Problem Details: orion5x_wdt no longer compiled after the changes in commit ebe35aff883496c07248df82c8576c3b6e84bbbe ("Orion: prepare for runtime-determined timer tick rate"). The tick rate define (ORION5X_TCLK) was removed in favor of a runtime detection. The quick fix is to add the define in the watchdog driver. The...
```diff diff --git a/drivers/watchdog/orion5x_wdt.c b/drivers/watchdog/orion5x_wdt.c index 14a339f58b6a..b64ae1a17832 100644 --- a/drivers/watchdog/orion5x_wdt.c +++ b/drivers/watchdog/orion5x_wdt.c @@ -29,6 +29,7 @@ #define WDT_EN 0x0010 #define WDT_VAL (TIMER_VIRT_BASE + 0x0024) +#define ORION5X_TCLK 166666...
623d563e52d4d4041612e24b33a5610a900dd778
Analyze and fix the following issue in the Linux kernel code: iwlwifi: fix error flow in iwl*_pci_probe
Problem Details: Both the agn and 3945 drivers has some problems with dealing with errors in their probe functions. Ensure that a goto will undo only things that was done before the goto was called. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 36bafeb353ce..129e2d330abb 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c @@ -3868,7 +3868,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_dev...
ef449e6d21b6e560c7ec36ed285ec3a34e0b12ed
Analyze and fix the following issue in the Linux kernel code: [ARM] 5419/1: ep93xx: fix build warnings about struct i2c_board_info
Problem Details: Fix build warnings due to struct i2c_board_info in <mach/platform.h> Patch "5311/1: add core support for built in i2c bus" is causing 11 of 39 the build warnings with Kautobuild for ep93xx_defconfig on kernel 2.6.29-rc5-git4. This patch fixes it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengr...
```diff diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/include/mach/platform.h index 88f7e88f152f..05f0f4f2f3ce 100644 --- a/arch/arm/mach-ep93xx/include/mach/platform.h +++ b/arch/arm/mach-ep93xx/include/mach/platform.h @@ -4,6 +4,8 @@ #ifndef __ASSEMBLY__ +struct i2c_board_info;...
a509538d4fb4f99cdf0a095213d57cc3b2347615
Analyze and fix the following issue in the Linux kernel code: ide-iops: fix odd-length ATAPI PIO transfers
Problem Details: Commit 9567b349f7e7dd7e2483db99ee8e4a6fe0caca38 (ide: merge ->atapi_*put_bytes and ->ata_*put_data methods) introduced a regression WRT the odd-length ATAPI PIO transfers -- the final word didn't get written (causing command timeouts). Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-o...
```diff diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index 753b92ebe0ae..b1892bd95c6f 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c @@ -315,6 +315,8 @@ void ide_output_data(ide_drive_t *drive, struct request *rq, void *buf, u8 io_32bit = drive->io_32bit; u8 mmio = (hwif->host_flag...
71bfc7a7c73eaf1f99e309dba60822ba050e3ec5
Analyze and fix the following issue in the Linux kernel code: ide: NULL noise: drivers/ide/ide-*.c
Problem Details: Fix this sparse warnings: drivers/ide/ide-disk_proc.c:130:11: warning: Using plain integer as NULL pointer drivers/ide/ide-floppy_proc.c:32:11: warning: Using plain integer as NULL pointer drivers/ide/ide-proc.c:234:11: warning: Using plain integer as NULL pointer drivers/ide/ide-tape.c:2141:11...
```diff diff --git a/drivers/ide/ide-disk_proc.c b/drivers/ide/ide-disk_proc.c index 1146f4204c6e..1f86dcbd2b1c 100644 --- a/drivers/ide/ide-disk_proc.c +++ b/drivers/ide/ide-disk_proc.c @@ -125,5 +125,5 @@ const struct ide_proc_devset ide_disk_settings[] = { IDE_PROC_DEVSET(multcount, 0, 16), IDE_PROC_DEVSET(no...
e0c6dcd8d4257a129fc813ac68f20b77c6ae2a7a
Analyze and fix the following issue in the Linux kernel code: ide: expiry() returns int, negative expiry() return values won't be noticed
Problem Details: bart: It seems like the bug could cause insanely long timeouts for: - ATA_DMA_ERR error in dma_timer_expiry() - commands without ->expiry in tc86c001_timer_expiry() (TC86C001 IDE controller only) Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Andre...
```diff diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 9ee51adf567f..9ff90cb1dbf1 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c @@ -908,7 +908,7 @@ void ide_timer_expiry (unsigned long data) ide_drive_t *uninitialized_var(drive); ide_handler_t *handler; unsigned long flags; - unsign...
b2b352590d94651579e6914ecdb08d30b2cb5f19
Analyze and fix the following issue in the Linux kernel code: x86: UV, SGI RTC: add generic system vector, build fix on UP
Problem Details: Make ack_APIC_irq() build on !SMP && !APIC too. Cc: Dimitri Sivanich <sivanich@sgi.com> LKML-Reference: <20090304185605.GA24419@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index 4ef949c1972e..394d177d721b 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h @@ -379,6 +379,7 @@ static inline u32 safe_apic_wait_icr_idle(void) static inline void ack_APIC_irq(void) { +#ifdef CONFIG_X86_LO...
f2f45e5f3c921c73c913e9a9c00f21ec01c86b4d
Analyze and fix the following issue in the Linux kernel code: dma-debug: add header file and core data structures
Problem Details: Impact: add groundwork for DMA-API debugging Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
```diff diff --git a/include/linux/dma-debug.h b/include/linux/dma-debug.h new file mode 100644 index 000000000000..ce4ace707c7b --- /dev/null +++ b/include/linux/dma-debug.h @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2008 Advanced Micro Devices, Inc. + * + * Author: Joerg Roedel <joerg.roedel@amd.com> + * + * This program...
a964e33c5d7c0ea46376d20c2f02edf01c9db251
Analyze and fix the following issue in the Linux kernel code: x86: clean up old gcc warnings
Problem Details: gcc 3.2.2 reports: In file included from /usr/src/all/linux-next/arch/x86/include/asm/page.h:8, from /usr/src/all/linux-next/arch/x86/include/asm/processor.h:18, from /usr/src/all/linux-next/arch/x86/include/asm/atomic_32.h:6, from /usr/src/all/linux-...
```diff diff --git a/arch/x86/include/asm/page_types.h b/arch/x86/include/asm/page_types.h index 2d625da6603c..826ad37006ab 100644 --- a/arch/x86/include/asm/page_types.h +++ b/arch/x86/include/asm/page_types.h @@ -40,14 +40,8 @@ #ifndef __ASSEMBLY__ -struct pgprot; - extern int page_is_ram(unsigned long pagenr);...
d4cc510c61b050ef38e842a12feef71c56d7cf81
Analyze and fix the following issue in the Linux kernel code: [ARM] 5418/1: restore lr before leaving mcount
Problem Details: gcc seems to expect that lr isn't clobbered by mcount, because for a function starting with: static int func(void) { void *ra = __builtin_return_address(0); printk(KERN_EMERG "__builtin_return_address(0) = %pS\n", ra) ... the following assembler is generated by gcc 4.3.2: 0: e1a0c00d...
```diff diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 49a6ba926c2b..159d0416f270 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S @@ -111,6 +111,7 @@ ENTRY(mcount) .globl mcount_call mcount_call: bl ftrace_stub + ldr lr, [fp, #-4] @ restore lr ...
62436fe9ee10f5e0dd087b106d69d93c9549935a
Analyze and fix the following issue in the Linux kernel code: x86: move init_memory_mapping() to common mm/init.c, build fix on 32-bit PAE
Problem Details: Impact: build fix Cc: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Yinghai Lu <yinghai@kernel.org> LKML-Reference: <1236257708-27269-14-git-send-email-penberg@cs.helsinki.fi> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h index 4d258ad76a0f..b8238dc8786d 100644 --- a/arch/x86/include/asm/pgtable_types.h +++ b/arch/x86/include/asm/pgtable_types.h @@ -273,6 +273,7 @@ typedef struct page *pgtable_t; extern pteval_t __supported_pte_mask; ext...
5ee00bd4691e7364bb7b62e2068d473cd5cb9320
Analyze and fix the following issue in the Linux kernel code: dma-debug: add Kconfig entry
Problem Details: Impact: add a Kconfig entry for DMA-API debugging Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
```diff diff --git a/arch/Kconfig b/arch/Kconfig index 550dab22daa1..830c16a2b801 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -106,3 +106,5 @@ config HAVE_CLK The <linux/clk.h> calls support software clock gating and thus are a key power management tool on many systems. +config HAVE_DMA_API_DEBUG + bool d...
f03d3115a6bcb814019d945c50c2ef91e5f14477
Analyze and fix the following issue in the Linux kernel code: ALSA: Fix sample rate of Lenovo Ideapad to 44.1kHz
Problem Details: Noises can be heard on analog outputs of (some model of) Lenovo Ideapad due to the hardware problem, and the only workaround right now is to fix the sample rate to 44.1kHz. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 6325ea43cf08..b794cba494c3 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -12845,6 +12845,27 @@ static int alc269_auto_create_analog_input_ctls(struct alc_spec *spec, #define alc269_pcm_digital_p...
298af9d89f3f5292e81a0a00f729c415adc4d8fb
Analyze and fix the following issue in the Linux kernel code: x86: fix up some bad global variable names in mm/init.c
Problem Details: Impact: cleanup The table_start, table_end, and table_top are too generic for global namespace so rename them to be more specific. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Yinghai Lu <yinghai@kernel.org> LKML-Reference: <1236257708-27269-15-git-send-email-penberg@cs.helsinki.fi> Signe...
```diff diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index 3a21b136da24..5bbdfe7459d2 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c @@ -23,9 +23,9 @@ kernel_physical_mapping_init(unsigned long start, unsigned long page_size_mask); #endif -unsigned long __initdata table_start; -unsigned lo...
c3f5d2d8b5fa6eb0cc1c47fd162bf6432f206f42
Analyze and fix the following issue in the Linux kernel code: x86: init_memory_mapping() trivial cleanups
Problem Details: Impact: cleanup To reduce the diff between the 32-bit and 64-bit versions of init_memory_mapping(), fix up all trivial issues. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Yinghai Lu <yinghai@kernel.org> LKML-Reference: <1236257708-27269-1-git-send-email-penberg@cs.helsinki.fi> Signed-off...
```diff diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index c351456d06dc..ad4e03c2d4df 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c @@ -868,11 +868,10 @@ static void __init find_early_table_space(unsigned long end, int use_pse) table_start >>= PAGE_SHIFT; table_end = table_start; - ...
8a0be9ef8225638d26b455788f988c8f84ce9e75
Analyze and fix the following issue in the Linux kernel code: sched: don't rebalance if attached on NULL domain
Problem Details: Impact: fix function graph trace hang / drop pointless softirq on UP While debugging a function graph trace hang on an old PII, I saw that it consumed most of its time on the timer interrupt. And the domain rebalancing softirq was the most concerned. The timer interrupt calls trigger_load_balance() w...
```diff diff --git a/kernel/sched.c b/kernel/sched.c index dfae1bf6d5b2..e509dbd7d77f 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -4148,6 +4148,11 @@ static void run_rebalance_domains(struct softirq_action *h) #endif } +static inline int on_null_domain(int cpu) +{ + return !rcu_dereference(cpu_rq(cpu)->sd);...
d6515e6ff4ad3db4bd5ef2dd4e1026a7aca2482e
Analyze and fix the following issue in the Linux kernel code: libata: make sure port is thawed when skipping resets
Problem Details: When SCR access is available and the link is offline, softreset is skipped as it only wastes time and some controllers don't respond very well. However, the skip path forgot to thaw the port, which not only blocks further event notification from the port but also causes repeated EH invocations on the ...
```diff diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 009ccc7c9865..ea890911d4fa 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -2423,11 +2423,14 @@ int ata_eh_reset(struct ata_link *link, int classify, } /* prereset() might have cleared ATA_EH_RESET. If so, - * ...
55f784c826af2506e417bcc484d7e0e4d27f1977
Analyze and fix the following issue in the Linux kernel code: sata_nv: fix module parameter description
Problem Details: Update MODULE_PARM_DESC for ADMA to reflect the fact that the option is disabled by default. Signed-off-by: Brandon Ehle <azverkan@yahoo.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index 55a8eed3f3a3..f65b53785a8f 100644 --- a/drivers/ata/sata_nv.c +++ b/drivers/ata/sata_nv.c @@ -2523,7 +2523,7 @@ static void __exit nv_exit(void) module_init(nv_init); module_exit(nv_exit); module_param_named(adma, adma_enabled, bool, 0444); -MO...
5825627c9463581fd9e70f8285685889ae5bb9bb
Analyze and fix the following issue in the Linux kernel code: libata: fix dma_unmap_sg misuse
Problem Details: libata passes the returned value of dma_map_sg() to dma_unmap_sg(),which is the misuse of dma_unmap_sg(). DMA-mapping.txt says: To unmap a scatterlist, just call: pci_unmap_sg(pdev, sglist, nents, direction); Again, make sure DMA activity has already finished. PLEASE NOTE: The 'nents' argument t...
```diff diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 9fbf0595f3d4..5e324cea3019 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -4612,7 +4612,7 @@ void ata_sg_clean(struct ata_queued_cmd *qc) VPRINTK("unmapping %u sg elements\n", qc->n_elem); if (qc->n_elem) -...
e7d3ef13d52a126438f687a1a32da65ff926ed57
Analyze and fix the following issue in the Linux kernel code: libata: change drive ready wait after hard reset to 5s
Problem Details: This fixes problems during resume with drives that take longer than 1s to be ready. The ATA-6 spec appears to allow 5 seconds for a drive to be ready. On one affected system, this patch changes "PM: resume devices took..." message from 17 seconds to 4 seconds, and gets rid of a lot of ugly timeout/er...
```diff diff --git a/include/linux/libata.h b/include/linux/libata.h index 5d87bc09a1f5..dd818c7decd7 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -275,7 +275,7 @@ enum { * advised to wait only for the following duration before * doing SRST. */ - ATA_TMOUT_PMP_SRST_WAIT = 1000, + ATA_TMO...
2485e5184452ccbda34ff83883883d9107800dff
Analyze and fix the following issue in the Linux kernel code: perfcounters: fix reserved bits sizing
Problem Details: The sum of bits is 65 currently not 64 - so reduce the # of reserved bits from 55 to 54. Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h index c42455ab1558..dde564517b66 100644 --- a/include/linux/perf_counter.h +++ b/include/linux/perf_counter.h @@ -83,7 +83,7 @@ struct perf_counter_hw_event { exclude_hv : 1, /* ditto hypervisor */ exclude_idle : 1, ...
ff2c8a4167eb143c5e2a03148fa996978938e8d7
Analyze and fix the following issue in the Linux kernel code: IOMMU-API: use ANSI style function declaration for 'iommu_found'
Problem Details: Fix this sparse warning: drivers/base/iommu.c:34:18: warning: non-ANSI function declaration of function 'iommu_found' Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
```diff diff --git a/drivers/base/iommu.c b/drivers/base/iommu.c index 5e039d4f877c..c2d1eed90376 100644 --- a/drivers/base/iommu.c +++ b/drivers/base/iommu.c @@ -31,7 +31,7 @@ void register_iommu(struct iommu_ops *ops) iommu_ops = ops; } -bool iommu_found() +bool iommu_found(void) { return iommu_ops != NULL; ...
a1a15ac5f9aeee521c048a88fc1aec848e623de7
Analyze and fix the following issue in the Linux kernel code: Fix kernel NULL pointer dereference in xen-blkfront
Problem Details: When booting Xen Dom0 on a pre-release 3.2.1 hypervisor the system Oopses on a "Unable to handle kernel NULL pointer dereference" in xenwatch. From the backtrace it looks like backend_changed is calling bdget_disk with a NULL pointer. Checking for NULL and returning ENODEV instead allows the kernel t...
```diff diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index b6c8ce254359..8f905089b72b 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -977,6 +977,8 @@ static void backend_changed(struct xenbus_device *dev, break; case XenbusStateClosing: + if (info->gd...
7786ce823b1c9a3de01a63857e3451890cb4e81c
Analyze and fix the following issue in the Linux kernel code: Blackfin arch: fix bug - gdb signull case make trunk kernel panic frequently
Problem Details: Use copy_to_user_page and copy_from_user_page instead of memcpy. copy_to_user_page does cache flush when necessary. Signed-off-by: Jie Zhang <jie.zhang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
```diff diff --git a/arch/blackfin/kernel/ptrace.c b/arch/blackfin/kernel/ptrace.c index 594e325b40e4..d76618db50df 100644 --- a/arch/blackfin/kernel/ptrace.c +++ b/arch/blackfin/kernel/ptrace.c @@ -45,6 +45,7 @@ #include <asm/asm-offsets.h> #include <asm/dma.h> #include <asm/fixed_code.h> +#include <asm/cacheflush....
03d78913f01e8f6599823f00357ed17b32747d3d
Analyze and fix the following issue in the Linux kernel code: lockdep: remove duplicate CONFIG_DEBUG_LOCKDEP definitions
Problem Details: Impact: cleanup The atomic debug modifiers are already defined in kernel/lockdep_internals.h. Signed-off-by: David Rientjes <rientjes@google.com> Acked-by: Peter Zijlstra <peterz@infradead.org> LKML-Reference: <alpine.DEB.2.00.0903050222160.30401@chino.kir.corp.google.com> Signed-off-by: Ingo Molnar ...
```diff diff --git a/kernel/lockdep.c b/kernel/lockdep.c index 02014f7ccc86..9a1e2bcc4b8d 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c @@ -433,13 +433,6 @@ atomic_t nr_find_usage_forwards_checks; atomic_t nr_find_usage_forwards_recursions; atomic_t nr_find_usage_backwards_checks; atomic_t nr_find_usage_backw...
ba0dade4bbe6bb26b975323726f7214278d5e994
Analyze and fix the following issue in the Linux kernel code: Blackfin arch: fix bug - On bf548-ezkit, ethernet fails to work after wakeup from "mem"
Problem Details: Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
```diff diff --git a/arch/blackfin/mach-common/dpmc_modes.S b/arch/blackfin/mach-common/dpmc_modes.S index 4da50bcd9300..8009a512fb11 100644 --- a/arch/blackfin/mach-common/dpmc_modes.S +++ b/arch/blackfin/mach-common/dpmc_modes.S @@ -376,10 +376,22 @@ ENTRY(_do_hibernate) #endif #ifdef PINT0_ASSIGN + PM_SYS_PUSH(P...
1400b3faab8fedfffde5a7fe47098e2732d4aa76
Analyze and fix the following issue in the Linux kernel code: x86: UV, SGI RTC: fix uv_time.c for UP
Problem Details: Fix non-smp build of uv_time.c. Signed-off-by: Dimitri Sivanich <sivanich@sgi.com> LKML-Reference: <20090304220246.GC6288@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/arch/x86/kernel/uv_time.c b/arch/x86/kernel/uv_time.c index 6f8e3256ab2a..2ffb6c53326e 100644 --- a/arch/x86/kernel/uv_time.c +++ b/arch/x86/kernel/uv_time.c @@ -24,6 +24,8 @@ #include <asm/uv/uv_hub.h> #include <asm/uv/bios.h> #include <asm/uv/uv.h> +#include <asm/apic.h> +#include <asm/cpu.h> ...
72e2240f181871675d3a979766330c91d48a1673
Analyze and fix the following issue in the Linux kernel code: bonding: Fix device passed into ->ndo_neigh_setup().
Problem Details: Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 9fb388388fb7..e0578fe8c0db 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -4113,7 +4113,7 @@ static int bond_neigh_setup(struct net_device *dev, struct neigh_parms *parms) const struct ...
d7ff1a90b2d3d122b896056d63db919617e9b6cd
Analyze and fix the following issue in the Linux kernel code: Blackfin arch: Fix bug - KGDB single step into the middle of a 4 bytes instruction on bf561 after soft bp is hit
Problem Details: Run IFLUSH twice to avoid loading wrong instruction after invalidating icache and following sequence is met. 1) The one instruction address is cached in the icache. 2) This instruction in SDRAM is changed. 3) IFLASH[P0] is executed only once in lackfin_icache_flush_range(). 4) This instruction is exec...
```diff diff --git a/arch/blackfin/mach-common/cache.S b/arch/blackfin/mach-common/cache.S index 3c98dacbf289..aa0648c6a9fe 100644 --- a/arch/blackfin/mach-common/cache.S +++ b/arch/blackfin/mach-common/cache.S @@ -66,11 +66,33 @@ /* Invalidate all instruction cache lines assocoiated with this memory area */ ENTRY(...
c19577e34e641f802ad35fc0204ff68ea16fe7a3
Analyze and fix the following issue in the Linux kernel code: Blackfin arch: Fix bug - make ksz8893m driver available when bfin_mac is enabled
Problem Details: Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
```diff diff --git a/arch/blackfin/mach-bf518/boards/ezbrd.c b/arch/blackfin/mach-bf518/boards/ezbrd.c index 0e175342112e..b044de49ecf0 100644 --- a/arch/blackfin/mach-bf518/boards/ezbrd.c +++ b/arch/blackfin/mach-bf518/boards/ezbrd.c @@ -113,7 +113,6 @@ static struct platform_device bfin_mac_device = { .name = "bfin...
37db623ae2a7bde234a8ed683d0d13d6f939199c
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix check of ALC888S-VC in alc888_coef_init()
Problem Details: Fixed the wrong bits check to identify ALC888S-VC model in alc888_coef_init(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 91ef9f27b120..6325ea43cf08 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -982,7 +982,7 @@ static void alc888_coef_init(struct hda_codec *codec) snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_C...
9d40bbda599def1e1d155d7f7dca14fe8744bd2b
Analyze and fix the following issue in the Linux kernel code: vlan: Fix vlan-in-vlan crashes.
Problem Details: As analyzed by Patrick McHardy, vlan needs to reset it's netdev_ops pointer in it's ->init() function but this leaves the compat method pointers stale. Add a netdev_resync_ops() and call it from the vlan code. Any other driver which changes ->netdev_ops after register_netdevice() will need to call th...
```diff diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index ec54785d34f9..659366734f3f 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -1079,6 +1079,7 @@ extern void synchronize_net(void); extern int register_netdevice_notifier(struct notifier_block *nb); extern int ...
54acd0efab072cb70e87206329d561b297f93bbb
Analyze and fix the following issue in the Linux kernel code: net: Fix missing dev->neigh_setup in register_netdevice().
Problem Details: Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/core/dev.c b/net/core/dev.c index 9e4afe650e7a..2dd484ed3dbb 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -4339,6 +4339,7 @@ int register_netdevice(struct net_device *dev) dev->do_ioctl = ops->ndo_do_ioctl; dev->set_config = ops->ndo_set_config; dev->change_mtu = ops->ndo_change...
7acab7a9ca6b0c5b820f083424c57e6ac2031d9d
Analyze and fix the following issue in the Linux kernel code: Blackfin arch: fix bug - The SPORT_HYS bit is not set for BF561 0.5
Problem Details: IMHO the setting should depend on ANOMALY_05000305 which is about the availability of the bit, not ANOMALY_05000265 which only describes the SPORT sensitivity to noise (checked for BF561 only, though). If that's not true for other BF variants, maybe the definition of ANOMALY_05000265 for BF561 should ...
```diff diff --git a/arch/blackfin/mach-common/clocks-init.c b/arch/blackfin/mach-common/clocks-init.c index 9dddb6f8cc85..35393651359b 100644 --- a/arch/blackfin/mach-common/clocks-init.c +++ b/arch/blackfin/mach-common/clocks-init.c @@ -17,7 +17,7 @@ #define SDGCTL_WIDTH (1 << 31) /* SDRAM external data path width *...
87786945fe4b0e60e8f1db62d5ee8a3cec539a67
Analyze and fix the following issue in the Linux kernel code: tmspci: fix request_irq race
Problem Details: Currently, tmspci tokenring driver crashes on device initialization because it requests its irq before initializing corresponding data structures. Fix this by moving request_irq call to a safer place. Signed-off-by: Meelis Roos <mroos@linux.ee> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/tokenring/tmspci.c b/drivers/net/tokenring/tmspci.c index 5f601773c260..e2150b3c83d9 100644 --- a/drivers/net/tokenring/tmspci.c +++ b/drivers/net/tokenring/tmspci.c @@ -121,11 +121,6 @@ static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_devic goto err_out_trd...
4720bc6cfe70b606cf62a244c7a5391e59923e45
Analyze and fix the following issue in the Linux kernel code: sfc: Fix search for flush completion events
Problem Details: When flushing queues we disable normal interrupt and event handling and poll event queue 0 looking for flush completions. Unfortunately the flush event polling loop fails to move past any other type of event. This problem has not been observed in production hardware but appears to be a possibility. ...
```diff diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c index efd121c42a21..82c10f4de1b8 100644 --- a/drivers/net/sfc/falcon.c +++ b/drivers/net/sfc/falcon.c @@ -1187,31 +1187,29 @@ static void falcon_poll_flush_events(struct efx_nic *efx) struct efx_channel *channel = &efx->channel[0]; struct efx_...
ca83db369c1c633142c08dd0bfafca6ac4247c63
Analyze and fix the following issue in the Linux kernel code: sfc: Fix efx_ethtool_nway_result() to use clause 45 MDIO registers
Problem Details: Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c index 7b5924c039b3..589d13292969 100644 --- a/drivers/net/sfc/ethtool.c +++ b/drivers/net/sfc/ethtool.c @@ -529,7 +529,14 @@ static int efx_ethtool_nway_reset(struct net_device *net_dev) { struct efx_nic *efx = netdev_priv(net_dev); - retur...
a883bf564ea555447a76682bb2d8d4bc92e23e0e
Analyze and fix the following issue in the Linux kernel code: pkt_sched: act_police: Fix a rate estimator test.
Problem Details: A commit c1b56878fb68e9c14070939ea4537ad4db79ffae "tc: policing requires a rate estimator" introduced a test which invalidates previously working configs, based on examples from iproute2: doc/actions/actions-general. This is too rigorous: a rate estimator is needed only when police's "avrate" option is...
```diff diff --git a/net/sched/act_police.c b/net/sched/act_police.c index 5c72a116b1a4..f8f047b61245 100644 --- a/net/sched/act_police.c +++ b/net/sched/act_police.c @@ -183,13 +183,6 @@ override: if (R_tab == NULL) goto failure; - if (!est && (ret == ACT_P_CREATED || - !gen_estimator_active(&police->...
e74da5235cec6cb71eb338c987f876ecc793138b
Analyze and fix the following issue in the Linux kernel code: tracing: fix seq read from trace files
Problem Details: The buffer used by trace_seq was updated incorrectly. Instead of consuming what was actually read, it consumed the rest of the buffer on reads. Signed-off-by: Steven Rostedt <srostedt@redhat.com>
```diff diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 57155dc53530..2e53e6f09440 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -361,7 +361,7 @@ ssize_t trace_seq_to_user(struct trace_seq *s, char __user *ubuf, size_t cnt) cnt -= ret; - s->readpos += len; + s->readpos += cnt; r...
edf2e2811efa9304ebe14f778d33b764cfd58b7a
Analyze and fix the following issue in the Linux kernel code: Squashfs: fix documentation typo, Cramfs filesystem limit is 256 MiB
Problem Details: Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
```diff diff --git a/Documentation/filesystems/squashfs.txt b/Documentation/filesystems/squashfs.txt index 3e79e4a7a392..b324c033035a 100644 --- a/Documentation/filesystems/squashfs.txt +++ b/Documentation/filesystems/squashfs.txt @@ -22,7 +22,7 @@ Squashfs filesystem features versus Cramfs: Squashfs Cramfs -...
118e1ef6fabfc023126e6075f6ac0fc729cb5285
Analyze and fix the following issue in the Linux kernel code: Squashfs: Fix oops when reading fsfuzzer corrupted filesystems
Problem Details: This fixes a code regression caused by the recent mainlining changes. The recent code changes call zlib_inflate repeatedly, decompressing into separate 4K buffers, this code didn't check for the possibility that zlib_inflate might ask for too many buffers when decompressing corrupted data. Signed-off-...
```diff diff --git a/fs/squashfs/block.c b/fs/squashfs/block.c index c837dfc2b3c6..321728f48f2d 100644 --- a/fs/squashfs/block.c +++ b/fs/squashfs/block.c @@ -80,7 +80,7 @@ static struct buffer_head *get_block_length(struct super_block *sb, * generated a larger block - this does occasionally happen with zlib). */ ...
2dc5d12b1f43134e9bc5037f69f4739cfdfab93e
Analyze and fix the following issue in the Linux kernel code: tracing: do not return EFAULT if read copied anything
Problem Details: Impact: fix trace read to conform to standards Andrew Morton, Theodore Tso and H. Peter Anvin brought to my attention that a userspace read should not return -EFAULT if it succeeded in copying anything. It should only return -EFAULT if it failed to copy at all. This patch modifies the check of copy_f...
```diff diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index ab5cbcae43a1..57155dc53530 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -346,6 +346,9 @@ ssize_t trace_seq_to_user(struct trace_seq *s, char __user *ubuf, size_t cnt) int len; int ret; + if (!cnt) + return 0; + if (s->len...
4f3640f8a358f2183a8c966f299eeb55ca523e06
Analyze and fix the following issue in the Linux kernel code: ring-buffer: fix timestamp in partial ring_buffer_page_read
Problem Details: If a partial ring_buffer_page_read happens, then some of the incremental timestamps may be lost. This patch writes the recent timestamp into the page that is passed back to the caller. A partial ring_buffer_page_read is where the full page would not be written back to the user, and instead, just part ...
```diff diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index f2a163db52f9..f7473645b9c6 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -2461,6 +2461,7 @@ int ring_buffer_read_page(struct ring_buffer *buffer, unsigned long flags; unsigned int commit; unsigned int ...
7ce9d5d1f3c8736511daa413c64985a05b2feee3
Analyze and fix the following issue in the Linux kernel code: ext4: fix ext4_free_inode() vs. ext4_claim_inode() race
Problem Details: I was seeing fsck errors on inode bitmaps after a 4 thread dbench run on a 4 cpu machine: Inode bitmap differences: -50736 -(50752--50753) etc... I believe that this is because ext4_free_inode() uses atomic bitops, and although ext4_new_inode() *used* to also use atomic bitops for synchronization, c...
```diff diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index f18a919be70b..627f8c3337a3 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -188,7 +188,7 @@ void ext4_free_inode(handle_t *handle, struct inode *inode) struct ext4_group_desc *gdp; struct ext4_super_block *es; struct ext4_sb_info *sbi; - int f...
e543ad76914abec1acf6631604a4154cd7a2ca6b
Analyze and fix the following issue in the Linux kernel code: tracing: add cpu_file intialization for ftrace_dump
Problem Details: Impact: fix to ftrace_dump output corruption The commit: b04cc6b1f6398b0e0b60d37e27ce51b4899672ec tracing/core: introduce per cpu tracing files added a new field to the iterator called cpu_file. This was a handle to differentiate between the per cpu trace output files and the all cpu "trace" file. ...
```diff diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index c8abbb0c8397..ab5cbcae43a1 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -3918,8 +3918,10 @@ void ftrace_dump(void) printk(KERN_TRACE "Dumping ftrace buffer:\n"); + /* Simulate the iterator */ iter.tr = &global_trace; ite...
9f8ac0b7b063be77f0de7a27fe5e6a0aa2cce58d
Analyze and fix the following issue in the Linux kernel code: tg3: Fix 5906 link problems
Problem Details: Commit 6833c043f9fc03696fde623914c4a0277df2a0bc introduced the phy auto-powerdown capability. While the APD feature only works for 5761 and 5784 asic revisions, the (harmless portion of the) code was applied to all 5705 and newer devices. However, the 5906 phy departs from the usual design. This com...
```diff diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index b080f9493d83..dabdf59f8016 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -1473,7 +1473,8 @@ static void tg3_phy_toggle_apd(struct tg3 *tp, bool enable) { u32 reg; - if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) + if (!(tp->tg3_flags2 & TG3_...
7cbd4877e5b167b56a3d6033b926a9f925186e12
Analyze and fix the following issue in the Linux kernel code: dmatest: fix use after free in dmatest_exit
Problem Details: dmatest_cleanup_chanel will free dtc, so grab ->chan before it goes away and use it to do the release. Reported-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
```diff diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c index 732fa1ec36ab..e190d8b30700 100644 --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c @@ -430,13 +430,15 @@ late_initcall(dmatest_init); static void __exit dmatest_exit(void) { struct dmatest_chan *dtc, *_dtc; + struct dma_chan *chan; ...
c74ef1f867d18171c8617519ee5fe40b02903934
Analyze and fix the following issue in the Linux kernel code: ipu_idmac: fix spinlock type
Problem Details: fix a probably accidently dropped reference operator while calling spin_unlock_restore to an ipu lock. Signed-off-by: Luotao Fu <l.fu@pengutronix.de> Cc: Guennadi Liakhovetski <lg@denx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
```diff diff --git a/drivers/dma/ipu/ipu_idmac.c b/drivers/dma/ipu/ipu_idmac.c index 1f154d08e98f..ae50a9d1a4e6 100644 --- a/drivers/dma/ipu/ipu_idmac.c +++ b/drivers/dma/ipu/ipu_idmac.c @@ -729,7 +729,7 @@ static int ipu_init_channel_buffer(struct idmac_channel *ichan, ichan->status = IPU_CHANNEL_READY; - spin_u...
a09b09ae51ace43d28cd9bc1c8bb97986f2b55a6
Analyze and fix the following issue in the Linux kernel code: iop-adma, mv_xor: fix mem leak on self-test setup failure
Problem Details: iop_adma_zero_sum_self_test has the brackets in the wrong place for the setup failure deallocation path. This error was duplicated in mv_xor_xor_self_test. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
```diff diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c index ea5440dd10dc..4131ab8e5032 100644 --- a/drivers/dma/iop-adma.c +++ b/drivers/dma/iop-adma.c @@ -928,19 +928,19 @@ iop_adma_xor_zero_sum_self_test(struct iop_adma_device *device) for (src_idx = 0; src_idx < IOP_ADMA_NUM_SRC_TEST; src_idx++) {...
900325a6ce33995688b7a680a34e7698f16f4d72
Analyze and fix the following issue in the Linux kernel code: fsldma: fix off by one in dma_halt
Problem Details: Prevent dev_err from firing even if we successfully detected 'dma-idle' before the full 1ms timeout has elapsed. Acked-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
```diff diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index 70126a606239..86d6da47f558 100644 --- a/drivers/dma/fsldma.c +++ b/drivers/dma/fsldma.c @@ -158,7 +158,8 @@ static void dma_start(struct fsl_dma_chan *fsl_chan) static void dma_halt(struct fsl_dma_chan *fsl_chan) { - int i = 0; + int i; + DMA_...
211a22ce08dbb27eb1a66df8a4bdae5e96092bc8
Analyze and fix the following issue in the Linux kernel code: I/OAT: update driver version and copyright dates
Problem Details: Together with new fixes update driver version and extend copyright dates ranges. Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel....
```diff diff --git a/drivers/dca/dca-core.c b/drivers/dca/dca-core.c index 33bd75347518..25b743abfb59 100644 --- a/drivers/dca/dca-core.c +++ b/drivers/dca/dca-core.c @@ -1,5 +1,5 @@ /* - * Copyright(c) 2007 Intel Corporation. All rights reserved. + * Copyright(c) 2007 - 2009 Intel Corporation. All rights reserved. ...
d0cac39e4ec8097e4c7099d291b1fdcc0fe56b58
Analyze and fix the following issue in the Linux kernel code: sparc64: Fix lost interrupts on sun4u.
Problem Details: Based upon a report by Meelis Roos. Sparc64 SBUS and PCI controllers use a combination of IMAP and ICLR registers to manage device interrupts. The IMAP register contains the "valid" enable bit as well as CPU targetting information. Whereas the ICLR register is written with zero at the end of handlin...
```diff diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c index e289376198eb..1c378d8e90c5 100644 --- a/arch/sparc/kernel/irq_64.c +++ b/arch/sparc/kernel/irq_64.c @@ -323,17 +323,25 @@ static void sun4u_set_affinity(unsigned int virt_irq, sun4u_irq_enable(virt_irq); } +/* Don't do anything. Th...
211a40c0870457b29100cffea0180fa5083caf96
Analyze and fix the following issue in the Linux kernel code: smack: fixes for unlabeled host support
Problem Details: The following patch (against 2.6.29rc5) fixes a few issues in the smack/netlabel "unlabeled host support" functionnality that was added in 2.6.29rc. It should go in before -final. 1) smack_host_label disregard a "0.0.0.0/0 @" rule (or other label), preventing 'tagged' tasks to access Internet (many s...
```diff diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index 0278bc083044..e7ded1326b0f 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -1498,58 +1498,31 @@ static int smack_socket_post_create(struct socket *sock, int family, * looks for host based access restrictions...
113a0e4590881ce579ca992a80ddc562b3372ede
Analyze and fix the following issue in the Linux kernel code: smack: fixes for unlabeled host support
Problem Details: The following patch (against 2.6.29rc5) fixes a few issues in the smack/netlabel "unlabeled host support" functionnality that was added in 2.6.29rc. It should go in before -final. 1) smack_host_label disregard a "0.0.0.0/0 @" rule (or other label), preventing 'tagged' tasks to access Internet (many s...
```diff diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c index fd8d1eb43700..a1b57e4dba3e 100644 --- a/security/smack/smackfs.c +++ b/security/smack/smackfs.c @@ -651,10 +651,6 @@ static void *netlbladdr_seq_next(struct seq_file *s, void *v, loff_t *pos) return skp; } -/* -#define BEMASK 0x80000000...
fc5efe3941c47c0278fe1bbcf8cc02a03a74fcda
Analyze and fix the following issue in the Linux kernel code: x86: fix bootmem cross node for 32bit numa, cleanup
Problem Details: Impact: clean up Simplify the code, reuse some lines. Remove min_low_pfn reference, it is always 0 Signed-off-by: Yinghai Lu <yinghai@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> LKML-Reference: <49AEE2C4.2030602@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index c69c6b1f5e55..c351456d06dc 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c @@ -776,7 +776,6 @@ static void __init zone_sizes_init(void) free_area_init_nodes(max_zone_pfns); } -#ifdef CONFIG_NEED_MULTIPLE_NODES static unsigned ...
8d4dd919b46ed982da6ef6bf6fcec454cd7a5b1b
Analyze and fix the following issue in the Linux kernel code: x86: ioremap mptable
Problem Details: Impact: fix boot with mptable above max_low_mapped Try to use early_ioremap() to map MPC to make sure it works even it is at the end of ram. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> LKML-Reference: <49AE4901.3090801@kernel.org> Signed-off-by: Ingo M...
```diff diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c index 37cb1bda1baf..ae9060cb4481 100644 --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c @@ -558,6 +558,19 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type) static struct mpf_intel *mpf_found; +...
a71edd1f46c8a599509bda478fb4eea27fb0da63
Analyze and fix the following issue in the Linux kernel code: x86: fix bootmem cross node for 32bit numa
Problem Details: Impact: fix panic on system 2g x4 sockets Found one system with 4 sockets and every sockets has 2g can not boot with numa32 because boot mem is crossing nodes. So try to have numa version of setup_bootmem_allocator(). Signed-off-by: Yinghai Lu <yinghai@kernel.org> Cc: Andrew Morton <akpm@linux-found...
```diff diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index 917c4e60c767..67bdb59d4e10 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c @@ -776,9 +776,37 @@ static void __init zone_sizes_init(void) free_area_init_nodes(max_zone_pfns); } +#ifdef CONFIG_NEED_MULTIPLE_NODES +static unsigned...
ab9e18587f4cdb5f3fb3854c732f27a36f98e8f6
Analyze and fix the following issue in the Linux kernel code: x86, math-emu: fix init_fpu for task != current
Problem Details: Impact: fix math-emu related crash while using GDB/ptrace init_fpu() calls finit to initialize a task's xstate, while finit always works on the current task. If we use PTRACE_GETFPREGS on another process and both processes did not already use floating point, we get a null pointer exception in finit. ...
```diff diff --git a/arch/x86/include/asm/i387.h b/arch/x86/include/asm/i387.h index 48f0004db8c9..71c9e5183982 100644 --- a/arch/x86/include/asm/i387.h +++ b/arch/x86/include/asm/i387.h @@ -172,7 +172,13 @@ static inline void __save_init_fpu(struct task_struct *tsk) #else /* CONFIG_X86_32 */ -extern void finit(v...
dd39ecf522ba86c70809715af46e6557f6491131
Analyze and fix the following issue in the Linux kernel code: x86: EFI: Back efi_ioremap with init_memory_mapping instead of FIX_MAP
Problem Details: Impact: Fix boot failure on EFI system with large runtime memory range Brian Maly reported that some EFI system with large runtime memory range can not boot. Because the FIX_MAP used to map runtime memory range is smaller than run time memory range. This patch fixes this issue by re-implement efi_ior...
```diff diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h index ca5ffb2856b6..edc90f23e708 100644 --- a/arch/x86/include/asm/efi.h +++ b/arch/x86/include/asm/efi.h @@ -37,8 +37,6 @@ extern unsigned long asmlinkage efi_call_phys(void *, ...); #else /* !CONFIG_X86_32 */ -#define MAX_EFI_IO_PAGES 1...
e951651657610305c9af0045fd64c6a5b0bc4b80
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP: Allow I2C bus driver to be compiled as a module
Problem Details: Fixes a linker error when OMAP I2C bus driver is compiled as a module: ERROR: "i2c_register_board_info" [arch/arm/plat-omap/i2c.ko] undefined! The I2C utility functions used for board initialization should be always built-in. Signed-off-by: Aaro Koskinen <Aaro.Koskinen@nokia.com> Acked-by: Jarkko...
```diff diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile index deaff58878a2..04a100cfb8e5 100644 --- a/arch/arm/plat-omap/Makefile +++ b/arch/arm/plat-omap/Makefile @@ -18,7 +18,8 @@ obj-$(CONFIG_CPU_FREQ) += cpu-omap.o obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o obj-$(CONFIG_OMAP_DEBUG_DEVICES) +=...
87d99d6f7ee3ec73b2b0212427b173502ec9d6cb
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP: Fix compile error if pm.h is included
Problem Details: Change the error to a warning. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
```diff diff --git a/arch/arm/plat-omap/include/mach/pm.h b/arch/arm/plat-omap/include/mach/pm.h index 2a9c27ad4c37..37e2f0f38b46 100644 --- a/arch/arm/plat-omap/include/mach/pm.h +++ b/arch/arm/plat-omap/include/mach/pm.h @@ -108,7 +108,7 @@ !defined(CONFIG_ARCH_OMAP15XX) && \ !defined(CONFIG_ARCH_OMAP16XX) && \ ...
ff0c0874905fb312ca1491bbdac2653b0b48c20b
Analyze and fix the following issue in the Linux kernel code: x86: fix DMI on EFI
Problem Details: Impact: reactivate DMI quirks on EFI hardware DMI tables are loaded by EFI, so the dmi calls must happen after efi_init() and not before. Currently Apple hardware uses DMI to determine the framebuffer mappings for efifb. Without DMI working you also have no video on MacBook Pro. This patch resolves ...
```diff diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index c461f6d69074..6a8811a69324 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -770,6 +770,9 @@ void __init setup_arch(char **cmdline_p) finish_e820_parsing(); + if (efi_enabled) + efi_init(); + dmi_scan_machine(); ...
26575e28df5eb2050c02369843faba38cecb4d8c
Analyze and fix the following issue in the Linux kernel code: lockdep: remove extra "irq" string
Problem Details: Impact: clarify lockdep printk text print_irq_inversion_bug() gets handed state strings of the form "HARDIRQ", "SOFTIRQ", "RECLAIM_FS" and appends "-irq-{un,}safe" to them, which is either redudant for *IRQ or confusing in the RECLAIM_FS case. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl...
```diff diff --git a/kernel/lockdep.c b/kernel/lockdep.c index ef6584fd9fe5..02014f7ccc86 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c @@ -1900,9 +1900,9 @@ print_irq_inversion_bug(struct task_struct *curr, struct lock_class *other, curr->comm, task_pid_nr(curr)); print_lock(this); if (forwards) - print...
1c21f14ec48a2256fb03682b24dddd23eacdc96f
Analyze and fix the following issue in the Linux kernel code: lockdep: fix incorrect state name
Problem Details: In the recent mark_lock_irq() rework a bug snuck in that would report the state of write locks causing irq inversion under a read lock as a read lock. Fix this by masking the read bit of the state when validating write dependencies. Reported-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by...
```diff diff --git a/kernel/lockdep.c b/kernel/lockdep.c index 022d2ed7fd8b..ef6584fd9fe5 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c @@ -2015,7 +2015,8 @@ typedef int (*check_usage_f)(struct task_struct *, struct held_lock *, enum lock_usage_bit bit, const char *name); static int -mark_lock_irq(st...
5ad8b7d12605e88d1e532061699102797fdefe08
Analyze and fix the following issue in the Linux kernel code: drm: fix double lock typo
Problem Details: [airlied: you shall not retype patches from other trees half asleep] Signed-of-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c index 096e2a37446d..7c8b15b22bf2 100644 --- a/drivers/gpu/drm/drm_stub.c +++ b/drivers/gpu/drm/drm_stub.c @@ -168,7 +168,7 @@ int drm_setmaster_ioctl(struct drm_device *dev, void *data, file_priv->minor->master != file_priv->master) { ...
73af76dfd1f998dba71d8e8e785cbe77a990bf17
Analyze and fix the following issue in the Linux kernel code: x86, mce: fix build failure in arch/x86/kernel/cpu/mcheck/threshold.c
Problem Details: Impact: build fix The APIC code rewrite in the x86 tree broke the x86/mce branch: arch/x86/kernel/cpu/mcheck/threshold.c: In function ‘mce_threshold_interrupt’: arch/x86/kernel/cpu/mcheck/threshold.c:24: error: implicit declaration of function ‘ack_APIC_irq’ Also tidy up the file a bit while at it...
```diff diff --git a/arch/x86/kernel/cpu/mcheck/threshold.c b/arch/x86/kernel/cpu/mcheck/threshold.c index e4b8a3833fc5..23ee9e730f78 100644 --- a/arch/x86/kernel/cpu/mcheck/threshold.c +++ b/arch/x86/kernel/cpu/mcheck/threshold.c @@ -1,9 +1,13 @@ -/* Common corrected MCE threshold handler code */ -#include <linux/kern...
bd6afe3f34d41ed81e0c62a5a2181bb7bd51aebf
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix conflict of mixer controls on Sony VAIO VGN-AR71S
Problem Details: The recent update enabled the model=sony-assamd for all ALC262 with PCI SSID 104d:90xx. But this includes the VAIO VGN-AR* that has the primary codec of STAC92xx and the secondary ALC262 as a slave digital-only codec. For this device, the model=auto must be chosen to work properly. Signed-off-by: Ta...
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index c60c86acd9ba..8c02f789e4fc 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -10825,6 +10825,7 @@ static struct snd_pci_quirk alc262_cfg_tbl[] = { SND_PCI_QUIRK(0x104d, 0x1f00, "Sony ASSAMD", ALC26...
ff19fed4fe54f2f1dd439ac02969333ea9a9b4ff
Analyze and fix the following issue in the Linux kernel code: Blackfin arch: Fix BUG - kernel fails to build in pm.c when allow wakeup fromi standby by GPIO
Problem Details: This feature is not available on BF54x. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
```diff diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index be6097163b07..0c1f86e3e44a 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig @@ -1129,6 +1129,7 @@ endchoice config PM_WAKEUP_BY_GPIO bool "Allow Wakeup from Standby by GPIO" + depends on PM && !BF54x config PM_WAKEUP_GPIO_NUM...
0bf3d933085509916335480121761a1b225e6c23
Analyze and fix the following issue in the Linux kernel code: Blackfin arch: fix bug - kgdb fails to continue after setting breakpoint on bf561-ezkit kernel with smp patch
Problem Details: Free spinlock before call IPI handlers. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Header from folded patch 'blackfin_arch__fix_bug_-_kgdb_fails_to_continue_after_setting_breakpoint_on_bf561-ezkit_kernel_with_smp_patch-1': Blackfin arch: fix bu...
```diff diff --git a/arch/blackfin/kernel/kgdb_test.c b/arch/blackfin/kernel/kgdb_test.c index 3dba9c17304a..dbcf3e45cb0b 100644 --- a/arch/blackfin/kernel/kgdb_test.c +++ b/arch/blackfin/kernel/kgdb_test.c @@ -20,6 +20,7 @@ static char cmdline[256]; static unsigned long len; +#ifndef CONFIG_SMP static int num1 __...
79d7d5333b598e9a559bf27833f0ad2b8bf6ad2c
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix HP dv6736 mic input
Problem Details: Fix the mic input of HP dv6736 with Conexant 5051 codec chip. This laptop seems have no mic-switching per jack connection. A new model hp-dv6736 is introduced to match with the h/w implementation. Reference: Novell bnc#480753 https://bugzilla.novell.com/show_bug.cgi?id=480753 Signed-off-by: Takashi ...
```diff diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt index a448bbefd488..80b796e4a80e 100644 --- a/Documentation/sound/alsa/HD-Audio-Models.txt +++ b/Documentation/sound/alsa/HD-Audio-Models.txt @@ -262,6 +262,7 @@ Conexant 5051 ============= laptop Basic ...
5fd3a17ed456637a224cf4ca82b9ad9d005bc8d4
Analyze and fix the following issue in the Linux kernel code: md: fix deadlock when stopping arrays
Problem Details: Resolve a deadlock when stopping redundant arrays, i.e. ones that require a call to sysfs_remove_group when shutdown. The deadlock is summarized below: Thread1 Thread2 ------- ------- read sysfs attribute stop array take mddev lock ...
```diff diff --git a/drivers/md/md.c b/drivers/md/md.c index 03b4cd0a6344..a307f87eb90e 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -214,12 +214,7 @@ static inline mddev_t *mddev_get(mddev_t *mddev) return mddev; } -static void mddev_delayed_delete(struct work_struct *ws) -{ - mddev_t *mddev = container_...
fc1f9ea51de726b3b8003539788d918814c9deff
Analyze and fix the following issue in the Linux kernel code: qlge: Add support for lost firmware events.
Problem Details: When the firmware is issuing events to the driver the events must be removed from the queue. If the queue overflows, the firmware will build and special event that captures those that are lost. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/qlge/qlge_mpi.c b/drivers/net/qlge/qlge_mpi.c index f9a237165fc1..9f81b797f10b 100644 --- a/drivers/net/qlge/qlge_mpi.c +++ b/drivers/net/qlge/qlge_mpi.c @@ -284,6 +284,27 @@ static int ql_sfp_out(struct ql_adapter *qdev, struct mbox_params *mbcp) return status; } +static int ql_ae...
4222474519ff5b31a526dfa1da7aa4b0e38bef5c
Analyze and fix the following issue in the Linux kernel code: net: fix tokenring license
Problem Details: Currently, modular tokenring ("tr") lacks a license and fails to load: tr: module license 'unspecified' taints kernel. tr: Unknown symbol proc_net_fops_create Beacuse of this, no tokenring driver can load if it depends on modular tr. Fix this by adding GPL module license as it is in the kernel. Wit...
```diff diff --git a/net/802/tr.c b/net/802/tr.c index 158150fee462..f47ae289d83b 100644 --- a/net/802/tr.c +++ b/net/802/tr.c @@ -668,3 +668,5 @@ module_init(rif_init); EXPORT_SYMBOL(tr_type_trans); EXPORT_SYMBOL(alloc_trdev); + +MODULE_LICENSE("GPL"); ```
4843b93c96ae5043c6279c4ec6fcd8ee3866ff5b
Analyze and fix the following issue in the Linux kernel code: netlink: invert error code in netlink_set_err()
Problem Details: The callers of netlink_set_err() currently pass a negative value as parameter for the error code. However, sk->sk_err wants a positive error value. Without this patch, skb_recv_datagram() called by netlink_recvmsg() may return a positive value to report an error. Another choice to fix this is to chang...
```diff diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 9eb895c7a2a9..3ae3cb816563 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -1084,6 +1084,13 @@ out: return 0; } +/** + * netlink_set_err - report error to broadcast listeners + * @ssk: the kernel netlink socket, ...
8c882f64130071eaebdc0861bee34a73e436f004
Analyze and fix the following issue in the Linux kernel code: crypto: Fix dead links
Problem Details: Signed-off-by: Adrian-Ken Rueegsegger <ken@codelabs.ch> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
```diff diff --git a/crypto/gf128mul.c b/crypto/gf128mul.c index ecbeaa1f17e1..a90d260528d4 100644 --- a/crypto/gf128mul.c +++ b/crypto/gf128mul.c @@ -4,7 +4,7 @@ * Copyright (c) 2006, Rik Snel <rsnel@cube.dyndns.org> * * Based on Dr Brian Gladman's (GPL'd) work published at - * http://fp.gladman.plus.com/cryptog...
368a12117dd8abf6eaefa37c21ac313b517128b9
Analyze and fix the following issue in the Linux kernel code: powerpc: Run sbc610 USB fixup code only on the appropriate platform.
Problem Details: commit a969e76a7101bf5f3d369563df1ca1253dd6131b (powerpc: Correct USB support for GE Fanuc SBC610) introduced a fixup for NEC usb controllers. This fixup should only run on GEF SBC610 boards. Fixes Fedora bug #486511. (https://bugzilla.redhat.com/show_bug.cgi?id=486511) Signed-off-by: Tony Breeds <to...
```diff diff --git a/arch/powerpc/platforms/86xx/gef_sbc610.c b/arch/powerpc/platforms/86xx/gef_sbc610.c index fb371f5ce132..d6b772ba3b8f 100644 --- a/arch/powerpc/platforms/86xx/gef_sbc610.c +++ b/arch/powerpc/platforms/86xx/gef_sbc610.c @@ -142,6 +142,10 @@ static void __init gef_sbc610_nec_fixup(struct pci_dev *pdev...
abb79972b4d1dff00f79cb0d123173abac48a6ae
Analyze and fix the following issue in the Linux kernel code: rds: fix iband RDMA dependencies
Problem Details: Fix RDS Infiniband dependencies for RDMA so that these build errors won't happen: ERROR: "rdma_accept" [net/rds/rds.ko] undefined! ERROR: "rdma_destroy_id" [net/rds/rds.ko] undefined! ERROR: "rdma_connect" [net/rds/rds.ko] undefined! ERROR: "rdma_destroy_qp" [net/rds/rds.ko] undefined! ERROR: "rdma_li...
```diff diff --git a/net/rds/Kconfig b/net/rds/Kconfig index 63bd370ab6ee..796773b5df9b 100644 --- a/net/rds/Kconfig +++ b/net/rds/Kconfig @@ -2,6 +2,7 @@ config RDS tristate "Reliable Datagram Sockets (RDS) (EXPERIMENTAL)" depends on INET && INFINIBAND_IPOIB && EXPERIMENTAL + depends on INFINIBAND && INFINIBAND_A...
2cadf9135eb3b6d84b6427314be827ddd443c308
Analyze and fix the following issue in the Linux kernel code: tracing: add binary buffer files for use with splice
Problem Details: Impact: new feature This patch creates a directory of files that correspond to the per CPU ring buffers. These are binary files and are made to be used with splice. This is the fastest way to extract data from the ftrace ring buffers. Thanks to Jiaying Zhang for pushing me to get this code fixed, an...
```diff diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index ea055aa21cd9..12539f72f4a5 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -11,31 +11,30 @@ * Copyright (C) 2004-2006 Ingo Molnar * Copyright (C) 2004 William Lee Irwin III */ +#include <linux/ring_buffer.h> #include <linux/...
e3d6bf0a0781a269f34250fd41e0d3dbfe540cf1
Analyze and fix the following issue in the Linux kernel code: ring-buffer: replace sizeof of event header with offsetof
Problem Details: Impact: fix to possible alignment problems on some archs. Some arch compilers include an NULL char array in the sizeof field. Since the ring_buffer_event type includes one of these, it is better to use the "offsetof" instead, to avoid strange bugs on these archs. Signed-off-by: Steven Rostedt <sroste...
```diff diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 2ad6bae95a3d..27cf834d8b4e 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -132,7 +132,7 @@ void ring_buffer_normalize_time_stamp(int cpu, u64 *ts) } EXPORT_SYMBOL_GPL(ring_buffer_normalize_time_stamp); -#...
ef7a4a161472b952941bf78855a9cd95703c024e
Analyze and fix the following issue in the Linux kernel code: ring-buffer: fix ring_buffer_read_page
Problem Details: The ring_buffer_read_page was broken if it were to only copy part of the page. This patch fixes that up as well as adds a parameter to allow a length field, in order to only copy part of the buffer page. Signed-off-by: Steven Rostedt <srostedt@redhat.com>
```diff diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h index f5e793d69bd3..79fcbc4b09d6 100644 --- a/include/linux/ring_buffer.h +++ b/include/linux/ring_buffer.h @@ -121,6 +121,9 @@ unsigned long ring_buffer_overrun_cpu(struct ring_buffer *buffer, int cpu); u64 ring_buffer_time_stamp(int cpu);...
41be4da4e85e58520b934040966a6ae919c66c2d
Analyze and fix the following issue in the Linux kernel code: ring-buffer: reset write field for ring_buffer_read_page
Problem Details: Impact: fix ring_buffer_read_page After a page is swapped into the ring buffer, the write field must also be reset. Signed-off-by: Steven Rostedt <srostedt@redhat.com>
```diff diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index a8c275c01e83..9baad7ee4b36 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -2492,6 +2492,7 @@ int ring_buffer_read_page(struct ring_buffer *buffer, rb_init_page(bpage); bpage = cpu_buffer->reader_page->p...
1777f1a978153e8b887c1e1eb5160ac46098b142
Analyze and fix the following issue in the Linux kernel code: crypto: ixp4xx - Fix qmgr_request_queue build failure
Problem Details: There is another user of IXP4xx queue manager, fix it. Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
```diff diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c index 2d637e0fbc03..d9e751be8c5f 100644 --- a/drivers/crypto/ixp4xx_crypto.c +++ b/drivers/crypto/ixp4xx_crypto.c @@ -457,10 +457,12 @@ static int init_ixp_crypto(void) if (!ctx_pool) { goto err; } - ret = qmgr_request_queue(SEN...
6b708b3dde0ab3a10a0eea7774c1d6482f32f587
Analyze and fix the following issue in the Linux kernel code: IB/sa_query: Fix AH leak due to update_sm_ah() race
Problem Details: Our testing uncovered a race condition in ib_sa_event(): spin_lock_irqsave(&port->ah_lock, flags); if (port->sm_ah) kref_put(&port->sm_ah->ref, free_sm_ah); port->sm_ah = NULL; spin_unlock_irqrestore(&port->ah_lock, flags); schedule_work(&sa_dev->port[event->element.port_num - sa_dev->...
```diff diff --git a/drivers/infiniband/core/sa_query.c b/drivers/infiniband/core/sa_query.c index 7863a50d56f2..1865049e80f7 100644 --- a/drivers/infiniband/core/sa_query.c +++ b/drivers/infiniband/core/sa_query.c @@ -395,6 +395,8 @@ static void update_sm_ah(struct work_struct *work) } spin_lock_irq(&port->ah_lo...
4780c1953f9bef07365b13af01ae4e8238ecd3de
Analyze and fix the following issue in the Linux kernel code: IB/mad: Fix ib_post_send_mad() returning 0 with no generate send comp
Problem Details: If ib_post_send_mad() returns 0, the API guarantees that there will be a callback to send_buf->mad_agent->send_handler() so that the sender can call ib_free_send_mad(). Otherwise, the ib_mad_send_buf will be leaked and the mad_agent reference count will never go to zero and the IB device module cannot...
```diff diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index dbcd285405ec..de922a04ca2d 100644 --- a/drivers/infiniband/core/mad.c +++ b/drivers/infiniband/core/mad.c @@ -742,9 +742,7 @@ static int handle_outgoing_dr_smp(struct ib_mad_agent_private *mad_agent_priv, break; case IB_MAD_RE...
bdf602bd737eb07d63d6fa2da826b4751fdf9bab
Analyze and fix the following issue in the Linux kernel code: [ARM] fix lots of ARM __devexit sillyness
Problem Details: `iop_adma_remove' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o `mv_xor_remove' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o `mv64xxx_i2c_unmap_regs' refe...
```diff diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c index ea5440dd10dc..647374acba94 100644 --- a/drivers/dma/iop-adma.c +++ b/drivers/dma/iop-adma.c @@ -1401,7 +1401,7 @@ MODULE_ALIAS("platform:iop-adma"); static struct platform_driver iop_adma_driver = { .probe = iop_adma_probe, - .remove = io...
633ddaa7f471e9db181f993c1458d6f4bae321ca
Analyze and fix the following issue in the Linux kernel code: tracing: fix return value to registering events
Problem Details: The registering of events had the return value check backwards. A zero returned is success, the check had it as a failure. This patch also fixes a missing "\n" in the warning that the check failed. Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Steven Rostedt <srostedt@redhat.com>
```diff diff --git a/kernel/trace/trace_events_stage_3.h b/kernel/trace/trace_events_stage_3.h index c62a4d2a5283..041789ffbac1 100644 --- a/kernel/trace/trace_events_stage_3.h +++ b/kernel/trace/trace_events_stage_3.h @@ -120,9 +120,9 @@ static int ftrace_reg_event_##call(void) \ int ret; \ \ re...
03787ceed8f7bf06af29f3b213017d89f8e9423d
Analyze and fix the following issue in the Linux kernel code: x86: set_highmem_pages_init() cleanup, fix !CONFIG_NUMA && CONFIG_HIGHMEM=y
Problem Details: Impact: build fix arch/x86/mm/highmem_32.c:187: error: static declaration of 'set_highmem_pages_init' follows non-static declaration arch/x86/include/asm/numa_32.h:8: error: previous declaration of 'set_highmem_pages_init' was here Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> LKML-Reference...
```diff diff --git a/arch/x86/mm/highmem_32.c b/arch/x86/mm/highmem_32.c index 13a823cf564c..00f127c80b0e 100644 --- a/arch/x86/mm/highmem_32.c +++ b/arch/x86/mm/highmem_32.c @@ -183,7 +183,7 @@ void __init set_highmem_pages_init(void) totalram_pages += totalhigh_pages; } #else -static void __init set_highmem_pages...
82ad39f9391fca1d3177bd9f6a5264eff5b5346a
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix gcc compile warning
Problem Details: It's false positive, but annoying. sound/pci/hda/hda_codec.c: In function ‘get_empty_pcm_device’: sound/pci/hda/hda_codec.c:2772: warning: ‘dev’ may be used uninitialized in this function Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 7c9ef5c18e77..04cb1251e3e7 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -2776,13 +2776,10 @@ static int get_empty_pcm_device(struct hda_bus *bus, int type) for (i = 0; i < ARRAY_SIZE(audio_idx); i++) { d...
780eef9492b16a1543a3b2ae9f9526a735fc9856
Analyze and fix the following issue in the Linux kernel code: x86: oprofile: don't set counter width from cpuid on Core2
Problem Details: Impact: fix stuck NMIs and non-working oprofile on certain CPUs Resetting the counter width of the performance counters on Intel's Core2 CPUs, breaks the delivery of NMIs, when running in x86_64 mode. This should fix bug #12395: http://bugzilla.kernel.org/show_bug.cgi?id=12395 Signed-off-by: Tim ...
```diff diff --git a/arch/x86/oprofile/op_model_ppro.c b/arch/x86/oprofile/op_model_ppro.c index e9f80c744cf3..10131fbdaada 100644 --- a/arch/x86/oprofile/op_model_ppro.c +++ b/arch/x86/oprofile/op_model_ppro.c @@ -78,8 +78,18 @@ static void ppro_setup_ctrs(struct op_msrs const * const msrs) if (cpu_has_arch_perfmon)...
97d4b35fb44cd5a80bc10952e2b1de5d3a14117b
Analyze and fix the following issue in the Linux kernel code: Blackfin arch: fix bug - Error if one serial has hardware flow control and the other doesn't
Problem Details: I have a system where UART0 is configured with hardware flow control, but UART1 doesn't have it enabled. Attempting to access UART1 in this configuration results in the following error in dmesg: <3>bfin-gpio: GPIO 0 is already reserved as Peripheral by bfin-uart ! <5>Stack from 0082bc7c: <5> 00...
```diff diff --git a/arch/blackfin/mach-bf518/include/mach/bfin_serial_5xx.h b/arch/blackfin/mach-bf518/include/mach/bfin_serial_5xx.h index b50a63b975a2..e21c1c3e4ec7 100644 --- a/arch/blackfin/mach-bf518/include/mach/bfin_serial_5xx.h +++ b/arch/blackfin/mach-bf518/include/mach/bfin_serial_5xx.h @@ -144,7 +144,7 @@ s...
6eb0777228f31932fc941eafe8b08848466630a1
Analyze and fix the following issue in the Linux kernel code: netns: Fix icmp shutdown.
Problem Details: Recently I had a kernel panic in icmp_send during a network namespace cleanup. There were packets in the arp queue that failed to be sent and we attempted to generate an ICMP host unreachable message, but failed because icmp_sk_exit had already been called. The network devices are removed from a netw...
```diff diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index 705b33b184a3..fc562d29cc46 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c @@ -1205,7 +1205,7 @@ static struct pernet_operations __net_initdata icmp_sk_ops = { int __init icmp_init(void) { - return register_pernet_device(&icmp_sk_ops); + return registe...
176c39af29bc4edaf37f663553eeaacd47b5bc9c
Analyze and fix the following issue in the Linux kernel code: netns: fix addrconf_ifdown kernel panic
Problem Details: When a network namespace is destroyed the network interfaces are all unregistered, making addrconf_ifdown called by the netdevice notifier. In the other hand, the addrconf exit method does a loop on the network devices and does addrconf_ifdown on each of them. But the ordering of the netns subsystem ...
```diff diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 40fabdee42ae..1220e2c7831e 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -2611,9 +2611,6 @@ static int addrconf_ifdown(struct net_device *dev, int how) ASSERT_RTNL(); - if ((dev->flags & IFF_LOOPBACK) && how == 1) - how = 0; - ...