id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
cc367732ff0b1c63d0d7bdd11e6d1661794ef6a3 | Analyze and fix the following issue in the Linux kernel code: sched: debug, improve migration statistics | Problem Details:
add new migration statistics when SCHED_DEBUG and SCHEDSTATS
is enabled. Available in /proc/<PID>/sched.
Signed-off-by: Ingo Molnar <mingo@elte.hu> | ```diff
diff --git a/include/linux/sched.h b/include/linux/sched.h
index fcc9a5ada1a2..3a6e05e77715 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -931,6 +931,24 @@ struct sched_entity {
u64 block_max;
u64 exec_max;
u64 slice_max;
+
+ u64 nr_migrations;
+ u64 nr_migrations_cold;
+ u64... |
2d92f22784b7b8879ebe3254e44c92cb8792b0dd | Analyze and fix the following issue in the Linux kernel code: sched: debug: increase width of debug line | Problem Details:
increase width of debug line - in preparation of more debugging info.
Signed-off-by: Ingo Molnar <mingo@elte.hu> | ```diff
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index 0aab455a7b41..755815937417 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -198,7 +198,7 @@ static int sched_debug_show(struct seq_file *m, void *v)
u64 now = ktime_to_ns(ktime_get());
int cpu;
- SEQ_printf(m, "Sched Debug Vers... |
e62dd02ed0af35631c6ca473e50758c9594773cf | Analyze and fix the following issue in the Linux kernel code: sched: fix group scheduling for SCHED_BATCH | Problem Details:
The following patch (sched: disable sleeper_fairness on SCHED_BATCH)
seems to break GROUP_SCHED. Although, it may be 'oops'-less due to the
possibility of 'p' being always a valid address.
Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu> | ```diff
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 410b77aea216..3ac096e74faf 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -485,9 +485,8 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
vruntime += sched_vslice_add(cfs_rq, se);
if (!initial) {
- str... |
ace8b3d633f93da8535921bf3e3679db3c619578 | Analyze and fix the following issue in the Linux kernel code: sched: some proc entries are missed in sched_domain sys_ctl debug code | Problem Details:
cache_nice_tries and flags entry do not appear in proc fs sched_domain
directory, because ctl_table entry is skipped.
This patch fixes the issue.
Signed-off-by: Zou Nan hai <nanhai.zou@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu> | ```diff
diff --git a/kernel/sched.c b/kernel/sched.c
index 48fc74b6df55..b7dff36c7c8c 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5284,7 +5284,7 @@ set_table_entry(struct ctl_table *entry,
static struct ctl_table *
sd_alloc_ctl_domain_table(struct sched_domain *sd)
{
- struct ctl_table *table = sd_alloc_ctl... |
638e13ac37a1a89473415f407cbffc1688a20fe2 | Analyze and fix the following issue in the Linux kernel code: sched: fix rt ptracer monopolizing CPU | Problem Details:
yield() in wait_task_inactive(), can cause a high priority thread to be
scheduled back in, and there by loop forever while it is waiting for some
lower priority thread which is unfortunately still on the runqueue.
Use schedule_timeout_uninterruptible(1) instead.
Signed-off-by: Gautham R Shenoy <ego@i... | ```diff
diff --git a/kernel/sched.c b/kernel/sched.c
index 9ac99896db8f..48fc74b6df55 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1133,7 +1133,7 @@ repeat:
* yield - it could be a while.
*/
if (unlikely(on_rq)) {
- yield();
+ schedule_timeout_uninterruptible(1);
goto repeat;
}
``` |
810e95ccd58d91369191aa4ecc9e6d4a10d8d0c8 | Analyze and fix the following issue in the Linux kernel code: sched: another wakeup_granularity fix | Problem Details:
unit mis-match: wakeup_gran was used against a vruntime
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu> | ```diff
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index f5f491762e35..3ecbfd0902d8 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -818,7 +818,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p)
struct task_struct *curr = rq->curr;
struct cfs_rq *cfs_rq = task_cfs_... |
00bf7bfc2eaf775b634774e9ec435d720b6ecee7 | Analyze and fix the following issue in the Linux kernel code: sched: fix: move the CPU check into ->task_new_fair() | Problem Details:
noticed by Peter Zijlstra:
fix: move the CPU check into ->task_new_fair(), this way we
can call place_entity() and get child ->vruntime right at
initial wakeup time.
(without this there can be large latencies)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@che... | ```diff
diff --git a/kernel/sched.c b/kernel/sched.c
index f2b8db4d6802..b41ef663b993 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1660,17 +1660,14 @@ void fastcall wake_up_new_task(struct task_struct *p, unsigned long clone_flags)
{
unsigned long flags;
struct rq *rq;
- int this_cpu;
rq = task_rq_lock... |
a65914b3658043da27c159b8a28c5811bb0a88c9 | Analyze and fix the following issue in the Linux kernel code: sched: kfree(NULL) is valid | Problem Details:
kfree(NULL) is valid.
pointed out by checkpatch.pl.
the fix shrinks the code a bit:
text data bss dec hex filename
40024 3842 100 43966 abbe sched.o.before
40002 3842 100 43944 aba8 sched.o.after
Signed-off-by: Ingo Molnar <mingo@elte.hu> | ```diff
diff --git a/kernel/sched.c b/kernel/sched.c
index 10b7bedfa35a..23da93360b22 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6784,17 +6784,14 @@ struct task_grp *sched_create_group(void)
err:
for_each_possible_cpu(i) {
- if (tg->cfs_rq && tg->cfs_rq[i])
+ if (tg->cfs_rq)
kfree(tg->cfs_rq[i]);
-... |
8927f49479756c1aff76e8202ad32733c965864f | Analyze and fix the following issue in the Linux kernel code: sched: style cleanup | Problem Details:
fix up __setup() style bug - noticed via checkpatch.pl.
Signed-off-by: Ingo Molnar <mingo@elte.hu> | ```diff
diff --git a/kernel/sched.c b/kernel/sched.c
index 7fefd8ab8b58..10b7bedfa35a 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5680,7 +5680,7 @@ static int __init isolated_cpu_setup(char *str)
return 1;
}
-__setup ("isolcpus=", isolated_cpu_setup);
+__setup("isolcpus=", isolated_cpu_setup);
/*
* i... |
26797a34a24cfeab9951a6f42f27432c0b2546af | Analyze and fix the following issue in the Linux kernel code: sched: break out if printing a warning in sched_domain_debug() | Problem Details:
checkpatch.pl and Andy Whitcroft noticed the following bug: we did
not break out after printing an error.
Signed-off-by: Ingo Molnar <mingo@elte.hu> | ```diff
diff --git a/kernel/sched.c b/kernel/sched.c
index 1a80ac1b6dab..7fefd8ab8b58 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5534,16 +5534,19 @@ static void sched_domain_debug(struct sched_domain *sd, int cpu)
printk("\n");
printk(KERN_ERR "ERROR: domain->cpu_power not "
"set\n");
+ br... |
3e9830dcabdeb3656855ec1b678b6bcf3b50261c | Analyze and fix the following issue in the Linux kernel code: sched: run sched_domain_debug() if CONFIG_SCHED_DEBUG=y | Problem Details:
run sched_domain_debug() if CONFIG_SCHED_DEBUG=y, instead
of relying on the hand-crafted SCHED_DOMAIN_DEBUG switch.
Signed-off-by: Ingo Molnar <mingo@elte.hu> | ```diff
diff --git a/kernel/sched.c b/kernel/sched.c
index f370f108ed04..1a80ac1b6dab 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5476,8 +5476,7 @@ int __init migration_init(void)
int nr_cpu_ids __read_mostly = NR_CPUS;
EXPORT_SYMBOL(nr_cpu_ids);
-#undef SCHED_DOMAIN_DEBUG
-#ifdef SCHED_DOMAIN_DEBUG
+#ifde... |
08ec3df5109e0555da5b9deb4382fd29733c852c | Analyze and fix the following issue in the Linux kernel code: sched: fix __pick_next_entity() | Problem Details:
The thing is that __pick_next_entity() must never be called when
first_fair(cfs_rq) == NULL. It wouldn't be a problem, should 'run_node'
be the very first field of 'struct sched_entity' (and it's the second).
The 'nr_running != 0' check is _not_ enough, due to the fact that
'current' is not within the... | ```diff
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 1f14b56d0d00..fa78686ec227 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -600,9 +600,12 @@ set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se)
static struct sched_entity *pick_next_entity(struct cfs_rq *cfs_rq)
{
- stru... |
b9fa3df33f9166daf81bfa8253d339f5a7726122 | Analyze and fix the following issue in the Linux kernel code: sched: group scheduler, fix latency | Problem Details:
There is a possibility that because of task of a group moving from one
cpu to another, it may gain more cpu time that desired. See
http://marc.info/?l=linux-kernel&m=119073197730334 for details.
This is an attempt to fix that problem. Basically it simulates dequeue
of higher level entities as if they... | ```diff
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 57e7f3672fd7..de13a6f5b977 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -727,6 +727,7 @@ static void enqueue_task_fair(struct rq *rq, struct task_struct *p, int wakeup)
break;
cfs_rq = cfs_rq_of(se);
enqueue_entity(cfs_rq, s... |
fad095a7b963d9e914e0cdb73e27355c47709441 | Analyze and fix the following issue in the Linux kernel code: sched: group scheduler, fix bloat | Problem Details:
Recent fix to check_preempt_wakeup() to check for preemption at higher
levels caused a size bloat for !CONFIG_FAIR_GROUP_SCHED.
Fix the problem.
42277 10598 320 53195 cfcb kernel/sched.o-before_this_patch
42216 10598 320 53134 cf8e kernel/sched.o-after_this_patch
Signed-off... | ```diff
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index c44a295eee0e..57e7f3672fd7 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -652,15 +652,21 @@ static inline struct cfs_rq *cpu_cfs_rq(struct cfs_rq *cfs_rq, int this_cpu)
#define for_each_leaf_cfs_rq(rq, cfs_rq) \
list_for_each_entry(... |
fb615581c78efee25e4d04f1145e8fa8ec705dc3 | Analyze and fix the following issue in the Linux kernel code: sched: group scheduler, fix coding style issues | Problem Details:
Fix coding style issues reported by Randy Dunlap and others
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Signed-off-by: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de> | ```diff
diff --git a/init/Kconfig b/init/Kconfig
index faed9a0b6f24..54f31a191b88 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -282,11 +282,11 @@ config CPUSETS
Say N if unsure.
config FAIR_GROUP_SCHED
- bool "Fair group cpu scheduler"
+ bool "Fair group CPU scheduler"
default y
depends on EXPERIMENTAL
... |
5f6d858ecca78f71755859a346d845e302973cd1 | Analyze and fix the following issue in the Linux kernel code: sched: speed up and simplify vslice calculations | Problem Details:
speed up and simplify vslice calculations.
[ From: Mike Galbraith <efault@gmx.de>: build fix ]
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu> | ```diff
diff --git a/include/linux/sched.h b/include/linux/sched.h
index d5daca4bcc6b..97f736b749c2 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1400,7 +1400,7 @@ extern void sched_idle_next(void);
#ifdef CONFIG_SCHED_DEBUG
extern unsigned int sysctl_sched_latency;
-extern unsigned int sysctl_... |
2830cf8c90f37526d401f1999250312df970bfa3 | Analyze and fix the following issue in the Linux kernel code: sched: group scheduler SMP migration fix | Problem Details:
group scheduler SMP migration fix: use task_cfs_rq(p) to get
to the relevant fair-scheduling runqueue of a task, rq->cfs
is not the right one.
Signed-off-by: Ingo Molnar <mingo@elte.hu> | ```diff
diff --git a/kernel/sched.c b/kernel/sched.c
index ba9fa6c0ab65..e1657e0c86d0 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1040,6 +1040,8 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu)
{
int old_cpu = task_cpu(p);
struct rq *old_rq = cpu_rq(old_cpu), *new_rq = cpu_rq(new_cpu);
+ ... |
2d72376b3af1e7d4d4515ebfd0f4383f2e92c343 | Analyze and fix the following issue in the Linux kernel code: sched: clean up schedstats, cnt -> count | Problem Details:
rename all 'cnt' fields and variables to the less yucky 'count' name.
yuckage noticed by Andrew Morton.
no change in code, other than the /proc/sched_debug bkl_count string got
a bit larger:
text data bss dec hex filename
38236 3506 24 41766 a326 sched.o.before
382... | ```diff
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 19489b0d5554..e5d0953d4db1 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -304,7 +304,7 @@ static int proc_pid_schedstat(struct task_struct *task, char *buffer)
return sprintf(buffer, "%llu %llu %lu\n",
task->sched_info.cpu_time,
task->sched_info... |
2b1e315dd2822c99793485f9e53a73459fb399c1 | Analyze and fix the following issue in the Linux kernel code: sched: yield fix | Problem Details:
fix yield bugs due to the current-not-in-rbtree changes: the task is
not in the rbtree so rbtree-removal is a no-no.
[ From: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>: build fix. ]
also, nice code size reduction:
kernel/sched.o:
text data bss dec hex filename
38323 3506 ... | ```diff
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 5384a977c9a7..fcd6900849b3 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -739,9 +739,7 @@ static void dequeue_task_fair(struct rq *rq, struct task_struct *p, int sleep)
static void yield_task_fair(struct rq *rq)
{
struct cfs_rq *cf... |
8651a86c342ab79a956afec0c5971acaad38d3a1 | Analyze and fix the following issue in the Linux kernel code: sched: group scheduler wakeup latency fix | Problem Details:
group scheduler wakeup latency fix: when checking for preemption
we must check cross-group too, not just intra-group.
Signed-off-by: Ingo Molnar <mingo@elte.hu> | ```diff
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 48c69211888f..5384a977c9a7 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -796,7 +796,8 @@ static void yield_task_fair(struct rq *rq)
static void check_preempt_wakeup(struct rq *rq, struct task_struct *p)
{
struct task_struct *curr ... |
02e4bac2a5b097e23d757bf2953740b3d51b7976 | Analyze and fix the following issue in the Linux kernel code: sched: fix sched_fork() | Problem Details:
fix sched_fork(): large latencies at new task creation time because
the ->vruntime was not fixed up cross-CPU, if the parent got migrated
after the child's CPU got set up.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Reviewed-by: Thomas Gleixner <tg... | ```diff
diff --git a/kernel/sched.c b/kernel/sched.c
index 744bd5050f10..36484da963f9 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1657,7 +1657,7 @@ void sched_fork(struct task_struct *p, int clone_flags)
#ifdef CONFIG_SMP
cpu = sched_balance_self(cpu, SD_BALANCE_FORK);
#endif
- __set_task_cpu(p, cpu);
+ se... |
b8487b924177385e3932f846f430b73ce8e69bba | Analyze and fix the following issue in the Linux kernel code: sched: fix sign check error in place_entity() | Problem Details:
fix sign check error in place_entity() - we'd get excessive
latencies due to negatives being converted to large u64's.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> | ```diff
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 62a9ee8db13e..2bd9625fa62d 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -483,7 +483,7 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
if (sched_feat(NEW_FAIR_SLEEPERS))
vruntime -= sysctl_sched_late... |
8465e792e82c567b80358e38732164b770ed4b7f | Analyze and fix the following issue in the Linux kernel code: sched: entity_key() fix | Problem Details:
entity_key() fix - we'd occasionally end up with a 0 vruntime
in the !initial case.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> | ```diff
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 8ea4c9b3e411..926491f7f803 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -479,13 +479,16 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
if (initial && sched_feat(START_DEBIT))
vruntime += __sched_vsli... |
ddc972975091ba5f839bf24d0f9ef54fe90ee741 | Analyze and fix the following issue in the Linux kernel code: sched debug: check spread | Problem Details:
debug feature: check how well we schedule within a reasonable
vruntime 'spread' range. (note that CPU overload can increase
the spread, so this is not a hard condition, but normal loads
should be within the spread.)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra... | ```diff
diff --git a/kernel/sched.c b/kernel/sched.c
index fe1165b226a1..213294fdcd0f 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -250,6 +250,9 @@ struct cfs_rq {
* It is set to NULL otherwise (i.e when none are currently running).
*/
struct sched_entity *curr;
+
+ unsigned long nr_spread_over;
+
#ifde... |
d822cecedad88b69a7d68aa8d49e1f238aa320c7 | Analyze and fix the following issue in the Linux kernel code: sched debug: more width for parameter printouts | Problem Details:
more width for parameter printouts in /proc/sched_debug.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de> | ```diff
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index d79e1ec5b06a..b24f17de19e3 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -204,9 +204,9 @@ static int sched_debug_show(struct seq_file *m, void *v)
SEQ_printf(m, "now at %Lu.%06ld msecs\n", SPLIT_NS(now));
#define P(x) \
- SEQ_... |
1aa4731eff7dab7bd01747b46f654f449f1cfc2c | Analyze and fix the following issue in the Linux kernel code: sched debug: print settings | Problem Details:
print the current value of all tunables in /proc/sched_debug output.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de> | ```diff
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index b6d0a94d4120..d79e1ec5b06a 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -203,6 +203,19 @@ static int sched_debug_show(struct seq_file *m, void *v)
SEQ_printf(m, "now at %Lu.%06ld msecs\n", SPLIT_NS(now));
+#define P(x) \
+ S... |
fdd71d132badad542a9ab99ab4a9c3c08fa6412f | Analyze and fix the following issue in the Linux kernel code: sched debug: BKL usage statistics, fix | Problem Details:
build fix for the SCHED_DEBUG && !SCHEDSTATS case.
Signed-off-by: S.Ceglar Onur <caglar@pardus.org.tr>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de> | ```diff
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index 823b63a3a3e1..b6d0a94d4120 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -136,8 +136,10 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
SPLIT_NS(spread0));
SEQ_printf(m, " .%-30s: %ld\n", "nr_running... |
b8efb56172bc55082b8490778b07ef73eea0b551 | Analyze and fix the following issue in the Linux kernel code: sched debug: BKL usage statistics | Problem Details:
add per task and per rq BKL usage statistics.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de> | ```diff
diff --git a/include/linux/sched.h b/include/linux/sched.h
index d0cc58311b13..920eb7354d0a 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -621,6 +621,10 @@ struct sched_info {
/* timestamps */
unsigned long long last_arrival,/* when we last ran on a cpu */
last_queued; /* when we ... |
9b5b77512dce239fa168183fa71896712232e95a | Analyze and fix the following issue in the Linux kernel code: sched: clean up code under CONFIG_FAIR_GROUP_SCHED | Problem Details:
With the view of supporting user-id based fair scheduling (and not just
container-based fair scheduling), this patch renames several functions
and makes them independent of whether they are being used for container
or user-id based fair scheduling.
Also fix a problem reported by KAMEZAWA Hiroyuki (wrt... | ```diff
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 66169005f008..03c13b663e4b 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -136,6 +136,7 @@ extern unsigned long weighted_cpuload(const int cpu);
struct seq_file;
struct cfs_rq;
+struct task_grp;
#ifdef CONFIG_SCHED_DEBUG
e... |
545f3b18152355acbb8da59873506fcf66c7c60e | Analyze and fix the following issue in the Linux kernel code: sched: print nr_running and load in /proc/sched_debug | Problem Details:
- print nr_running and load information for cfs_rq in /proc/sched_debug
Signed-off-by: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Reviewed-by: Th... | ```diff
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index 4eaaf96559d6..3e47e870b043 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -134,6 +134,8 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
spread0 = min_vruntime - rq0_min_vruntime;
SEQ_printf(m, " .%-30s:... |
72ea22f8fbc893425faefa60641f45a4cdef2261 | Analyze and fix the following issue in the Linux kernel code: sched: fix minor bug in yield | Problem Details:
- fix a minor bug in yield (seen for CONFIG_FAIR_GROUP_SCHED),
group scheduling would skew when yield was called.
Signed-off-by: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijls... | ```diff
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 92563cd5af75..d8d2e2ff513d 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -725,7 +725,7 @@ static void dequeue_task_fair(struct rq *rq, struct task_struct *p, int sleep)
*/
static void yield_task_fair(struct rq *rq)
{
- struct cfs_r... |
c86da3a3d40f6e7a032edfaea191fb51e9626c8f | Analyze and fix the following issue in the Linux kernel code: sched: fix formatting of /proc/sched_debug | Problem Details:
fix formatting of /proc/sched_debug
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de> | ```diff
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index e2c1e0dfdf50..4eaaf96559d6 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -67,7 +67,7 @@ print_task(struct seq_file *m, struct rq *rq, struct task_struct *p)
(long long)(p->nvcsw + p->nivcsw),
p->prio);
#ifdef CONFIG_SCHEDSTA... |
ef83a5714d9a817b2e9b97f04a6d070fbd6ecf80 | Analyze and fix the following issue in the Linux kernel code: sched: enhance debug output | Problem Details:
enhance debug output by changing 12345678 nsecs to 12.345678 output,
this is more human-readable.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de> | ```diff
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index 22cf74c1dc03..e2c1e0dfdf50 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -28,6 +28,31 @@
printk(x); \
} while (0)
+/*
+ * Ease the printing of nsec fields:
+ */
+static long long nsec_high(long long nsec)
+{
+ if (nsec < 0... |
1a75b94f7bda591f4c53af86baa50e1eaee35927 | Analyze and fix the following issue in the Linux kernel code: sched: prettify /proc/sched_debug output | Problem Details:
print the correct amount of dashes in /proc/sched_debug.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de> | ```diff
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index bb34b8188f61..22cf74c1dc03 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -60,10 +60,8 @@ static void print_rq(struct seq_file *m, struct rq *rq, int rq_cpu)
"\nrunnable tasks:\n"
" task PID tree-key switche... |
75d4ef16a6aa84f708188bada182315f80aab6fa | Analyze and fix the following issue in the Linux kernel code: sched: fix delay accounting performance regression | Problem Details:
fix delay accounting performance regression - those sched_clock()
calls are not needed.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de> | ```diff
diff --git a/kernel/sched_stats.h b/kernel/sched_stats.h
index c20a94dda61e..1d9ec98c38de 100644
--- a/kernel/sched_stats.h
+++ b/kernel/sched_stats.h
@@ -129,7 +129,7 @@ rq_sched_info_depart(struct rq *rq, unsigned long long delta)
# define schedstat_set(var, val) do { } while (0)
#endif
-#if defined(CONFI... |
d02e5ed8d55e2a2b2735232ea1da40ffbf4c0932 | Analyze and fix the following issue in the Linux kernel code: sched: sched_setscheduler() fix | Problem Details:
Fix a problem in the 'sched-group' patch for !CONFIG_FAIR_GROUP_SCHED.
description:
sched_setscheduler()
{
...
if (task_running()) p->sched_class->put_prev_entity();
[ this one sets up cfs_rq->curr to NULL ]
...
if (task_running) p->sched_class->set_curr_task();
[ and this one is a _NOP_ (empty) ... | ```diff
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 12ab9338d563..144f3ef97380 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -984,6 +984,10 @@ static void set_curr_task_fair(struct rq *rq)
#else
static void set_curr_task_fair(struct rq *rq)
{
+ struct sched_entity *se = &rq->curr->se... |
119fe5e06800afc197781ebc8c2d8ca7d03497c8 | Analyze and fix the following issue in the Linux kernel code: sched: fix SMP migration latencies | Problem Details:
fix SMP migration latencies: the vruntimes of different CPUs are
at incompatible offsets so they have to be fixed up when migrating
a task across CPUs.
Signed-off-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Review... | ```diff
diff --git a/kernel/sched.c b/kernel/sched.c
index 0f0cf374c775..4ad789d268fe 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -992,6 +992,9 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu)
if (p->se.block_start)
p->se.block_start -= clock_offset;
#endif
+ if (likely(new_rq->cfs.min_vr... |
7a62eabc4d60980eb39fff659f168d903b55c6d7 | Analyze and fix the following issue in the Linux kernel code: sched: debug: update exec_clock only when SCHED_DEBUG | Problem Details:
micro-optimization: update cfs_rq->exec_clock only if
CONFIG_SCHED_DEBUG=y.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de> | ```diff
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 895fef74d99a..ce79eb0f0660 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -301,7 +301,7 @@ __update_curr(struct cfs_rq *cfs_rq, struct sched_entity *curr,
schedstat_set(curr->exec_max, max((u64)delta_exec, curr->exec_max));
curr->... |
9014623c0e3545be58a7f19f55793f6517bdc274 | Analyze and fix the following issue in the Linux kernel code: sched: handle vruntime 64-bit overflow | Problem Details:
Handle vruntime overflow by centering the key space around min_vruntime.
( otherwise we could overflow 64-bit vruntime in a few days with SCHED_IDLE
tasks - or in a few years with nice +19. )
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off... | ```diff
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 86e5e8c5d101..895fef74d99a 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -124,11 +124,18 @@ set_leftmost(struct cfs_rq *cfs_rq, struct rb_node *leftmost)
cfs_rq->rb_leftmost = leftmost;
if (leftmost) {
se = rb_entry(leftmost, st... |
67e12eac328b276dca7e61640632ed996ff1a93a | Analyze and fix the following issue in the Linux kernel code: sched: add se->vruntime debugging | Problem Details:
debug se->vruntime fields.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mike Galbraith <efault@gmx.de> | ```diff
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index 6b789dae7fdf..75ccf7aa98f3 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -44,7 +44,8 @@ print_task(struct seq_file *m, struct rq *rq, struct task_struct *p)
(long long)(p->nvcsw + p->nivcsw),
p->prio);
#ifdef CONFIG_SCHEDSTA... |
2bd8e6d422a4f44c0994f909317eba80b0fe08a1 | Analyze and fix the following issue in the Linux kernel code: sched: use constants if !CONFIG_SCHED_DEBUG | Problem Details:
use constants if !CONFIG_SCHED_DEBUG.
this speeds up the code and reduces code-size:
text data bss dec hex filename
27464 3014 16 30494 771e sched.o.before
26929 3010 20 29959 7507 sched.o.after
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-... | ```diff
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 9761b165d563..befca3f9364a 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1402,15 +1402,18 @@ static inline void idle_task_exit(void) {}
extern void sched_idle_next(void);
+#ifdef CONFIG_SCHED_DEBUG
extern unsigned int sy... |
eba1ed4b7e52720e3099325874811c38a5ec1562 | Analyze and fix the following issue in the Linux kernel code: sched: debug: track maximum 'slice' | Problem Details:
track the maximum amount of time a task has executed while
the CPU load was at least 2x. (i.e. at least two nice-0
tasks were runnable)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Reviewed-by: Thomas Gl... | ```diff
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 833f7dc2b8de..9761b165d563 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -921,6 +921,7 @@ struct sched_entity {
u64 block_start;
u64 block_max;
u64 exec_max;
+ u64 slice_max;
unsigned long wait_runtime_overru... |
a4b29ba2f72673aaa60ba11ced74d579771dd578 | Analyze and fix the following issue in the Linux kernel code: sched: small sched_debug cleanup | Problem Details:
small kernel/sched_debug.c cleanup - break up
multi-variable assignment.
no code changed:
text data bss dec hex filename
38869 3550 24 42443 a5cb sched.o.before
38869 3550 24 42443 a5cb sched.o.after
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-... | ```diff
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index c3ee38bd3426..94915f1fd9de 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -279,9 +279,13 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m)
void proc_sched_set_task(struct task_struct *p)
{
#ifdef CONFIG_SCHE... |
44142fac3446d08c08c5d717ec11d50a737e8640 | Analyze and fix the following issue in the Linux kernel code: sched: fix sysctl_sched_child_runs_first flag | Problem Details:
fix the sched_child_runs_first flag: always call into ->task_new()
if we are on the same CPU, as SCHED_OTHER tasks depend on it for
correct initial setup.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Rev... | ```diff
diff --git a/kernel/sched.c b/kernel/sched.c
index 6c10fa796ca0..2054e557d0d2 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1688,10 +1688,8 @@ void fastcall wake_up_new_task(struct task_struct *p, unsigned long clone_flags)
else
p->sched_class = &fair_sched_class;
- if (!p->sched_class->task_new |... |
ddc6d3b32a8a732c343dc225048fae06c129e48a | Analyze and fix the following issue in the Linux kernel code: [XFS] Fix build regression from mod/commit which did cleanup of xfs_bmbt_*set_allf | Problem Details:
In sgi mod# xfs-linux-melb:xfs-kern:29319a, the variable renaming was not
complete and variable 'b' was left unchanged for non-lbd 32 bit machines.
SGI-PV: 968563
SGI-Modid: xfs-linux-melb:xfs-kern:29469a
Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Signed-off-by: Tim Shimmin <t... | ```diff
diff --git a/fs/xfs/xfs_bmap_btree.c b/fs/xfs/xfs_bmap_btree.c
index 41092a2ea917..32b49ec00fb5 100644
--- a/fs/xfs/xfs_bmap_btree.c
+++ b/fs/xfs/xfs_bmap_btree.c
@@ -2309,7 +2309,7 @@ xfs_bmbt_set_allf(
((xfs_bmbt_rec_base_t)blockcount &
(xfs_bmbt_rec_base_t)XFS_MASK64LO(21));
#else /* !XFS_BIG_BLKNOS *... |
49ee6c911f0ae5b3a9a04e0589e3265e52f94f53 | Analyze and fix the following issue in the Linux kernel code: [XFS] Fix a potential NULL pointer deref in XFS on failed mount. | Problem Details:
If we fail to open the the log device buftarg, we can fall through to
error handling code that fails to check for a NULL log device buftarg
before calling xfs_free_buftarg().
This patch fixes the issue by checking mp->m_logdev_targp against NULL in
xfs_unmountfs_close() and doing the proper xfs_blkdev... | ```diff
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index cfe4de5def89..eef27f21f9ab 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -1262,7 +1262,7 @@ xfs_unmountfs(xfs_mount_t *mp, struct cred *cr)
void
xfs_unmountfs_close(xfs_mount_t *mp, struct cred *cr)
{
- if (mp->m_logdev_targp != mp->m_d... |
a6f64d4aea0d0c8483e910c7dd2d1ee48e42245c | Analyze and fix the following issue in the Linux kernel code: [XFS] split ondisk vs incore versions of xfs_bmbt_rec_t | Problem Details:
currently xfs_bmbt_rec_t is used both for ondisk extents as well as
host-endian ones. This patch adds a new xfs_bmbt_rec_host_t for the native
endian ones and cleans up the fallout. There have been various endianess
issues in the tracing / debug printf code that are fixed by this patch.
SGI-PV: 968563... | ```diff
diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c
index 6ff0f4de1630..9567d1846ee5 100644
--- a/fs/xfs/quota/xfs_qm.c
+++ b/fs/xfs/quota/xfs_qm.c
@@ -1717,7 +1717,6 @@ xfs_qm_get_rtblks(
xfs_extnum_t idx; /* extent record index */
xfs_ifork_t *ifp; /* inode fork pointer */
xfs_extnum_t nexten... |
54583bf4efda79388fc13163e35c016c8bc5de81 | Analyze and fix the following issue in the Linux kernel code: i915: fix vbl swap allocation size. | Problem Details:
Oops...
Signed-off-by: Dave Airlie <airlied@linux.ie> | ```diff
diff --git a/drivers/char/drm/i915_irq.c b/drivers/char/drm/i915_irq.c
index 380c3f387218..a443f4a202e3 100644
--- a/drivers/char/drm/i915_irq.c
+++ b/drivers/char/drm/i915_irq.c
@@ -540,7 +540,7 @@ int i915_vblank_swap(struct drm_device *dev, void *data,
return -EBUSY;
}
- vbl_swap = drm_calloc(1, sizeo... |
bdc3e603cda3433c2ccc2069d28f7f3cd319cfc6 | Analyze and fix the following issue in the Linux kernel code: fix use after free in amd create gatt pages | Problem Details:
Coverity spotted a "use after free" bug in
drivers/char/agp/amd-k7-agp.c::amd_create_gatt_pages().
The problem is this:
If "entry = kzalloc(sizeof(struct amd_page_map), GFP_KERNEL);"
fails, then there's a loop in the function to free all entries
allocated so far and break out of the allocation loop. ... | ```diff
diff --git a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c
index f60bca70d1fb..1405a42585e1 100644
--- a/drivers/char/agp/amd-k7-agp.c
+++ b/drivers/char/agp/amd-k7-agp.c
@@ -100,21 +100,16 @@ static int amd_create_gatt_pages(int nr_tables)
for (i = 0; i < nr_tables; i++) {
entry = kzallo... |
a2721e998ede079db10f65e4b42310f79dc8f135 | Analyze and fix the following issue in the Linux kernel code: AGP fix race condition between unmapping and freeing pages | Problem Details:
With Andi's clflush fixup, we were getting hangs on server exit, flushing the
mappings after freeing each page helped.
This showed up a race condition where the pages after being freed could be
reused before the agp mappings had been flushed. Flushing after each single
page is a bad thing for future ... | ```diff
diff --git a/drivers/char/agp/agp.h b/drivers/char/agp/agp.h
index 8955e7ff759a..b83824c41329 100644
--- a/drivers/char/agp/agp.h
+++ b/drivers/char/agp/agp.h
@@ -58,6 +58,9 @@ struct gatt_mask {
* devices this will probably be ignored */
};
+#define AGP_PAGE_DESTROY_UNMAP 1
+#define AGP_PAGE_DESTROY_FREE... |
23fd50450a34f2558070ceabb0bfebc1c9604af5 | Analyze and fix the following issue in the Linux kernel code: Fix compile while compiling drivers/mmc/host/mmc_spi.o with !BLOCK | Problem Details:
Make sure the mmc_spi driver can build without CONFIG_BLOCK.
Issue noted by "Avuton Olrich" <avuton@gmail.com> and randconfig.
While that won't be a common configuration, sometimes embedded
boards use SDIO to interface WLAN or Bluetooth chips (vs some
parallel interface), and don't provide an MMC/SD s... | ```diff
diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c
index f30327bba6f6..254b194e7625 100644
--- a/drivers/mmc/host/mmc_spi.c
+++ b/drivers/mmc/host/mmc_spi.c
@@ -26,7 +26,7 @@
*/
#include <linux/hrtimer.h>
#include <linux/delay.h>
-#include <linux/blkdev.h>
+#include <linux/bio.h>
#include... |
5c0d6b34d6ee11ff979cbdac9a59b47a74cb9f43 | Analyze and fix the following issue in the Linux kernel code: sky2: reboot fix | Problem Details:
The call to napi_disable() in the PCI shutdown handler is problematic,
and is aggravated by the new NAPI.
Also, make sure watchdog timer doesn't go off.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 68f728f0b600..7967240534d5 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -4396,7 +4396,7 @@ static void sky2_shutdown(struct pci_dev *pdev)
if (!hw)
return;
- napi_disable(&hw->napi);
+ del_timer_sync(&hw->watchdog_timer);
for (... |
89039b37be7c34194db0e72f956a5f02cfa30941 | Analyze and fix the following issue in the Linux kernel code: x86: force timer broadcast on late AMD C1E detection | Problem Details:
The 64bit SMP bootup is slightly different to the 32bit one. It enables
the boot CPU local APIC timer before all CPUs are brought up. Some AMD C1E
systems have the C1E feature flag only set in the secondary CPU. Due to
the early enable of the boot CPU local APIC timer the APIC timer is
registered as a ... | ```diff
diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c
index 395928de28ea..09b82093bc75 100644
--- a/arch/x86/kernel/apic_64.c
+++ b/arch/x86/kernel/apic_64.c
@@ -964,8 +964,34 @@ void __init setup_boot_APIC_clock (void)
setup_APIC_timer();
}
+/*
+ * AMD C1E enabled CPUs have a real nasty probl... |
b097976e8d6f6e6220161fa6b72b0798ce9f4f4c | Analyze and fix the following issue in the Linux kernel code: x86: fix missing include for vsyscall | Problem Details:
> Maybe I just picked a bad time to try, but...
>
> arch/x86/kernel/alternative.c: In function 'apply_alternatives':
> arch/x86/kernel/alternative.c:191: error: 'VSYSCALL_START' undeclared (first use in this function)
> arch/x86/kernel/alternative.c:191: error: (Each undeclared identifier is repor... | ```diff
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index bd72d94e713e..11b03d3c6fda 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -10,6 +10,7 @@
#include <asm/pgtable.h>
#include <asm/mce.h>
#include <asm/nmi.h>
+#include <asm/vsyscall.h>
#define... |
9a39e273d4df0560c724c5fe71f6314a0583ca2b | Analyze and fix the following issue in the Linux kernel code: kbuild: fix up CFLAGS usage | Problem Details:
Only in very rare cases is it needed to change CFLAGS
outside of arch/*/Makefile.
Fix up all wrong cases - in most cases
the use of EXTRA_CFLAGS is the only thing needed.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> | ```diff
diff --git a/arch/parisc/math-emu/Makefile b/arch/parisc/math-emu/Makefile
index affd4c80e3b7..1f3f225897f5 100644
--- a/arch/parisc/math-emu/Makefile
+++ b/arch/parisc/math-emu/Makefile
@@ -3,7 +3,7 @@
#
# See arch/parisc/math-emu/README
-CFLAGS += -Wno-parentheses -Wno-implicit-function-declaration \
+EXT... |
7441dd12e607651128e676866630a848b664d6e7 | Analyze and fix the following issue in the Linux kernel code: hisax: hfc_usb: update to current CVS version | Problem Details:
- killed paranoid NULL Pointer check
- human readable LED states
- support for "Eicon DIVA USB 4.0" (0x071d/0x1005)
Signed-off-by: Martin Bachem <info@colognechip.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/isdn/hisax/hfc_usb.c b/drivers/isdn/hisax/hfc_usb.c
index 60843b3f3b6f..98b0149bca68 100644
--- a/drivers/isdn/hisax/hfc_usb.c
+++ b/drivers/isdn/hisax/hfc_usb.c
@@ -1,7 +1,7 @@
/*
* hfc_usb.c
*
- * $Id: hfc_usb.c,v 2.3.2.20 2007/08/20 14:07:54 mbachem Exp $
+ * $Id: hfc_usb.c,v 2.3.2.... |
325a80715f6dba4b12479f8bb011d96093a47374 | Analyze and fix the following issue in the Linux kernel code: ipg: endianness fixes | Problem Details:
if your mask is host-endian, you should apply it after le64_to_cpu();
if it's little-endian - before. Doing both (for the same mask and
little-endian value) is broken.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/net/ipg.c b/drivers/net/ipg.c
index 59898ce54dcf..68887235d7e9 100644
--- a/drivers/net/ipg.c
+++ b/drivers/net/ipg.c
@@ -754,7 +754,7 @@ static int init_rfdlist(struct net_device *dev)
if (sp->RxBuff[i]) {
pci_unmap_single(sp->pdev,
- le64_to_cpu(rxfd->frag_info & ~IPG_RFI_FRAG... |
f53f4137baedc1be179880d35f390e20445428ba | Analyze and fix the following issue in the Linux kernel code: fix endianness bug in inet_lro | Problem Details:
all uses of and almost all assignments to lro_desc->tcp_ack assume that it's
net-endian; one converts net-endian to host-endian and sticks it in
lro_desc->tcp_ack.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/include/linux/inet_lro.h b/include/linux/inet_lro.h
index bb1c8773a1a1..1246d46abbc0 100644
--- a/include/linux/inet_lro.h
+++ b/include/linux/inet_lro.h
@@ -54,7 +54,7 @@ struct net_lro_desc {
__wsum data_csum;
__be32 tcp_rcv_tsecr;
__be32 tcp_rcv_tsval;
- u32 tcp_ack;
+ __be32 tcp_ack;
u... |
b4482a4b2e2ff5ed96d8d16d72e83e75064062c5 | Analyze and fix the following issue in the Linux kernel code: more trivial signedness fixes in drivers | Problem Details:
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/acpi/toshiba_acpi.c b/drivers/acpi/toshiba_acpi.c
index 13369b45563f..a736ef7bdee4 100644
--- a/drivers/acpi/toshiba_acpi.c
+++ b/drivers/acpi/toshiba_acpi.c
@@ -362,7 +362,7 @@ static unsigned long write_video(const char *buffer, unsigned long count)
int crt_out = -1;
int tv_out = -1;
... |
411223c01a51163e995dbc2679bf8e963a136a5f | Analyze and fix the following issue in the Linux kernel code: fix breakage in sctp getsockopt | Problem Details:
copy_to_user() into on-stack array
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 9c6a4b5f6264..bd6f42a15a4b 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -5058,6 +5058,7 @@ static int sctp_getsockopt_active_key(struct sock *sk, int len,
static int sctp_getsockopt_peer_auth_chunks(struct sock *sk, int len,
char __... |
a022fef5a2b19086b329d1cc64a5d78aa83e2908 | Analyze and fix the following issue in the Linux kernel code: hwmon: (vt8231) fix sparse warning | Problem Details:
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com> | ```diff
diff --git a/drivers/hwmon/vt8231.c b/drivers/hwmon/vt8231.c
index 8806302b5f30..2196a84603f5 100644
--- a/drivers/hwmon/vt8231.c
+++ b/drivers/hwmon/vt8231.c
@@ -676,7 +676,7 @@ static struct pci_driver vt8231_pci_driver = {
.probe = vt8231_pci_probe,
};
-int vt8231_probe(struct platform_device *pdev)
+s... |
5460a9d0ffc860a370631e096a8a6f3682f3fc94 | Analyze and fix the following issue in the Linux kernel code: hwmon: (sis5595) fix sparse warning | Problem Details:
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com> | ```diff
diff --git a/drivers/hwmon/sis5595.c b/drivers/hwmon/sis5595.c
index 79a5376a8d81..860b71ccbb86 100644
--- a/drivers/hwmon/sis5595.c
+++ b/drivers/hwmon/sis5595.c
@@ -739,11 +739,10 @@ static int __devinit sis5595_pci_probe(struct pci_dev *dev,
int *i;
for (i = blacklist; *i != 0; i++) {
- struct pci_dev... |
8f2376adfb57d95973b64ecdf016937f436b9bf0 | Analyze and fix the following issue in the Linux kernel code: [CIFS] Fix endian conversion problem in posix mkdir | Problem Details:
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com> | ```diff
diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES
index 13071faf8af7..70c90c07edf1 100644
--- a/fs/cifs/CHANGES
+++ b/fs/cifs/CHANGES
@@ -9,7 +9,8 @@ ability to mount to IPC$ share (which allows CIFS named pipes to be
opened, read and written as if they were files). When 1st tree
connect fails (e.g. due to sign... |
5dd80d5d096f58b7a83ae493a20bfc9d0de30226 | Analyze and fix the following issue in the Linux kernel code: mpc52xx-uart: fix compile warning (format type mismatch) | Problem Details:
Trivial compile warning fix
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index 035cca028199..ec36ad78d2fe 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -756,8 +756,8 @@ mpc52xx_console_setup(struct console *co, char *options)
if (port->membase == NULL)
return -EINVAL;
... |
80d4b4169e46949e1919d470ebc508cf4fbf0996 | Analyze and fix the following issue in the Linux kernel code: mpc52xx-ata: fix compile warning (unused variable) | Problem Details:
Trivial unused variable fix
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c
index 412140f02853..50c56e2814c1 100644
--- a/drivers/ata/pata_mpc52xx.c
+++ b/drivers/ata/pata_mpc52xx.c
@@ -308,7 +308,6 @@ mpc52xx_ata_init_one(struct device *dev, struct mpc52xx_ata_priv *priv,
struct ata_host *host;
struct ata_port *a... |
86a2249d69ff8bb9ecadb5830c2fcfdf10dc70b9 | Analyze and fix the following issue in the Linux kernel code: XilinxFB: typo bugfix | Problem Details:
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
index 6ef99b2d13ca..e38d3b7c3ad7 100644
--- a/drivers/video/xilinxfb.c
+++ b/drivers/video/xilinxfb.c
@@ -84,7 +84,7 @@ static struct xilinxfb_platform_data xilinx_fb_default_pdata = {
.xres = 640,
.yres = 480,
.xvirt = 1024,
- .yvirt = 480;... |
709d27c04f4eccbc99d57a5569bce028915a4345 | Analyze and fix the following issue in the Linux kernel code: HID: hidraw_connect() memleak fix | Problem Details:
It looks like hidraw_connect() is leaking memory in case of failure.
Also it should return -ENOMEM when kzalloc fails.
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ```diff
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c
index 20ebba1032b8..8503197a8131 100644
--- a/drivers/hid/hidraw.c
+++ b/drivers/hid/hidraw.c
@@ -282,7 +282,7 @@ EXPORT_SYMBOL_GPL(hidraw_report_event);
int hidraw_connect(struct hid_device *hid)
{
- int minor, result = -EINVAL;
+ int minor, result;
... |
a2e1b833d9e0231d67e722b7e2f4d79daf919baf | Analyze and fix the following issue in the Linux kernel code: [MTD] fix mtdconcat for subpage-write NAND | Problem Details:
This allows the mtdconcat driver to work with NAND flash devices that
support sub-page writes.
Signed-off-by: Chris Paulson-Ellis <chris@edesix.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org> | ```diff
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c
index 96be7ef62f35..d563dcd4b264 100644
--- a/drivers/mtd/mtdconcat.c
+++ b/drivers/mtd/mtdconcat.c
@@ -726,6 +726,7 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to c
concat->mtd.size = subdev[0]->size;
concat->... |
3cd3a86b6fdcb80ad097850a0990bcf6251422fe | Analyze and fix the following issue in the Linux kernel code: [MTD] [OneNAND] Avoid deadlock in erase callback; release chip lock first. | Problem Details:
When the erase callback performs some other action on the flash, it's
highly likely to deadlock unless we actually release the chip lock
before calling it.
This patch mirrors that same change already done for NAND.
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: David Woodho... | ```diff
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index a8c426bf47a4..dd2835569092 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -1711,13 +1711,14 @@ static int onenand_erase(struct mtd_info *mtd, struct erase_info *instr)
erase_e... |
08f06177f4089abeba904cc12a2a50cffa9ffce6 | Analyze and fix the following issue in the Linux kernel code: USBHID: report descriptor fix for MacBook JIS keyboard | Problem Details:
This patch fixes the problem, that Japanese MacBook doesn't recognize some keys
like '\'(yen, or backslash), '|'(pipe), and '_'(underscore).
It is due to that MacBook JIS keyboard (jp106) sends wrong report descriptor.
It saids "logical maximum = 0x65", so Keyboard.0089 is mapped to Key.Unknown,
while... | ```diff
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
index 91abac6a30cd..a0d6f081ee5c 100644
--- a/drivers/hid/usbhid/hid-quirks.c
+++ b/drivers/hid/usbhid/hid-quirks.c
@@ -624,6 +624,8 @@ static const struct hid_rdesc_blacklist {
{ USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_S510_RECEIVER... |
0ce1ac3b3ca0f44682aed210ba6062bafc2e32fa | Analyze and fix the following issue in the Linux kernel code: HID: trivial fixes in hid-debug | Problem Details:
- added KERN_DEBUG to output lines
- fixed preffered -> preferred typo
- added const to char *'s
Also, exported symbol hid_resolv_event is unused by the current
kernel tree and perhaps should be removed.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ```diff
diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
index 27e4cf003834..5da9f676b4cf 100644
--- a/drivers/hid/hid-debug.c
+++ b/drivers/hid/hid-debug.c
@@ -34,7 +34,7 @@
struct hid_usage_entry {
unsigned page;
unsigned usage;
- char *description;
+ const char *description;
};
stati... |
f14d5d206cf84357a7072ddb2bbc7d3454639f11 | Analyze and fix the following issue in the Linux kernel code: HID: fix input mapping for Microsoft Ergonomic Keyboard | Problem Details:
Special keys 1-5 on Microsoft Ergonomic Keyboard were mistakenly
mapped to buttons, which doesn't make a lot of sense. Fix this
mapping to KEY_F{13,18}.
Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ```diff
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index bd5a29fe85fc..8be28d205d6d 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -762,12 +762,12 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
switch(usage->hid & HID_USAGE) {
ca... |
82eb121989c06e3de33b56ade1fa52c9e86c014e | Analyze and fix the following issue in the Linux kernel code: HID: ignore all non-LED usages in output fields in hid-input | Problem Details:
We have to ignore all non-LED usages in output fields if the
report descriptor of the device specifies any. If we don't do
so, the devices which contain the same usages both in input and
output reports with different parameters will mess things up. In
hid-input, we currently care only for the input usa... | ```diff
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index de8dbec6aae5..f80b57142cd4 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -355,6 +355,13 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
if (field->flags & HID_MAIN_ITEM_CONSTANT)
... |
77b296629d6e938e68de40195a9d500f209f6d10 | Analyze and fix the following issue in the Linux kernel code: HID: fix whitespace damage | Problem Details:
Fixes some trivial whitespace damage in hid-input.c
Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ```diff
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 00f326012a31..de8dbec6aae5 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -299,7 +299,7 @@ static int hidinput_getkeycode(struct input_dev *dev, int scancode,
{
struct hid_device *hid = dev->private;
struct hid_usag... |
cc5f4f28755b3b152297fd7bc3e03781dd8008e2 | Analyze and fix the following issue in the Linux kernel code: UBI: return correct error code | Problem Details:
Fix the following warning:
drivers/mtd/ubi/eba.c: In function 'ubi_eba_init_scan':
drivers/mtd/ubi/eba.c:1116: warning: 'err' may be used uninitialized in this function
Pointed-to-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | ```diff
diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c
index 7b7add6da12f..1297732f4db9 100644
--- a/drivers/mtd/ubi/eba.c
+++ b/drivers/mtd/ubi/eba.c
@@ -1188,6 +1188,7 @@ int ubi_eba_init_scan(struct ubi_device *ubi, struct ubi_scan_info *si)
if (ubi->avail_pebs < EBA_RESERVED_PEBS) {
ubi_err("no eno... |
e8823bd63d50bb1f9bd73f1197230e1f7217456a | Analyze and fix the following issue in the Linux kernel code: UBI: fix atomic LEB change problems | Problem Details:
When the UBI device is nearly full, i.e. all LEBs are mapped, we have
only one spare LEB left - the one we reserved for WL purposes. Well,
I do not count the LEBs which were reserved for bad PEB handling -
suppose NOR flash for simplicity. If an "atomic LEB change operation"
is run, and the WL unit is ... | ```diff
diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c
index 81bb6a33b555..7b7add6da12f 100644
--- a/drivers/mtd/ubi/eba.c
+++ b/drivers/mtd/ubi/eba.c
@@ -46,6 +46,9 @@
#include <linux/err.h>
#include "ubi.h"
+/* Number of physical eraseblocks reserved for atomic LEB change operation */
+#define EBA_RES... |
e88d6e10e5c848fd5be8f89e09e3bce2570886b7 | Analyze and fix the following issue in the Linux kernel code: UBI: do not use vmalloc on I/O path | Problem Details:
Similar reason as in case of the previous patch: it causes
deadlocks if a filesystem with writeback support works on top
of UBI. So pre-allocate needed buffers when attaching MTD device.
We also need mutexes to protect the buffers, but they do not
cause much contantion because they are used in recovery... | ```diff
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 1cb22bfae750..023653977a1a 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -565,7 +565,7 @@ static int attach_mtd_dev(const char *mtd_dev, int vid_hdr_offset,
}
ubi = ubi_devices[ubi_devices_cnt] = kzalloc(sizeof(s... |
33818bbb84cd371b63ed8849cc5264d24c8b3aa2 | Analyze and fix the following issue in the Linux kernel code: UBI: allocate memory with GFP_NOFS | Problem Details:
Use GFP_NOFS flag when allocating memory on I/O path, because otherwise
we may deadlock the filesystem which works on top of us. We observed
the deadlocks with UBIFS. Example:
VFS->FS lock a lock->UBI->kmalloc()->VFS writeback->FS locks the same
lock again.
Signed-off-by: Artem Bityutskiy <Artem.Bity... | ```diff
diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c
index 7c5e29eaf118..89193104c6c8 100644
--- a/drivers/mtd/ubi/eba.c
+++ b/drivers/mtd/ubi/eba.c
@@ -157,7 +157,7 @@ static struct ltree_entry *ltree_add_entry(struct ubi_device *ubi, int vol_id,
{
struct ltree_entry *le, *le1, *le_free;
- le = kmem... |
8bc22961966b845aa5f965be30771902146c2fcc | Analyze and fix the following issue in the Linux kernel code: UBI: fix sparse warnings | Problem Details:
Fix "symbol shadows an earlier one" warnings. Although they are harmless
but it does not hurt to fix them and make sparse happy.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | ```diff
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c
index 80c73d88c83f..18c347b24e27 100644
--- a/drivers/mtd/ubi/scan.c
+++ b/drivers/mtd/ubi/scan.c
@@ -266,7 +266,7 @@ static int compare_lebs(const struct ubi_device *ubi,
void *buf;
int len, err, second_is_newer, bitflips = 0, corrupted = 0;
ui... |
dcec4c3bdc4d5f4bd2d858ee1ce11e3424cbaed7 | Analyze and fix the following issue in the Linux kernel code: UBI: fix leak in ubi_scan_erase_peb | Problem Details:
Coverity (1769) found the following problem: if the erase counter
overflow check triggers, ec_hdr is leaked.
Moving the allocation after the overflow check should take care of it.
Signed-off-by: Florin Malita <fmalita@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | ```diff
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c
index 94ee54934411..80c73d88c83f 100644
--- a/drivers/mtd/ubi/scan.c
+++ b/drivers/mtd/ubi/scan.c
@@ -673,10 +673,6 @@ int ubi_scan_erase_peb(const struct ubi_device *ubi,
int err;
struct ubi_ec_hdr *ec_hdr;
- ec_hdr = kzalloc(ubi->ec_hdr_alsize... |
d060db63fd38a8a75f666576ef9999c28cdc31cf | Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix register usage in xor_raid_4(). | Problem Details:
Some typos led to using %i6/%i7 instead of %l6/%l7 in loads which is
really really bad because those are the frame pointer and return PC.
Based upon a raid5 crash report by Bertrand Joel.
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/arch/sparc64/lib/xor.S b/arch/sparc64/lib/xor.S
index a79c8888170d..f44f58f40234 100644
--- a/arch/sparc64/lib/xor.S
+++ b/arch/sparc64/lib/xor.S
@@ -491,12 +491,12 @@ xor_niagara_4: /* %o0=bytes, %o1=dest, %o2=src1, %o3=src2, %o4=src3 */
ldda [%i1 + 0x10] %asi, %i2 /* %i2/%i3 = src1 + 0x10 */
... |
7379b42b607782695f49d05c80d3eb99e5072908 | Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix bugs in SYSV IPC handling in 64-bit processes. | Problem Details:
Thanks to Tom Callaway for the excellent bug report and
test case.
sys_ipc() has several problems, most to due with semaphore
call handling:
1) 'err' return should be a 'long'
2) "union semun" is passed in a register on 64-bit compared
to 32-bit which provides it on the stack and therefore
by r... | ```diff
diff --git a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c
index d108eeb0734f..0d5c50264945 100644
--- a/arch/sparc64/kernel/sys_sparc.c
+++ b/arch/sparc64/kernel/sys_sparc.c
@@ -436,7 +436,7 @@ out:
asmlinkage long sys_ipc(unsigned int call, int first, unsigned long second,
unsigned lo... |
e8dd16129fad13e5b8b05b6a0a02d10d06f30301 | Analyze and fix the following issue in the Linux kernel code: [SPARC32]: Add irqflags.h to sparc32 and use it from generic code. | Problem Details:
Added asm-sparc/irqflags.h and moved irq related code from system.h to it.
Renamed local_irq functions to raw_local_irq in irq.c.
Modified system.h to include linux/irqflags.h which includes asm/irqflags.h.
Added TRACE_IRQFLAGS_SUPPORT to Kconfig.debug.
This is the first step in adding IRQ-flags state... | ```diff
diff --git a/arch/sparc/Kconfig.debug b/arch/sparc/Kconfig.debug
index 120f6b529348..87dd496f15eb 100644
--- a/arch/sparc/Kconfig.debug
+++ b/arch/sparc/Kconfig.debug
@@ -1,5 +1,9 @@
menu "Kernel hacking"
+config TRACE_IRQFLAGS_SUPPORT
+ bool
+ default y
+
source "lib/Kconfig.debug"
config DEBUG_STACK_US... |
f9c97e5d7cd9ff5e51e16d5db08d7e54fa4cb6bb | Analyze and fix the following issue in the Linux kernel code: [FFB]: source cleanup | Problem Details:
This patch cleans up the driver a bit. It contains
coding style fixes (pointed by Lindent and checkpatch)
and white space clean ups.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/video/ffb.c b/drivers/video/ffb.c
index 4b520b573911..d7e24889650e 100644
--- a/drivers/video/ffb.c
+++ b/drivers/video/ffb.c
@@ -171,17 +171,17 @@ static struct fb_ops ffb_ops = {
#define FFB_PPC_CS_VAR 0x000002
#define FFB_PPC_CS_CONST 0x000003
-#define FFB_ROP_NEW 0... |
a140e94d92f82db7406e116b63e78bd024907657 | Analyze and fix the following issue in the Linux kernel code: [CG6]: accelerated copyarea | Problem Details:
This patch adds accelerated copyarea and sets READS_FAST flag.
This doubles scrolling speed on SparcStation20 85MHz.
It also fixes a comment in cg6_fillrect function.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/video/cg6.c b/drivers/video/cg6.c
index 137e475bbd92..549891d76ef5 100644
--- a/drivers/video/cg6.c
+++ b/drivers/video/cg6.c
@@ -37,6 +37,7 @@ static void cg6_fillrect(struct fb_info *, const struct fb_fillrect *);
static int cg6_sync(struct fb_info *);
static int cg6_mmap(struct fb_info... |
4735b37cf434175c2b7b36b3b68f1e60e8ec8527 | Analyze and fix the following issue in the Linux kernel code: Fix ohci-ssb with !CONFIG_PM | Problem Details:
ohci_bus_{suspend,resume} exists only if we have CONFIG_PM; do the same
thing as other subdrivers...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/usb/host/ohci-ssb.c b/drivers/usb/host/ohci-ssb.c
index bc3e785d8c00..fe70e72340de 100644
--- a/drivers/usb/host/ohci-ssb.c
+++ b/drivers/usb/host/ohci-ssb.c
@@ -117,8 +117,10 @@ static const struct hc_driver ssb_ohci_hc_driver = {
.hub_status_data = ohci_hub_status_data,
.hub_control ... |
d58df9cd788e6fb4962e1c8d5ba7b8b95d639a44 | Analyze and fix the following issue in the Linux kernel code: hwmon: (w83627hf) don't assume bank 0 | Problem Details:
The bank switching code assumes that the bank selector is set to 0
when the driver is loaded. This might not be the case. This is exactly
the same bug as was fixed in the w83627ehf driver two months ago:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0956895aa6f8dc6a3321096... | ```diff
diff --git a/drivers/hwmon/w83627hf.c b/drivers/hwmon/w83627hf.c
index 2169d8c8bbe4..20ae425a1980 100644
--- a/drivers/hwmon/w83627hf.c
+++ b/drivers/hwmon/w83627hf.c
@@ -1319,6 +1319,24 @@ static int __devexit w83627hf_remove(struct platform_device *pdev)
}
+/* Registers 0x50-0x5f are banked */
+static in... |
14358e6ddaed27499d7d366b3e65c3e46b39e1c4 | Analyze and fix the following issue in the Linux kernel code: lockdep: annotate dir vs file i_mutex | Problem Details:
On Mon, 2007-09-24 at 22:13 -0400, Steven Rostedt wrote:
> The circular lock seems to be this:
>
> #1:
>
> sys_mmap2: down_write(&mm->mmap_sem);
> nfs_revalidate_mapping: mutex_lock(&inode->i_mutex);
>
>
> #0:
>
> vfs_readdir: mutex_lock(&inode->i_mutex);
> - during the r... | ```diff
diff --git a/fs/inode.c b/fs/inode.c
index bf6adf122c68..f97de0aeb3b6 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -567,6 +567,18 @@ EXPORT_SYMBOL(new_inode);
void unlock_new_inode(struct inode *inode)
{
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+ struct file_system_type *type = inode->i_sb->s_type;
+ /*
+ * ensure n... |
a202707e71ff16d5e3a92f40eeaa41f3099dd8c5 | Analyze and fix the following issue in the Linux kernel code: i2c-au1550: Fix a misused register problem | Problem Details:
Fix a "mis-used register" problem on the AMD MIPS Alchemy au1550
I2C interface.
In summary, the programmable serial controller seems to hang the kernel
when I send a single 'address' byte on the I2C bus. The patch
essentially uses the PSC_SMBSTAT register's TE (transmit FIFO empty)
bit to check when ... | ```diff
diff --git a/drivers/i2c/busses/i2c-au1550.c b/drivers/i2c/busses/i2c-au1550.c
index d7e7c359fc36..2f684166c43d 100644
--- a/drivers/i2c/busses/i2c-au1550.c
+++ b/drivers/i2c/busses/i2c-au1550.c
@@ -48,17 +48,14 @@ wait_xfer_done(struct i2c_au1550_data *adap)
sp = (volatile psc_smb_t *)(adap->psc_base);
-... |
b027cacdabc3ffe2d2b97a55375203add64a5d29 | Analyze and fix the following issue in the Linux kernel code: mlx4_core: Fix infinite loop on device initialization | Problem Details:
Commit 3d73c288 ("mlx4_core: Fix section mismatches") introduced a
stupid bug in device init: when some of mlx4_init_one() was split off
into __mlx4_init_one(), the call from the main mlx4_init_one()
function was back to mlx4_init_one() rather than to __mlx4_init_one(),
which leads to an obvious infini... | ```diff
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c
index e029b8afbd37..89b3f0b7cdc0 100644
--- a/drivers/net/mlx4/main.c
+++ b/drivers/net/mlx4/main.c
@@ -884,7 +884,7 @@ static int __devinit mlx4_init_one(struct pci_dev *pdev,
++mlx4_version_printed;
}
- return mlx4_init_one(pdev, id);
+ ret... |
8d8fe64237646fdd2c2de2722ec4189a5999119d | Analyze and fix the following issue in the Linux kernel code: JFS: Bio cleanup: Replace missing return statements | Problem Details:
commit e30408b2a99cb7b8bf529c7dc2328a19d71894cf ("JFS: fix bio-related
build breakage") removed some "return 0;" statements, rather than
changing them to null returns.
Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
... | ```diff
diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c
index ccfd02944053..15a3974cdeeb 100644
--- a/fs/jfs/jfs_logmgr.c
+++ b/fs/jfs/jfs_logmgr.c
@@ -2234,6 +2234,8 @@ static void lbmIODone(struct bio *bio, int error)
/* wakeup I/O initiator */
LCACHE_WAKEUP(&bp->l_ioevent);
+
+ return;
}
/*
@@ ... |
835c34a1687f524c37d4fb8bad18d642c74bed8d | Analyze and fix the following issue in the Linux kernel code: Delete filenames in comments. | Problem Details:
Since the x86 merge, lots of files that referenced their own filenames
are no longer correct. Rather than keep them up to date, just delete
them, as they add no real value.
Additionally:
- fix up comment formatting in scx200_32.c
- Remove a credit from myself in setup_64.c from a time when we had no ... | ```diff
diff --git a/arch/x86/kernel/bugs_64.c b/arch/x86/kernel/bugs_64.c
index 4e5e9d364d63..9a189cef6404 100644
--- a/arch/x86/kernel/bugs_64.c
+++ b/arch/x86/kernel/bugs_64.c
@@ -1,6 +1,4 @@
/*
- * arch/x86_64/kernel/bugs.c
- *
* Copyright (C) 1994 Linus Torvalds
* Copyright (C) 2000 SuSE
*/
diff --git ... |
23ec23c2d3496d1cdf74f73d60ab1051405ca774 | Analyze and fix the following issue in the Linux kernel code: fix sparc32 breakage (result of vmlinux.lds.S bug) | Problem Details:
In commit 4665079cbb2a3e17de82f2ab2940b9f97f37d65e ("[NETNS]: Move some
code into __init section when CONFIG_NET_NS=n") we got a new section -
.exit.text.refok (more of 'let's tell modpost that some bogus calls are
not bogus', a-la text.init.refok).
Unfortunately, the commit in question forgot to add ... | ```diff
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 0240e0506a07..5615440027ec 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -153,7 +153,8 @@
#define TEXT_TEXT \
ALIGN_FUNCTION(); \
*(.text) \
- *(.text.init.... |
2b8232ce512105e28453f301d1510de8363bccd1 | Analyze and fix the following issue in the Linux kernel code: minimal build fixes for uml (fallout from x86 merge) | Problem Details:
a) include/asm-um/arch can't just point to include/asm-$(SUBARCH) now
b) arch/{i386,x86_64}/crypto are merged now
c) subarch-obj needed changes
d) cpufeature_64.h should pull "cpufeature_32.h", not <asm/cpufeature_32.h>
since it can be included from asm-um/cpufeature.h
e) in case of uml-i386 we... | ```diff
diff --git a/arch/um/Makefile b/arch/um/Makefile
index 989224f21346..0666729eb976 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -176,9 +176,9 @@ include/asm-um/arch:
@echo ' SYMLINK $@'
ifneq ($(KBUILD_SRC),)
$(Q)mkdir -p $(objtree)/include/asm-um
- $(Q)ln -fsn $(srctree)/include/asm-$(SUBARCH) ... |
c4ea43c552ecc9ccc564e11e70d397dbdf09484b | Analyze and fix the following issue in the Linux kernel code: net core: fix kernel-doc for new function parameters | Problem Details:
Fix networking code kernel-doc for newly added parameters.
Warning(linux-2.6.23-git2//net/core/sock.c:879): No description found for parameter 'net'
Warning(linux-2.6.23-git2//net/core/dev.c:570): No description found for parameter 'net'
Warning(linux-2.6.23-git2//net/core/dev.c:594): No description f... | ```diff
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 5a11f889e56a..39dd83b183a9 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1294,6 +1294,7 @@ static inline void netif_rx_complete(struct net_device *dev,
/**
* netif_tx_lock - grab network device transmit lock... |
22e67bb6c1554dc804ee44569f43b2e9c8e591e7 | Analyze and fix the following issue in the Linux kernel code: docbook/mcabook: fixup x86 path/file names | Problem Details:
Fix docbook templates for new x86 path/filenames:
docproc: linux-2.6.23-git2/include/asm-i386/mca_dma.h: No such file or directory
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/Documentation/DocBook/mcabook.tmpl b/Documentation/DocBook/mcabook.tmpl
index 42a760cd7467..529a53dc1389 100644
--- a/Documentation/DocBook/mcabook.tmpl
+++ b/Documentation/DocBook/mcabook.tmpl
@@ -101,7 +101,7 @@
<chapter id="dmafunctions">
<title>DMA Functions Provided</title>
-!Iinclu... |
f3cf31ad1f287d7705593fdc3628ee5e45e56592 | Analyze and fix the following issue in the Linux kernel code: docbook/kernel-api: fixup x86 path/file names | Problem Details:
Fix docbook templates for new x86 path/filenames.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl
index e5da4f2b7c22..230cbf753782 100644
--- a/Documentation/DocBook/kernel-api.tmpl
+++ b/Documentation/DocBook/kernel-api.tmpl
@@ -45,8 +45,8 @@
</sect1>
<sect1><title>Atomic and pointer manipulation</title... |
34ca81026eee69224c8707c7877a343dff96db62 | Analyze and fix the following issue in the Linux kernel code: docbook/kernel-hacking: fixup x86 path/file names | Problem Details:
Fix docbook templates for modified x86 path/filenames.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/Documentation/DocBook/kernel-hacking.tmpl b/Documentation/DocBook/kernel-hacking.tmpl
index 582032eea872..4c63e5864160 100644
--- a/Documentation/DocBook/kernel-hacking.tmpl
+++ b/Documentation/DocBook/kernel-hacking.tmpl
@@ -1239,7 +1239,7 @@ static struct block_device_operations opt_fops = {
<... |
08d7b5ac29f76ccd21f5f692cb1a34d08c37ab59 | Analyze and fix the following issue in the Linux kernel code: docbook/deviceiobook: fixup x86 path/file names | Problem Details:
Fix docbook templates for new x86 path/filenames:
docproc: linux-2.6.23-git2/include/asm-i386/io.h: No such file or directory
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/Documentation/DocBook/deviceiobook.tmpl b/Documentation/DocBook/deviceiobook.tmpl
index c917de681ccd..361c884d860d 100644
--- a/Documentation/DocBook/deviceiobook.tmpl
+++ b/Documentation/DocBook/deviceiobook.tmpl
@@ -316,7 +316,7 @@ CPU B: spin_unlock_irqrestore(&dev_lock, flags)
<chapte... |
c09c5184a26158da32801e89d5849d774605f0dd | Analyze and fix the following issue in the Linux kernel code: hwmon: (w83627hf) Fix setting fan min right after driver load | Problem Details:
We need to read the fan clock dividers at initialization time,
otherwise the code in store_fan_min() may use uninitialized values.
That's pretty much the same bug and same fix as for the w83627ehf
driver last month.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoff... | ```diff
diff --git a/drivers/hwmon/w83627hf.c b/drivers/hwmon/w83627hf.c
index 996fc1ca3227..2169d8c8bbe4 100644
--- a/drivers/hwmon/w83627hf.c
+++ b/drivers/hwmon/w83627hf.c
@@ -389,6 +389,7 @@ static int __devexit w83627hf_remove(struct platform_device *pdev);
static int w83627hf_read_value(struct w83627hf_data *d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.