id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
d1e12de804f9d8ad114786ca7c2ce593cba79891
Analyze and fix the following issue in the Linux kernel code: [SCSI] ses: Avoid kernel panic when lun 0 is not mapped
Problem Details: During device discovery, scsi mid layer sends INQUIRY command to LUN 0. If the LUN 0 is not mapped to host, it creates a temporary scsi_device with LUN id 0 and sends REPORT_LUNS command to it. After the REPORT_LUNS succeeds, it walks through the LUN table and adds each LUN found to sysfs. At the end o...
```diff diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index f171c65dc5a8..2d3ec5094685 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -462,7 +462,7 @@ static inline int scsi_device_qas(struct scsi_device *sdev) } static inline int scsi_device_enclosure(struct scsi_d...
877a55979c189c590e819a61cbbe2b7947875f17
Analyze and fix the following issue in the Linux kernel code: [SCSI] ses: show devices for enclosures with no page 7
Problem Details: enclosure page 7 gives us the "pretty" names of the enclosure slots. Without a page 7, we can still use the enclosure code as long as we make up numeric names for the slots. Unfortunately, the current code fails to add any devices because the check for page 10 is in the wrong place if we have no page 7...
```diff diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c index 7f5a6a86f820..3b00e907b917 100644 --- a/drivers/scsi/ses.c +++ b/drivers/scsi/ses.c @@ -390,9 +390,9 @@ static void ses_enclosure_data_process(struct enclosure_device *edev, len = (desc_ptr[2] << 8) + desc_ptr[3]; /* skip past overall descriptor *...
68cacd29167b1926d237bd1b153aa2a990201729
Analyze and fix the following issue in the Linux kernel code: perf_events: Fix stale ->cgrp pointer in update_cgrp_time_from_cpuctx()
Problem Details: This patch solves a stale pointer problem in update_cgrp_time_from_cpuctx(). The cpuctx->cgrp was not cleared on all possible event exit paths, including: close() perf_release() perf_release_kernel() list_del_event() This patch fixes list_del_event() to clear cpuctx->cgrp when...
```diff diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index f495c0147240..311b4dc785a1 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -938,9 +938,7 @@ struct perf_cpu_context { struct list_head rotation_list; int jiffies_interval; struct pmu *active_pmu; -...
2130781e2aaab66e5a9f2fdc8af35da0153f405c
Analyze and fix the following issue in the Linux kernel code: sys_swapon: fix inode locking
Problem Details: A conflict between 52c50567d8ab ("mm: swap: unlock swapfile inode mutex before closing file on bad swapfiles") and 83ef99befc32 ("sys_swapon: remove did_down variable") caused a double unlock of the inode mutex (once in bad_swap: before the filp_close, once at the end just before returning). The patch...
```diff diff --git a/mm/swapfile.c b/mm/swapfile.c index aafcf3611b31..71b42ec55b78 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -2088,7 +2088,6 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags) p->swap_file = swap_file; mapping = swap_file->f_mapping; - inode = mapping->host; ...
04948c7f80b9446009c1c4791bb93e79729724fb
Analyze and fix the following issue in the Linux kernel code: smp: add missing init.h include
Problem Details: Commit 34db18a054c6 ("smp: move smp setup functions to kernel/smp.c") causes this build error on s390 because of a missing init.h include: CC arch/s390/kernel/asm-offsets.s In file included from /home2/heicarst/linux-2.6/arch/s390/include/asm/spinlock.h:14:0, from include/linux/spinlock.h:8...
```diff diff --git a/include/linux/smp.h b/include/linux/smp.h index 48159dd320d0..74243c86ba39 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h @@ -10,6 +10,7 @@ #include <linux/types.h> #include <linux/list.h> #include <linux/cpumask.h> +#include <linux/init.h> extern void cpu_idle(void); ```
5d18724588a4f632e836357a43b33bf4b538af82
Analyze and fix the following issue in the Linux kernel code: ARM: mxc: fix buggy '.end' of IORESOURCE_MEM in device codes
Problem Details: Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
```diff diff --git a/arch/arm/plat-mxc/devices/platform-fec.c b/arch/arm/plat-mxc/devices/platform-fec.c index 6561c9df5f0d..ccc789e21daa 100644 --- a/arch/arm/plat-mxc/devices/platform-fec.c +++ b/arch/arm/plat-mxc/devices/platform-fec.c @@ -53,7 +53,7 @@ struct platform_device *__init imx_add_fec( struct resource r...
5658bff6c2c4a07fb25195eac70205934b8f5a0d
Analyze and fix the following issue in the Linux kernel code: ARM: imx: let MACH_IMX27_VISSTRIM_M10 select IMX_HAVE_PLATFORM_IMX_SSI
Problem Details: mach-imx27_visstrim_m10.c uses imx27_add_imx_ssi() so it needs to select IMX_HAVE_PLATFORM_IMX_SSI to fix: arch/arm/mach-imx/built-in.o: In function `visstrim_m10_board_init': mach-imx27_visstrim_m10.c:(.init.text+0x308): undefined reference to `imx_add_imx_ssi' mach-imx27_visstrim_m10.c:(.init.tex...
```diff diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 5eec099e0c72..56b930a13443 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -255,6 +255,7 @@ config MACH_IMX27_VISSTRIM_M10 bool "Vista Silicon i.MX27 Visstrim_m10" select SOC_IMX27 select IMX_HAVE_PLATFORM_I...
bd23a539d0733c9f9ec3f9fc628491fad2658e82
Analyze and fix the following issue in the Linux kernel code: fix leaks in path_lookupat()
Problem Details: Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/fs/namei.c b/fs/namei.c index 5a9a6c3094da..a4dfac650c3c 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1644,13 +1644,16 @@ static int path_lookupat(int dfd, const char *name, err = -ECHILD; } - if (!err) + if (!err) { err = handle_reval_path(nd); + if (err) + path_put(&nd->path); + } ...
fb7f045ace0624f1e59a7db8497e460bd54b1cbc
Analyze and fix the following issue in the Linux kernel code: sh: Fix ptrace hw_breakpoint handling
Problem Details: Since commit 34d0b5af50a063cded842716633501b38ff815fb it is no longer possible to debug an application using singlestep. The old commit converted singlestep handling via ptrace to hw_breakpoints. The hw_breakpoint is disabled when an event is triggered and not re-enabled again. This patch re-enables th...
```diff diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c index b53664ef53e8..2130ca674e9b 100644 --- a/arch/sh/kernel/ptrace_32.c +++ b/arch/sh/kernel/ptrace_32.c @@ -101,6 +101,8 @@ static int set_single_step(struct task_struct *tsk, unsigned long addr) attr = bp->attr; attr.bp_addr = addr;...
c49b6ecf0870e78fa40497cd8b142915c1d5c7c9
Analyze and fix the following issue in the Linux kernel code: sh: Fix ptrace fpu state initialisation
Problem Details: Commit 0ea820cf introduced the PTRACE_GETFPREGS/SETFPREGS cmds, but gdb-server still accesses the FPU state using the PTRACE_PEEKUSR/POKEUSR commands. In this case, xstate was not initialised. Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com> Cc: stable@kernel.org Signed-off-by: Paul Mundt <let...
```diff diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c index 90a15d29feeb..b53664ef53e8 100644 --- a/arch/sh/kernel/ptrace_32.c +++ b/arch/sh/kernel/ptrace_32.c @@ -392,6 +392,9 @@ long arch_ptrace(struct task_struct *child, long request, tmp = 0; } else { unsigned long index; + ...
e815f0a84fc9a98e5cc3ef0b520122e5e18520e7
Analyze and fix the following issue in the Linux kernel code: sched.h: Fix a typo ("its")
Problem Details: The sentence uses the possessive pronoun, which is spelled without an apostrophe. Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Cc: Jiri Kosina <trivial@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> LKML-Reference: <1300735487-2406-1-git-send-email-j.neuschaefer@gmx.net> Signed-of...
```diff diff --git a/include/linux/sched.h b/include/linux/sched.h index c15936fe998b..e89f1292c301 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -516,7 +516,7 @@ struct thread_group_cputimer { struct autogroup; /* - * NOTE! "signal_struct" does not have it's own + * NOTE! "signal_struct" does n...
d7e8c01a97429101cb0ca2c09380e683c3814af8
Analyze and fix the following issue in the Linux kernel code: mfd: Fix MAX8997 Kconfig entry typos
Problem Details: Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
```diff diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 642168c8d3b1..500a130857d8 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -322,7 +322,7 @@ config MFD_MAX8997 Say yes here to support for Maxim Semiconductor MAX8998/8966. This is a Power Management IC with RTC, Flash, Fuel Gaug...
0ea3e83bd8d198f2a18e0066542f8670b2883890
Analyze and fix the following issue in the Linux kernel code: mfd: Add "platform:" prefix for twl4030-madc platform modalias
Problem Details: Since 43cc71eed1250755986da4c0f9898f9a635cb3bf (platform: prefix MODALIAS with "platform:"), the platform modalias is prefixed with "platform:". Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
```diff diff --git a/drivers/mfd/twl4030-madc.c b/drivers/mfd/twl4030-madc.c index e9884e2583bf..3941ddcf15fe 100644 --- a/drivers/mfd/twl4030-madc.c +++ b/drivers/mfd/twl4030-madc.c @@ -799,4 +799,4 @@ module_exit(twl4030_madc_exit); MODULE_DESCRIPTION("TWL4030 ADC driver"); MODULE_LICENSE("GPL"); MODULE_AUTHOR("J ...
4aad5a918c919c04b6c3136f3c4dcafada3b6319
Analyze and fix the following issue in the Linux kernel code: mfd: Fix ab8500-gpadc to measure charger current
Problem Details: The GPADC in the AB8500 was incorrectly configured when a charger current channel was selected. Signed-off-by: Karl Komierowski <karl.komierowski@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
```diff diff --git a/drivers/mfd/ab8500-gpadc.c b/drivers/mfd/ab8500-gpadc.c index a70201a74729..2ad3115f7772 100644 --- a/drivers/mfd/ab8500-gpadc.c +++ b/drivers/mfd/ab8500-gpadc.c @@ -56,6 +56,7 @@ #define DIS_GPADC 0x00 #define SW_AVG_16 0x60 #define ADC_SW_CONV 0x04 +#define EN_ICHAR 0x80 #define EN_BU...
cf16943947cef089c564d2be0ae9d96a285f495e
Analyze and fix the following issue in the Linux kernel code: mfd: Move ab8500 gpadc header to subdir
Problem Details: This moves the ab8500-gpadc.h header down into the ab8500/ subdir in include/linux/mfd and fixes some whitespace in the header in the process. Signed-off-by: Daniel Willerud <daniel.willerud@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linu...
```diff diff --git a/drivers/mfd/ab8500-gpadc.c b/drivers/mfd/ab8500-gpadc.c index 19339bc439ca..f60f71f4b473 100644 --- a/drivers/mfd/ab8500-gpadc.c +++ b/drivers/mfd/ab8500-gpadc.c @@ -17,7 +17,7 @@ #include <linux/slab.h> #include <linux/mfd/ab8500.h> #include <linux/mfd/abx500.h> -#include <linux/mfd/ab8500-gpad...
2798e226ad7db82725ba03da933638e981b472f7
Analyze and fix the following issue in the Linux kernel code: mfd-core: Fix up typos/vagueness in comment
Problem Details: Signed-off-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
```diff diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h index 835996e167e1..1fd7c4467e5a 100644 --- a/include/linux/mfd/core.h +++ b/include/linux/mfd/core.h @@ -39,8 +39,8 @@ struct mfd_cell { size_t data_size; /* - * This resources can be specified relatively to the parent device. - * For a...
ce2d17ca7f85dcade62cd608601a0d52ccdaf0e6
Analyze and fix the following issue in the Linux kernel code: perf top: Fix uninitialized 'counter' variable
Problem Details: builtin-top.c has an uninitialized variable. gcc(version 4.5.1) warns about it and it results in build failure: builtin-top.c: In function 'display_thread': builtin-top.c:518:9: error: 'counter' may be used uninitialized This situation can indeed trigger, if the getline() call in prompt_integer() f...
```diff diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 70f1075cc5b0..676b4fb0070f 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -515,7 +515,9 @@ static void handle_keypress(struct perf_session *session, int c) break; case 'E': if (top.evlist->nr_entries > 1) ...
9b84cca2564b9a5b2d064fb44d2a55a5b44473a0
Analyze and fix the following issue in the Linux kernel code: job control: Fix ptracer wait(2) hang and explain notask_error clearing
Problem Details: wait(2) and friends allow access to stopped/continued states through zombies, which is required as the states are process-wide and should be accessible whether the leader task is alive or undead. wait_consider_task() implements this by always clearing notask_error and going through wait_task_stopped/co...
```diff diff --git a/kernel/exit.c b/kernel/exit.c index b4a935c72159..84d13d6bb30b 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -1550,17 +1550,41 @@ static int wait_consider_task(struct wait_opts *wo, int ptrace, return 0; } - /* - * We don't reap group leaders with subthreads. - */ - if (p->exit_state =...
d79fdd6d96f46fabb779d86332e3677c6f5c2a4f
Analyze and fix the following issue in the Linux kernel code: ptrace: Clean transitions between TASK_STOPPED and TRACED
Problem Details: Currently, if the task is STOPPED on ptrace attach, it's left alone and the state is silently changed to TRACED on the next ptrace call. The behavior breaks the assumption that arch_ptrace_stop() is called before any task is poked by ptrace and is ugly in that a task manipulates the state of another ta...
```diff diff --git a/include/linux/sched.h b/include/linux/sched.h index b2a17dfbdbad..456d80ed3b78 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1775,8 +1775,10 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t * /* * task->group_stop flags */ +#define GROUP_ST...
e5c1902e9260a0075ea52cb5ef627a8d9aaede89
Analyze and fix the following issue in the Linux kernel code: signal: Fix premature completion of group stop when interfered by ptrace
Problem Details: task->signal->group_stop_count is used to track the progress of group stop. It's initialized to the number of tasks which need to stop for group stop to finish and each stopping or trapping task decrements. However, each task doesn't keep track of whether it decremented the counter or not and if woken...
```diff diff --git a/include/linux/sched.h b/include/linux/sched.h index 4b601be3dace..85f51042c2b8 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1260,6 +1260,7 @@ struct task_struct { int exit_state; int exit_code, exit_signal; int pdeath_signal; /* The signal sent when the parent dies */...
c672af35d54992b88d3c48133bd62cc3386fb2f9
Analyze and fix the following issue in the Linux kernel code: signal: Fix SIGCONT notification code
Problem Details: After a task receives SIGCONT, its parent is notified via SIGCHLD with its siginfo describing what the notified event is. If SIGCONT is received while the child process is stopped, the code should be CLD_CONTINUED. If SIGCONT is recieved while the child process is in the process of being stopped, it ...
```diff diff --git a/kernel/signal.c b/kernel/signal.c index 31751868de88..e26274abf3a9 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -1853,8 +1853,13 @@ relock: * the CLD_ si_code into SIGNAL_CLD_MASK bits. */ if (unlikely(signal->flags & SIGNAL_CLD_MASK)) { - int why = (signal->flags & SIGNAL_STOP_CO...
f6e47884e7f588094bf7b824c839a9ee33f2aa55
Analyze and fix the following issue in the Linux kernel code: drm/i915: Avoid unmapping pages from a NULL address space
Problem Details: Found by gem_stress. As we perform retirement from a workqueue, it is possible for us to free and unbind objects after the last close on the device, and so after the address space has been torn down and reset to NULL: BUG: unable to handle kernel NULL pointer dereference at 00000054 IP: [<c1295a20>] ...
```diff diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index c9bdaf208a91..7ce3f353af33 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -1356,9 +1356,10 @@ i915_gem_release_mmap(struct drm_i915_gem_object *obj) if (!obj->fault_mappable) return; ...
26e12f894317bf0221fed40bef6f937538a78c0b
Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix use after free within tracepoint
Problem Details: Detected by scripts/coccinelle/free/kfree.cocci. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Keith Packard <keithp@keithp.com>
```diff diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index edd6098743b2..c9bdaf208a91 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -3603,6 +3603,8 @@ static void i915_gem_free_object_tail(struct drm_i915_gem_object *obj) return; } + trace...
36d527deadf7d0c302e3452dde39465e74a65a08
Analyze and fix the following issue in the Linux kernel code: drm/i915: Restore missing command flush before interrupt on BLT ring
Problem Details: We always skipped flushing the BLT ring if the request flush did not include the RENDER domain. However, this neglects that we try to flush the COMMAND domain after every batch and before the breadcrumb interrupt (to make sure the batch is indeed completed prior to the interrupt firing and so insuring ...
```diff diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 0b99c30bb19c..edd6098743b2 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -2219,13 +2219,18 @@ i915_gem_flush_ring(struct intel_ring_buffer *ring, { int ret; + if (((invalidate_domain...
ed0291fd16f6349ef43d3f25a4626c2f7baf568b
Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix computation of pitch for dumb bo creator
Problem Details: Cc: Dave Airlie <airlied@linux.ie> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
```diff diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index c5dfb59e13d3..0b99c30bb19c 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -224,7 +224,7 @@ i915_gem_dumb_create(struct drm_file *file, struct drm_mode_create_dumb *args) { /* ha...
e281fcaa287fb39ce26d9aa33a716c2a7bb8484e
Analyze and fix the following issue in the Linux kernel code: drm/i915: report correct render clock frequencies on SNB
Problem Details: Fix up the debug file to report the right frequencies. On SNB, we program the PCU with a frequency ratio, which is multiplied by 100MHz on the CPU side. But GFX only runs at half that, so report it as such to avoid confusion. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Chri...
```diff diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 09e0327fc6ce..87c8e29465e3 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -892,7 +892,7 @@ static int i915_cur_delayinfo(struct seq_file *m, void *unused) seq_printf(m, ...
48898b038b69ef4801f0e059026c8f6920684677
Analyze and fix the following issue in the Linux kernel code: drm/i915/dp: Correct the order of deletion for ghost eDP devices
Problem Details: The order of the calls does matter indeed. Swapping the call order of intel_dp_destroy() and intel_dp_encoder_destroy() fixes the problem. This is because i2c_del_adapter unregisters the device which parent is intel_connector, and connectors are removed in intel_dp_destroy(). Thus intel_dp_encoder_de...
```diff diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index d29e33f815d7..0daefca5cbb8 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -1957,9 +1957,9 @@ intel_dp_init(struct drm_device *dev, int output_reg) DP_NO_AUX_HANDSHAKE_LINK_TRAINING; ...
69ac43b05eef4b8555e84ad51ceb6c58b5a3bc75
Analyze and fix the following issue in the Linux kernel code: [S390] early: Fix possible overlapping data buffer
Problem Details: This patch fixed bugzilla #12965: https://bugzilla.kernel.org/show_bug.cgi?id=12965 The original code contains some inproper use of sprintf function where a buffer is used both as input string as well as output string. It should remember the written bytes in the previous and use that as the offset for...
```diff diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c index 3b7e7dddc324..668138ee85d9 100644 --- a/arch/s390/kernel/early.c +++ b/arch/s390/kernel/early.c @@ -94,6 +94,7 @@ static noinline __init void create_kernel_nss(void) unsigned int sinitrd_pfn, einitrd_pfn; #endif int response; + int hlen...
29c5a587284195278e233eec5c2234c24fb2c204
Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix tiling corruption from pipelined fencing
Problem Details: ... even though it was disabled. A mistake in the handling of fence reuse caused us to skip the vital delay of waiting for the object to finish rendering before changing the register. This resulted in us changing the fence register whilst the bo was active and so causing the blits to complete using the...
```diff diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index d4bf061dbaf1..c5dfb59e13d3 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -2581,8 +2581,23 @@ i915_gem_object_get_fence(struct drm_i915_gem_object *obj, reg = &dev_priv->fence_regs[obj-...
7ccb4a53eb03c9196646ca0c2a97558313e886f1
Analyze and fix the following issue in the Linux kernel code: drm/i915: Re-enable self-refresh
Problem Details: A broken implementation of is_pot() prevented the detection of when a singular pipe was enabled. Eric Anholt pointed out the existence of is_power_of_2() so use that instead of our broken code! Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=35402 Signed-off-by: Yuanhan Liu <yuanhan.liu@intel.c...
```diff diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 841f0397288b..49c07231302c 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -3885,10 +3885,7 @@ static bool g4x_compute_srwm(struct drm_device *dev, display, cu...
09bfa51773c1e90f13000dc2fc0c4b84047009bc
Analyze and fix the following issue in the Linux kernel code: drm/i915: Prevent racy removal of request from client list
Problem Details: When i915_gem_retire_requests_ring calls i915_gem_request_remove_from_client, the client_list for that request may already be removed in i915_gem_release. So we may call twice list_del(&request->client_list), resulting in an oops like this report: [126167.230394] BUG: unable to handle kernel paging re...
```diff diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index c4c2855d002d..d4bf061dbaf1 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -1796,8 +1796,10 @@ i915_gem_request_remove_from_client(struct drm_i915_gem_request *request) return; spin_...
00d70b15125030391d17baab2c2f70f93b3339a6
Analyze and fix the following issue in the Linux kernel code: drm/i915: skip redundant operations whilst enabling pipes and planes
Problem Details: If the pipe or plane is already enabled, then we do not need to enable it again and can skip the delay. Similarly if it is already disabled when we want to disable it, we can also skip it. This fixes a regression from b24e717988, which caused the LVDS output on one PineView machine to become corrupt a...
```diff diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 3bc6ab56cf8b..841f0397288b 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -1516,8 +1516,10 @@ static void intel_enable_pipe(struct drm_i915_private *dev_priv, enum pipe...
762237bb714b0cd93ce2405ccc891fadb405c26e
Analyze and fix the following issue in the Linux kernel code: drm/i915: Remove surplus POSTING_READs before wait_for_vblank
Problem Details: ... as wait_for_vblank (and friends) will do a flush of the MMIO writes anyway. References: https://bugs.freedesktop.org/show_bug.cgi?id=34601 Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: ...
```diff diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 3106c0dc8389..3bc6ab56cf8b 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -1518,7 +1518,6 @@ static void intel_enable_pipe(struct drm_i915_private *dev_priv, enum pipe ...
b299eb5cde1a91706c450804006c6559b0826df8
Analyze and fix the following issue in the Linux kernel code: ACPI:Fix goto flows in thermal-sys
Problem Details: This patch fixes two minor bugs in thermal_sys: (a) The flow of goto's in thermal_hwmon_add_sysfs. (b) Remove the temp*_crit only if there is a get_crit_temp defined, in thermal_remove_hwmon_sysfs. Signed-off-by: Durgadoss R <durgadoss.r@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c index 713b7ea4a607..0b1c82ad6805 100644 --- a/drivers/thermal/thermal_sys.c +++ b/drivers/thermal/thermal_sys.c @@ -499,7 +499,7 @@ thermal_add_hwmon_sysfs(struct thermal_zone_device *tz) dev_set_drvdata(hwmon->device, hwmon); result...
32297abd90a5d181e8e026c8b8e65ef41e9ffc07
Analyze and fix the following issue in the Linux kernel code: ACPI: make acpi_pad /sys output more readable
Problem Details: Make /sys output from acpi_pad more readable. Before the fix: # cat idlecpus idlepct rrtime 00000000510 After the fix: # cat idlecpus idlepct rrtime 00000000 5 10 Signed-off-by: Naga Chumbalkar <nagananda.chumbalkar@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c index 6afceb3d4034..474be3a198ed 100644 --- a/drivers/acpi/acpi_pad.c +++ b/drivers/acpi/acpi_pad.c @@ -298,7 +298,7 @@ static ssize_t acpi_pad_rrtime_store(struct device *dev, static ssize_t acpi_pad_rrtime_show(struct device *dev, struct device...
64146f8b2af1ba77fe3c21d9d6d7213b9bb72b40
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: prefer legacy pll algo for tv-out
Problem Details: ntsc seems to work fine with either algo, some pal TVs seem pickier. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=30832 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c index 3cd3234ba0af..10e41af6b026 100644 --- a/drivers/gpu/drm/radeon/atombios_crtc.c +++ b/drivers/gpu/drm/radeon/atombios_crtc.c @@ -957,7 +957,11 @@ static void atombios_crtc_set_pll(struct drm_crtc *crtc, struct drm_...
6734fe57a07b2dd23ef1ef2ac1f790747e53eefc
Analyze and fix the following issue in the Linux kernel code: ACPI: Bug compatibility for Windows on the ACPI reboot vector
Problem Details: Windows ignores the bit_offset and bit_width, despite the spec requiring that they be validated. Drop the checks so that we match this behaviour. Windows also goes straight for the keyboard controller if the ACPI reboot fails, so we shouldn't sleep if we're still alive. Signed-off-by: Matthew Garrett ...
```diff diff --git a/drivers/acpi/reboot.c b/drivers/acpi/reboot.c index 93f91142d7ad..4870aaaa2ae1 100644 --- a/drivers/acpi/reboot.c +++ b/drivers/acpi/reboot.c @@ -15,9 +15,10 @@ void acpi_reboot(void) rr = &acpi_gbl_FADT.reset_register; - /* Is the reset register supported? */ - if (!(acpi_gbl_FADT.flags & AC...
f17d9cbf20c4734c4199caa6dee87047f2f8278f
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix access width for reset vector
Problem Details: Section 4.7.3.6 of the ACPI specification requires that the register width of the reset vector be 8 bits. Windows simply hardcodes the access to be a byte and ignores the width provided in the FADT, so make sure that we do the same. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Len Br...
```diff diff --git a/drivers/acpi/acpica/hwxface.c b/drivers/acpi/acpica/hwxface.c index 6f98d210e71c..f75f81ad15c9 100644 --- a/drivers/acpi/acpica/hwxface.c +++ b/drivers/acpi/acpica/hwxface.c @@ -80,14 +80,14 @@ acpi_status acpi_reset(void) if (reset_reg->space_id == ACPI_ADR_SPACE_SYSTEM_IO) { /* - * For I...
a7bff75b087e7a355838a32efe61707cfa73c194
Analyze and fix the following issue in the Linux kernel code: bridge: Fix possibly wrong MLD queries' ethernet source address
Problem Details: The ipv6_dev_get_saddr() is currently called with an uninitialized destination address. Although in tests it usually seemed to nevertheless always fetch the right source address, there seems to be a possible race condition. Therefore this commit changes this, first setting the destination address and ...
```diff diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index 030a002ff8ee..f61eb2eff3fd 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c @@ -445,9 +445,9 @@ static struct sk_buff *br_ip6_multicast_alloc_query(struct net_bridge *br, ip6h->payload_len = htons(8 + sizeof(*mldq))...
6a1fef6d000944911df0f160f366111daa10740a
Analyze and fix the following issue in the Linux kernel code: net: davinci_emac:Fix translation logic for buffer descriptor
Problem Details: With recent changes to the driver(switch to new cpdma layer), the support for buffer descriptor address translation logic is broken. This affects platforms where the physical address of the descriptors as seen by the DMA engine is different from the physical address. Original Patch adding translation ...
```diff diff --git a/drivers/net/davinci_cpdma.c b/drivers/net/davinci_cpdma.c index e92b2b6cd8c4..ae47f23ba930 100644 --- a/drivers/net/davinci_cpdma.c +++ b/drivers/net/davinci_cpdma.c @@ -76,6 +76,7 @@ struct cpdma_desc { struct cpdma_desc_pool { u32 phys; + u32 hw_addr; void __iomem *iomap; /* ioremap ...
de55aa33ca6928881ca5c402bb0f5db242fbcdba
Analyze and fix the following issue in the Linux kernel code: Blackfin: bf54x: re-enable anomaly 05000353 for all revs
Problem Details: Even though the anomaly sheet says that the the bootrom is fixed, tests have shown that the fix itself does not handle all cases. So until we get a ROM update, assume the reset code is still broken and we need to handle things ourselves. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
```diff diff --git a/arch/blackfin/mach-bf548/include/mach/anomaly.h b/arch/blackfin/mach-bf548/include/mach/anomaly.h index 4070079e2c00..ffd0537295ac 100644 --- a/arch/blackfin/mach-bf548/include/mach/anomaly.h +++ b/arch/blackfin/mach-bf548/include/mach/anomaly.h @@ -81,7 +81,11 @@ /* PLL Status Register Is Inaccur...
b12d12596992f608f5506a8dabe4d1299594bd1e
Analyze and fix the following issue in the Linux kernel code: fs/devpts/inode.c: correctly check d_alloc_name() return code in devpts_pty_new()
Problem Details: d_alloc_name return NULL in case error, but we expect errno in devpts_pty_new. Addresses http://bugzilla.openvz.org/show_bug.cgi?id=1758 Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.or...
```diff diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c index c6bd815dc794..2f27e578d466 100644 --- a/fs/devpts/inode.c +++ b/fs/devpts/inode.c @@ -502,7 +502,7 @@ int devpts_pty_new(struct inode *ptmx_inode, struct tty_struct *tty) mutex_lock(&root->d_inode->i_mutex); dentry = d_alloc_name(root, s); - if (!IS...
e91f90bb0bb10be9cc8efd09a3cf4ecffcad0db1
Analyze and fix the following issue in the Linux kernel code: aio: wake all waiters when destroying ctx
Problem Details: The test program below will hang because io_getevents() uses add_wait_queue_exclusive(), which means the wake_up() in io_destroy() only wakes up one of the threads. Fix this by using wake_up_all() in the aio code paths where we want to make sure no one gets stuck. // t.c -- compile with gcc -lpthrea...
```diff diff --git a/fs/aio.c b/fs/aio.c index 7f54f43b8f7c..ebb6a22e4e1b 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -520,7 +520,7 @@ static inline void really_put_req(struct kioctx *ctx, struct kiocb *req) ctx->reqs_active--; if (unlikely(!ctx->reqs_active && ctx->dead)) - wake_up(&ctx->wait); + wake_up_all(&ctx-...
da23ef0549d4205ca9b576cf6cce9a80d0c3e43a
Analyze and fix the following issue in the Linux kernel code: adfs: add hexadecimal filetype suffix option
Problem Details: ADFS (FileCore) storage complies with the RISC OS filetype specification (12 bits of file type information is stored in the file load address, rather than using a file extension). The existing driver largely ignores this information and does not present it to the end user. It is desirable that stored...
```diff diff --git a/Documentation/filesystems/adfs.txt b/Documentation/filesystems/adfs.txt index 9e8811f92b84..5949766353f7 100644 --- a/Documentation/filesystems/adfs.txt +++ b/Documentation/filesystems/adfs.txt @@ -9,6 +9,9 @@ Mount options for ADFS will be nnn. Default 0700. othmask=nnn The permission mask ...
2f09719af705db56032ae480a2d9c32c2a3fcbd3
Analyze and fix the following issue in the Linux kernel code: adfs: fix E+/F+ dir size > 2048 crashing kernel
Problem Details: Kernel crashes in fs/adfs module when accessing directories with a large number of objects on mounted Acorn ADFS E+/F+ format discs (or images) as the existing code writes off the end of the fixed array of struct buffer_head pointers. Additionally, each directory access that didn't crash would leak a ...
```diff diff --git a/fs/adfs/adfs.h b/fs/adfs/adfs.h index 2ff622f6f547..58588ddb178c 100644 --- a/fs/adfs/adfs.h +++ b/fs/adfs/adfs.h @@ -79,6 +79,10 @@ struct adfs_dir { int nr_buffers; struct buffer_head *bh[4]; + + /* big directories need allocated buffers */ + struct buffer_head **bh_fplus; + unsigned in...
12da58b0c89e27617aaedde7dcf99a8690875e91
Analyze and fix the following issue in the Linux kernel code: Documentation/vm/page-types.c: auto debugfs mount for hwpoison operation
Problem Details: page-types.c doesn't supply a way to specify the debugfs path and the original debugfs path is not usual on most machines. This patch supplies a way to auto mount debugfs if needed. This patch is heavily inspired by tools/perf/utils/debugfs.c [akpm@linux-foundation.org: make functions static] [akpm@...
```diff diff --git a/Documentation/vm/page-types.c b/Documentation/vm/page-types.c index cc96ee2666f2..7445caa26d05 100644 --- a/Documentation/vm/page-types.c +++ b/Documentation/vm/page-types.c @@ -32,8 +32,20 @@ #include <sys/types.h> #include <sys/errno.h> #include <sys/fcntl.h> +#include <sys/mount.h> +#include ...
0bc825d240abcaf5ed6e9d59b44215b51718ef5b
Analyze and fix the following issue in the Linux kernel code: codafs: fix compile warning when CONFIG_SYSCTL=n
Problem Details: When CONFIG_SYSCTL=n, we get the following warning: fs/coda/sysctl.c:18: warning: `coda_tabl' defined but not used Fix the warning by making sure coda_table and it's callee function are in the same context. Also clean up the code by removing extra #ifdef. [akpm@linux-foundation.org: remove unneeded...
```diff diff --git a/fs/coda/sysctl.c b/fs/coda/sysctl.c index c6405ce3c50e..06d27a41807f 100644 --- a/fs/coda/sysctl.c +++ b/fs/coda/sysctl.c @@ -13,7 +13,6 @@ #ifdef CONFIG_SYSCTL static struct ctl_table_header *fs_table_header; -#endif static ctl_table coda_table[] = { { @@ -40,7 +39,6 @@ static ctl_table c...
f4d93ad74c18143abd3067ca3c8ffba7d00addf4
Analyze and fix the following issue in the Linux kernel code: epoll: fix compiler warning and optimize the non-blocking path
Problem Details: Add a comment to ep_poll(), rename labels a bit clearly, fix a warning of unused variable from gcc and optimize the non-blocking path a little. Hinted-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Davide Libenzi <davidel@xmailserver.org> hannes@cmpxchg.org: : The non-blocking ep_poll ...
```diff diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 57298d092f56..ed38801b57a7 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -1148,12 +1148,29 @@ static inline struct timespec ep_set_mstimeout(long ms) return timespec_add_safe(now, ts); } +/** + * ep_poll - Retrieves ready events, and delivers them to...
309c00c73f053a905d144b430d4fb55d811085e2
Analyze and fix the following issue in the Linux kernel code: checkpatch: warn about memset with swapped arguments
Problem Details: Because the second and third arguments of memset have the same type, it turns out to be really easy to mix them up. This bug comes up time after time, so checkpatch should really be checking for it at patch submission time. Signed-off-by: Dave Jones <davej@redhat.com> Cc: Steven Rostedt <rostedt@good...
```diff diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 19abef2b4dd5..8f9e394298cd 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2902,6 +2902,11 @@ sub process { $line =~ /DEVICE_ATTR.*S_IWUGO/ ) { WARN("Exporting world writable files is usually an error. Consider more r...
7bf693951a8e5f7e600a45b74d91d962a453146e
Analyze and fix the following issue in the Linux kernel code: console: allow to retain boot console via boot option keep_bootcon
Problem Details: On some architectures, the boot process involves de-registering the boot console (early boot), initialize drivers and then re-register the console. This mechanism introduces a window in which no printk can happen on the console and messages are buffered and then printed once the new console is availab...
```diff diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index e9261e938f6a..c357a31411cd 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -872,6 +872,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted. ...
fef2c9bc1b54c0261324a96e948c0b849796e896
Analyze and fix the following issue in the Linux kernel code: kernel/watchdog.c: allow hardlockup to panic by default
Problem Details: When a cpu is considered stuck, instead of limping along and just printing a warning, it is sometimes preferred to just panic, let kdump capture the vmcore and reboot. This gets the machine back into a stable state quickly while saving the info that got it into a stuck state to begin with. Add a Kcon...
```diff diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index a3b688287a8d..e9261e938f6a 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -1597,11 +1597,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted. Fo...
b1b5f65e53af770ede22c113e249de2f6fa53706
Analyze and fix the following issue in the Linux kernel code: calibrate: retry with wider bounds when converge seems to fail
Problem Details: Systems with unmaskable interrupts such as SMIs may massively underestimate loops_per_jiffy, and fail to converge anywhere near the real value. A case seen on x86_64 was an initial estimate of 256<<12, which converged to 511<<12 where the real value should have been over 630<<12. This admitedly requir...
```diff diff --git a/init/calibrate.c b/init/calibrate.c index f9000dfbe227..76ac9194cbc4 100644 --- a/init/calibrate.c +++ b/init/calibrate.c @@ -122,7 +122,7 @@ static unsigned long __cpuinit calibrate_delay_direct(void) {return 0;} static unsigned long __cpuinit calibrate_delay_converge(void) { /* First stage - ...
4d51985e484dd11d9047dfcd1278ec9ccfb435d5
Analyze and fix the following issue in the Linux kernel code: kernel/cpu.c: fix many errors related to style.
Problem Details: Change the printk() calls to have the KERN_INFO/KERN_ERROR stuff, and fixes other coding style errors. Not _all_ of them are gone, though. [akpm@linux-foundation.org: revert the bits I disagree with] Signed-off-by: Michael Rodriguez <dkingston02@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-fou...
```diff diff --git a/kernel/cpu.c b/kernel/cpu.c index 156cc5556140..c95fc4df0faa 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -160,7 +160,6 @@ static void cpu_notify_nofail(unsigned long val, void *v) { BUG_ON(cpu_notify(val, v)); } - EXPORT_SYMBOL(register_cpu_notifier); void __ref unregister_cpu_notifier(...
a844b43ca078d7dd8f0cd13c6f030ec62a996975
Analyze and fix the following issue in the Linux kernel code: drivers/misc/atmel_tclib.c: fix a memory leak
Problem Details: request_mem_region() will call kzalloc to allocate memory for struct resource. release_resource() unregisters the resource but does not free the allocated memory, thus use release_mem_region() instead to fix the memory leak. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Andrew Morton <a...
```diff diff --git a/drivers/misc/atmel_tclib.c b/drivers/misc/atmel_tclib.c index 3891124001f2..a844810b50f6 100644 --- a/drivers/misc/atmel_tclib.c +++ b/drivers/misc/atmel_tclib.c @@ -75,7 +75,7 @@ out: return tc; fail_ioremap: - release_resource(r); + release_mem_region(r->start, ATMEL_TC_IOMEM_SIZE); fail: ...
6f7d485e13c6c07348cf9cfd1b735fe1bcf3caa9
Analyze and fix the following issue in the Linux kernel code: drivers/misc/hmc6352.c: fix wrong return value checking for i2c_master_recv()
Problem Details: i2c_master_recv() returns negative errno, or else the number of bytes read. Thus i2c_master_recv(client, i2c_data, 2) returns 2 instead of 1 in success case. [akpm@linux-foundation.org: make `ret' signed] Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Kalhan Trisal <kalhan.trisal@intel.com> Cc: Ala...
```diff diff --git a/drivers/misc/hmc6352.c b/drivers/misc/hmc6352.c index 234bfcaf2099..ca938fc8a8d6 100644 --- a/drivers/misc/hmc6352.c +++ b/drivers/misc/hmc6352.c @@ -75,7 +75,7 @@ static ssize_t compass_heading_data_show(struct device *dev, { struct i2c_client *client = to_i2c_client(dev); unsigned char i2c_d...
13e165baf6ada9f427c319bd41a1c7a9c7b4f0a6
Analyze and fix the following issue in the Linux kernel code: uml: kernels on {i386,x86_64} produce bad coredumps
Problem Details: One of our users reported that when a user-level program SIGSEGVs under UML kernel, the resulting core dump is not very usable. I have reproduced that with the latest kernel: make ARCH=um defconfig; make ARCH=um Run the resulting kernel, then "inside" run this program: #include <pthread.h> void ...
```diff diff --git a/arch/um/sys-i386/asm/elf.h b/arch/um/sys-i386/asm/elf.h index a979a22a8d9f..d964a4111ac6 100644 --- a/arch/um/sys-i386/asm/elf.h +++ b/arch/um/sys-i386/asm/elf.h @@ -75,6 +75,8 @@ typedef struct user_i387_struct elf_fpregset_t; pr_reg[16] = PT_REGS_SS(regs); \ } while (0); +#define task_pt_re...
bee4c36a5cf5c9f63ce1d7372aa62045fbd16d47
Analyze and fix the following issue in the Linux kernel code: shmem: let shared anonymous be nonlinear again
Problem Details: Up to 2.6.22, you could use remap_file_pages(2) on a tmpfs file or a shared mapping of /dev/zero or a shared anonymous mapping. In 2.6.23 we disabled it by default, but set VM_CAN_NONLINEAR to enable it on safe mappings. We made sure to set it in shmem_mmap() for tmpfs files, but missed it in shmem_z...
```diff diff --git a/mm/shmem.c b/mm/shmem.c index 88593586bdb7..91ce9a1024d7 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -2793,5 +2793,6 @@ int shmem_zero_setup(struct vm_area_struct *vma) fput(vma->vm_file); vma->vm_file = file; vma->vm_ops = &shmem_vm_ops; + vma->vm_flags |= VM_CAN_NONLINEAR; return 0; } `...
8f7a66051b7523108c5aefb08c6a637e54aedc47
Analyze and fix the following issue in the Linux kernel code: mm/memblock: properly handle overlaps and fix error path
Problem Details: Currently memblock_reserve() or memblock_free() don't handle overlaps of any kind. There is some special casing for coalescing exactly adjacent regions but that's about it. This is annoying because typically memblock_reserve() is used to mark regions passed by the firmware as reserved and we all know...
```diff diff --git a/mm/memblock.c b/mm/memblock.c index 4618fda975a0..a0562d1a6ad4 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -58,28 +58,6 @@ static unsigned long __init_memblock memblock_addrs_overlap(phys_addr_t base1, p return ((base1 < (base2 + size2)) && (base2 < (base1 + size1))); } -static long __in...
cc5d462f7777c06c5cf0b55d736be325cda747b3
Analyze and fix the following issue in the Linux kernel code: mm: use __GFP_OTHER_NODE for transparent huge pages
Problem Details: Pass __GFP_OTHER_NODE for transparent hugepages NUMA allocations done by the hugepages daemon. This way the low level accounting for local versus remote pages works correctly. Contains improvements from Andrea Arcangeli [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Andi Kleen <ak@li...
```diff diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 113e35c47502..0a619e0e2e0b 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -643,23 +643,24 @@ static int __do_huge_pmd_anonymous_page(struct mm_struct *mm, return ret; } -static inline gfp_t alloc_hugepage_gfpmask(int defrag) +static inline gfp...
78afd5612deb8268bafc8b6507d72341d5ed9aac
Analyze and fix the following issue in the Linux kernel code: mm: add __GFP_OTHER_NODE flag
Problem Details: Add a new __GFP_OTHER_NODE flag to tell the low level numa statistics in zone_statistics() that an allocation is on behalf of another thread. This way the local and remote counters can be still correct, even when background daemons like khugepaged are changing memory mappings. This only affects the a...
```diff diff --git a/include/linux/gfp.h b/include/linux/gfp.h index dca31761b311..bfb8f934521e 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -35,6 +35,7 @@ struct vm_area_struct; #define ___GFP_NOTRACK 0 #endif #define ___GFP_NO_KSWAPD 0x400000u +#define ___GFP_OTHER_NODE 0x800000u /* * GFP bi...
11bc82d67d1150767901bca54a24466621d763d7
Analyze and fix the following issue in the Linux kernel code: mm: compaction: Use async migration for __GFP_NO_KSWAPD and enforce no writeback
Problem Details: __GFP_NO_KSWAPD allocations are usually very expensive and not mandatory to succeed as they have graceful fallback. Waiting for I/O in those, tends to be overkill in terms of latencies, so we can reduce their latency by disabling sync migrate. Unfortunately, even with async migration it's still possi...
```diff diff --git a/mm/migrate.c b/mm/migrate.c index 7d2983f3783e..89e5c3fe8bbc 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -564,7 +564,7 @@ static int fallback_migrate_page(struct address_space *mapping, * == 0 - success */ static int move_to_new_page(struct page *newpage, struct page *page, - int rem...
602605a42ea4c299aeed4d806c49fb9dd18cd204
Analyze and fix the following issue in the Linux kernel code: mm: compaction: minimise the time IRQs are disabled while isolating free pages
Problem Details: compaction_alloc() isolates free pages to be used as migration targets. While its scanning, IRQs are disabled on the mistaken assumption the scanning should be short. Analysis showed that IRQs were in fact being disabled for substantial time. A simple test was run using large anonymous mappings with ...
```diff diff --git a/mm/compaction.c b/mm/compaction.c index 38ce48805c08..b27802e04b91 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -153,7 +153,6 @@ static void isolate_freepages(struct zone *zone, * pages on cc->migratepages. We stop searching if the migrate * and free page scanners meet or enough free...
033193275b3ffcfe7f3fde7b569f3d207f6cd6a0
Analyze and fix the following issue in the Linux kernel code: pagewalk: only split huge pages when necessary
Problem Details: Right now, if a mm_walk has either ->pte_entry or ->pmd_entry set, it will unconditionally split any transparent huge pages it runs in to. In practice, that means that anyone doing a cat /proc/$pid/smaps will unconditionally break down every huge page in the process and depend on khugepaged to re-c...
```diff diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 60b914860f81..78fd3621f565 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -343,6 +343,8 @@ static int smaps_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, struct page *page; int mapcount; + split_huge_page_pmd(walk->mm, ...
7bc32f6f90dae67730645da67bfd44304f810f93
Analyze and fix the following issue in the Linux kernel code: mm: debug-pagealloc: fix kconfig dependency warning
Problem Details: Fix kconfig dependency warning to satisfy dependencies: warning: (PAGE_POISONING) selects DEBUG_PAGEALLOC which has unmet direct dependencies (DEBUG_KERNEL && ARCH_SUPPORTS_DEBUG_PAGEALLOC && (!HIBERNATION || !PPC && !SPARC) && !KMEMCHECK) Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Rand...
```diff diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug index af7cfb43d2f0..8b1a477162dc 100644 --- a/mm/Kconfig.debug +++ b/mm/Kconfig.debug @@ -1,27 +1,24 @@ config DEBUG_PAGEALLOC bool "Debug page memory allocations" - depends on DEBUG_KERNEL && ARCH_SUPPORTS_DEBUG_PAGEALLOC - depends on !HIBERNATION || !PPC && ...
1d16871d8c96deadc5f9753b6b096074f2cbcbe1
Analyze and fix the following issue in the Linux kernel code: mm: batch-free pcp list if possible
Problem Details: free_pcppages_bulk() frees pages from pcp lists in a round-robin fashion by keeping batch_free counter. But it doesn't need to spin if there is only one non-empty list. This can be checked by batch_free == MIGRATE_PCPTYPES. [akpm@linux-foundation.org: fix comment] Signed-off-by: Namhyung Kim <namhyu...
```diff diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 36a168e383b5..426056aff12a 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -614,6 +614,10 @@ static void free_pcppages_bulk(struct zone *zone, int count, list = &pcp->lists[migratetype]; } while (list_empty(list)); + /* This is the only non-em...
702cfbf93aaf3a091b0c64c8766c1ade0a820c38
Analyze and fix the following issue in the Linux kernel code: mm: goodbye remove_from_page_cache()
Problem Details: Now delete_from_page_cache() replaces remove_from_page_cache(). So we remove remove_from_page_cache so fs or something out of mainline will notice it when compile time and can fix it. Signed-off-by: Minchan Kim <minchan.kim@gmail.com> Cc: Christoph Hellwig <hch@infradead.org> Acked-by: Hugh Dickins <...
```diff diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 0aa258f4678d..ea36ff29a51a 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -456,7 +456,6 @@ int add_to_page_cache_locked(struct page *page, struct address_space *mapping, int add_to_page_cache_lru(struct page *page, stru...
9d502c1c8d47b337c378c2ac8eaeee7918ad16b1
Analyze and fix the following issue in the Linux kernel code: mm/compaction: check migrate_pages's return value instead of list_empty()
Problem Details: Many migrate_page's caller check return value instead of list_empy by cf608ac19c ("mm: compaction: fix COMPACTPAGEFAILED counting"). This patch makes compaction's migrate_pages consistent with others. This patch should not change old behavior. Signed-off-by: Minchan Kim <minchan.kim@gmail.com> Cc: M...
```diff diff --git a/mm/compaction.c b/mm/compaction.c index dcb058bd76c4..38ce48805c08 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -494,12 +494,13 @@ static int compact_zone(struct zone *zone, struct compact_control *cc) while ((ret = compact_finished(zone, cc)) == COMPACT_CONTINUE) { unsigned long nr...
89699605fe7cfd8611900346f61cb6cbf179b10a
Analyze and fix the following issue in the Linux kernel code: mm: vmap area cache
Problem Details: Provide a free area cache for the vmalloc virtual address allocator, based on the algorithm used by the user virtual memory allocator. This reduces the number of rbtree operations and linear traversals over the vmap extents in order to find a free area, by starting off at the last point that a free ar...
```diff diff --git a/mm/vmalloc.c b/mm/vmalloc.c index f9b166732e70..fc77adabb5e3 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -261,8 +261,15 @@ struct vmap_area { }; static DEFINE_SPINLOCK(vmap_area_lock); -static struct rb_root vmap_area_root = RB_ROOT; static LIST_HEAD(vmap_area_list); +static struct rb_root...
9517f925f2eb9ffca78b3f0f9389fc675bcb572c
Analyze and fix the following issue in the Linux kernel code: leds: make *struct gpio_led_platform_data.leds const
Problem Details: And fix a typo. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/leds/leds-net5501.c b/drivers/leds/leds-net5501.c index 1739557a9038..7e764b8365e6 100644 --- a/drivers/leds/leds-net5501.c +++ b/drivers/leds/leds-net5501.c @@ -19,7 +19,7 @@ #include <asm/geode.h> -static struct gpio_led net5501_leds[] = { +static const struct gpio_led net5501_leds[]...
551ea73838c5eba18d673bd4e7fb0fec77cdcb8a
Analyze and fix the following issue in the Linux kernel code: leds: convert bd2802 driver to dev_pm_ops
Problem Details: There is a move to deprecate bus-specific PM operations and move to using dev_pm_ops instead in order to reduce the amount of boilerplate code in buses and facilitiate updates to the PM core. Do this move for the bs2802 driver. [akpm@linux-foundation.org: fix warnings] Signed-off-by: Mark Brown <broo...
```diff diff --git a/drivers/leds/leds-bd2802.c b/drivers/leds/leds-bd2802.c index 19dc4b61a105..3ebe3824662d 100644 --- a/drivers/leds/leds-bd2802.c +++ b/drivers/leds/leds-bd2802.c @@ -19,7 +19,7 @@ #include <linux/leds.h> #include <linux/leds-bd2802.h> #include <linux/slab.h> - +#include <linux/pm.h> #define L...
3a5dda7a17cf3706f79b86293f29db02d61e0d48
Analyze and fix the following issue in the Linux kernel code: oom: prevent unnecessary oom kills or kernel panics
Problem Details: This patch prevents unnecessary oom kills or kernel panics by reverting two commits: 495789a5 (oom: make oom_score to per-process value) cef1d352 (oom: multi threaded process coredump don't make deadlock) First, 495789a5 (oom: make oom_score to per-process value) ignores the fact that all threads i...
```diff diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 7dcca55ede7c..b5a7b5f46e7a 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -292,11 +292,11 @@ static struct task_struct *select_bad_process(unsigned int *ppoints, unsigned long totalpages, struct mem_cgroup *mem, const nodemask_t *nodemask) { - struct ta...
52c50567d8ab0a0a87f12cceaa4194967854f0bd
Analyze and fix the following issue in the Linux kernel code: mm: swap: unlock swapfile inode mutex before closing file on bad swapfiles
Problem Details: If an administrator tries to swapon a file backed by NFS, the inode mutex is taken (as it is for any swapfile) but later identified to be a bad swapfile due to the lack of bmap and tries to cleanup. During cleanup, an attempt is made to close the file but with inode->i_mutex still held. Closing an NFS ...
```diff diff --git a/mm/swapfile.c b/mm/swapfile.c index 0341c5700e34..6d6d28c0a72f 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -2149,8 +2149,13 @@ bad_swap_2: p->flags = 0; spin_unlock(&swap_lock); vfree(swap_map); - if (swap_file) + if (swap_file) { + if (did_down) { + mutex_unlock(&inode->i_mutex); + ...
c7a1fcd8e6e0c3c8f4f8f74fc926ff04da3bf7a7
Analyze and fix the following issue in the Linux kernel code: include/asm-generic/unistd.h: fix syncfs syscall number
Problem Details: syncfs() is duplicating name_to_handle_at() due to a merging mistake. Cc: Sage Weil <sage@newdream.net> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/include/asm-generic/unistd.h b/include/asm-generic/unistd.h index 176b825add52..07c40d5149de 100644 --- a/include/asm-generic/unistd.h +++ b/include/asm-generic/unistd.h @@ -652,7 +652,7 @@ __SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at) __SYSCALL(__NR_open_by_handle_at, sys_open_by_handl...
4667058b772857069378aa8f417203156e315e82
Analyze and fix the following issue in the Linux kernel code: nfs4: Fix NULL dereference at d_alloc_and_lookup()
Problem Details: d_alloc_and_lookup() calls i_op->lookup method due to rootfh changes his fsid. During mount i_op of NFS root inode is set to nfs_mountpoint_inode_operations, if rpc_ops->getroot() and rpc_ops->getattr() return different fsid. After that nfs_follow_remote_path() raised oops: BUG: unable to handle...
```diff diff --git a/fs/nfs/getroot.c b/fs/nfs/getroot.c index b5ffe8fa291f..79796521cfdc 100644 --- a/fs/nfs/getroot.c +++ b/fs/nfs/getroot.c @@ -199,6 +199,10 @@ struct dentry *nfs4_get_root(struct super_block *sb, struct nfs_fh *mntfh) goto out; } + if (fattr->valid & NFS_ATTR_FATTR_FSID && + !nfs_fsid_eq...
117a91e0f25fd7698e20ac3dfa62086be3dc82a3
Analyze and fix the following issue in the Linux kernel code: Squashfs: Use vmalloc rather than kmalloc for zlib workspace
Problem Details: Bugzilla bug 31422 reports occasional "page allocation failure. order:4" at Squashfs mount time. Fix this by making zlib workspace allocation use vmalloc rather than kmalloc. Reported-by: Mehmet Giritli <mehmet@giritli.eu> Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
```diff diff --git a/fs/squashfs/zlib_wrapper.c b/fs/squashfs/zlib_wrapper.c index 195b0d035e9b..517688b32ffa 100644 --- a/fs/squashfs/zlib_wrapper.c +++ b/fs/squashfs/zlib_wrapper.c @@ -26,6 +26,7 @@ #include <linux/buffer_head.h> #include <linux/slab.h> #include <linux/zlib.h> +#include <linux/vmalloc.h> #inclu...
0e4c180d3e2cc11e248f29d4c604b6194739d05a
Analyze and fix the following issue in the Linux kernel code: [media] v4l: soc-camera: Store negotiated buffer settings
Problem Details: This fixes the problem in which a host driver sets a personalized sizeimage or bytesperline field, and gets ignored when doing G_FMT. Signed-off-by: Sergio Aguirre <saaguirre@ti.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c index fa80a4a914d4..07525e74c4b4 100644 --- a/drivers/media/video/soc_camera.c +++ b/drivers/media/video/soc_camera.c @@ -389,6 +389,8 @@ static int soc_camera_set_fmt(struct soc_camera_device *icd, icd->user_width = pix->widt...
3ea205c449d2b5996d0256aa8b2894f7aea228a2
Analyze and fix the following issue in the Linux kernel code: avr32: at32ap700x: fix typo in DMA master configuration
Problem Details: Commit 4aa5f366431fe (avr32: at32ap700x: specify DMA src and dst masters) specified the masters for the ac97c playback device but incorrectly set them in the capture slave information rather than playback. Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> Reported-by: Nicolas Ferre <nicola...
```diff diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c index b4aaebd8780c..bfc9d071db9b 100644 --- a/arch/avr32/mach-at32ap/at32ap700x.c +++ b/arch/avr32/mach-at32ap/at32ap700x.c @@ -2061,8 +2061,8 @@ at32_add_device_ac97c(unsigned int id, struct ac97c_platform_data *data, tx_...
15195d3a83b59f0ca3bed52cbe5524042ce13fd6
Analyze and fix the following issue in the Linux kernel code: [media] rc/keymaps: Rename Hauppauge table as rc-hauppauge
Problem Details: There are two "hauppauge-new" keymaps, one with protocol unknown, and the other with the protocol marked accordingly. However, both tables are miss-named. Also, the old rc-hauppauge-new is broken, as it mixes three different controllers as if they were just one. This patch solves half of the problem ...
```diff diff --git a/drivers/media/dvb/siano/sms-cards.c b/drivers/media/dvb/siano/sms-cards.c index 25b43e587fa6..af121db88ea0 100644 --- a/drivers/media/dvb/siano/sms-cards.c +++ b/drivers/media/dvb/siano/sms-cards.c @@ -64,7 +64,7 @@ static struct sms_board sms_boards[] = { .type = SMS_NOVA_B0, .fw[DEVICE_MODE...
0548757419c974d8c0851c13279b2c89a12b2978
Analyze and fix the following issue in the Linux kernel code: [media] rc-rc5-hauppauge-new: Fix Hauppauge Grey mapping
Problem Details: The keys for the old black were messed with the ones for the hauppauge grey. Fix it. Also, fixes some keycodes and order the keys according with the way they appear inside the remote controller. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Jarod Wilson <jarod@redhat.com>
```diff diff --git a/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c b/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c index 4106008c7f98..cb312dae6fac 100644 --- a/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c +++ b/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c @@ -24,61 +24,67 @@ static struct rc_map_table rc5_ha...
9890a9edc8b8bba6d710499afb70e981e0b0dfae
Analyze and fix the following issue in the Linux kernel code: [media] rc-rc5-hauppauge-new: Add support for the old Black RC
Problem Details: Hans borrowed me an old Black Hauppauge RC. Thanks to that, we can fix the RC5 table for Hauppauge. Thanks-to: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Jarod Wilson <jarod@redhat.com>
```diff diff --git a/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c b/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c index dcbf3bddc826..4106008c7f98 100644 --- a/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c +++ b/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c @@ -82,7 +82,7 @@ static struct rc_map_table rc5_haup...
0684f5b0fc2b543287abad03fc40e65d5e89d1ef
Analyze and fix the following issue in the Linux kernel code: [media] rc-rc5-hauppauge-new: Add the old control to the table
Problem Details: Adds the old grey remote controller to Hauppauge table. Hans borrowed me an old gray Hauppauge RC. Thanks to that, we can fix the RC5 table for Hauppauge. Thanks-to: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Jarod Wilson <jarod@redhat.c...
```diff diff --git a/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c b/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c index a581c861c25d..dcbf3bddc826 100644 --- a/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c +++ b/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c @@ -20,6 +20,10 @@ */ static struct rc_map_table...
7f961c6989a98c10faea76a39228a63624f10690
Analyze and fix the following issue in the Linux kernel code: [media] rc-winfast: Fix the keycode tables
Problem Details: One of the remotes has a picture available at: http://lirc.sourceforge.net/remotes/leadtek/Y04G0004.jpg As there's one variant with a set direction keys plus vol/chann keys, and the same table is used for both models, change it to represent all keys, avoiding the usage of weird function keys. Signed...
```diff diff --git a/drivers/media/rc/keymaps/rc-winfast.c b/drivers/media/rc/keymaps/rc-winfast.c index 2747db43b70c..0062ca291959 100644 --- a/drivers/media/rc/keymaps/rc-winfast.c +++ b/drivers/media/rc/keymaps/rc-winfast.c @@ -27,15 +27,15 @@ static struct rc_map_table winfast[] = { { 0x0e, KEY_8 }, { 0x0f, KEY...
898a83e9243e2398e863887b36476c3cc227074a
Analyze and fix the following issue in the Linux kernel code: [media] a800: Fix a few wrong IR key assignments
Problem Details: Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Jarod Wilson <jarod@redhat.com>
```diff diff --git a/drivers/media/dvb/dvb-usb/a800.c b/drivers/media/dvb/dvb-usb/a800.c index 53b93a4b6f8a..f8e9bf116f21 100644 --- a/drivers/media/dvb/dvb-usb/a800.c +++ b/drivers/media/dvb/dvb-usb/a800.c @@ -38,8 +38,8 @@ static int a800_identify_state(struct usb_device *udev, struct dvb_usb_device_pr } static s...
d9e9f41c45536b68b14934949104cb40149e94f1
Analyze and fix the following issue in the Linux kernel code: [media] rc/keymaps: Fix most KEY_PROG[n] keycodes
Problem Details: Those KEY_PROG[n] keys were used on places where the developer didn't know for sure what key should be used. On several cases, using KEY_RED, KEY_GREEN, KEY_YELLOW would be enough. On others, there are specific keys for that already. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off...
```diff diff --git a/drivers/media/rc/keymaps/rc-adstech-dvb-t-pci.c b/drivers/media/rc/keymaps/rc-adstech-dvb-t-pci.c index 136d3952dedc..9a8752fdcca1 100644 --- a/drivers/media/rc/keymaps/rc-adstech-dvb-t-pci.c +++ b/drivers/media/rc/keymaps/rc-adstech-dvb-t-pci.c @@ -50,9 +50,9 @@ static struct rc_map_table adstech_...
4933fc9d72104d66c54620537eb6f43457a6896f
Analyze and fix the following issue in the Linux kernel code: [media] lirc_zilog: Fix somewhat confusing information messages in ir_probe()
Problem Details: The total sequence of messages emitted by the ir_porbe() calls for a transceiver's two i2c_clients was confusing. Clean it up a bit. Signed-off-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/lirc/lirc_zilog.c b/drivers/staging/lirc/lirc_zilog.c index 5946a9541c43..407d4b409a8b 100644 --- a/drivers/staging/lirc/lirc_zilog.c +++ b/drivers/staging/lirc/lirc_zilog.c @@ -1595,6 +1595,8 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) ret =...
915e54733de4a36742ab78b4768750ce72662f85
Analyze and fix the following issue in the Linux kernel code: [media] lirc_zilog: Don't acquire the rx->buf_lock in the poll() function
Problem Details: There is no need to take the rx->buf_lock in the the poll() function as all the underling calls made on objects in the rx->buf lirc_buffer object are protected by spinlocks. Corrected a bad error return value in poll(): return POLLERR instead of -ENODEV. Added some comments to poll() for when, in the...
```diff diff --git a/drivers/staging/lirc/lirc_zilog.c b/drivers/staging/lirc/lirc_zilog.c index 720ef6739d0e..695c3df93ca8 100644 --- a/drivers/staging/lirc/lirc_zilog.c +++ b/drivers/staging/lirc/lirc_zilog.c @@ -985,19 +985,26 @@ static unsigned int poll(struct file *filep, poll_table *wait) unsigned int ret; ...
fe06b11dea74d53156d4116dcd518193a2e42ba4
Analyze and fix the following issue in the Linux kernel code: [media] docs: fix typo in lirc_device_interface.xml
Problem Details: Reported-by: Daniel Burr <dburr@topcon.com> Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/Documentation/DocBook/v4l/lirc_device_interface.xml b/Documentation/DocBook/v4l/lirc_device_interface.xml index 68134c0ab4d1..0e0453f39e73 100644 --- a/Documentation/DocBook/v4l/lirc_device_interface.xml +++ b/Documentation/DocBook/v4l/lirc_device_interface.xml @@ -45,7 +45,7 @@ describing an IR si...
aaf0ef1d2bce05cfd06cf29c96a6973df4d0a6a8
Analyze and fix the following issue in the Linux kernel code: 9p: use the updated offset given by generic_write_checks
Problem Details: Without this fix, even if a file is opened in O_APPEND mode, data will be written at current file position instead of end of file. Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
```diff diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index 6997eb62fbba..ffed55817f0c 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c @@ -508,9 +508,12 @@ v9fs_file_write(struct file *filp, const char __user * data, if (!count) goto out; - return v9fs_file_write_internal(filp->f_path.dentry->d_inode, + ...
53bda3e5b4e91763224ecb7d05dab94d281fd41d
Analyze and fix the following issue in the Linux kernel code: [net/9p] unconditional wake_up to proc waiting for space on VirtIO ring
Problem Details: Process may wait to get space on VirtIO ring to send a transaction to VirtFS server. Current code just does a conditional wake_up() which means only one process will be woken up even if multiple processes are waiting. This fix makes the wake_up unconditional. Hence we won't have any processes waiting ...
```diff diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index 9b550ed9c711..961e025957ae 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c @@ -146,11 +146,10 @@ static void req_done(struct virtqueue *vq) rc = virtqueue_get_buf(chan->vq, &len); if (rc != NULL) { - if (!chan->ring_bufs_a...
04521db04e9a11e74b0252d222051cb194487f4d
Analyze and fix the following issue in the Linux kernel code: blk-throttle: Reset group slice when limits are changed
Problem Details: Lina reported that if throttle limits are initially very high and then dropped, then no new bio might be dispatched for a long time. And the reason being that after dropping the limits we don't reset the existing slice and do the rate calculation with new low rate and account the bios dispatched at hig...
```diff diff --git a/block/blk-throttle.c b/block/blk-throttle.c index 37abbfc68590..5352bdafbcf0 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c @@ -756,6 +756,15 @@ static void throtl_process_limit_change(struct throtl_data *td) " riops=%u wiops=%u", tg->bps[READ], tg->bps[WRITE], tg->iops[READ],...
472e7f9f8b547605ee9670ac803e971c2e3eeac0
Analyze and fix the following issue in the Linux kernel code: net/9p: Fix compile warning
Problem Details: Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
```diff diff --git a/net/9p/trans_common.c b/net/9p/trans_common.c index d62b9aa58df8..9172ab78fcb0 100644 --- a/net/9p/trans_common.c +++ b/net/9p/trans_common.c @@ -41,9 +41,9 @@ EXPORT_SYMBOL(p9_release_req_pages); int p9_nr_pages(struct p9_req_t *req) { - int start_page, end_page; - start_page = (unsigned long ...
eeff66ef6e33925f615d49e6c846263e342ab60e
Analyze and fix the following issue in the Linux kernel code: net/9p: Convert the in the 9p rpc call path to GFP_NOFS
Problem Details: Without this we can cause reclaim allocation in writepage. [ 3433.448430] ================================= [ 3433.449117] [ INFO: inconsistent lock state ] [ 3433.449117] 2.6.38-rc5+ #84 [ 3433.449117] --------------------------------- [ 3433.449117] inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-R...
```diff diff --git a/net/9p/client.c b/net/9p/client.c index 347ec0cd2718..2ccbf04d37df 100644 --- a/net/9p/client.c +++ b/net/9p/client.c @@ -223,7 +223,7 @@ static struct p9_req_t *p9_tag_alloc(struct p9_client *c, u16 tag) req = &c->reqs[row][col]; if (!req->tc) { - req->wq = kmalloc(sizeof(wait_queue_head_t)...
5a7e0a8cf50cf905403f5a498e86d1f97cfcf51b
Analyze and fix the following issue in the Linux kernel code: fs/9p: Fix race in initializing writeback fid
Problem Details: When two process open the same file we can end up with both of them allocating the writeback_fid. Add a new mutex which can be used for synchronizing v9fs_inode member values. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm...
```diff diff --git a/fs/9p/v9fs.h b/fs/9p/v9fs.h index bd8496db135b..89657e865162 100644 --- a/fs/9p/v9fs.h +++ b/fs/9p/v9fs.h @@ -130,6 +130,7 @@ struct v9fs_inode { #endif unsigned int cache_validity; struct p9_fid *writeback_fid; + struct mutex v_mutex; struct inode vfs_inode; }; diff --git a/fs/9p/vfs_fil...
9026e521c0da0731eb31f9f9022dd00cc3cd8885
Analyze and fix the following issue in the Linux kernel code: blk-cgroup: Only give unaccounted_time under debug
Problem Details: This change moves unaccounted_time to only be reported when CONFIG_DEBUG_BLK_CGROUP is true. Signed-off-by: Justin TerAvest <teravest@google.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
```diff diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 77ee3c1ec1a7..2bef5705ce24 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -605,10 +605,10 @@ static uint64_t blkio_get_stat(struct blkio_group *blkg, if (type == BLKIO_STAT_SECTORS) return blkio_fill_stat(key_str, MAX_KEY_LEN - 1, ...
2aefbc1acb5370b0753d16c9d6e65e01fe586c75
Analyze and fix the following issue in the Linux kernel code: [media] tm6000: fix s-video input
Problem Details: Add compatibility for composite and s-video inputs. Some TV cards hasn't it. Fix S-Video input, the s-video cable has only video signals no audio. Call the function of audio configure kill chroma in signal. only b/w video. Known bugs: - after s-video the audio for radio didn't work, TV crashed hard...
```diff diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c index 88144a12745d..146c7e86deca 100644 --- a/drivers/staging/tm6000/tm6000-cards.c +++ b/drivers/staging/tm6000/tm6000-cards.c @@ -235,11 +235,13 @@ struct tm6000_board tm6000_boards[] = { .avideo = TM6000_AIP_S...
2ccb24ff3b94acb3f405b10a59967d52d95f91e0
Analyze and fix the following issue in the Linux kernel code: [media] ite-cir: Fix some CodingStyle issues
Problem Details: Cc: Juan J. Garcia de Soria <skandalfo@gmail.com> Cc: Stephan Raue <stephan@openelec.tv> Cc: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c index 10358d5b3189..9be6a830f1d2 100644 --- a/drivers/media/rc/ite-cir.c +++ b/drivers/media/rc/ite-cir.c @@ -461,8 +461,10 @@ static int ite_tx_ir(struct rc_dev *rcdev, int *txbuf, u32 n) else val |= ITE_TX_SPACE; - /* if we get ...
3e507c55918b51fed30ae5e9a3667c6a5f2e8755
Analyze and fix the following issue in the Linux kernel code: [media] saa7134: Fix strange kconfig dependency on RC_CORE
Problem Details: As the code in saa7134-input is not a module, but the config for it is set as a boolean instead of a tristate, this causes a strange dependency on RC_CORE. VIDEO_SAA7134_RC (which determines if saa7134-input.o is built) depends on RC_CORE and VIDEO_SAA7134. If VIDEO_SAA7134 is compiled as 'y' but RC_C...
```diff diff --git a/drivers/media/video/saa7134/Kconfig b/drivers/media/video/saa7134/Kconfig index 380f1b28cfcc..39fc0187a747 100644 --- a/drivers/media/video/saa7134/Kconfig +++ b/drivers/media/video/saa7134/Kconfig @@ -28,6 +28,7 @@ config VIDEO_SAA7134_RC bool "Philips SAA7134 Remote Controller support" depend...
7106225a9e7d123ff87a6848972b6d28c8903940
Analyze and fix the following issue in the Linux kernel code: [media] gspca - main: Add endpoint direction test in alt_xfer
Problem Details: This patch fixes a bug in gspca, more precisely in alt_xfer(). This function looks for an input transfer endpoint in an alternate setting. By default it returns the first endpoint corresponding to the transfer type indicated in parameter. But with some USB devices, the first endpoint corresponding to ...
```diff diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index 62881740a0bd..9c6a643caf01 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c @@ -630,7 +630,8 @@ static struct usb_host_endpoint *alt_xfer(struct usb_host_interface *alt, ep = &alt->e...
8e3c08bb41145bd8507397f63937759500c12a04
Analyze and fix the following issue in the Linux kernel code: [media] gspca - nw80x: Fix exposure for some webcams
Problem Details: Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/gspca/nw80x.c b/drivers/media/video/gspca/nw80x.c index b6d7c8dbb94f..8e754fd4dc5e 100644 --- a/drivers/media/video/gspca/nw80x.c +++ b/drivers/media/video/gspca/nw80x.c @@ -1700,6 +1700,9 @@ static void setexposure(struct gspca_dev *gspca_dev) v[0] = ((9 - val) << 3) | 0x01;...
152507144a59d74423a25e1ba80f4f7f17449417
Analyze and fix the following issue in the Linux kernel code: [media] gspca - nw80x: Fix some image resolutions
Problem Details: No 352x288 for Ds3303 and no 320x240 for Generic802. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/gspca/nw80x.c b/drivers/media/video/gspca/nw80x.c index f2adf6f0426f..cfab8973e95c 100644 --- a/drivers/media/video/gspca/nw80x.c +++ b/drivers/media/video/gspca/nw80x.c @@ -154,6 +154,10 @@ static const u8 webcam_chip[NWEBCAMS] = { * nw801/802: 320x240, 640x480 */ static c...