id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
85f4186af944c1240c84934a9ab578743df2d69b
Analyze and fix the following issue in the Linux kernel code: worker_thread: fix racy try_to_freeze() usage
Problem Details: worker_thread() can miss freeze_process()->signal_wake_up() if it happens between try_to_freeze() and prepare_to_wait(). We should check freezing() before entering schedule(). This race was introduced by me in [PATCH 1/1] workqueue: don't migrate pending works from the dead CPU Looks like mm/vmsca...
```diff diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 87693b37d017..63885abf1ba0 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -308,14 +308,14 @@ static int worker_thread(void *__cwq) do_sigaction(SIGCHLD, &sa, (struct k_sigaction *)0); for (;;) { - if (cwq->wq->freezeable) - try_to_...
63bc0362521cbaae3ed17b8de7b094f9492453f0
Analyze and fix the following issue in the Linux kernel code: unify queue_delayed_work() and queue_delayed_work_on()
Problem Details: Change queue_delayed_work() to use queue_delayed_work_on() to avoid the code duplication (saves 133 bytes). Q: queue_delayed_work() enqueues &dwork->work directly when delay == 0, why? [jirislaby@gmail.com: oops fix] Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Jiri Slaby <jirislaby@...
```diff diff --git a/kernel/workqueue.c b/kernel/workqueue.c index d107e1c3b071..0eb9b33f1d91 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -180,28 +180,11 @@ void delayed_work_timer_fn(unsigned long __data) int fastcall queue_delayed_work(struct workqueue_struct *wq, struct delayed_work *dwork, unsi...
dfb4b82e1c631b1a6057e77212996a890aa515b7
Analyze and fix the following issue in the Linux kernel code: workqueue: make cancel_rearming_delayed_workqueue() work on idle dwork
Problem Details: cancel_rearming_delayed_workqueue(dwork) will hang forever if dwork was not scheduled, because in that case cancel_delayed_work()->del_timer_sync() never returns true. I don't know if there are any callers which may have problems, but this is not so convenient, and the fix is very simple. Q: looks li...
```diff diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 74f3f7825229..ce72d45c7fd8 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -569,6 +569,10 @@ EXPORT_SYMBOL(flush_work_keventd); void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, struct delayed_work *dwork) { +...
f293ea92007419e4f9c52db0cf57af17f45b9f94
Analyze and fix the following issue in the Linux kernel code: workqueue: don't save interrupts in run_workqueue()
Problem Details: work->func() may sleep, it's a bug to call run_workqueue() with irqs disabled. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/workqueue.c b/kernel/workqueue.c index ea422254f8bf..74f3f7825229 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -227,13 +227,7 @@ EXPORT_SYMBOL_GPL(queue_delayed_work_on); static void run_workqueue(struct cpu_workqueue_struct *cwq) { - unsigned long flags; - - /* - * Keep ...
36aa9dfc39bf473780439f5629c30f59d677e793
Analyze and fix the following issue in the Linux kernel code: workqueue: don't clear cwq->thread until it exits
Problem Details: Pointed out by Srivatsa Vaddagiri. cleanup_workqueue_thread() sets cwq->thread = NULL and does kthread_stop(). This breaks the "if (cwq->thread == current)" logic in flush_cpu_workqueue() and leads to deadlock. Kill the thead first, then clear cwq->thread. workqueue_mutex protects us from create_work...
```diff diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 1d1933cf3778..398c34ff6a54 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -625,17 +625,12 @@ EXPORT_SYMBOL_GPL(__create_workqueue); static void cleanup_workqueue_thread(struct workqueue_struct *wq, int cpu) { - struct cpu_workqueue_stru...
d721304dce0ced0b3b0366996cc02929669708a8
Analyze and fix the following issue in the Linux kernel code: workqueue: fix flush_workqueue() vs CPU_DEAD race
Problem Details: Many thanks to Srivatsa Vaddagiri for the helpful discussion and for spotting the bug in my previous attempt. work->func() (and thus flush_workqueue()) must not use workqueue_mutex, this leads to deadlock when CPU_DEAD does kthread_stop(). However without this mutex held we can't detect CPU_DEAD in pr...
```diff diff --git a/kernel/workqueue.c b/kernel/workqueue.c index d80dbdceadb8..1d1933cf3778 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -64,6 +64,7 @@ struct workqueue_struct { /* All the per-cpu workqueues on the system, for hotplug cpu to add/remove threads to each one as cpus come/go. */ +st...
319c2a986eb45989690c955d9667b814ef0ed56f
Analyze and fix the following issue in the Linux kernel code: workqueue: fix freezeable workqueues implementation
Problem Details: Currently ->freezeable is per-cpu, this is wrong. CPU_UP_PREPARE creates cwq->thread which is not freezeable. Move ->freezeable to workqueue_struct. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc: Srivatsa Vaddagiri <vatsa@in.ibm.com> Cc: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com> Cc: G...
```diff diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 5ecf4984e382..d80dbdceadb8 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -49,8 +49,6 @@ struct cpu_workqueue_struct { struct work_struct *current_work; int run_depth; /* Detect run_workqueue() recursion depth */ - - int freezeable; ...
e7407dcc69e077ac34a527842db916abfbc458df
Analyze and fix the following issue in the Linux kernel code: call cpu_chain with CPU_DOWN_FAILED if CPU_DOWN_PREPARE failed
Problem Details: This makes cpu hotplug symmetrical: if CPU_UP_PREPARE fails we get CPU_UP_CANCELED, so we can undo what ever happened on PREPARE. The same should happen for CPU_DOWN_PREPARE. [akpm@linux-foundation.org: fix for reduce-size-of-task_struct-on-64-bit-machines] Cc: Srivatsa Vaddagiri <vatsa@in.ibm.com> C...
```diff diff --git a/kernel/cpu.c b/kernel/cpu.c index 48810498b355..1a823944e972 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -97,7 +97,7 @@ static inline void check_for_tasks(int cpu) (!cputime_eq(p->utime, cputime_zero) || !cputime_eq(p->stime, cputime_zero))) printk(KERN_WARNING "Task %s (pid ...
5be9361cdff17fc76fa0c3e262ead94158555f16
Analyze and fix the following issue in the Linux kernel code: Eliminate lock_cpu_hotplug in kernel/schedc
Problem Details: Eliminate lock_cpu_hotplug from kernel/sched.c and use sched_hotcpu_mutex instead to postpone a hotplug event. In the migration_call hotcpu callback function, take sched_hotcpu_mutex while handling the event CPU_LOCK_ACQUIRE and release it while handling CPU_LOCK_RELEASE event. [akpm@linux-foundation...
```diff diff --git a/kernel/sched.c b/kernel/sched.c index 66bd7ff23f18..fe1a9c2b855a 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -305,6 +305,7 @@ struct rq { }; static DEFINE_PER_CPU(struct rq, runqueues) ____cacheline_aligned_in_smp; +static DEFINE_MUTEX(sched_hotcpu_mutex); static inline int cpu_of(st...
baaca49f415b25fdbe2a8f3c22b39929e450fbfd
Analyze and fix the following issue in the Linux kernel code: Define and use new events,CPU_LOCK_ACQUIRE and CPU_LOCK_RELEASE
Problem Details: This is an attempt to provide an alternate mechanism for postponing a hotplug event instead of using a global mechanism like lock_cpu_hotplug. The proposal is to add two new events namely CPU_LOCK_ACQUIRE and CPU_LOCK_RELEASE. The notification for these two events would be sent out before and after a ...
```diff diff --git a/include/linux/notifier.h b/include/linux/notifier.h index e34221bf8946..1903e5490c04 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h @@ -194,6 +194,8 @@ extern int __srcu_notifier_call_chain(struct srcu_notifier_head *nh, #define CPU_DOWN_PREPARE 0x0005 /* CPU (unsigned)v goin...
6f7cc11aa6c7d5002e16096c7590944daece70ed
Analyze and fix the following issue in the Linux kernel code: Extend notifier_call_chain to count nr_calls made
Problem Details: Since 2.6.18-something, the community has been bugged by the problem to provide a clean and a stable mechanism to postpone a cpu-hotplug event as lock_cpu_hotplug was badly broken. This is another proposal towards solving that problem. This one is along the lines of the solution provided in kernel/wo...
```diff diff --git a/include/linux/notifier.h b/include/linux/notifier.h index 10a43ed0527e..e34221bf8946 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h @@ -112,32 +112,40 @@ extern void srcu_init_notifier_head(struct srcu_notifier_head *nh); #ifdef __KERNEL__ -extern int atomic_notifier_chai...
d9ef8b92887c35f113cb749270530f87961f7a0a
Analyze and fix the following issue in the Linux kernel code: e1000: use flush_work_keventd()
Problem Details: Switch e1000 over to flush_work_keventd(). This probably fixes a netdev-close versus linkwatch rtnl_lock() deadlock which nobody knew about. (akpm: bypassed maintainers, sorry. There are other patches which depend on this) Cc: "Maciej W. Rozycki" <macro@linux-mips.org> Cc: David Howells <dhowells@r...
```diff diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 3a03a74c0609..397e25bdbfec 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -1214,7 +1214,7 @@ e1000_remove(struct pci_dev *pdev) int i; #endif - flush_scheduled_work(); + flush_work_kevent...
2b3cb2e778811a1df99e37fd7c359837501ab103
Analyze and fix the following issue in the Linux kernel code: tg3: use flush_work_keventd()
Problem Details: Convert tg3 over to flush_work_keventd(). Remove nasty now-unneeded deadlock avoidance logic. (akpm: bypassed maintainers, sorry. There are other patches which depend on this) Cc: "Maciej W. Rozycki" <macro@linux-mips.org> Cc: David Howells <dhowells@redhat.com> Cc: "David S. Miller" <davem@davemlo...
```diff diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index e5e901ecd808..0c0f9c817321 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -3716,10 +3716,8 @@ static void tg3_reset_task(struct work_struct *work) unsigned int restart_timer; tg3_full_lock(tp, 0); - tp->tg3_flags |= TG3_FLAG_IN_RESET_TASK...
b89deed32ccc96098bd6bc953c64bba6b847774f
Analyze and fix the following issue in the Linux kernel code: implement flush_work()
Problem Details: A basic problem with flush_scheduled_work() is that it blocks behind _all_ presently-queued works, rather than just the work whcih the caller wants to flush. If the caller holds some lock, and if one of the queued work happens to want that lock as well then accidental deadlocks can occur. One example...
```diff diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index f16ba1e0687d..26a70992dec8 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h @@ -178,6 +178,8 @@ extern int FASTCALL(queue_delayed_work(struct workqueue_struct *wq, struct delay extern int queue_delayed_work_on(int cp...
9b04bd27564cfd7224e0135ba37df778f1d490bf
Analyze and fix the following issue in the Linux kernel code: Fix printk format warnings in timer_list.c
Problem Details: u64 and s64 are not necessarily 'long long' on some 64-bit platforms, so explicit the type to kill the compiler warnings. Also consistently use '%Lu' which is unsigned. Signed-off-by: David S. Miller <davem@davemloft.net> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Signed...
```diff diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c index b734ca4bc75e..8bbcfb77f7d2 100644 --- a/kernel/time/timer_list.c +++ b/kernel/time/timer_list.c @@ -65,7 +65,7 @@ print_timer(struct seq_file *m, struct hrtimer *timer, int idx, u64 now) SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); #e...
62ce39c531860aee6c12128c629b0a82f656a306
Analyze and fix the following issue in the Linux kernel code: fs: fix indentation in do_path_lookup
Problem Details: Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu> Acked-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/namei.c b/fs/namei.c index 856b2f5da51d..19f178ec5744 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1155,11 +1155,9 @@ static int fastcall do_path_lookup(int dfd, const char *name, current->total_link_count = 0; retval = link_path_walk(name, nd); out: - if (likely(retval == 0)) { - if (unli...
35c35d1afa8f9afe01d922ff9668a14c5d879b02
Analyze and fix the following issue in the Linux kernel code: clocksource: spelling error in watchdog code
Problem Details: There's more that need fixing, and fix my own subject spelling error too. Signed-off-by: Daniel Walker <dwalker@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index fe5c7db24247..db0c725de5ea 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c @@ -75,14 +75,14 @@ static struct timer_list watchdog_timer; static DEFINE_SPINLOCK(watchdog_lock); static cycle_t watchdog_last; /* - * I...
ae030e435f5400cff77c52506a8d3d7278f0947c
Analyze and fix the following issue in the Linux kernel code: tty_set_ldisc() receive_room fix
Problem Details: Fix tty_set_ldisc in tty_io.c so that tty->receive_room is only cleared if actually changing line disciplines. Without this fix a problem occurs when requesting the line discipline to change to the same line discipline. In this case tty->receive_room is cleared but ldisc->open() is not called to set ...
```diff diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 7710a6a77d97..bf5a00145c0b 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -933,13 +933,6 @@ restart: if (ld == NULL) return -EINVAL; - /* - * No more input please, we are switching. The new ldisc - * will update this va...
84963048ca8093e0aa71ac90c2a5fe7af5f617c3
Analyze and fix the following issue in the Linux kernel code: nbd: check the return value of sysfs_create_file
Problem Details: [akpm@linux-foundation.org: fix it] Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com> Cc: Paul Clements <paul.clements@steeleye.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 090796bef78f..069ae39a9cd9 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -366,20 +366,25 @@ static struct disk_attribute pid_attr = { .show = pid_show, }; -static void nbd_do_it(struct nbd_device *lo) +static int nbd_do_it(struct ...
54493c10069741a02cd34c2b44a6bfdb85e7de6a
Analyze and fix the following issue in the Linux kernel code: cm4000_cs: fix error paths
Problem Details: This patch fixes error paths in module_init and probe functions in cm4000_cs and cm4040_cs drivers. Cc: Harald Welte <laforge@gnumonks.org> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> S...
```diff diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c index e91b43a014b0..8cbc64fe0feb 100644 --- a/drivers/char/pcmcia/cm4000_cs.c +++ b/drivers/char/pcmcia/cm4000_cs.c @@ -1881,8 +1881,11 @@ static int cm4000_probe(struct pcmcia_device *link) init_waitqueue_head(&dev->readq); re...
809aa5048fb7e7fd3bf0aa1fb169c42db0f63b08
Analyze and fix the following issue in the Linux kernel code: mca: fix bus matching
Problem Details: There's a bug in the MCA bus matching algorithm in that it promotes from signed short to int before comparing with the actual id and does sign extension on anything > 0x7fff (which means that pos ids > 0x7fff never get correctly matched). Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com> S...
```diff diff --git a/drivers/mca/mca-bus.c b/drivers/mca/mca-bus.c index da862e4632dd..a70fe00aea16 100644 --- a/drivers/mca/mca-bus.c +++ b/drivers/mca/mca-bus.c @@ -47,7 +47,7 @@ static int mca_bus_match (struct device *dev, struct device_driver *drv) { struct mca_device *mca_dev = to_mca_device (dev); struct mc...
dd988528f4a7d64908b427c251d727f3c3e88add
Analyze and fix the following issue in the Linux kernel code: Use the APIC to determine the hardware processor id - x86_64
Problem Details: hard_smp_processor_id used to be just a macro that hard-coded hard_smp_processor_id to 0 in the non SMP case. When booting non SMP kernels on hardware where the boot ioapic id is not 0 this turns out to be a problem. This is happens frequently in the case of kdump and once in a great while in the case...
```diff diff --git a/include/asm-x86_64/smp.h b/include/asm-x86_64/smp.h index f62fda527439..3f303d2365ed 100644 --- a/include/asm-x86_64/smp.h +++ b/include/asm-x86_64/smp.h @@ -57,12 +57,6 @@ static inline int num_booting_cpus(void) #define raw_smp_processor_id() read_pda(cpunumber) -static inline int hard_smp_p...
a36166c6ef45081fea6eeaf5ca785d7ed786b6e2
Analyze and fix the following issue in the Linux kernel code: Use the APIC to determine the hardware processor id - i386
Problem Details: hard_smp_processor_id used to be just a macro that hard-coded hard_smp_processor_id to 0 in the non SMP case. When booting non SMP kernels on hardware where the boot ioapic id is not 0 this turns out to be a problem. This is happens frequently in the case of kdump and once in a great while in the case...
```diff diff --git a/arch/i386/mach-generic/probe.c b/arch/i386/mach-generic/probe.c index a7b3999bb37a..74f3da634423 100644 --- a/arch/i386/mach-generic/probe.c +++ b/arch/i386/mach-generic/probe.c @@ -119,9 +119,7 @@ int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id) return 0; } -#ifdef CONFIG_SMP...
dd2a345f8f002845636dbf5d2d768bb5cd8a5f59
Analyze and fix the following issue in the Linux kernel code: Display all possible partitions when the root filesystem failed to mount
Problem Details: Display all possible partitions when the root filesystem is not mounted. This helps to track spell'o's and missing drivers. Updated to work with newer kernels. Example output: VFS: Cannot open root device "foobar" or unknown-block(0,0) Please append a correct "root=" boot option; here are the availa...
```diff diff --git a/block/genhd.c b/block/genhd.c index b5664440896c..93a2cf654597 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -213,6 +213,59 @@ struct gendisk *get_gendisk(dev_t dev, int *part) return kobj ? to_disk(kobj) : NULL; } +/* + * print a full list of all partitions - intended for places where th...
cb0c78cc94a63871cad051674516b38e4a8aef95
Analyze and fix the following issue in the Linux kernel code: Fix Linuxdoc comment
Problem Details: A linuxdoc comment had fallen out of date - it refers to an argument which no longer exists. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c index 32e1ab1477d1..e391cbb1f566 100644 --- a/kernel/irq/handle.c +++ b/kernel/irq/handle.c @@ -22,7 +22,6 @@ * handle_bad_irq - handle spurious and unhandled irqs * @irq: the interrupt number * @desc: description of the interrupt - * @regs...
1e0cb0c3bf04850fa6fb300293d9e85ba81b605f
Analyze and fix the following issue in the Linux kernel code: uml: fix build breakage
Problem Details: UML now needs required-features.h to build - an empty one suffices. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/include/asm-um/required-features.h b/include/asm-um/required-features.h new file mode 100644 index 000000000000..dfb967b2d2f3 --- /dev/null +++ b/include/asm-um/required-features.h @@ -0,0 +1,9 @@ +#ifndef __UM_REQUIRED_FEATURES_H +#define __UM_REQUIRED_FEATURES_H + +/* + * Nothing to see, just nee...
ace4bd29c248b51db3f8a97e9b59740dc6caa074
Analyze and fix the following issue in the Linux kernel code: fix leaky resv_huge_pages when cpuset is in use
Problem Details: The internal hugetlb resv_huge_pages variable can permanently leak nonzero value in the error path of hugetlb page fault handler when hugetlb page is used in combination of cpuset. The leaked count can permanently trap N number of hugetlb pages in unusable "reserved" state. Steps to reproduce the bug...
```diff diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 36db012b38dd..88e708be1f64 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -140,6 +140,8 @@ static struct page *alloc_huge_page(struct vm_area_struct *vma, return page; fail: + if (vma->vm_flags & VM_MAYSHARE) + resv_huge_pages++; spin_unlock(&hugetlb_lock)...
ba8b45cea5f632540d561d37d94c71c07f6af1aa
Analyze and fix the following issue in the Linux kernel code: dm log: fix resume failed log device
Problem Details: This patch removes the possibility of having uninitialized log state if the log device has failed. When a mirror resumes operation, it calls 'resume' on the logging module. If disk based logging is being used, the log device is read to fill in the log state. If the log device has failed, we cannot s...
```diff diff --git a/drivers/md/dm-log.c b/drivers/md/dm-log.c index a60acf8d385a..a66428d860fe 100644 --- a/drivers/md/dm-log.c +++ b/drivers/md/dm-log.c @@ -478,7 +478,14 @@ static int disk_resume(struct dirty_log *log) DMWARN("%s: Failed to read header on mirror log device", lc->log_dev->name); fail_...
f5353cd7c9cd10cdf9d62a5487f3db77b7b68105
Analyze and fix the following issue in the Linux kernel code: dm raid1: fix to commit pending clear region requests
Problem Details: With the code as it is, it is possible for oustanding clear region requests never to get flushed when a mirror is deactivated or suspended. This means there will always be some resync work required when a mirror is activated, even though it may very well be in-sync. Always requesting the flush doesn'...
```diff diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c index bde904606099..85d254edd9be 100644 --- a/drivers/md/dm-raid1.c +++ b/drivers/md/dm-raid1.c @@ -405,8 +405,7 @@ static void rh_update_states(struct region_hash *rh) mempool_free(reg, rh->region_pool); } - if (!list_empty(&recovered)) - rh->l...
f97380bcadd6bd2e368727de4061aaba4989c426
Analyze and fix the following issue in the Linux kernel code: dm crypt: use smaller bvecs in clones
Problem Details: Allocate smaller clones With the previous dm-crypt fixes, there is no need for the clone bios to have the same bvec size as the original - we just need to make them big enough for the remaining number of pages. The only requirement is that we clear the "out" index in convert_context, so that crypt_co...
```diff diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 339b575ce07f..1ecee5e1c548 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -379,8 +379,7 @@ static int crypt_convert(struct crypt_config *cc, * This should never violate the device limitations * May return a smaller bio when ...
2f9941b6c55d70103c1bc3f2c7676acd9f20bf8a
Analyze and fix the following issue in the Linux kernel code: dm crypt: fix remove first_clone
Problem Details: Get rid of first_clone in dm-crypt This gets rid of first_clone, which is not really needed. Apparently, cloned bios used to share their bvec some time way in the past - this is no longer the case. Contrarily, this even hurts us if we try to create a clone off first_clone after it has completed, and...
```diff diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 1dc2c62200ee..339b575ce07f 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -33,7 +33,6 @@ struct crypt_io { struct dm_target *target; struct bio *base_bio; - struct bio *first_clone; struct work_struct work; atomic_t pen...
98221eb757de03d9aa6262b1eded2be708640ccc
Analyze and fix the following issue in the Linux kernel code: dm crypt: fix avoid cloned bio ref after free
Problem Details: Do not access the bio after generic_make_request We should never access a bio after generic_make_request - there's no guarantee it still exists. Signed-off-by: Olaf Kirch <olaf.kirch@oracle.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: An...
```diff diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index db439363f97d..1dc2c62200ee 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -655,9 +655,12 @@ static void process_write(struct crypt_io *io) generic_make_request(clone); + /* Do not reference clone after this - it + * ma...
027581f3515b5ec2218847dab578afa439a9d6b9
Analyze and fix the following issue in the Linux kernel code: dm crypt: fix call to clone_init
Problem Details: Call clone_init early We need to call clone_init as early as possible - at least before call bio_put(clone) in any error path. Otherwise, the destructor will try to dereference bi_private, which may still be NULL. Signed-off-by: Olaf Kirch <olaf.kirch@oracle.com> Signed-off-by: Alasdair G Kergon <ag...
```diff diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 8527827b24f1..db439363f97d 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -107,6 +107,8 @@ struct crypt_config { static struct kmem_cache *_crypt_io_pool; +static void clone_init(struct crypt_io *, struct bio *); + /* * ...
6ad36fe2b451cc85cc7b14f4128286759e217124
Analyze and fix the following issue in the Linux kernel code: dm raid1: one kmirrord per mirror
Problem Details: This patch replaces the single instance of kmirrord by one instance per mirror set. This change is required to avoid a deadlock in kmirrord when the persistent dirty log of a mirror itself resides on a mirror. The single instance of kmirrord then issues a sync write to the dirty log in write_bits whi...
```diff diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c index 23a642619bed..c8b4c108da9e 100644 --- a/drivers/md/dm-raid1.c +++ b/drivers/md/dm-raid1.c @@ -22,15 +22,8 @@ #define DM_MSG_PREFIX "raid1" -static struct workqueue_struct *_kmirrord_wq; -static struct work_struct _kmirrord_work; static DECLA...
34013886ef47ea72e412beb04558431b57a68d51
Analyze and fix the following issue in the Linux kernel code: Fix spellings of slab allocator section in init/Kconfig
Problem Details: Fix some of the spelling issues. Fix sentences. Discourage SLOB use since SLUB can pack objects denser. Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: Matt Mackall <mpm@selenic.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundati...
```diff diff --git a/init/Kconfig b/init/Kconfig index da6a91c4a051..4ad6de163238 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -523,9 +523,9 @@ config SLAB bool "SLAB" help The regular slab allocator that is established and known to work - well in all environments. It organizes chache hot objects in + we...
7ae439ce0c01d7db0c70d1542985969e95ef750d
Analyze and fix the following issue in the Linux kernel code: krealloc: fix kerneldoc comments
Problem Details: No "blank" (or "*") line is allowed between the function name and lines for it parameter(s). Cc: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: ...
```diff diff --git a/mm/slab.c b/mm/slab.c index acda7e2d66e4..01262d26e192 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -3742,7 +3742,6 @@ EXPORT_SYMBOL(__kmalloc); /** * krealloc - reallocate memory. The contents will remain unchanged. - * * @p: object to reallocate memory for. * @new_size: how many bytes of me...
45edfa580b8e638c44ec26872bfe75b307ba12d1
Analyze and fix the following issue in the Linux kernel code: SLUB: include lifetime stats and sets of cpus / nodes in tracking output
Problem Details: We have information about how long an object existed and about the nodes and cpus where the allocations and frees took place. Add that information to the tracking output in /sys/slab/xx/alloc_calls and /sys/slab/free_calls This will then enable slabinfo to output nice reports like this: christoph@...
```diff diff --git a/mm/slub.c b/mm/slub.c index 3e614c1901b7..ae2831027802 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1586,13 +1586,16 @@ static int calculate_order(int size) order < MAX_ORDER; order++) { unsigned long slab_size = PAGE_SIZE << order; - if (slub_max_order > order && + if (order < slub_max_or...
41ecc55b8a8ca618e6d490982c7ce45d230d4399
Analyze and fix the following issue in the Linux kernel code: SLUB: add CONFIG_SLUB_DEBUG
Problem Details: CONFIG_SLUB_DEBUG can be used to switch off the debugging and sysfs components of SLUB. Thus SLUB will be able to replace SLOB. SLUB can arrange objects in a denser way than SLOB and the code size should be minimal without debugging and sysfs support. Note that CONFIG_SLUB_DEBUG is materially differ...
```diff diff --git a/init/Kconfig b/init/Kconfig index d0edf42f4dba..da6a91c4a051 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -504,6 +504,15 @@ config VM_EVENT_COUNTERS on EMBEDDED systems. /proc/vmstat will only show page counts if VM event counters are disabled. +config SLUB_DEBUG + default y + bool "E...
02cbc874463924de2c3403379b698bce3cd277a5
Analyze and fix the following issue in the Linux kernel code: SLUB: move tracking definitions and check_valid_pointer() away from debug code
Problem Details: Move the tracking definitions and the check_valid_pointer() function away from the debugging related functions. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/mm/slub.c b/mm/slub.c index dfbd0d874a00..b9e05366afda 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -195,6 +195,18 @@ static enum { static DECLARE_RWSEM(slub_lock); LIST_HEAD(slab_caches); +/* + * Tracking user of a slab. + */ +struct track { + void *addr; /* Called from address */ + int cpu; /*...
35e5d7ee27680aef6dc3fab45a5ecd9952d9791a
Analyze and fix the following issue in the Linux kernel code: SLUB: introduce DebugSlab(page)
Problem Details: This replaces the PageError() checking. DebugSlab is clearer and allows for future changes to the page bit used. We also need it to support CONFIG_SLUB_DEBUG. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <t...
```diff diff --git a/mm/slub.c b/mm/slub.c index 07492a83b46e..c58a974d15ac 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -87,6 +87,21 @@ * the fast path. */ +static inline int SlabDebug(struct page *page) +{ + return PageError(page); +} + +static inline void SetSlabDebug(struct page *page) +{ + SetPageError(page)...
672bba3a4b2e65ed95ebd0cf764bd628bd1da74f
Analyze and fix the following issue in the Linux kernel code: SLUB: update comments
Problem Details: Update comments throughout SLUB to reflect the new developments. Fix up various awkward sentences. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/mm/slub.c b/mm/slub.c index 03d26f7142c7..15189d826f8f 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -66,11 +66,11 @@ * SLUB assigns one slab for allocation to each processor. * Allocations only occur from these slabs called cpu slabs. * - * Slabs with free elements are kept on a partial list. - ...
a87615b8f9e2349f6d3770af3d72fd6a41ab4239
Analyze and fix the following issue in the Linux kernel code: SLUB: slabinfo upgrade
Problem Details: -e Show empty slabs -d Modification of slab debug options at runtime -o Operations. Display of ctor / dtor etc. -r Report: Display all available information about a slabcache. Cleanup tracking display and make it work right. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Mo...
```diff diff --git a/Documentation/vm/slabinfo.c b/Documentation/vm/slabinfo.c index 41710ccf3a29..686a8e04a4f3 100644 --- a/Documentation/vm/slabinfo.c +++ b/Documentation/vm/slabinfo.c @@ -16,6 +16,7 @@ #include <stdarg.h> #include <getopt.h> #include <regex.h> +#include <errno.h> #define MAX_SLABS 500 #define...
01f41ec7b36e14da18a4e162ef697ae358f36e37
Analyze and fix the following issue in the Linux kernel code: mmc build fix
Problem Details: Cc: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index b6c16704aaab..7385acfa1dd9 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -501,9 +501,9 @@ void mmc_detect_change(struct mmc_host *host, unsigned long delay) { #ifdef CONFIG_MMC_DEBUG unsigned long flags; - spin_lock...
09129f0d14147732e0dff0feb9ca1347089a9c23
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5619): Dvb-usb: fix typo
Problem Details: replace "streaming_crtl" with "streaming_ctrl" Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/dvb/dvb-usb/dvb-usb.h b/drivers/media/dvb/dvb-usb/dvb-usb.h index 0d721731a524..6f824a569e14 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb.h +++ b/drivers/media/dvb/dvb-usb/dvb-usb.h @@ -119,7 +119,7 @@ struct usb_data_stream_properties { * @caps: capabilities of the DVB USB device...
57e45b31c1f32d15b6642c3af1578ee40be35dfb
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5617): V4L2: videodev, allow debugging
Problem Details: videodev, allow debugging fix typo? in videodev.c to allow debugging Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c index db4bee842745..b876aca69c73 100644 --- a/drivers/media/video/videodev.c +++ b/drivers/media/video/videodev.c @@ -433,7 +433,7 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, int ret = -EIN...
4fd74a776f8f451e424ec6cd6bdff690c83b07c2
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5612): M920x: rename function prefixes from m9206_foo to m920x_foo
Problem Details: Signed-off-by: Aapo Tahkola <aet@rasterburn.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/dvb/dvb-usb/m920x.c b/drivers/media/dvb/dvb-usb/m920x.c index 7433d3527244..49e57f85f99b 100644 --- a/drivers/media/dvb/dvb-usb/m920x.c +++ b/drivers/media/dvb/dvb-usb/m920x.c @@ -22,7 +22,7 @@ static int dvb_usb_m920x_debug; module_param_named(debug,dvb_usb_m920x_debug, int, 0644); ...
e7b419b69212f3c3489ae808f26d2a0d2b52fe9c
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5610): M920x: remove duplicated code
Problem Details: Some of the devices supported by the m920x driver have identical functions used for tuner_attach and frontend_attach. This patch consolidates the functions in question, and updates the debug code to be generic for each. This patch decreases the size of the kernel. Signed-off-by: Michael Krufky <mkru...
```diff diff --git a/drivers/media/dvb/dvb-usb/m920x.c b/drivers/media/dvb/dvb-usb/m920x.c index 3ebf0bcf47c9..f9fb791102be 100644 --- a/drivers/media/dvb/dvb-usb/m920x.c +++ b/drivers/media/dvb/dvb-usb/m920x.c @@ -381,7 +381,7 @@ static int m920x_identify_state(struct usb_device *udev, } /* demod configurations */...
910a7b68350516e114294064fbec4a9e58f59efc
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5593): Budget-ci: Fix tuning for TDM 1316 (160..200 MHz)
Problem Details: Revert changeset http://linuxtv.org/hg/v4l-dvb?cmd=changeset;node=e7c424bbf9aa;style=gitweb Petri Helin found that this changeset broke tuning: 'Well, after going through the changes that might have had effect on tuning, I found out the one which had caused this problem. I do not know the actual re...
```diff diff --git a/drivers/media/dvb/ttpci/budget-ci.c b/drivers/media/dvb/ttpci/budget-ci.c index 4ed4599ce816..9d42f88ebb0e 100644 --- a/drivers/media/dvb/ttpci/budget-ci.c +++ b/drivers/media/dvb/ttpci/budget-ci.c @@ -904,7 +904,7 @@ static int dvbc_philips_tdm1316l_tuner_set_params(struct dvb_frontend *fe, struc ...
87c3019d7b1acb7704a257d78c482112e9b0c227
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5592): DMA: Correctly free resources on error, sync PCI streamed data
Problem Details: I added saa7146_vmalloc_destroy_pgtable() which frees the resources allocated by saa7146_vmalloc_build_pgtable() and updated the callers in budget-core.c and av7110.c. I have also been through the updated functions and updated the error paths to ensure they free all allocated resources on error. I also...
```diff diff --git a/drivers/media/common/saa7146_core.c b/drivers/media/common/saa7146_core.c index 86cbdbcf9d7d..ef3e54cd9407 100644 --- a/drivers/media/common/saa7146_core.c +++ b/drivers/media/common/saa7146_core.c @@ -136,28 +136,45 @@ char *saa7146_vmalloc_build_pgtable(struct pci_dev *pci, long length, struct sa...
ba70d59bb987110c4394e896b299f9726609aa33
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5576): Improve / fix support for PAL-60 in cx25840
Problem Details: This causes the cx25840 module to treat V4L2_STD_PAL_60 similar to other 60Hz timings, and it fixes a wrongly-named variable (timings are independant of color system). Acked-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@...
```diff diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index 1757a588970f..67bda9f9a44b 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c @@ -555,7 +555,7 @@ static int set_v4lfmt(struct i2c_client *client, stru...
5f12491c36acb94670d822a90c9295f6fd671c8a
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5570): V4l1-compat: misc fixes for pixelformat function
Problem Details: Mark the palette2pixelformat lookup table as const pixelformat is unsigned, adjust the palette2pixelformat table and pixelformat_to_palette() palette_to_pixelformat() is a pure function pixelformat_to_palette() is a const function Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mau...
```diff diff --git a/drivers/media/video/v4l1-compat.c b/drivers/media/video/v4l1-compat.c index a861e150865e..efb67d29fc0b 100644 --- a/drivers/media/video/v4l1-compat.c +++ b/drivers/media/video/v4l1-compat.c @@ -127,7 +127,7 @@ set_v4l_control(struct inode *inode, /* -----------------------------------...
452c0fb46b1d68b1dae37cea7ccebd70a80397e4
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5569): Fix: v4l1_compat should be called only if V4L1_COMPAT
Problem Details: Added also some explanations about V4L1 handling Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c index f45c625a92f4..db4bee842745 100644 --- a/drivers/media/video/videodev.c +++ b/drivers/media/video/videodev.c @@ -438,6 +438,12 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, } #ifdef CONFIG_VIDEO_V4L1_...
45e95980f2c89c2cb6e770f4c67982eb0b72ce28
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5565): Cx88: fix compilation on alpha
Problem Details: error: 'DMA_32BIT_MASK' undeclared Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/cx88/cx88-mpeg.c b/drivers/media/video/cx88/cx88-mpeg.c index 2ebde2fdbcbe..81916d9b5817 100644 --- a/drivers/media/video/cx88/cx88-mpeg.c +++ b/drivers/media/video/cx88/cx88-mpeg.c @@ -28,6 +28,7 @@ #include <linux/device.h> #include <linux/dma-mapping.h> #include <linux/int...
a3cf4ea8729a5d448742fd5a0a003827c9f25cb6
Analyze and fix the following issue in the Linux kernel code: sh: Fix stacktrace simplification fallout.
Problem Details: When the stacktrace simplification changes went in the function definition on SH got skipped, fix it up so things build again. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/kernel/stacktrace.c b/arch/sh/kernel/stacktrace.c index 4bdd2f83535d..d41e561be20e 100644 --- a/arch/sh/kernel/stacktrace.c +++ b/arch/sh/kernel/stacktrace.c @@ -17,7 +17,7 @@ /* * Save stack-backtrace addresses into a stack_trace buffer. */ -void save_stack_trace(struct stack_trace *t...
cc150b03ae79b20e4c023f71913c1225f8a19a6b
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP: Fix GCC-reported compile time bug
Problem Details: Fix GCC-reported compile time bug which prevents booting when the framebuffer code is disabled. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/plat-omap/fb.c index 469f580ca057..4493bcff5172 100644 --- a/arch/arm/plat-omap/fb.c +++ b/arch/arm/plat-omap/fb.c @@ -333,7 +333,10 @@ unsigned long omapfb_reserve_sram(unsigned long sram_pstart, unsigned long sram_vstart, unsigned long sram_size, ...
e0b50d3c644f10a0022b23fccb58c8003741db52
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP: partial LED fixes
Problem Details: Partial fix for CONFIG_LEDS breakage ... at least allow platforms using the debug-leds support (H4 for now) to build with the generic LED support, and default the LED that would be the timer LED to trigger using the "heartbeat" (timer driven, rate depends on load). Right now only H2 and P2 seem to hav...
```diff diff --git a/arch/arm/plat-omap/debug-leds.c b/arch/arm/plat-omap/debug-leds.c index 511d6a50041e..9128a80d228f 100644 --- a/arch/arm/plat-omap/debug-leds.c +++ b/arch/arm/plat-omap/debug-leds.c @@ -39,12 +39,6 @@ static struct h2p2_dbg_fpga __iomem *fpga; static u16 led_state, hw_led_state; -#ifdef CON...
39b8e6986739c34da4e45eb4b8d2bb707292c591
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP: Fix gpmc header
Problem Details: Fix gpmc header Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/include/asm-arm/arch-omap/gpmc.h b/include/asm-arm/arch-omap/gpmc.h index fa33149f597e..995cc83482eb 100644 --- a/include/asm-arm/arch-omap/gpmc.h +++ b/include/asm-arm/arch-omap/gpmc.h @@ -87,7 +87,7 @@ extern int gpmc_cs_calc_divider(int cs, unsigned int sync_clk); extern int gpmc_cs_set_timings...
2d0fa586facb740b9ef9a01dcedc94c126c6f148
Analyze and fix the following issue in the Linux kernel code: [MTD] [MAPS] Fix missing printk() parameter in physmap_of.c MTD driver
Problem Details: Squashes a compiler warning, and provides more useful information in the case messed up device tree information. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c index 7efe744ad31e..8ec2fbe10744 100644 --- a/drivers/mtd/maps/physmap_of.c +++ b/drivers/mtd/maps/physmap_of.c @@ -186,7 +186,7 @@ static int __devinit of_physmap_probe(struct of_device *dev, const struct of_dev else { if (strcmp(...
b3cfe0cb37ac7c3ca05a29e308f01c8eb27e06d4
Analyze and fix the following issue in the Linux kernel code: [AVR32] Fix section mismatch .taglist -> .init.text
Problem Details: Rename .taglist to .taglist.init to silence section mismatch warnings. The .taglist.init section was already placed in the .init output section along with .init.text, so the warning didn't indicate any real problems. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
```diff diff --git a/arch/avr32/kernel/vmlinux.lds.c b/arch/avr32/kernel/vmlinux.lds.c index 7ad20cfb48a8..e7f72c995a32 100644 --- a/arch/avr32/kernel/vmlinux.lds.c +++ b/arch/avr32/kernel/vmlinux.lds.c @@ -35,7 +35,7 @@ SECTIONS _einittext = .; . = ALIGN(4); __tagtable_begin = .; - *(.taglist) + *(.tagli...
b96687768a9ac0fdd005c7700093ebb24b93450f
Analyze and fix the following issue in the Linux kernel code: Magic number prefix consistency change to Documentation/magic-number.txt
Problem Details: Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
```diff diff --git a/Documentation/magic-number.txt b/Documentation/magic-number.txt index 0e740c812d12..bd450e797558 100644 --- a/Documentation/magic-number.txt +++ b/Documentation/magic-number.txt @@ -129,7 +129,7 @@ SAVEKMSG_MAGIC1 0x53415645 savekmsg arch/*/amiga/config.c GDA_MAGIC 0x58...
5886269962f94fa9185c32db3ec936c612503235
Analyze and fix the following issue in the Linux kernel code: fix file specification in comments
Problem Details: Many files include the filename at the beginning, serveral used a wrong one. Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
```diff diff --git a/arch/arm/mach-s3c2410/sleep.S b/arch/arm/mach-s3c2410/sleep.S index 637aaba65390..d1eeed2ad47c 100644 --- a/arch/arm/mach-s3c2410/sleep.S +++ b/arch/arm/mach-s3c2410/sleep.S @@ -1,4 +1,4 @@ -/* linux/arch/arm/mach-s3c2410/s3c2410-sleep.S +/* linux/arch/arm/mach-s3c2410/sleep.S * * Copyright (c)...
01afd80626e98c2347bc25be92ee4a3faf314514
Analyze and fix the following issue in the Linux kernel code: drivers/base/platform.c: fix small typo in doc
Problem Details: Typo: iwithout -> without. Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Adrian Bunk <bunk@stusta.de>
```diff diff --git a/drivers/base/platform.c b/drivers/base/platform.c index eb84d9d44645..869ff8c00146 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -360,7 +360,7 @@ EXPORT_SYMBOL_GPL(platform_device_unregister); * This function creates a simple platform device that requires minimal * resou...
a982ac06b069f6ee9ea1b64f4ce68cdf2e138742
Analyze and fix the following issue in the Linux kernel code: misc doc and kconfig typos
Problem Details: Fix various typos in kernel docs and Kconfigs, 2.6.21-rc4. Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
```diff diff --git a/Documentation/MSI-HOWTO.txt b/Documentation/MSI-HOWTO.txt index d389388c733e..0d8240774fca 100644 --- a/Documentation/MSI-HOWTO.txt +++ b/Documentation/MSI-HOWTO.txt @@ -480,8 +480,8 @@ The PCI stack provides 3 possible levels of MSI disabling: 6.1. Disabling MSI on a single device -Under some...
f1a1eb299a8422c3e8d41753095bec44b2493398
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Further fixes for the removal of 4level-fixup hack from ppc32
Problem Details: Commit d1953c8888ef034b912ee33bc2ea2cce6a414402 removed the use of 4level-fixup.h for 32-bit systems under arch/powerpc. However, I missed a few things activated on some configurations, resulting in some warnings (at least with STRICT_MM_TYPECHECKS enabled) and build errors in some circumstances. Thi...
```diff diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c index 05066674a7a0..ec1421a20aaa 100644 --- a/arch/powerpc/mm/ppc_mmu_32.c +++ b/arch/powerpc/mm/ppc_mmu_32.c @@ -185,7 +185,7 @@ void hash_preload(struct mm_struct *mm, unsigned long ea, if (Hash == 0) return; - pmd = pmd_offset(pg...
16f1c746755836aa823658000493cdab8ce7b098
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Small fixes & cleanups in segment page size demotion
Problem Details: The code for demoting segments to 4K had some issues, like for example, when using _PAGE_4K_PFN flag, the first CPU to hit it would do the demotion, but other CPUs hitting the same page wouldn't properly flush their SLBs if mmu_ci_restriction isn't set. There are also potential issues with hash_preloa...
```diff diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index 9b226fa7006f..71092c2f65cd 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c @@ -596,22 +596,18 @@ unsigned int hash_page_do_lazy_icache(unsigned int pp, pte_t pte, int trap) * Demote a segmen...
02a3e59a088749c08b0293ee1535f5bf48f5926c
Analyze and fix the following issue in the Linux kernel code: Fix minor typoes in kernel/module.c
Problem Details: Fix minor (comment) typoes in kernel/module.c. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
```diff diff --git a/kernel/module.c b/kernel/module.c index d36e45477fac..9bd93de01f4a 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -96,9 +96,9 @@ static inline void add_taint_module(struct module *mod, unsigned flag) mod->taints |= flag; } -/* A thread that wants to hold a reference to a module only whi...
fd2dbc92e318ee9d306c4c3f393eef7294a5a30c
Analyze and fix the following issue in the Linux kernel code: Kconfig: A couple of grammatical fixes in arch/i386/Kconfig
Problem Details: Fix a couple grammatical errors in arch/i386/Kconfig. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
```diff diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index 64ad10f984a1..30944ee2e61a 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig @@ -858,9 +858,9 @@ config RELOCATABLE bool "Build a relocatable kernel(EXPERIMENTAL)" depends on EXPERIMENTAL help - This build a kernel image that retains relocati...
8b60756a628a73bc8bf8b59d8716cb3f09b7e7eb
Analyze and fix the following issue in the Linux kernel code: Fix more "deprecated" spellos.
Problem Details: Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
```diff diff --git a/Documentation/fb/aty128fb.txt b/Documentation/fb/aty128fb.txt index 069262fb619d..b605204fcfe1 100644 --- a/Documentation/fb/aty128fb.txt +++ b/Documentation/fb/aty128fb.txt @@ -54,8 +54,8 @@ Accepted options: noaccel - do not use acceleration engine. It is default. accel - use acceleration...
1591275cb57bc5df7ff59774b85c8af84bc45e87
Analyze and fix the following issue in the Linux kernel code: Fix "deprecated" typoes.
Problem Details: Fix remaining misspellings of "depreciated" to "deprecated." Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
```diff diff --git a/Documentation/arm/Interrupts b/Documentation/arm/Interrupts index 72c93de8cd4e..0d3dbf1099bc 100644 --- a/Documentation/arm/Interrupts +++ b/Documentation/arm/Interrupts @@ -149,7 +149,7 @@ So, what's changed? 3. set_GPIO_IRQ_edge() is obsolete, and should be replaced by set_irq_type. -4. Dire...
beb7dd86a101263bf63a78c7c6d4da3849b35bd6
Analyze and fix the following issue in the Linux kernel code: Fix misspellings collected by members of KJ list.
Problem Details: Fix the misspellings of "propogate", "writting" and (oh, the shame :-) "kenrel" in the source tree. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
```diff diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index 5922e84d9133..d3d3c255ddb7 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt @@ -228,7 +228,7 @@ Controls the kernel's behaviour when an oops or BUG is encountered. pid_max: -PID allocation...
3dde6ad8fc3939d345a3768464ecff43c91d511a
Analyze and fix the following issue in the Linux kernel code: Fix trivial typos in Kconfig* files
Problem Details: Fix several typos in help text in Kconfig* files. Signed-off-by: David Sterba <dave@jikos.cz> Signed-off-by: Adrian Bunk <bunk@stusta.de>
```diff diff --git a/arch/cris/arch-v32/drivers/Kconfig b/arch/cris/arch-v32/drivers/Kconfig index f64624fc4504..1d859c16931e 100644 --- a/arch/cris/arch-v32/drivers/Kconfig +++ b/arch/cris/arch-v32/drivers/Kconfig @@ -603,7 +603,7 @@ config ETRAX_CARDBUS select HOTPLUG select PCCARD_NONSTATIC ...
ccf6780dc3d228f380e17b6858b93fc48e40afd4
Analyze and fix the following issue in the Linux kernel code: Style fix in fs/select.c
Problem Details: Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
```diff diff --git a/fs/select.c b/fs/select.c index d86224154dec..a974082b0824 100644 --- a/fs/select.c +++ b/fs/select.c @@ -64,7 +64,7 @@ EXPORT_SYMBOL(poll_initwait); static void free_poll_entry(struct poll_table_entry *entry) { - remove_wait_queue(entry->wait_address,&entry->wait); + remove_wait_queue(entry->w...
0f8952c2fa981c75dbbb363ac83b320068fffa69
Analyze and fix the following issue in the Linux kernel code: fs/libfs.c: >80 columns line break fix
Problem Details: Signed-off-by: Ronni Nielsen <theronni@gmail.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
```diff diff --git a/fs/libfs.c b/fs/libfs.c index 1247ee90253a..5294de1f40c4 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -159,7 +159,10 @@ int dcache_readdir(struct file * filp, void * dirent, filldir_t filldir) continue; spin_unlock(&dcache_lock); - if (filldir(dirent, next->d_name.name, next->d_name....
da4e8ca376a1b3dca470eba14dcec321a6a27b8b
Analyze and fix the following issue in the Linux kernel code: applesmc: Use standard sysfs names for labels
Problem Details: We have a standard suffix to associate a designation string to a sensor: _label. Use it instead of _position so that libsensors will catch it. (This isn't implemented yet, but should be soon.) Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Nicolas Boichat <nicolas@boichat.ch> Signed-off-by: And...
```diff diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c index 5456e8608892..b51c104a28a2 100644 --- a/drivers/hwmon/applesmc.c +++ b/drivers/hwmon/applesmc.c @@ -981,7 +981,7 @@ static SENSOR_DEVICE_ATTR_2(fan##offset##_output, S_IRUGO | S_IWUSR, \ static SENSOR_DEVICE_ATTR(fan##offset##_manual, S_IRU...
5616df204ecf164ef2b124a17fd3cadd87954628
Analyze and fix the following issue in the Linux kernel code: FRV: Miscellaneous fixes
Problem Details: Miscellaneous fixes to bring FRV up to date: (1) Copy the new syscall numbers from i386 to asm-frv/unistd.h and fill out the syscall table in entry.S too. (2) Mark __frv_uart0 and __frv_uart1 __pminitdata rather than __initdata so that determine_clocks() can access them when CONFIG_PM=y. ...
```diff diff --git a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S index 940ac306e9a0..43dc08ec7511 100644 --- a/arch/frv/kernel/entry.S +++ b/arch/frv/kernel/entry.S @@ -1482,6 +1482,16 @@ sys_call_table: .long sys_faccessat .long sys_pselect6 .long sys_ppoll + .long sys_unshare /* 310 */ + .long sys_set_ro...
7e81ab9d3d9a22fb7b20c56f0cabc8ef51954014
Analyze and fix the following issue in the Linux kernel code: Fix unnecesary meminit
Problem Details: This is to fix unnecessary __meminit definition. These are exported for kernel modules. I compiled on ia64/x86-64 with memory hotplug on/off. Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-fo...
```diff diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index 4dd0dabe81cb..8fcd6a15517f 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c @@ -228,7 +228,7 @@ int __init acpi_numa_init(void) return 0; } -int __meminit acpi_get_pxm(acpi_handle h) +int acpi_get_pxm(acpi_handle h) { unsigned long p...
a361a68bc510b91b50462433cfa65c6b620a80c3
Analyze and fix the following issue in the Linux kernel code: rtc: rtc-sh: Fix rtc_dev pointer for rtc_update_irq().
Problem Details: When the rtc_update_irq() callsites stopped passing in the class_dev, the rtc_dev references weren't fixed. Fix it up, so we pass in the proper pointer. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/drivers/rtc/rtc-sh.c b/drivers/rtc/rtc-sh.c index bde3d34cb007..e0f91dfce0f5 100644 --- a/drivers/rtc/rtc-sh.c +++ b/drivers/rtc/rtc-sh.c @@ -104,7 +104,7 @@ static irqreturn_t sh_rtc_interrupt(int irq, void *dev_id) writeb(tmp, rtc->regbase + RCR1); - rtc_update_irq(&rtc->rtc_dev, 1, events)...
1605b8471d64c855bc2493abf3adf6a1ebc3e645
Analyze and fix the following issue in the Linux kernel code: [CRYPTO] cryptomgr: Fix use after free
Problem Details: By the time kthread_run returns the param may have already been freed so writing the returned thread_struct pointer to param is wrong. In fact, we don't need it in param anyway so this patch simply puts it on the stack. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
```diff diff --git a/crypto/cryptomgr.c b/crypto/cryptomgr.c index 6958ea83ee44..e5fb7cca5107 100644 --- a/crypto/cryptomgr.c +++ b/crypto/cryptomgr.c @@ -24,8 +24,6 @@ #include "internal.h" struct cryptomgr_param { - struct task_struct *thread; - struct rtattr *tb[CRYPTOA_MAX]; struct { @@ -81,6 +79,7 @@ err...
f6a3c1ca00ce9a43942364a0cc15601b291df281
Analyze and fix the following issue in the Linux kernel code: sh: landisk mv_nr_irqs definition.
Problem Details: Fix up the landisk build. When NR_IRQS was removed, landisk got missed in the updates. Update the machvec for the landisk IRQs to get it working again. Signed-off-by: kogiidena <kogiidena@eggplant.ddo.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/boards/landisk/setup.c b/arch/sh/boards/landisk/setup.c index a83a5d9587bb..4058b4f50d44 100644 --- a/arch/sh/boards/landisk/setup.c +++ b/arch/sh/boards/landisk/setup.c @@ -93,6 +93,7 @@ static void __init landisk_setup(char **cmdline_p) */ struct sh_machine_vector mv_landisk __initmv =...
c71861e65e2898850478a7ac6c4b8cc9f7007e9e
Analyze and fix the following issue in the Linux kernel code: sh: Fixup ndelay() xloops calculation for alternate HZ.
Problem Details: Currently the xloops calculation in ndelay() gets set to 0 when calculated with HZ=250, fix up how we do the HZ factoring in order to get this right for differing values. Signed-off-by: kogiidena <kogiidena@eggplant.ddo.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/lib/delay.c b/arch/sh/lib/delay.c index 351714694d6d..f3ddd2133e6f 100644 --- a/arch/sh/lib/delay.c +++ b/arch/sh/lib/delay.c @@ -24,9 +24,10 @@ inline void __const_udelay(unsigned long xloops) __asm__("dmulu.l %0, %2\n\t" "sts mach, %0" : "=r" (xloops) - : "0" (xloops), "r" (cpu_d...
53f983a90d7908bcece51f86180c7c9b575a1e4d
Analyze and fix the following issue in the Linux kernel code: sh: Fix PC adjustments for varying opcode length.
Problem Details: There are a few different cases for figuring out how to size the instruction. We read in the instruction located at regs->pc - 4 when rewinding the opcode to figure out if there's a 32-bit opcode before the faulting instruction, with a default of a - 2 adjustment on a mismatch. In practice this works f...
```diff diff --git a/arch/sh/kernel/cpu/sh4/fpu.c b/arch/sh/kernel/cpu/sh4/fpu.c index 7624677f6628..d61dd599169f 100644 --- a/arch/sh/kernel/cpu/sh4/fpu.c +++ b/arch/sh/kernel/cpu/sh4/fpu.c @@ -16,6 +16,7 @@ #include <linux/sched.h> #include <linux/signal.h> #include <asm/processor.h> +#include <asm/system.h> #inc...
44530c696b3fc2c8a45bdc798af85528e065ed80
Analyze and fix the following issue in the Linux kernel code: sh: Always define TRAPA_BUG_OPCODE.
Problem Details: Previously this was only set when CONFIG_BUG=y. While we rely on that for handle_BUG() dispatch, we still want to hand the opcode off to the die chain notifier for determining the trap value. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/include/asm-sh/bug.h b/include/asm-sh/bug.h index 794c36daf06d..46f925c815ac 100644 --- a/include/asm-sh/bug.h +++ b/include/asm-sh/bug.h @@ -1,12 +1,12 @@ #ifndef __ASM_SH_BUG_H #define __ASM_SH_BUG_H +#define TRAPA_BUG_OPCODE 0xc33e /* trapa #0x3e */ + #ifdef CONFIG_BUG #define HAVE_ARCH_BU...
435c55d1ef3ec5460fab8c332a693ef5fad18454
Analyze and fix the following issue in the Linux kernel code: rtc: rtc-sh: Fix up dev_dbg() warnings.
Problem Details: Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/drivers/rtc/rtc-sh.c b/drivers/rtc/rtc-sh.c index 6abf4811958c..bde3d34cb007 100644 --- a/drivers/rtc/rtc-sh.c +++ b/drivers/rtc/rtc-sh.c @@ -341,7 +341,7 @@ static int sh_rtc_read_time(struct device *dev, struct rtc_time *tm) tm->tm_sec--; #endif - dev_dbg(&dev, "%s: tm is secs=%d, mins=%d, ...
1bf66a30421ca772820f489d88c16d0c430d6a67
Analyze and fix the following issue in the Linux kernel code: IB: Put rlimit accounting struct in struct ib_umem
Problem Details: When memory pinned with ib_umem_get() is released, ib_umem_release() needs to subtract the amount of memory being unpinned from mm->locked_vm. However, ib_umem_release() may be called with mm->mmap_sem already held for writing if the memory is being released as part of an munmap() call, so it is somet...
```diff diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c index 48e854cf416f..f32ca5fbb26b 100644 --- a/drivers/infiniband/core/umem.c +++ b/drivers/infiniband/core/umem.c @@ -39,13 +39,6 @@ #include "uverbs.h" -struct ib_umem_account_work { - struct work_struct work; - struct mm_struct ...
af80318eb71e234a59957cd1d2d7c3fa2ea27313
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix request_irq() ignored result warnings in PCI controller code.
Problem Details: Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/pci_psycho.c b/arch/sparc64/kernel/pci_psycho.c index 401e5dfe9bd5..2edcb1dd13c3 100644 --- a/arch/sparc64/kernel/pci_psycho.c +++ b/arch/sparc64/kernel/pci_psycho.c @@ -836,6 +836,7 @@ static void psycho_register_error_handlers(struct pci_pbm_info *pbm) struct of_device *op =...
63c3f460cb47c2e06f1726e18534d0e1fe8652a7
Analyze and fix the following issue in the Linux kernel code: [ATYFB]: Fix sparc includes.
Problem Details: No need to use asm/pbm.h here. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index ea67dd902d4e..8d3455da663a 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c @@ -80,8 +80,9 @@ #include "../macmodes.h" #endif #ifdef __sparc__ -#include <asm/pbm.h> #include <asm/fbio.h> +#incl...
15576bc8adb33d58867942385ae849cc48379610
Analyze and fix the following issue in the Linux kernel code: [QLA2XXX]: Fix build on sparc.
Problem Details: We now use pci_device_to_OF_node() to get properties and of_get_property() returns const pointers. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 3e296ab845b6..089fc7940d8b 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -13,7 +13,6 @@ #ifdef CONFIG_SPARC #include <asm/prom.h> -#include <asm/pbm.h> #endif /* XXX(hch): this is...
c5f125031f416ba6350e84462e9039737b6e2bab
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix ARM branch relocation range
Problem Details: Branches in the ARM architecture are restricted to a range of +/- 32MB. However, the code in .../arch/arm/kernel/module.c::apply_relocate() was checking offset against a range of +/- 64MB. Signed-off-by: Kevin Welton <Kevin.Welton@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index 1b061583408e..79b7e5cf5416 100644 --- a/arch/arm/kernel/module.c +++ b/arch/arm/kernel/module.c @@ -116,8 +116,8 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, offset += sym->st_value - loc; if (o...
1efd48b3ae8f89a1d04f1e36be96764d7bf43ae9
Analyze and fix the following issue in the Linux kernel code: mmc: use lock instead of claim in debug check
Problem Details: As mmc_detect_change() can be called from irq context, using claim (which can sleep) is inherently unsafe. Use the host spinlock instead, which also is faster. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
```diff diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 72c7cf4a9f9d..b6c16704aaab 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -500,9 +500,10 @@ void __mmc_release_bus(struct mmc_host *host) void mmc_detect_change(struct mmc_host *host, unsigned long delay) { #ifdef CON...
8eef3896b352a8760ab04293174444da4e8c8127
Analyze and fix the following issue in the Linux kernel code: [ARM] 4361/1: AT91: Build error
Problem Details: Fix a build error due to a missing semicolon. Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/include/asm-arm/arch-at91/board.h b/include/asm-arm/arch-at91/board.h index 7a34a5b1fed0..0ce6ee98ed0b 100644 --- a/include/asm-arm/arch-at91/board.h +++ b/include/asm-arm/arch-at91/board.h @@ -121,7 +121,7 @@ extern void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data); /* AC97 */ str...
994c84ea526ea1c348f63dc3aa7cfeec931bb612
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP: h4 must have blinky leds!!
Problem Details: This adds generic support for the "debug board" LEDs used by most of TI's OMAP reference boards, and board-specific support for the H4. It's derived from the not-as-generic stuff used by OMAP1 H2/H3/P2. Those should be able to switch easily to this version, and clean up some of the omap1-specific code...
```diff diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index aab97ccf1e63..2a1aca7a6371 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -20,6 +20,7 @@ config MACH_OMAP_GENERIC config MACH_OMAP_H4 bool "OMAP 2420 H4 board" depends on ARCH_OMAP2 && ARCH_OMAP24XX ...
215d06780d13fd7de629b02b61b7b7bf88ce5039
Analyze and fix the following issue in the Linux kernel code: Fix sunrpc warning noise
Problem Details: Commit c5a4dd8b7c15927a8fbff83171b57cad675a79b9 introduced the following compiler warnings: net/sunrpc/sched.c:766: warning: format '%u' expects type 'unsigned int', but argument 3 has type 'size_t' net/sunrpc/sched.c:785: warning: format '%u' expects type 'unsigned int', but argument 2 has type 'size...
```diff diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index 4a53e94f8134..99014516b73c 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c @@ -763,9 +763,9 @@ void *rpc_malloc(struct rpc_task *task, size_t size) else buf = kmalloc(size, gfp); *buf = size; - dprintk("RPC: %5u allocated buffer of size ...
8678c1f04277daaa914abb107fb9fe71298d916d
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix ASID version switch
Problem Details: Close a hole in the ASID version switch, particularly the following scenario: CPU0 MM PID CPU1 MM PID idle A pid(A) A idle(lazy tlb) * new asid version triggered by B * B pid(B) A pid(A) * MM A gets new asid version * A idle(lazy tlb) A pid(A) * CPU1 doesn't see the ne...
```diff diff --git a/arch/arm/mm/context.c b/arch/arm/mm/context.c index 9da43a0fdcdf..930c04c4f53c 100644 --- a/arch/arm/mm/context.c +++ b/arch/arm/mm/context.c @@ -14,7 +14,8 @@ #include <asm/mmu_context.h> #include <asm/tlbflush.h> -unsigned int cpu_last_asid = { 1 << ASID_BITS }; +static DEFINE_SPINLOCK(cpu_as...
66761522a7bca951c1214498b80260533957e3ad
Analyze and fix the following issue in the Linux kernel code: [IA64] fix stack alignment for ia32 signal handlers
Problem Details: This fixes the setup of the alignment of the signal frame, so that all signal handlers are run with a properly aligned stack frame. The current code "over-aligns" the stack pointer so that the stack frame is effectively always mis-aligned by 4 bytes. But what we really want is that on function entry ...
```diff diff --git a/arch/ia64/ia32/ia32_signal.c b/arch/ia64/ia32/ia32_signal.c index b3355a9ca2c3..7b38b73e7827 100644 --- a/arch/ia64/ia32/ia32_signal.c +++ b/arch/ia64/ia32/ia32_signal.c @@ -811,7 +811,11 @@ get_sigframe (struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size) } /* Legacy stack switch...
be3478ddb8a3902b588c840b42e166a0e64a87b3
Analyze and fix the following issue in the Linux kernel code: sm501fb printk warning fixes
Problem Details: drivers/video/sm501fb.c: In function 'sm501fb_cursor': drivers/video/sm501fb.c:992: warning: format '%08x' expects type 'unsigned int', but argument 3 has type 'long unsigned int' drivers/video/sm501fb.c:992: warning: format '%08x' expects type 'unsigned int', but argument 4 has type 'long unsigned int...
```diff diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c index 0a44c44672c8..c86df126f93a 100644 --- a/drivers/video/sm501fb.c +++ b/drivers/video/sm501fb.c @@ -989,7 +989,7 @@ static int sm501fb_cursor(struct fb_info *info, struct fb_cursor *cursor) ((info->cmap.green[fg_col] & 0xFC) << 3) | ((in...
435d56fcd45cdf32bfb4db5d4e1efe17f3da95b2
Analyze and fix the following issue in the Linux kernel code: pm2fb: fix of jumps in pm2fb_probe
Problem Details: This patch fixes incorrect targets of jumps when an error occurs in the pm2fb_probe. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.o...
```diff diff --git a/drivers/video/pm2fb.c b/drivers/video/pm2fb.c index 7f4c753b1d89..1ac5264bb2c1 100644 --- a/drivers/video/pm2fb.c +++ b/drivers/video/pm2fb.c @@ -1335,10 +1335,10 @@ static int __devinit pm2fb_probe(struct pci_dev *pdev, info->var = pm2fb_var; if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) - g...
19c1a8b3122e7b2007cfd2836da2318816f324cc
Analyze and fix the following issue in the Linux kernel code: skeletonfb: improvements
Problem Details: This patch adds a macro to register PCI ids table and corrects type of xxxfb_fix variable to avoid modpost warnings. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torva...
```diff diff --git a/drivers/video/skeletonfb.c b/drivers/video/skeletonfb.c index c15b6fefe919..842b5cd054c6 100644 --- a/drivers/video/skeletonfb.c +++ b/drivers/video/skeletonfb.c @@ -84,7 +84,7 @@ struct xxx_par; * if we don't use modedb. If we do use modedb see xxxfb_init how to use it * to get a fb_var_screen...
2ae854777592856ad8ce4d4cdb6114804e2e28f6
Analyze and fix the following issue in the Linux kernel code: vgacon: disallow console operations when in KD_GRAPHICS mode
Problem Details: Reported by James Pearson as: boot to run level 3 if not root, then make sure /dev/console is writeable login and type: setterm -blank 0 start X type into an xterm: while true; do echo "" > /dev/console; usleep 100000; done while the above loop is running switch to the text cons...
```diff diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index d0d2733ef479..2460b82a1d93 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c @@ -660,6 +660,9 @@ static void vgacon_set_cursor_size(int xpos, int from, int to) static void vgacon_cursor(struct vc...
b1e7223f28b4ed5073d2029a3597bf514ff514f2
Analyze and fix the following issue in the Linux kernel code: fbdev: clean up exit patch of fb_set_var
Problem Details: Clean up exit patch of fb_set_var(): - consolidate all return values into a single local variable - ensure that return values are valid error codes - fix fb_set_var() returning success when fb_check_caps() failed Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@li...
```diff diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 354711c84aaa..08d4e11d9121 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c @@ -799,11 +799,11 @@ static int fb_check_caps(struct fb_info *info, struct fb_var_screeninfo *var, int fb_set_var(struct fb_info *info, struct fb_var_scre...
2620c6e31735248ac26403558bd4279a8af619d8
Analyze and fix the following issue in the Linux kernel code: nvidiafb: fix return value of nvidiafb_open()
Problem Details: Fix return value of nvidiafb_open(). Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c index 610575319444..7c36b5fe582e 100644 --- a/drivers/video/nvidia/nvidia.c +++ b/drivers/video/nvidia/nvidia.c @@ -1016,7 +1016,7 @@ static int nvidiafb_release(struct fb_info *info, int user) par->open_count--; done: mutex_unlock(...