id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
b2b2cbc4b2a2f389442549399a993a8306420baf
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix reparenting to the same thread group. (take 2)
Problem Details: This patch fixes the case when we reparent to a different thread in the same thread group. This modifies the code so that we do not send signals and do not change the signal to send to SIGCHLD unless we have change the thread group of our parents. It also suppresses sending pdeath_sig in this cas as ...
```diff diff --git a/kernel/exit.c b/kernel/exit.c index 85917c2bf065..46cf6b681460 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -597,14 +597,6 @@ choose_new_parent(struct task_struct *p, struct task_struct *reaper) static void reparent_thread(struct task_struct *p, struct task_struct *father, int traced) { - /...
0888f06ac99f993df2bb4c479f5b9306dafe154f
Analyze and fix the following issue in the Linux kernel code: [PATCH] sched: fix bad missed wakeups in the i386, x86_64, ia64, ACPI and APM idle code
Problem Details: Fernando Lopez-Lezcano reported frequent scheduling latencies and audio xruns starting at the 2.6.18-rt kernel, and those problems persisted all until current -rt kernels. The latencies were serious and unjustified by system load, often in the milliseconds range. After a patient and heroic multi-month...
```diff diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c index b75cff25de4b..199016927541 100644 --- a/arch/i386/kernel/apm.c +++ b/arch/i386/kernel/apm.c @@ -785,7 +785,11 @@ static int apm_do_idle(void) polling = !!(current_thread_info()->status & TS_POLLING); if (polling) { current_thread_info()->...
6d3a25f1fb75206ae8b2b1cdd1431b3852e1a45a
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix s3c24xx gpio driver (include linux/workqueue.h)
Problem Details: The general gpio driver includes seem to now depend on having <linux/workqueue.h> included before they are. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvald...
```diff diff --git a/drivers/spi/spi_s3c24xx_gpio.c b/drivers/spi/spi_s3c24xx_gpio.c index a5d2cdfff46f..bcaf4bd18eb9 100644 --- a/drivers/spi/spi_s3c24xx_gpio.c +++ b/drivers/spi/spi_s3c24xx_gpio.c @@ -15,6 +15,7 @@ #include <linux/init.h> #include <linux/delay.h> #include <linux/spinlock.h> +#include <linux/workqu...
3f9d7b0d810f9fe3dc670901b694a9632b8d62b3
Analyze and fix the following issue in the Linux kernel code: [PATCH] md: fix a few problems with the interface (sysfs and ioctl) to md
Problem Details: While developing more functionality in mdadm I found some bugs in md... - When we remove a device from an inactive array (write 'remove' to the 'state' sysfs file - see 'state_store') would should not update the superblock information - as we may not have read and processed it all properly yet. ...
```diff diff --git a/drivers/md/md.c b/drivers/md/md.c index 21e2a7b08841..d1cb45f6d6a9 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -1792,7 +1792,8 @@ state_store(mdk_rdev_t *rdev, const char *buf, size_t len) else { mddev_t *mddev = rdev->mddev; kick_rdev_from_array(rdev); - md_update_sb(mddev, ...
8701ea957dd2a7c309e17c8dcde3a64b92d8aec0
Analyze and fix the following issue in the Linux kernel code: [PATCH] ptrace: Fix EFL_OFFSET value according to i386 pda changes
Problem Details: The PDA patches introduced a bug in ptrace: it reads eflags from the wrong place on the target's stack, but writes it back to the correct place. The result is a corrupted eflags, which is most visible when it turns interrupts off unexpectedly. This patch fixes this by making the ptrace code a little ...
```diff diff --git a/arch/i386/kernel/ptrace.c b/arch/i386/kernel/ptrace.c index f3f94ac5736a..af8aabe85800 100644 --- a/arch/i386/kernel/ptrace.c +++ b/arch/i386/kernel/ptrace.c @@ -45,7 +45,7 @@ /* * Offset of eflags on child stack.. */ -#define EFL_OFFSET ((EFL-2)*4-sizeof(struct pt_regs)) +#define EFL_OFFSET o...
7c7e9425f114a109b07be2c2c1c6c169e34e9bb3
Analyze and fix the following issue in the Linux kernel code: [PATCH] memory hotplug: fix compile error for i386 with NUMA config
Problem Details: Fix compile error when config memory hotplug with numa on i386. The cause of compile error was missing of arch_add_memory(), remove_memory(), and memory_add_physaddr_to_nid(). Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com> Acked-by: David Rientjes <rientjes@cs.washington.edu> Acked-by: Randy Du...
```diff diff --git a/arch/i386/mm/discontig.c b/arch/i386/mm/discontig.c index 103b76e56a94..e0c390d6ceb5 100644 --- a/arch/i386/mm/discontig.c +++ b/arch/i386/mm/discontig.c @@ -405,3 +405,31 @@ void __init set_highmem_pages_init(int bad_ppro) totalram_pages += totalhigh_pages; #endif } + +#ifdef CONFIG_MEMORY_HOT...
134fe01bfafa74e691d84bf15666fb30e89896ff
Analyze and fix the following issue in the Linux kernel code: [PATCH] kernel-doc: allow unnamed structs/unions
Problem Details: Make kernel-doc support unnamed (anonymous) structs and unions. There is one (union) in include/linux/skbuff.h (inside struct sk_buff) that is currently generating a kernel-doc warning, so this fixes that warning. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akp...
```diff diff --git a/scripts/kernel-doc b/scripts/kernel-doc index df3b272f7ce6..f50a70f550b3 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -1469,6 +1469,7 @@ sub push_parameter($$$) { my $param = shift; my $type = shift; my $file = shift; + my $anon = 0; my $param_name = $param; $param_name =...
31fccf7fe4097e62f038bdfe8f4f68ecaea8ebe7
Analyze and fix the following issue in the Linux kernel code: [PATCH] gxt4500: Fix colormap and PLL setting, support GXT6000P
Problem Details: This fixes some bugs in the gxt4500 framebuffer driver, and adds support for GXT6000P cards. First, I had the red and blue channels swapped in the colormap update code, resulting in penguins' noses and feet turning blue (though the penguins weren't actually shivering :). Secondly, the code that calcu...
```diff diff --git a/drivers/video/gxt4500.c b/drivers/video/gxt4500.c index 3adf6ab0768f..23a6bcc3e3ce 100644 --- a/drivers/video/gxt4500.c +++ b/drivers/video/gxt4500.c @@ -1,5 +1,5 @@ /* - * Frame buffer device for IBM GXT4500P display adaptor + * Frame buffer device for IBM GXT4500P and GXT6000P display adaptors ...
449d4dd5add718578eb2e6671168de9f67dd239c
Analyze and fix the following issue in the Linux kernel code: [PATCH] MAINTAINERS: fix email for S3C2410 and S3C2440
Problem Details: Change the email address for the S3C2410 and S3C2440 maintainer. The old addresses have been deleted due to spam issues. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/MAINTAINERS b/MAINTAINERS index 13902cbe56ba..8197d8c81449 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -406,14 +406,14 @@ S: Maintained ARM/S3C2410 ARM ARCHITECTURE P: Ben Dooks -M: ben-s3c2410@fluff.org +M: ben-linux@fluff.org L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) W...
be31f9cbc809dae0bcdd39211c33c6882a7b0c9e
Analyze and fix the following issue in the Linux kernel code: [PATCH] microcode: fix mc_cpu_notifier section warning
Problem Details: Structure mc_cpu_notifier references a __cpuinit function, but isn't declared __cpuinitdata itself: WARNING: arch/i386/kernel/microcode.o - Section mismatch: reference to .init.text: from .data after 'mc_cpu_notifier' (at offset 0x118) Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Tigran Aivaz...
```diff diff --git a/arch/i386/kernel/microcode.c b/arch/i386/kernel/microcode.c index 47ffec57c0cb..c8fa13721bcb 100644 --- a/arch/i386/kernel/microcode.c +++ b/arch/i386/kernel/microcode.c @@ -722,7 +722,7 @@ mc_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu) return NOTIFY_OK; } -static...
fadfc8e930dcaf502b49a0a0170ba8ebe9a34c49
Analyze and fix the following issue in the Linux kernel code: [PATCH] gss_spkm3: fix error handling in module init
Problem Details: Return error and prevent from loading module when gss_mech_register() failed. Cc: Andy Adamson <andros@citi.umich.edu> Cc: J. Bruce Fields <bfields@citi.umich.edu> Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <...
```diff diff --git a/net/sunrpc/auth_gss/gss_spkm3_mech.c b/net/sunrpc/auth_gss/gss_spkm3_mech.c index 41465072d0b5..8ef3f1c19435 100644 --- a/net/sunrpc/auth_gss/gss_spkm3_mech.c +++ b/net/sunrpc/auth_gss/gss_spkm3_mech.c @@ -228,7 +228,7 @@ static int __init init_spkm3_module(void) status = gss_mech_register(&gss_s...
3e1fbd12c958591695f89b11f9c6ec08d002e358
Analyze and fix the following issue in the Linux kernel code: [PATCH] audit: fix kstrdup() error check
Problem Details: kstrdup() returns NULL on error. Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index 2e896f8ae29e..9c8c23227c7f 100644 --- a/kernel/auditfilter.c +++ b/kernel/auditfilter.c @@ -800,8 +800,8 @@ static inline int audit_dupe_selinux_field(struct audit_field *df, /* our own copy of se_str */ se_str = kstrdup(sf->se_str, GFP_KERNEL...
561ccd3a97867ed33e1670feeca3391cd4d6fa2c
Analyze and fix the following issue in the Linux kernel code: [PATCH] handle SLOB with sparsemen
Problem Details: This is to disallow to make SLOB with SMP or SPARSEMEM. This avoids latent troubles of SLOB with SLAB_DESTROY_BY_RCU. And fix compile error. Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: ...
```diff diff --git a/init/Kconfig b/init/Kconfig index 9b1adb176ea8..a3f83e2c8250 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -450,7 +450,7 @@ config SHMEM config SLAB default y - bool "Use full SLAB allocator" if EMBEDDED + bool "Use full SLAB allocator" if (EMBEDDED && !SMP && !SPARSEMEM) help Disablin...
19900cdee29c812857ce938ab449e1053d516252
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix aoe without scatter-gather [Bug 7662]
Problem Details: Fix a bug that only appears when AoE goes over a network card that does not support scatter-gather. The headers in the linear part of the skb appeared to be larger than they really were, resulting in data that was offset by 24 bytes. This patch eliminates the offset data on cards that don't support s...
```diff diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c index 97f7f535f412..bb022ed4a866 100644 --- a/drivers/block/aoe/aoecmd.c +++ b/drivers/block/aoe/aoecmd.c @@ -30,8 +30,6 @@ new_skb(ulong len) skb->nh.raw = skb->mac.raw = skb->data; skb->protocol = __constant_htons(ETH_P_AOE); skb->p...
9127d4b1d9b2e8fba8e7fbc7f88ea93e5eb01396
Analyze and fix the following issue in the Linux kernel code: [PATCH] lock debugging: fix DEBUG_LOCKS_WARN_ON() & debug_locks_silent
Problem Details: Matthew Wilcox noticed that the debug_locks_silent use should be inverted in DEBUG_LOCKS_WARN_ON(). This bug was causing spurious stacktraces and incorrect failures in the locking self-test on the parisc kernel. Bug-found-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: Ingo Molnar <mingo@elte.hu> ...
```diff diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h index a1c10b0c4cf0..1678a5de7013 100644 --- a/include/linux/debug_locks.h +++ b/include/linux/debug_locks.h @@ -24,7 +24,7 @@ extern int debug_locks_off(void); int __ret = 0; \ \ if (unlikely(c)) { \ - if (debug_loc...
ef8142a525c58dec325e8dd9a7bf92fb240d05c7
Analyze and fix the following issue in the Linux kernel code: [PATCH] smc911 workqueue fixes
Problem Details: Teach this driver about the workqueue changes. Cc: Vitaly Wool <vitalywool@gmail.com> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index 797ab9125e72..880d9fdd7c67 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c @@ -148,6 +148,8 @@ struct smc911x_local { int tx_throttle; spinlock_t lock; + struct net_device *netdev; + #ifdef SMC_USE_DMA /* DMA needs the phys...
9b6d2efed2f4cfa07827d3e497655ce91dd97866
Analyze and fix the following issue in the Linux kernel code: [PATCH] smc911x: fix netpoll compilation faliure
Problem Details: Fix the compilation failure for smc911x.c when NET_POLL_CONTROLLER is set. Signed-off-by: Vitaly Wool <vitalywool@gmail.com> Cc: Jeff Garzik <jeff@garzik.org> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index 2c4343395a4d..797ab9125e72 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c @@ -1331,7 +1331,7 @@ smc911x_rx_dma_irq(int dma, void *data) static void smc911x_poll_controller(struct net_device *dev) { disable_irq(dev->irq); - smc9...
9d7ac8be4b48737ad1cebd94ed754a269f360708
Analyze and fix the following issue in the Linux kernel code: [PATCH] genirq: fix irq flow handler uninstall
Problem Details: The sanity check for no_irq_chip in __set_irq_hander() is unconditional on both install and uninstall of an handler. This triggers false warnings and replaces no_irq_chip by dummy_irq_chip in the uninstall case. Check only, when a real handler is installed. Signed-off-by: Thomas Gleixner <tglx@linut...
```diff diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 1c1b7125b8ac..d27b25855743 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -517,8 +517,7 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, if (!handle) handle = handle_bad_irq; - - if (desc->chip == &no_irq...
e903387f1ebe3a7ddb93cd49c38341d3632df528
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix vm_events_fold_cpu() build breakage
Problem Details: fix vm_events_fold_cpu() build breakage 2.6.20-rc1 does not build properly if CONFIG_VM_EVENT_COUNTERS is set and CONFIG_HOTPLUG is unset: CC init/version.o LD init/built-in.o LD .tmp_vmlinux1 mm/built-in.o: In function `page_alloc_cpu_notify': page_alloc.c:(.text+0x56eb): undefi...
```diff diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 532360010919..5e9803ed17fc 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h @@ -74,7 +74,13 @@ static inline void count_vm_events(enum vm_event_item item, long delta) } extern void all_vm_events(unsigned long *); +#ifdef CONF...
e07aa05b606deeb1a8b55cd19098427c72daebce
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix swapped parameters in mm/vmscan.c
Problem Details: The version of mm/vmscan.c in Linus' current tree has swapped parameters in the shrink_all_zones declaration and call, used by the various suspend-to-disk implementations. This doesn't seem to have any great adverse effect, but it's clearly wrong. Signed-off-by: Nigel Cunningham <nigel@suspend2.net> ...
```diff diff --git a/mm/vmscan.c b/mm/vmscan.c index e9813b06c7a3..63eb9ab0032b 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1369,8 +1369,8 @@ void wakeup_kswapd(struct zone *zone, int order) * * For pass > 3 we also try to shrink the LRU lists that contain a few pages */ -static unsigned long shrink_all_zones(...
af9997e426f9ddfe7a84cb4cd3c7ff938fabd41a
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix kernel-doc warnings in 2.6.20-rc1
Problem Details: Fix kernel-doc warnings in 2.6.20-rc1. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index e07c079e07e6..fb6789725e1b 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c @@ -2453,6 +2453,7 @@ EXPORT_SYMBOL(blk_rq_map_user); * @rq: request to map data to * @iov: pointer to the iovec * @iov_count: number of elements in the iovec + * @le...
b7f869a2847dfe6f9b0835ca1b24e73bed926d7d
Analyze and fix the following issue in the Linux kernel code: [PATCH] slab: fix kmem_ptr_validate definition
Problem Details: The declaration of kmem_ptr_validate in slab.h does not match the one in slab.c. Remove the fastcall attribute (this is the only use in slab.c). Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/mm/slab.c b/mm/slab.c index 909975f6e090..176037bcc66a 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -3553,7 +3553,7 @@ EXPORT_SYMBOL(kmem_cache_zalloc); * * Currently only used for dentry validation. */ -int fastcall kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr) +int kmem_ptr_val...
533ffc289db9f44c0633d3a7b87243b5740b02b2
Analyze and fix the following issue in the Linux kernel code: [PATCH] rtc warning fix
Problem Details: drivers/char/rtc.c:116: warning: 'hpet_rtc_interrupt' defined but not used Cc: Jan Beulich <jbeulich@novell.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c index e1d70e8b6268..664f36c98e6a 100644 --- a/drivers/char/rtc.c +++ b/drivers/char/rtc.c @@ -113,7 +113,12 @@ static int rtc_has_irq = 1; #define hpet_set_rtc_irq_bit(arg) 0 #define hpet_rtc_timer_init() do { } while (0) #define hpet_rtc_dropped_irq(...
92a3d03aab912624cae799e5772a6eb2ef55083f
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix for shmem_truncate_range() BUG_ON()
Problem Details: Ran into BUG() while doing madvise(REMOVE) testing. If we are punching a hole into shared memory segment using madvise(REMOVE) and the entire hole is below the indirect blocks, we hit following assert. BUG_ON(limit <= SHMEM_NR_DIRECT); Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com> Cc...
```diff diff --git a/mm/shmem.c b/mm/shmem.c index 4bb28d218eb5..70da7a0981bf 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -515,7 +515,12 @@ static void shmem_truncate_range(struct inode *inode, loff_t start, loff_t end) size = SHMEM_NR_DIRECT; nr_swaps_freed = shmem_free_swp(ptr+idx, ptr+size); } - if (!topdir...
ba0084048ab785c2cb1d6cc2cccabe642a5b799a
Analyze and fix the following issue in the Linux kernel code: [PATCH] Conditionally check expected_preempt_count in __resched_legal()
Problem Details: Commit 2d7d253548cffdce80f4e03664686e9ccb1b0ed7 ("fix cond_resched() fix") introduced an 'expected_preempt_count' parameter to __resched_legal() to fix a bug where it was returning a false negative when called from cond_resched_lock() and preemption was enabled. Unfortunately this broke things for whe...
```diff diff --git a/kernel/sched.c b/kernel/sched.c index b81ed8703f70..850bde4b31a2 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -4619,8 +4619,10 @@ asmlinkage long sys_sched_yield(void) static inline int __resched_legal(int expected_preempt_count) { +#ifdef CONFIG_PREEMPT if (unlikely(preempt_count() !=...
36241b8c7cbcc83e7fd534d25e1df8339db8244e
Analyze and fix the following issue in the Linux kernel code: [PATCH] KVM: AMD SVM: Save and restore the floating point unit state
Problem Details: Fixes sf bug 1614113 (segfaults in nbench). Signed-off-by: Avi Kivity <avi@qumranet.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index 3bf25795b3ef..59c930f276e2 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c @@ -575,6 +575,8 @@ static int svm_create_vcpu(struct kvm_vcpu *vcpu) memset(vcpu->svm->db_regs, 0, sizeof(vcpu->svm->db_regs)); init_vmcb(vcpu->svm->vmcb); + fx_init(...
5f2a105d5e33a038a717995d2738434f9c25aed2
Analyze and fix the following issue in the Linux kernel code: [PATCH] truncate: dirty memory accounting fix
Problem Details: Only (un)account for IO and page-dirtying for devices which have real backing store (ie: not tmpfs or ramdisks). Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/mm/truncate.c b/mm/truncate.c index 89a5c359b6e8..4a38dd1a4ce8 100644 --- a/mm/truncate.c +++ b/mm/truncate.c @@ -60,7 +60,8 @@ void cancel_dirty_page(struct page *page, unsigned int account_size) WARN_ON(++warncount < 5); } - if (TestClearPageDirty(page) && account_size) { + if (TestClear...
bb4067e34159648d394943d5e2a011f838bff22f
Analyze and fix the following issue in the Linux kernel code: [PATCH] elevator: fixup typo in merge logic
Problem Details: The recent io scheduler allow_merge commit left the block layer with no merging, oops. This patch fixes that up. That means the CFQ change needs to be verified again, it might not fix the original bug now. But that's a seperate thing, I'll double check that tomorrow. Signed-off-by: Jens Axboe <jens....
```diff diff --git a/block/elevator.c b/block/elevator.c index 62c7a3069d3a..536be740ba4e 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -82,7 +82,7 @@ inline int elv_rq_merge_ok(struct request *rq, struct bio *bio) /* * must be same device and not a special request */ - if (rq->rq_disk != bio->bi_bdev...
3e67c0987d7567ad666641164a153dca9a43b11d
Analyze and fix the following issue in the Linux kernel code: [PATCH] truncate: clear page dirtiness before running try_to_free_buffers()
Problem Details: truncate presently invalidates the dirty page's buffer_heads then shoots down the page. But try_to_free_buffers() will now bale out because the page is dirty. Net effect: the LRU gets filled with dirty pages which have invalidated buffer_heads attached. They have no ->mapping and hence cannot be cle...
```diff diff --git a/mm/truncate.c b/mm/truncate.c index bf9e2965d666..89a5c359b6e8 100644 --- a/mm/truncate.c +++ b/mm/truncate.c @@ -60,11 +60,12 @@ void cancel_dirty_page(struct page *page, unsigned int account_size) WARN_ON(++warncount < 5); } - if (TestClearPageDirty(page) && account_size) + if (TestClear...
921320210bd2ec4f17053d283355b73048ac0e56
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix XFS after clear_page_dirty() removal
Problem Details: XFS appears to call clear_page_dirty to get the mapping tree dirty tag set correctly at the same time the page dirty flag is cleared. I note that this can be done by set_page_writeback() if we clear the dirty flag on the page first when we are writing back the entire page. Hence it seems to me that t...
```diff diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index b56eb754e2d2..7b54461695e2 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c @@ -341,9 +341,9 @@ xfs_start_page_writeback( { ASSERT(PageLocked(page)); ASSERT(!PageWriteback(page)); - set_page_writeback(pag...
d0e671a932cb9c653b27393cec26aec012a8d97e
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix JFS after clear_page_dirty() removal
Problem Details: This patch removes some questionable code that attempted to make a no-longer-used page easier to reclaim. Calling metapage_writepage against such a page will not result in any I/O being performed, so removing this code shouldn't be a big deal. [ It's likely that we could have just replaced the "clear...
```diff diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c index b1a1c7296014..ceaf03b94935 100644 --- a/fs/jfs/jfs_metapage.c +++ b/fs/jfs/jfs_metapage.c @@ -764,22 +764,9 @@ void release_metapage(struct metapage * mp) } else if (mp->lsn) /* discard_metapage doesn't remove it */ remove_from_logsync(mp); ...
fba2591bf4e418b6c3f9f8794c9dd8fe40ae7bd9
Analyze and fix the following issue in the Linux kernel code: VM: Remove "clear_page_dirty()" and "test_clear_page_dirty()" functions
Problem Details: They were horribly easy to mis-use because of their tempting naming, and they also did way more than any users of them generally wanted them to do. A dirty page can become clean under two circumstances: (a) when we write it out. We have "clear_page_dirty_for_io()" for this, and that function r...
```diff diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index ed2c22340ad7..4f4cd132b571 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c @@ -176,7 +176,7 @@ static int hugetlbfs_commit_write(struct file *file, static void truncate_huge_page(struct page *page) { - clear_page_dirty(page); + canc...
9bfb18392ef586467277fa25d8f3a7a93611f6df
Analyze and fix the following issue in the Linux kernel code: [PATCH] workqueue: fix schedule_on_each_cpu()
Problem Details: fix the schedule_on_each_cpu() implementation: __queue_work() is now stricter, hence set the work-pending bit before passing in the new work. (found in the -rt tree, using Peter Zijlstra's files-lock scalability patchset) Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Linus Torvalds <torva...
```diff diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 742cbbe49bdc..180a8ce11535 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -637,9 +637,11 @@ int schedule_on_each_cpu(work_func_t func) mutex_lock(&workqueue_mutex); for_each_online_cpu(cpu) { - INIT_WORK(per_cpu_ptr(works, cpu), func...
5ccac88eeb5659c716af8e695e2943509c80d172
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix leaks on pipe(2) failure exits
Problem Details: Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/fs/pipe.c b/fs/pipe.c index 9a06e8e48e8d..68090e84f589 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -935,8 +935,9 @@ struct file *create_write_pipe(void) void free_write_pipe(struct file *f) { - mntput(f->f_path.mnt); + free_pipe_info(f->f_dentry->d_inode); dput(f->f_path.dentry); + mntput(f->f_...
136f1e7a8cb7d17ff91706518549697071640ae4
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86_64: fix boot time hang in detect_calgary()
Problem Details: if CONFIG_CALGARY_IOMMU is built into the kernel via CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT, or is enabled via the iommu=calgary boot option, then the detect_calgary() function runs to detect the presence of a Calgary IOMMU. detect_calgary() first searches the BIOS EBDA area for a "rio_table_hdr" BIO...
```diff diff --git a/arch/x86_64/kernel/pci-calgary.c b/arch/x86_64/kernel/pci-calgary.c index 3215675ab128..87d90cb68a74 100644 --- a/arch/x86_64/kernel/pci-calgary.c +++ b/arch/x86_64/kernel/pci-calgary.c @@ -1052,7 +1052,7 @@ void __init detect_calgary(void) void *tbl; int calgary_found = 0; unsigned long ptr;...
a9622f6219ce58faba1417743bf3078501eb3434
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86_64: fix boot hang caused by CALGARY_IOMMU_ENABLED_BY_DEFAULT
Problem Details: one of my boxes didnt boot the 2.6.20-rc1-rt0 kernel rpm, it hung during early bootup. After an hour or two of happy debugging i narrowed it down to the CALGARY_IOMMU_ENABLED_BY_DEFAULT option, which was freshly added to 2.6.20 via the x86_64 tree and /enabled by default/. commit bff6547bb6a4e82c399d7...
```diff diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig index d4275537b25b..ef6672455695 100644 --- a/arch/x86_64/Kconfig +++ b/arch/x86_64/Kconfig @@ -480,14 +480,13 @@ config CALGARY_IOMMU config CALGARY_IOMMU_ENABLED_BY_DEFAULT bool "Should Calgary be enabled by default?" - default y depends on CALGARY...
2786f6e388e9dfe9e7b1c3c6bd7fcfba9cfb9831
Analyze and fix the following issue in the Linux kernel code: ACPI: fix Supermicro X7DB8+ Boot regression
Problem Details: http://bugzilla.kernel.org/show_bug.cgi?id=7695 Originally we converted bind/unbind to use a new pci bridge driver. The driver will add/remove _PRT, so we can eventually remove .bind/.unbind methods. But we found that some of the _ADR-Based devices don't have _PRT, i.e. they are not managed by the ne...
```diff diff --git a/drivers/acpi/pci_bind.c b/drivers/acpi/pci_bind.c index aa05e92464e6..1e2ae6e7a7e4 100644 --- a/drivers/acpi/pci_bind.c +++ b/drivers/acpi/pci_bind.c @@ -223,6 +223,8 @@ int acpi_pci_bind(struct acpi_device *device) data->id.segment, data->id.bus, data->id.device, data->id.function));...
a5176b78974451680bd93b8954230cf1a47dee1b
Analyze and fix the following issue in the Linux kernel code: [PATCH] USB: Nokia E70 is an unusual device
Problem Details: Taken from http://bugzilla.kernel.org/show_bug.cgi?id=7508 When the Nokia E70 Phone is plugged in to the USB port, I get: end_request: I/O error, dev sda, sector 1824527 sd 0:0:0:0: SCSI error: return code = 0x10070000 end_request: I/O error, dev sda, sector 1824535 sd 0:0:0:0: SCSI error: return cod...
```diff diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 5fe7ff441a09..f726b87c8fe4 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h @@ -160,6 +160,13 @@ UNUSUAL_DEV( 0x0421, 0x0433, 0x0100, 0x0100, US_SC_DEVICE, US_PR_DEVICE, NULL, ...
2e5704f63ed56b040a3189f6b7eb17f6f849ea22
Analyze and fix the following issue in the Linux kernel code: [PATCH] libata: take scmd->cmd_len into account when translating SCSI commands
Problem Details: libata depended on SCSI command to have the correct length when tranlating it into an ATA command. This generally worked for commands issued by SCSI HLD but user could issue arbitrary broken command using sg interface. Also, when building ATAPI command, full command size was always copied. Because s...
```diff diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 307910bd62c3..836947da5b14 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -953,6 +953,9 @@ static unsigned int ata_scsi_start_stop_xlat(struct ata_queued_cmd *qc) struct ata_taskfile *tf = &qc->tf; const u8 *...
1f21782e63da81f56401a813a52091ef2703838f
Analyze and fix the following issue in the Linux kernel code: Driver core: proper prototype for drivers/base/init.c:driver_init()
Problem Details: Add a prototype for driver_init() in include/linux/device.h. Also remove a static function of the same name in drivers/acpi/ibm_acpi.c to ibm_acpi_driver_init() to fix the namespace collision. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-of...
```diff diff --git a/drivers/acpi/ibm_acpi.c b/drivers/acpi/ibm_acpi.c index 003a9876c968..5a8445959f67 100644 --- a/drivers/acpi/ibm_acpi.c +++ b/drivers/acpi/ibm_acpi.c @@ -352,7 +352,7 @@ static char *next_cmd(char **cmds) return start; } -static int driver_init(void) +static int ibm_acpi_driver_init(void) { ...
542cfce6f36e8c43f71ae9c235b78497f350ae55
Analyze and fix the following issue in the Linux kernel code: kobject: kobject_uevent() returns manageable value
Problem Details: Since kobject_uevent() function does not return an integer value to indicate if its operation was completed with success or not, it is worth changing it in order to report a proper status (success or error) instead of returning void. [randy.dunlap@oracle.com: Fix inline kobject functions] Cc: Mauricio...
```diff diff --git a/include/linux/kobject.h b/include/linux/kobject.h index d1c8d28fa92e..76538fcf2c4e 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h @@ -265,8 +265,8 @@ extern int __must_check subsys_create_file(struct subsystem * , struct subsys_attribute *); #if defined(CONFIG_HOTPLUG) ...
fb0f2b40faff41f03acaa2ee6e6231fc96ca497c
Analyze and fix the following issue in the Linux kernel code: PCI legacy resource fix
Problem Details: Since commit 368c73d4f689dae0807d0a2aa74c61fd2b9b075f the kernel will try to update the non-writeable BAR registers 0..3 of PIIX4 IDE adapters if pci_assign_unassigned_resources() is used to do full resource assignment of the bus. This fails because in the PIIX4 these BAR registers have implicitly ass...
```diff diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 6a3c1e728900..1ae9c3f50ffa 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -649,6 +649,9 @@ static void pci_read_irq(struct pci_dev *dev) * Returns 0 on success and -1 if unknown type of device (not normal, bridge * or CardBus). */...
9ac0ce8596b17093739d42721cc8a616cedf734b
Analyze and fix the following issue in the Linux kernel code: PCI: Be a bit defensive in quirk_nvidia_ck804() so we don't risk dereferencing a NULL pdev.
Problem Details: pci_get_slot() may return NULL if nothing was found. quirk_nvidia_ck804() does not check the value returned from pci_get_slot(), so it may end up causing a NULL pointer deref. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@os...
```diff diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 30c41fc1c996..8a2db01b903e 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -1743,6 +1743,8 @@ static void __devinit quirk_nvidia_ck804_msi_ht_cap(struct pci_dev *dev) * a single one having MSI is enough to be sure that MSI are sup...
1597cacbe39802d86656d1f2e6329895bd2ef531
Analyze and fix the following issue in the Linux kernel code: PCI: Fix multiple problems with VIA hardware
Problem Details: This patch is designed to fix: - Disk eating corruptor on KT7 after resume from RAM - VIA IRQ handling - VIA fixups for bus lockups after resume from RAM The core of this is to add a table of resume fixups run at resume time. We need to do this for a variety of boards and features, but particularly we...
```diff diff --git a/arch/i386/pci/fixup.c b/arch/i386/pci/fixup.c index cde1170b01a1..8053b17ab647 100644 --- a/arch/i386/pci/fixup.c +++ b/arch/i386/pci/fixup.c @@ -115,7 +115,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, pci #define VIA_8363_KL133_REVISION_ID 0x81 #define VIA_83...
f1e79092d9a59e2b1c8eae3b0f4ef3827dda08a0
Analyze and fix the following issue in the Linux kernel code: rpaphp: compiler warning cleanup
Problem Details: This janitorial patch removes the following annoying compile-time message: drivers/pci/hotplug/rpaphp_slot.c:57: warning: ignoring return value of sfs_create_file declared with attribute warn_unused_result It also fixes a typo, removes some misc crud. Signed-off-by: Linas Vepstas <linas@austin.ibm.c...
```diff diff --git a/drivers/pci/hotplug/rpaphp_slot.c b/drivers/pci/hotplug/rpaphp_slot.c index b771196a654e..3009193f0058 100644 --- a/drivers/pci/hotplug/rpaphp_slot.c +++ b/drivers/pci/hotplug/rpaphp_slot.c @@ -47,21 +47,11 @@ static ssize_t location_read_file (struct hotplug_slot *php_slot, char *buf) return ret...
df251b8bfcc5879b947223746779f90018424a6d
Analyze and fix the following issue in the Linux kernel code: USB: fix to usbfs_snoop logging of user defined control urbs
Problem Details: When sending CONTROL URB's using the usual CONTROL ioctl, logging works fine, but when sending them via SUBMITURB, like VMWare does, the control fields are not logged. This patch fixes that. I didn't see any major changes to devio.c recently, so this patch should apply cleanly to even the latest kern...
```diff diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 3ed4cb2d56d9..4b3a6ab29bd3 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c @@ -962,7 +962,11 @@ static int proc_do_submiturb(struct dev_state *ps, struct usbdevfs_urb *uurb, kfree(dr); return -EFAULT; } - sno...
bc92c32aa21cf2e8808f8cff0be0a2a653652e92
Analyze and fix the following issue in the Linux kernel code: USB: at91_udc: allow drivers that support high speed
Problem Details: This patch allows gadget drivers that support high speed (e.g. gadgetfs) to work properly with at91_udc. Fix suggested by Milan Svoboda in http://marc.theaimsgroup.com/?l=linux-usb-devel&m=115822184711817 Signed-off-by: Wojtek Kaniewski <wojtekka@toxygen.net> Acked-by: David Brownell <dbrownell@users...
```diff diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c index c8954a6ddf8c..38a2e113e705 100644 --- a/drivers/usb/gadget/at91_udc.c +++ b/drivers/usb/gadget/at91_udc.c @@ -1579,7 +1579,7 @@ int usb_gadget_register_driver (struct usb_gadget_driver *driver) int retval; if (!driver - ||...
29ba4b533b677f3cd7f2fc901d51054555a8f243
Analyze and fix the following issue in the Linux kernel code: USB: at91_udc, misc fixes
Problem Details: This is an update to the AT91 USB Device (Gadget) driver. Adds support for the Atmel AT91SAM9260 and AT91SAM9261 processors. The only difference is how they handle the pullup pin. [Patch from Patrice Vilchez] Need to clear any pending USB Device interrupts before registering the interrupt handler. ...
```diff diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c index b53b93700ca8..c8954a6ddf8c 100644 --- a/drivers/usb/gadget/at91_udc.c +++ b/drivers/usb/gadget/at91_udc.c @@ -51,6 +51,8 @@ #include <asm/arch/gpio.h> #include <asm/arch/board.h> +#include <asm/arch/cpu.h> +#include <asm/arch/a...
23d10a9e376d6a9cd4afd4e27e5e403864f6729b
Analyze and fix the following issue in the Linux kernel code: USB: ohci handles hardware faults during root port resets
Problem Details: I have found a problem where the root_port_reset() goes into an infinite loop and stalls the kernel. This happens when a hardware fault inside the machine occurs during a small timing window. In case of USB device connection, if a USB device responds to hcd_submit_urb(), and later the controller fail...
```diff diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c index f9748b67e5e7..216c9c9d4d6d 100644 --- a/drivers/usb/host/ohci-hub.c +++ b/drivers/usb/host/ohci-hub.c @@ -555,7 +555,7 @@ static void start_hnp(struct ohci_hcd *ohci); #define tick_before(t1,t2) ((s16)(((s16)(t1))-((s16)(t2))) < 0) ...
ee269d98a9248fbb729c20ffda0f1b97e82c5c37
Analyze and fix the following issue in the Linux kernel code: USB: ohci at91 warning fix
Problem Details: Remove a warning about an unused variable in the OHCI bus glue for at91. Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index f15c84ea2869..cc405512fa1c 100644 --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci-at91.c @@ -187,7 +187,6 @@ ohci_at91_start (struct usb_hcd *hcd) { struct at91_usbh_data *board = hcd->self.controller->platform_data...
6bea476cf628eb7bb18a036ac6a8fed1ad319951
Analyze and fix the following issue in the Linux kernel code: USB: gadget driver unbind() is optional; section fixes; misc
Problem Details: Allow gadget drivers to omit the unbind() method. When they're statically linked, that's an appropriate memory saving tweak. Similarly, provide consistent/simpler handling for a should-not-happen error case: removing a peripheral controller driver when a gadget driver is still loaded. Such code dat...
```diff diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c index 3e0abbb49fe1..81656337381f 100644 --- a/drivers/usb/gadget/at91_udc.c +++ b/drivers/usb/gadget/at91_udc.c @@ -1574,7 +1574,6 @@ int usb_gadget_register_driver (struct usb_gadget_driver *driver) if (!driver || driver->speed !=...
fe1ec341df1b510e5e614ccdad4a89273d6f6fe8
Analyze and fix the following issue in the Linux kernel code: USB: Nokia E70 is an unusual device
Problem Details: Taken from http://bugzilla.kernel.org/show_bug.cgi?id=7508 When the Nokia E70 Phone is plugged in to the USB port, I get: end_request: I/O error, dev sda, sector 1824527 sd 0:0:0:0: SCSI error: return code = 0x10070000 end_request: I/O error, dev sda, sector 1824535 sd 0:0:0:0: SCSI error: return cod...
```diff diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 7640bdd4fff2..5fe7ff441a09 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h @@ -153,6 +153,13 @@ UNUSUAL_DEV( 0x0421, 0x042e, 0x0100, 0x0100, US_SC_DEVICE, US_PR_DEVICE, NULL, ...
071e0a2aee9c289f50b9329d0c26474ca94f7c7a
Analyze and fix the following issue in the Linux kernel code: USB: fix Wacom Intuos3 4x6 bugs
Problem Details: Fixes Intuos3 4x6 bugs Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/input/wacom_sys.c b/drivers/usb/input/wacom_sys.c index e7cc20ab8155..12b42746ded8 100644 --- a/drivers/usb/input/wacom_sys.c +++ b/drivers/usb/input/wacom_sys.c @@ -159,13 +159,13 @@ void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac) { input_dev->keybit[LON...
abc9404bb0bcfa8677ab5978b2c8b60ab5ef7536
Analyze and fix the following issue in the Linux kernel code: USB: fix ohci.h over-use warnings
Problem Details: When u132-hcd is built, it includes local header ohci.h, which appears to have been intended only for use by ohci-hcd. This throws warnings about functions which are defined and not used. The warnings thrown are because three small functions are implemented in the header, but not declared 'inline', a ...
```diff diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h index a2f42a2f47c6..fd93e7eca7bf 100644 --- a/drivers/usb/host/ohci.h +++ b/drivers/usb/host/ohci.h @@ -602,7 +602,7 @@ static inline void disable (struct ohci_hcd *ohci) #define FIT (1 << 31) #define LSTHRESH 0x628 /* lowspeed bit threshold *...
96ca014d53d2c2f9d3b32fe6f2f003e660c3bc63
Analyze and fix the following issue in the Linux kernel code: USB: fix transvibrator disconnect race
Problem Details: in disconnect you set the interface's private data to NULL. In your IO methods you unconditionally follow the pointer into never never land. Signed-off-by: Oliver Neukum <oliver@neukum.name> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/misc/trancevibrator.c b/drivers/usb/misc/trancevibrator.c index 33cd91d11eca..67e2fc20eeeb 100644 --- a/drivers/usb/misc/trancevibrator.c +++ b/drivers/usb/misc/trancevibrator.c @@ -120,8 +120,8 @@ static void tv_disconnect(struct usb_interface *interface) struct trancevibrator *dev; ...
6a7255e1df3cf8f89c2c0c6eeea866c6bb17cfb9
Analyze and fix the following issue in the Linux kernel code: USB: Fix oops in PhidgetServo
Problem Details: The PhidgetServo causes an Oops when any of its sysfs attributes are read or written too, making the driver useless. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/misc/phidgetservo.c b/drivers/usb/misc/phidgetservo.c index 7163f05c5b27..0d9de2f73930 100644 --- a/drivers/usb/misc/phidgetservo.c +++ b/drivers/usb/misc/phidgetservo.c @@ -282,6 +282,7 @@ servo_probe(struct usb_interface *interface, const struct usb_device_id *id) dev->dev = NULL; ...
73720861d211e2b23c3026c6adea6f758676c46f
Analyze and fix the following issue in the Linux kernel code: [libata] pata_via: suspend/resume support fix
Problem Details: Make this array static so it doesn't have to be built at runtime. Cc: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index ff93e8f71cf8..f0d4f7e9ed31 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c @@ -395,7 +395,7 @@ static void via_config_fifo(struct pci_dev *pdev, unsigned int flags) enable &= 3; if (flags & VIA_SET_FIFO) { - u8 fifo_sett...
f8cb2c450e7ff61abe75fabc94a4f62667a79c2b
Analyze and fix the following issue in the Linux kernel code: [ALSA] ac97: Identify CMI9761 chips.
Problem Details: Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
```diff diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index 91d8ceb4e9c2..d2994cb4c8c9 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c @@ -129,9 +129,9 @@ static const struct ac97_codec_id snd_ac97_codec_ids[] = { { 0x434d4941, 0xffffffff, "CMI9738", patch_cm9738, N...
e8bb036a46ec4a9d748672f54a6b2d62c82b6fbd
Analyze and fix the following issue in the Linux kernel code: [ALSA] ac97_codec - trivial fix for bit update functions
Problem Details: This patch fixes a couple of bit update functions in alsa-kernel/pci/ac97/ac97_codec.c, which could possibly corrupt bits not in the given mask. Specifically, it'll clobber unset bits in the target that are not in the mask, when the corresponding bit in the given new value is set. Signed-off-by: James...
```diff diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index 7abcb10b2754..91d8ceb4e9c2 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c @@ -382,7 +382,7 @@ int snd_ac97_update_bits_nolock(struct snd_ac97 *ac97, unsigned short reg, unsigned short old, new; old = s...
d5f6a38d9896614e2e78a82c6cb818721601c52f
Analyze and fix the following issue in the Linux kernel code: [ALSA] snd-ca0106: Fix typos.
Problem Details: Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
```diff diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c index 881c4ca7b56d..f61f052f6d14 100644 --- a/sound/pci/ca0106/ca0106_main.c +++ b/sound/pci/ca0106/ca0106_main.c @@ -204,7 +204,7 @@ static struct snd_ca0106_details ca0106_chip_details[] = { * DAC: WM8768GEDS */ { .serial ...
e4f55d8010eacb2669c2a68f195993e4563b94c8
Analyze and fix the following issue in the Linux kernel code: [ALSA] snd-ca0106: Add new card variant.
Problem Details: Fixed ALSA bug#2326 Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
```diff diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c index 35ac187cab66..881c4ca7b56d 100644 --- a/sound/pci/ca0106/ca0106_main.c +++ b/sound/pci/ca0106/ca0106_main.c @@ -154,6 +154,7 @@ MODULE_SUPPORTED_DEVICE("{{Creative,SB CA0106 chip}}"); static int index[SNDRV_CARDS] = SNDRV_DEFAUL...
4d361285925613516560f81f8c7fc96b89c8b1a8
Analyze and fix the following issue in the Linux kernel code: [ALSA] sound: fix PCM substream list
Problem Details: If snd_pcm_new_stream() fails to initalize a substream (if snd_pcm_substream_proc_init() returns error), snd_pcm_new_stream() immediately return without unlinking that kfree()d substram. It causes oops when snd_pcm_free() iterates the list of substream to free them by invalid reference. Signed-off-by:...
```diff diff --git a/sound/core/pcm.c b/sound/core/pcm.c index 5ac6e19ccb41..8e0189885516 100644 --- a/sound/core/pcm.c +++ b/sound/core/pcm.c @@ -640,6 +640,10 @@ int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count) err = snd_pcm_substream_proc_init(substream); if (err < 0) { snd_prin...
01f681da496831eb3aff5a908cefdafe74dd263b
Analyze and fix the following issue in the Linux kernel code: [ALSA] Fix invalid assignment of PCI revision
Problem Details: Fix the type of PCI revision to char from int and avoid invalid assignment with pointer cast. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
```diff diff --git a/include/sound/ymfpci.h b/include/sound/ymfpci.h index a3c5de59a248..f3514ee96bd9 100644 --- a/include/sound/ymfpci.h +++ b/include/sound/ymfpci.h @@ -286,7 +286,7 @@ struct snd_ymfpci { int irq; unsigned int device_id; /* PCI device ID */ - unsigned int rev; /* PCI revision */ + unsigned char...
e3a5d59a17e9a42e3f3e0e37342b2679bab2ff43
Analyze and fix the following issue in the Linux kernel code: [ALSA] Fix races in PCM OSS emulation
Problem Details: Fixed the race among multiple threads accessing the OSS PCM instance concurrently by simply introducing a mutex for protecting a setup of the PCM. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
```diff diff --git a/include/sound/pcm_oss.h b/include/sound/pcm_oss.h index c854647b6f3c..1cd4f64cdf31 100644 --- a/include/sound/pcm_oss.h +++ b/include/sound/pcm_oss.h @@ -56,6 +56,7 @@ struct snd_pcm_oss_runtime { size_t mmap_bytes; char *buffer; /* vmallocated period */ size_t buffer_used; /* used lengt...
ba8bdf8584c6f8af6d009dfd716ea5ee37fc15cd
Analyze and fix the following issue in the Linux kernel code: [ALSA] hda-codec - fix typo in PCI IDs
Problem Details: my notebook is a Samsung X11 of course... The attached patch fixes the typo. Signed-off-by: Christian Hesse <mail@earthworm.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
```diff diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 07908030aaba..25b578782adf 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c @@ -811,7 +811,7 @@ static struct hda_board_config ad1986a_cfg_tbl[] = { { .pci_subvendor = 0x144d, .pci_subdevice = 0xc024, ...
c19bcdc64a13c6d7eedfdb46d705531e24e69cad
Analyze and fix the following issue in the Linux kernel code: [ALSA] ac97 - Fix potential negative array index
Problem Details: Fix the case cidx2 >= 0 and cidx2 < 0 which may result in negative array index. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
```diff diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c index f63025e99ab6..e813968e0cf8 100644 --- a/sound/pci/ac97/ac97_patch.c +++ b/sound/pci/ac97/ac97_patch.c @@ -1467,7 +1467,9 @@ static void patch_ad1881_chained(struct snd_ac97 * ac97, int unchained_idx, int snd_ac97_write_cache(ac97, AC...
ee3527b0362e3b1b2e212d6161869aff9a8a98a0
Analyze and fix the following issue in the Linux kernel code: [ALSA] hda-codec - Fix detection of supported sample rates
Problem Details: Don't include 9.6kHz in the list of supported sample rates. Since this rate isn't indicated in AC_PAR_PCM parameter, the driver might guess wrongly as if it's available. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
```diff diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 71482c15a852..18bbc87e376f 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -1367,9 +1367,6 @@ static struct hda_rate_tbl rate_bits[] = { { 176400, SNDRV_PCM_RATE_176400, 0x5800 },/* 4 x 44 */ { 192000, SNDRV_P...
4a95cd86604740cf8cd27166e22a24944ed1e2f6
Analyze and fix the following issue in the Linux kernel code: [ALSA] hda-codec - Fix model for ASUS V1j laptop
Problem Details: Add a proper model entry (laptop-eapd) for ASUS V1j laptop with AD1986A codec. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
```diff diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 2e0db62ed081..07908030aaba 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c @@ -822,6 +822,8 @@ static struct hda_board_config ad1986a_cfg_tbl[] = { .config = AD1986A_LAPTOP_EAPD }, /* ASUS U5F */ { ...
9a826ddba6e087b1be24dd78cd0eac42f7eb7e97
Analyze and fix the following issue in the Linux kernel code: [ALSA] pcm core: fix silence_start calculations
Problem Details: The case where silence_size < boundary was broken because different parts of the snd_pcm_playback_silence() function disagreed about whether silence_start should point to the start or to the end of the buffer part to be silenced. This patch changes the code to always use to the start, which also simpli...
```diff diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index 0bb142a28539..b336797be4fc 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c @@ -79,19 +79,17 @@ void snd_pcm_playback_silence(struct snd_pcm_substream *substream, snd_pcm_ufram runtime->silence_filled -= frames; if ((snd_pcm_sfra...
3bc89529594767b0f894589f6c05b2d9821b6791
Analyze and fix the following issue in the Linux kernel code: [ALSA] hda-codec - Fix a typo
Problem Details: Fixed a typo in proc file. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
```diff diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c index d737f17695a3..e695655e88db 100644 --- a/sound/pci/hda/hda_proc.c +++ b/sound/pci/hda/hda_proc.c @@ -45,7 +45,7 @@ static const char *get_wid_type_name(unsigned int wid_value) if (names[wid_value]) return names[wid_value]; else - retu...
bd2033f27f346610b11b40a74ff7d1d023abcfd9
Analyze and fix the following issue in the Linux kernel code: [ALSA] hda-codec - Fix wrong error checks in patch_{realtek,analog}.c
Problem Details: Fix wrong error checks of *_ch_mode_put() in patch_realtek.c and patch_analog.c. snd_hda_ch_mode_put() could return a positive value for success, too. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
```diff diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index edd22dec8286..2e0db62ed081 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c @@ -1640,7 +1640,7 @@ static int ad198x_ch_mode_put(struct snd_kcontrol *kcontrol, int err = snd_hda_ch_mode_put(codec, ucontro...
d9301263cce69ee4ef989de5bbe57515ef71a780
Analyze and fix the following issue in the Linux kernel code: [ALSA] ymfpci: fix swap_rear for S/PDIF passthrough
Problem Details: This patch fixes incorrect assignment of swap_rear, which was broken since patch 'ymfpci - make rear channel swap optional' It removes module_param rear_swap. Signed-off-by: Glen Masgai <mimosius@gmx.de> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
```diff diff --git a/include/sound/ymfpci.h b/include/sound/ymfpci.h index d41cda97e952..a3c5de59a248 100644 --- a/include/sound/ymfpci.h +++ b/include/sound/ymfpci.h @@ -345,7 +345,6 @@ struct snd_ymfpci { struct snd_kcontrol *spdif_pcm_ctl; int mode_dup4ch; int rear_opened; - int rear_swap; int spdif_opened; ...
519ab5f2be65b72cf12ae99c89752bbe79b44df6
Analyze and fix the following issue in the Linux kernel code: ACPI: video: Add dev argument for backlight_device_register
Problem Details: This patch set adds generic abstract layer support for acpi video driver to have generic user interface to control backlight and output switch control by leveraging the existing backlight sysfs class driver, and by adding a new video output sysfs class driver. This patch: Add dev argument for backlig...
```diff diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c index bf7bc25e680e..11468e46253c 100644 --- a/drivers/acpi/asus_acpi.c +++ b/drivers/acpi/asus_acpi.c @@ -1402,7 +1402,7 @@ static int __init asus_acpi_init(void) return result; } - asus_backlight_device = backlight_device_register("asus", ...
f4715189dfb1c381ad36b7e02e3716fb7a7f84db
Analyze and fix the following issue in the Linux kernel code: ACPI: Implement acpi_video_get_next_level()
Problem Details: acpi_video_get_next_level was supposed to implement an algorithm to select a new brightness level based on the old brightness level of an ACPI video device, but it simply says "/* Fix me */" and returns the current brightness. This patch implements acpi_video_get_next_level properly. It had to change...
```diff diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 56666a982476..9200a46c38bd 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -3,6 +3,7 @@ * * Copyright (C) 2004 Luming Yu <luming.yu@intel.com> * Copyright (C) 2004 Bruno Ducrot <ducrot@poupinou.org> + * Copyright (C) 2006 Th...
a6fdbf90b94fa4e2f5f7cbb526c71160b6c561c8
Analyze and fix the following issue in the Linux kernel code: ACPI: fix NULL check in drivers/acpi/osl.c
Problem Details: Spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index c84286cbbe25..e10679ce1e0e 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -1032,7 +1032,7 @@ acpi_status acpi_os_create_cache(char *name, u16 size, u16 depth, acpi_cache_t ** cache) { *cache = kmem_cache_create(name, size, 0, 0, NULL, N...
1c9bb1a01ac1bc92a0d98cf3e40a7922ee684dc0
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix register save area alignment for swapcontext syscall
Problem Details: For 32-bit processes, the getcontext side of the swapcontext system call (i.e. the saving of the context when the first argument is non-NULL) has to set the ctx->uc_mcontext.uc_regs pointer to the place where it saves the registers. Which it does, but it doesn't ensure that the pointer is 16-byte alig...
```diff diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c index e4ebe1a6228e..6b405a3f43f9 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c @@ -835,11 +835,21 @@ long sys_swapcontext(struct ucontext __user *old_ctx, return -EINVAL; if (old_ctx != NUL...
bb63ab13515951f4d09b16c9e8bd6e50b0f20d1e
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix PCI device channel state initialization
Problem Details: Initialize the pci device pci channel state. This is critical for having the pci_channel_offline() routine (in pci.h) to function correctly. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index a6b7692c7269..73c59ec49120 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c @@ -360,6 +360,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node, DBG(" class: 0x%x\n", dev->class); dev->...
d28d027ab386ab64c905bfaa0f1e73a06bb4d9b4
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix build of cell zImage.initrd
Problem Details: The patch adding support for zImage.ps3 didn't add a zImage.initrd.ps3 target causing builds of zImage.initrd to fail when ps3 is included in the .config. The current method of generating ps3 images doesn't support initrd's yet, so we create a dummy target that only displays a warning message instead. ...
```diff diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 343dbcfdf08a..98392fb5f581 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -152,6 +152,9 @@ $(obj)/zImage.initrd.miboot: vmlinux $(wrapperbits) $(obj)/zImage.ps3: vmlinux $(STRIP) -s -R .comment $< -o $@ ...
ba3ba887c3549656c17675e73e12aaa97c3548f1
Analyze and fix the following issue in the Linux kernel code: [POWERPC] iSeries: fix CONFIG_VIOPATH dependency
Problem Details: This is a long standing typo. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/platforms/iseries/Kconfig b/arch/powerpc/platforms/iseries/Kconfig index 887b68804e6d..54e6b3b6f261 100644 --- a/arch/powerpc/platforms/iseries/Kconfig +++ b/arch/powerpc/platforms/iseries/Kconfig @@ -31,5 +31,5 @@ endmenu config VIOPATH bool - depends on VIOCONS || VIODASD || VIO...
94c8f9f974f2ad29b90b2830b189d74a633fef49
Analyze and fix the following issue in the Linux kernel code: [POWERPC] iSeries: fix viocons init
Problem Details: Only initialise viocons on legacy iSeries. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/drivers/char/viocons.c b/drivers/char/viocons.c index 0e0da443cbd5..8de6b95aeb84 100644 --- a/drivers/char/viocons.c +++ b/drivers/char/viocons.c @@ -42,6 +42,7 @@ #include <linux/tty_flip.h> #include <linux/sysrq.h> +#include <asm/firmware.h> #include <asm/iseries/vio.h> #include <asm/iserie...
31c72ad0d10b561e7e5f843747e7d0c1abf4d6f7
Analyze and fix the following issue in the Linux kernel code: [POWERPC] iSeries: fix viocd init
Problem Details: Only initialise viocd on legacy iSeries. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c index 54ca931e19ea..93fbf84dcc4a 100644 --- a/drivers/cdrom/viocd.c +++ b/drivers/cdrom/viocd.c @@ -47,6 +47,7 @@ #include <asm/iseries/hv_types.h> #include <asm/iseries/hv_lp_event.h> #include <asm/iseries/vio.h> +#include <asm/firmware.h> #defin...
687d18abed09315a531470a0edcae977ef6a7f9e
Analyze and fix the following issue in the Linux kernel code: [POWERPC] iSeries: fix iseries_veth init
Problem Details: Only initialise iseries_veth on legacy iSeries. Make the init and exit routines static. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/drivers/net/iseries_veth.c b/drivers/net/iseries_veth.c index d6f4f185bf37..2194b567239f 100644 --- a/drivers/net/iseries_veth.c +++ b/drivers/net/iseries_veth.c @@ -73,7 +73,7 @@ #include <asm/abs_addr.h> #include <asm/iseries/mf.h> #include <asm/uaccess.h> - +#include <asm/firmware.h> #includ...
fd38451f1512fd5230e3c5dcc66d1ca867af879b
Analyze and fix the following issue in the Linux kernel code: [POWERPC] iSeries: fix viotape init
Problem Details: Only initialise viotape on legacy iSeries. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c index 94d79cb8ce8d..9438512b17f1 100644 --- a/drivers/char/viotape.c +++ b/drivers/char/viotape.c @@ -49,7 +49,7 @@ #include <asm/uaccess.h> #include <asm/ioctls.h> - +#include <asm/firmware.h> #include <asm/vio.h> #include <asm/iseries/vio.h> ...
fb8b50078458ba74c3d3f7bf05f5ddc27b88f051
Analyze and fix the following issue in the Linux kernel code: [POWERPC] iSeries: fix viodasd init
Problem Details: Don't initialise viodasd except on legacy iSeries. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/drivers/block/viodasd.c b/drivers/block/viodasd.c index e19ba4ebcd4e..68592c336011 100644 --- a/drivers/block/viodasd.c +++ b/drivers/block/viodasd.c @@ -49,6 +49,7 @@ #include <asm/iseries/hv_lp_event.h> #include <asm/iseries/hv_lp_config.h> #include <asm/iseries/vio.h> +#include <asm/firmware....
6f67f9d26fe5ced50f716e9620b42c0721d8b8d9
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Workaround oldworld OF bug with IRQs & P2P bridges
Problem Details: On some oldworld PowerMacs, OF doesn't assign interrupts properly beyond P2P bridges. Fortunately, the fix is easy as all those machines just wire all IRQ lines together to one IRQ which is assigned to the bridge itself. We already have a special function for parsing Apple OldWorld interrupts which are...
```diff diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c index 0dfbe1cd28eb..12c51e4ad2b4 100644 --- a/arch/powerpc/kernel/prom_parse.c +++ b/arch/powerpc/kernel/prom_parse.c @@ -920,9 +920,20 @@ static int of_irq_map_oldworld(struct device_node *device, int index, /* * Old machin...
f10bb2544bab75b3e8df15a7b51a833c78cbd77f
Analyze and fix the following issue in the Linux kernel code: ACPI: fix single linked list manipulation
Problem Details: Fix single linked list manipulation for sub_driver. If the remving entry is not on the head of the sub_driver list, it goes into infinate loop. Though that infinite loop doesn't happen. Because the only user of acpi_pci_register_dirver() is acpiphp. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.c...
```diff diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index 0984a1ee24ed..c92c144d6c58 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c @@ -98,11 +98,12 @@ void acpi_pci_unregister_driver(struct acpi_pci_driver *driver) struct acpi_pci_driver **pptr = &sub_driver; while (*pptr) ...
0c234ae655a45ac3ee53a25b2e56e9bb6c27d71d
Analyze and fix the following issue in the Linux kernel code: [PATCH] ieee80211softmac: Fix mutex_lock at exit of ieee80211_softmac_get_genie
Problem Details: ieee80211softmac_wx_get_genie locks the associnfo mutex at function exit. This patch fixes it. The patch is against Linus' tree (commit af1713e0). Signed-off-by: Ulrich Kunitz <kune@deine-taler.de> Signed-off-by: Michael Buesch <mb@bu3sch.de> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-...
```diff diff --git a/net/ieee80211/softmac/ieee80211softmac_wx.c b/net/ieee80211/softmac/ieee80211softmac_wx.c index 480d72c7a42c..fa2f7da606a9 100644 --- a/net/ieee80211/softmac/ieee80211softmac_wx.c +++ b/net/ieee80211/softmac/ieee80211softmac_wx.c @@ -463,7 +463,7 @@ ieee80211softmac_wx_get_genie(struct net_device *...
9cd446198e7646431a7f2ce7dbeec8df9f77012b
Analyze and fix the following issue in the Linux kernel code: [WATCHDOG] fix clk_get() error check
Problem Details: The return value of clk_get() should be checked by IS_ERR(). Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
```diff diff --git a/drivers/char/watchdog/pnx4008_wdt.c b/drivers/char/watchdog/pnx4008_wdt.c index 3a55fc6abcd8..0e3d589d6332 100644 --- a/drivers/char/watchdog/pnx4008_wdt.c +++ b/drivers/char/watchdog/pnx4008_wdt.c @@ -283,7 +283,8 @@ static int pnx4008_wdt_probe(struct platform_device *pdev) wdt_base = (void __i...
6f07a8a3eb2adbfacd1322862368da4eb9dd3b45
Analyze and fix the following issue in the Linux kernel code: [PATCH] ieee80211softmac: Fix errors related to the work_struct changes
Problem Details: The signature of work functions changed recently from a context pointer to the work structure pointer. This caused a problem in the ieee80211softmac code, because the ieee80211softmac_assox_work function has been called directly with a parameter explicitly casted to (void*). This compiled correctly bu...
```diff diff --git a/net/ieee80211/softmac/ieee80211softmac_assoc.c b/net/ieee80211/softmac/ieee80211softmac_assoc.c index e3f37fdda65f..a824852909e4 100644 --- a/net/ieee80211/softmac/ieee80211softmac_assoc.c +++ b/net/ieee80211/softmac/ieee80211softmac_assoc.c @@ -167,7 +167,7 @@ static void ieee80211softmac_assoc_n...
4d1feabcbf41f875447a392015acd0796f57baf6
Analyze and fix the following issue in the Linux kernel code: [PATCH] zd1211rw: Call ieee80211_rx in tasklet
Problem Details: The driver called ieee80211_rx in hardware interrupt context. This has been against the intention of the ieee80211_rx function. It caused a bug in the crypto routines used by WPA. This patch calls ieee80211_rx in a tasklet. Signed-off-by: Ulrich Kunitz <kune@deine-taler.de> Signed-off-by: Andrew Mo...
```diff diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index 00ca704ece35..a08524191b5d 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c @@ -41,6 +41,8 @@ static void housekeeping_disable(struct zd_mac *mac); static void se...
abac08d734151a51506deb35f10caa3b7830659a
Analyze and fix the following issue in the Linux kernel code: [ARM] 4059/1: VR1000: fix LED3's platform device number
Problem Details: LED 3 should have been registered with the platform deviceid of 3, instead of 1 (which was used for LED 1). Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c index e2eda3937ab0..a382fc095110 100644 --- a/arch/arm/mach-s3c2410/mach-vr1000.c +++ b/arch/arm/mach-s3c2410/mach-vr1000.c @@ -352,7 +352,7 @@ static struct platform_device vr1000_led2 = { static struct platform_device vr...
ccb4911598172a131b6a2d99d7eecfcee1ecc8f7
Analyze and fix the following issue in the Linux kernel code: [POWERPC] spufs: fix assignment of node numbers
Problem Details: The difference between 'nid' and 'node' fields in an spu structure was used incorrectly. The common 'node' number now reflects the NUMA node, and it is used in other places in the code as well. The 'nid' value is meaningful only in one place, namely the computation of the interrupt numbers based on th...
```diff diff --git a/arch/powerpc/platforms/cell/spu_priv1_mmio.c b/arch/powerpc/platforms/cell/spu_priv1_mmio.c index c805e63b7d5c..910a926b61a2 100644 --- a/arch/powerpc/platforms/cell/spu_priv1_mmio.c +++ b/arch/powerpc/platforms/cell/spu_priv1_mmio.c @@ -40,7 +40,6 @@ static DEFINE_MUTEX(add_spumem_mutex); stru...
6e22ba63f01b9bdcd1f29251a95047d310526207
Analyze and fix the following issue in the Linux kernel code: [POWERPC] cell: Fix spufs with "new style" device-tree
Problem Details: Some SPU code was a bit too convoluted and broke when adding support for the new style device-tree, most notably the struct pages for SPEs no longer get created. oops... Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
```diff diff --git a/arch/powerpc/platforms/cell/spu_priv1_mmio.c b/arch/powerpc/platforms/cell/spu_priv1_mmio.c index a5de0430c56d..c805e63b7d5c 100644 --- a/arch/powerpc/platforms/cell/spu_priv1_mmio.c +++ b/arch/powerpc/platforms/cell/spu_priv1_mmio.c @@ -37,6 +37,8 @@ #include "interrupt.h" #include "spu_priv1_mm...
183b4aeefa1ff8e0a792b95d5d56f0994d022449
Analyze and fix the following issue in the Linux kernel code: drm: savage: compat fix from drm git.
Problem Details: Signed-off-by: Dave Airlie <airlied@linux.ie>
```diff diff --git a/drivers/char/drm/savage_bci.c b/drivers/char/drm/savage_bci.c index a9a84f88df5e..b94fab556809 100644 --- a/drivers/char/drm/savage_bci.c +++ b/drivers/char/drm/savage_bci.c @@ -963,8 +963,8 @@ static int savage_bci_event_emit(DRM_IOCTL_ARGS) event.count = savage_bci_emit_event(dev_priv, event....
a52de245ef0b6217a56fb2472ff65c3a196cafd5
Analyze and fix the following issue in the Linux kernel code: [PATCH] cciss: fix XFER_READ/XFER_WRITE in do_cciss_request
Problem Details: This patch fixes a stupid bug. Sometime during the 2tb enhancement I ended up replacing the macros XFER_READ and XFER_WRITE with h->cciss_read and h->cciss_write respectively. It seemed to work somehow at least on x86_64 and ia64. I don't know how. But people started complaining about command timeouts ...
```diff diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 67a6d4a9343a..9d2ddb209343 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -2492,7 +2492,7 @@ static void do_cciss_request(request_queue_t *q) c->Request.Type.Type = TYPE_CMD; // It is a command. c->Request.Type.Attribute = A...
14fb8a764786e37ac26a2175638115f21980e5a3
Analyze and fix the following issue in the Linux kernel code: [IPV4]: Fix BUG of ip_rt_send_redirect()
Problem Details: Fix the redirect packet of the router if the jiffies wraparound. Signed-off-by: Li Yewang <lyw@nanjing-fnst.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 1aaff0a2e098..2daa0dc19d33 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -1325,7 +1325,8 @@ void ip_rt_send_redirect(struct sk_buff *skb) /* Check for load limit; set rate_last to the latest sent * redirect. */ - if (time_after(jiffies, + ...
a9fc00cca8327dba3ec2a6c727f4b5b1c449f2a2
Analyze and fix the following issue in the Linux kernel code: [TCP]: Trivial fix to message in tcp_v4_inbound_md5_hash
Problem Details: The message logged in tcp_v4_inbound_md5_hash when the hash was expected but not found was reversed. Signed-off-by: Leigh Brown <leigh@solinno.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index fa814fc506d5..bf7a22412bcb 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -1186,7 +1186,7 @@ done_opts: return 0; if (hash_expected && !hash_location) { - LIMIT_NETDEBUG(KERN_INFO "MD5 Hash NOT expected but found " + LIMIT_NETD...
8228a18dd30f5c988b722495ea6c25cb1d2be035
Analyze and fix the following issue in the Linux kernel code: [TCP]: Fix oops caused by tcp_v4_md5_do_del
Problem Details: md5sig_info.alloced4 must be set to zero when freeing keys4, otherwise it will not be alloc'd again when another key is added to the same socket by tcp_v4_md5_do_add. Signed-off-by: Leigh Brown <leigh@solinno.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index a1222d6968c4..fa814fc506d5 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -928,6 +928,7 @@ int tcp_v4_md5_do_del(struct sock *sk, __be32 addr) if (tp->md5sig_info->entries4 == 0) { kfree(tp->md5sig_info->keys4); tp->md5sig...
d8172d822fb02d5c4f7508e41f9267428dd3d891
Analyze and fix the following issue in the Linux kernel code: [CONNECTOR]: Fix compilation breakage introduced recently.
Problem Details: Linus has changed work queue structure and has not tested it with connector compiled in, his changes break the build. Attached patch fixes compilation error. Patch is against commit 99f5e9718185f07458ae70c2282c2153a2256c91. Thanks to Toralf Förster for pointing this out. Signed-off-by: Evgeniy Poly...
```diff diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c index 5e7cd45d10ee..4cec1a82fd43 100644 --- a/drivers/connector/connector.c +++ b/drivers/connector/connector.c @@ -135,8 +135,7 @@ static int cn_call_callback(struct cn_msg *msg, void (*destruct_data)(void *), v spin_lock_bh(&dev->cbd...
c49a1561ee4b663d2819b5bea3e4684eae217b19
Analyze and fix the following issue in the Linux kernel code: [TG3]: Fix race condition when calling register_netdev().
Problem Details: Hot-plug scripts can call tg3_open() as soon as register_netdev() is called in tg3_init_one(). We need to call pci_set_drvdata() before register_netdev(), and netif_carrier_off() needs to be moved to tg3_open() to avoid race conditions. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: ...
```diff diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index e47a9c1f35cb..501ea6da03cc 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -6981,6 +6981,8 @@ static int tg3_open(struct net_device *dev) struct tg3 *tp = netdev_priv(dev); int err; + netif_carrier_off(tp->dev); + tg3_full_lock(tp, 0); ...