id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
377c9ba772b0c3f848c12810231eb103aad473eb
Analyze and fix the following issue in the Linux kernel code: [media] V4L: mt9t112: fix broken cropping and scaling
Problem Details: G_CROP, S_CROP, CROPCAP, G_FMT, and S_FMT functionality in the mt9t112 driver was broken on many occasions. This patch allows consistent cropping for rectangles also larger than VGA and cleans up multiple other issues in this area. It still doesn't add support for proper scaling, using the sensor own s...
```diff diff --git a/drivers/media/video/mt9t112.c b/drivers/media/video/mt9t112.c index 608a3b6a8e99..25cdcb90768a 100644 --- a/drivers/media/video/mt9t112.c +++ b/drivers/media/video/mt9t112.c @@ -78,11 +78,6 @@ /************************************************************************ struct *******************...
15f517e2726cae7d9ed2a0bccb6e36dbf3fff456
Analyze and fix the following issue in the Linux kernel code: [media] V4L: sh_mobile_ceu_camera: fix field addresses in interleaved mode
Problem Details: In interlaced interleaved mode field offset for deinterlacing depends on the pixel format. 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/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c index b44f318aa011..7841fde1cc4e 100644 --- a/drivers/media/video/sh_mobile_ceu_camera.c +++ b/drivers/media/video/sh_mobile_ceu_camera.c @@ -267,6 +267,7 @@ static int sh_mobile_ceu_capture(struct sh_mobile_ceu...
188d7c6b0cfee134cc7fbc61d36223b1d7dfffab
Analyze and fix the following issue in the Linux kernel code: ARM:i.MX: fix build error in clock-mx51-mx53.c
Problem Details: arch/arm/mach-mx5/clock-mx51-mx53.c: In function 'clk_get_freq_dt': arch/arm/mach-mx5/clock-mx51-mx53.c:1643: error: implicit declaration of function 'for_each_compatible_node' arch/arm/mach-mx5/clock-mx51-mx53.c:1643: error: expected ';' before '{' token Signed-off-by: Jason Liu <jason.hui@linaro.org...
```diff diff --git a/arch/arm/mach-mx5/clock-mx51-mx53.c b/arch/arm/mach-mx5/clock-mx51-mx53.c index 2aacf41c48e7..6312425c0056 100644 --- a/arch/arm/mach-mx5/clock-mx51-mx53.c +++ b/arch/arm/mach-mx5/clock-mx51-mx53.c @@ -1634,6 +1634,7 @@ int __init mx53_clocks_init(unsigned long ckil, unsigned long osc, return 0; ...
98de0cbbe2e7157fd87d04386621be3eadd4d6ab
Analyze and fix the following issue in the Linux kernel code: ARM:i.MX: fix build error in tzic/avic.c
Problem Details: arch/arm/plat-mxc/tzic.c:105: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'tzic_handle_irq' Signed-off-by: Jason Liu <jason.hui@linaro.org>
```diff diff --git a/arch/arm/plat-mxc/avic.c b/arch/arm/plat-mxc/avic.c index 8875fb415f68..55f15699a383 100644 --- a/arch/arm/plat-mxc/avic.c +++ b/arch/arm/plat-mxc/avic.c @@ -22,6 +22,7 @@ #include <linux/io.h> #include <mach/common.h> #include <asm/mach/irq.h> +#include <asm/exception.h> #include <mach/hardwar...
a918feef334090692ea65e77a8b0cca5e682e666
Analyze and fix the following issue in the Linux kernel code: ARM: mxc: fix local timer interrupt handling
Problem Details: As local timer interrupts are now handled as normal interrupts, remove the special case in the GIC handler. Cc: Shawn Guo <shawn.guo@linaro.org> Cc: Sascha Hauer <kernel@pengutronix.de> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Tested-and-Acked-by: Shawn Guo <shawn.guo@linaro.org>
```diff diff --git a/arch/arm/plat-mxc/gic.c b/arch/arm/plat-mxc/gic.c index b3b8eed263b8..12f8f8109010 100644 --- a/arch/arm/plat-mxc/gic.c +++ b/arch/arm/plat-mxc/gic.c @@ -28,21 +28,14 @@ asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs) if (irqnr == 1023) break; - if (irqnr > 29 &...
7d0d3ad5e3cfbf96aa4a2d6ee26a20c98a29d4a1
Analyze and fix the following issue in the Linux kernel code: powerpc/fsl_booke: Fix comment in head_fsl_booke.S
Problem Details: Fix typo in comments introduced by: commit 6dece0eb69b2a28e18d104bc5d707f1cb673f5e0 Author: Scott Wood <scottwood@freescale.com> Date: Mon Jul 25 11:29:33 2011 +0000 powerpc/32: Pass device tree address as u64 to machine_init Signed-off-by: Matthew McClintock <msm@freescale.com> cc: Scott Wood...
```diff diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S index e1c699f3b7a7..9f5d210ddf3f 100644 --- a/arch/powerpc/kernel/head_fsl_booke.S +++ b/arch/powerpc/kernel/head_fsl_booke.S @@ -80,8 +80,8 @@ _ENTRY(_start); slw r18,r18,r17 /* r18 = page size */ addi r18,r18,-1 an...
cfadd83852eb6b9a015bc1ea396b98f395f073e0
Analyze and fix the following issue in the Linux kernel code: powerpc/8xxx: Fix interrupt handling in MPC8xxx GPIO driver
Problem Details: Interrupt handler in MPC8xxx GPIO driver is missing the call to PIC EOI (end of interrupt) handler. As a result, at least on 85XX systems, GPIO interrupt is delivered only once. This patch adds the missing EOI call. Tested on custom P1022 board. Signed-off-by: Felix Radensky <felix@embedded-sol.com> S...
```diff diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c index d74d19bf3af5..ec3fcf0a7e12 100644 --- a/drivers/gpio/gpio-mpc8xxx.c +++ b/drivers/gpio/gpio-mpc8xxx.c @@ -146,6 +146,7 @@ static int mpc8xxx_gpio_to_irq(struct gpio_chip *gc, unsigned offset) static void mpc8xxx_gpio_irq_cascade(unsig...
cf2aff6eff251b6fbdaf8c253e65ff7c693de8cd
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix DP setup on TRAVIS bridges
Problem Details: Supposedly both NUTMEG and TRAVIS should use the same panel mode, but switching the panel mode for TRAVIS gets things working. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=41569 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/atombios_dp.c b/drivers/gpu/drm/radeon/atombios_dp.c index ff47186b5629..a0de48542f71 100644 --- a/drivers/gpu/drm/radeon/atombios_dp.c +++ b/drivers/gpu/drm/radeon/atombios_dp.c @@ -560,9 +560,12 @@ static void radeon_dp_set_panel_mode(struct drm_encoder *encoder, if (!ASI...
a18cee15ed4c8b6a35f96b7b26a46bac32e04bd9
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: add MSI module parameter
Problem Details: Allow the user to override whether MSIs are enabled or not on supported ASICs. MSIs are disabled by default on IGP chips as they tend not to work. However certain IGP chips only seem to work with MSIs enabled. I suspect this is a chipset or bios issue, but I'm not sure what the proper fix is. This ...
```diff diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 83b76db7bcfd..e94c6f18a157 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h @@ -93,6 +93,7 @@ extern int radeon_audio; extern int radeon_disp_priority; extern int radeon_hw_i2c; extern int r...
01e718ec194e30b3e8eb3858c742c13649757efc
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: Add MSI quirk for Dell RS690
Problem Details: Some Dell laptops only seem to work with MSIs. This looks like a platform/bios bug. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=37679 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c index f88c1a245036..914d9ee8fd35 100644 --- a/drivers/gpu/drm/radeon/radeon_irq_kms.c +++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c @@ -125,6 +125,12 @@ static bool radeon_msi_ok(struct radeon_device *rdev) (rde...
b362105f7f5223fa4d2e03ceeea0e51da754ccc6
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: Add MSI quirk for HP RS690
Problem Details: Some HP laptops only seem to work with MSIs. This looks like a platform/bios bug. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=37679 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c index 91de37a0fde2..f88c1a245036 100644 --- a/drivers/gpu/drm/radeon/radeon_irq_kms.c +++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c @@ -118,6 +118,13 @@ static bool radeon_msi_ok(struct radeon_device *rdev) if (rdev...
6dd9ad7df2019b1e33a372a501907db293ebcd0d
Analyze and fix the following issue in the Linux kernel code: block: don't call blk_drain_queue() if elevator is not up
Problem Details: blk_cleanup_queue() may be called before elevator is set up on a queue which triggers the following oops. BUG: unable to handle kernel NULL pointer dereference at (null) IP: [<ffffffff8125a69c>] elv_drain_elevator+0x1c/0x70 ... Pid: 830, comm: kworker/0:2 Not tainted 3.1.0-next-20111025_...
```diff diff --git a/block/blk-core.c b/block/blk-core.c index f65871116404..f43c8a5840ae 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -407,8 +407,13 @@ void blk_cleanup_queue(struct request_queue *q) spin_unlock_irq(lock); mutex_unlock(&q->sysfs_lock); - /* drain all requests queued before DEAD markin...
616fdb5afb12b4d5bb9e36df40d039e86aaaefc2
Analyze and fix the following issue in the Linux kernel code: drm/i915: forcewake warning fixes in debugfs
Problem Details: Some more unsafe debugfs access are fixed with this patch. I tested all reads, but didn't thoroughly test the writes. Cc: "Nicolas Kalkhof" <nkalkhof@web.de> Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Keith Packard <keithp@keithp.c...
```diff diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 8e95d66800b0..f2e02075d510 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -635,11 +635,16 @@ static int i915_ringbuffer_info(struct seq_file *m, void *data) struct drm_de...
51e4152a969aa6d2306492ebf143932dcb535c9b
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek - Skip invalid digital out pins
Problem Details: Some BIOS report invalid pins as digital output pins. The driver checks the connection but it doesn't do it fully correctly, and it leaves some undefined value as the audio-out widget, which makes the driver spewing warnings. This patch fixes the issue. Reference: https://bugzilla.novell.com/show_bu...
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 9543bc8aaef6..80d6add8a620 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -1604,27 +1604,29 @@ static void alc_auto_init_digital(struct hda_codec *codec) static void alc_auto_parse_digital(struct...
4536e4d1d21c8172402a2217b0fa1880665ace36
Analyze and fix the following issue in the Linux kernel code: Revert "perf: Add PM notifiers to fix CPU hotplug races"
Problem Details: This reverts commit 144060fee07e9c22e179d00819c83c86fbcbf82c. It causes a resume regression for Andi on his Acer Aspire 1830T post 3.1. The screen just stays black after wakeup. Also, it really looks like the wrong way to suspend and resume perf events: I think they should be done as part of the CPU...
```diff diff --git a/kernel/events/core.c b/kernel/events/core.c index 12a0287e0358..e1253faa34dd 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -29,7 +29,6 @@ #include <linux/hardirq.h> #include <linux/rculist.h> #include <linux/uaccess.h> -#include <linux/suspend.h> #include <linux/syscalls.h> #...
f9e3d4b1a9c86217655997d3ef109b1eaae967bc
Analyze and fix the following issue in the Linux kernel code: perf top: Fix live annotation in the --stdio interface
Problem Details: In the old --stdio interface the annotation is done just after one selects a symbol, while in --tui, now the default when the required libs are installed, we annotate all symbols with samples so that when annotation is asked we see what happened recently on that symbol. To achieve that the --stdio var...
```diff diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index a13f8870d94c..c9cdedb58134 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -200,7 +200,8 @@ static void record_precise_ip(struct hist_entry *he, int counter, u64 ip) struct symbol *sym; if (he == NULL || he->ms....
c75d720fca8a91ce99196d33adea383621027bf2
Analyze and fix the following issue in the Linux kernel code: genirq: Fix irqfixup, irqpoll regression
Problem Details: commit d05c65fff0 ("genirq: spurious: Run only one poller at a time") introduced a regression, leaving the boot options 'irqfixup' and 'irqpoll' non-functional. The patch placed tests in each function, to exit if the function is already running. The test in 'misrouted_irq' exited when it should have pr...
```diff diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c index aa57d5da18c1..b5f4742693c0 100644 --- a/kernel/irq/spurious.c +++ b/kernel/irq/spurious.c @@ -115,7 +115,7 @@ static int misrouted_irq(int irq) struct irq_desc *desc; int i, ok = 0; - if (atomic_inc_return(&irq_poll_active) == 1) + if (atomi...
9d8e18b1e966e43729a08421a29510f49f931b60
Analyze and fix the following issue in the Linux kernel code: [media] staging: as102: Enable compilation
Problem Details: Fix compilation errors in the USB driver by replacing usb_buffer_free(), usb_buffer_alloc() with usb_free_coherent() and usb_alloc_coherent(). Add entries for the driver in parent Makefile and Kconfig. [snjw23@gmail.com: minor edit to changelog] Cc: Devin Heitmueller <dheitmueller@kernellabs.com> Sign...
```diff diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig index d132c27dfb3f..0e1bc6dccccb 100644 --- a/drivers/staging/Kconfig +++ b/drivers/staging/Kconfig @@ -144,4 +144,6 @@ source "drivers/staging/mei/Kconfig" source "drivers/staging/nvec/Kconfig" +source "drivers/staging/media/as102/Kconfig" + ...
315cadc446714c5c1a406afff6f53aa80d1e267e
Analyze and fix the following issue in the Linux kernel code: [media] staging: as102: Fix licensing oversight
Problem Details: Fix a couple of files which were supposed by be relicensed as GPL but were overlooked. Signed-off-by: Pierrick Hascoet <pierrick.hascoet@abilis.com> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl> Signed-off-by: Sylwester Nawrocki <...
```diff diff --git a/drivers/staging/media/as102/as10x_cmd_cfg.c b/drivers/staging/media/as102/as10x_cmd_cfg.c index 7b22e190c701..0635797232e5 100644 --- a/drivers/staging/media/as102/as10x_cmd_cfg.c +++ b/drivers/staging/media/as102/as10x_cmd_cfg.c @@ -1,20 +1,21 @@ -/** - - \file as10x_cmd_cfg.c - - \author: S. Ma...
e2e02ca48878e78393f09a47918501a3a4b374b4
Analyze and fix the following issue in the Linux kernel code: [media] staging: as102: Fix CodingStyle errors in file as10x_cmd_cfg.c
Problem Details: Fix Linux kernel coding style (whitespace and indentation) errors in file as10x_cmd_cfg.c. No functional changes. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl> Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com> Signed-off-by: Ma...
```diff diff --git a/drivers/staging/media/as102/as10x_cmd_cfg.c b/drivers/staging/media/as102/as10x_cmd_cfg.c index e3a0f90936d4..7b22e190c701 100644 --- a/drivers/staging/media/as102/as10x_cmd_cfg.c +++ b/drivers/staging/media/as102/as10x_cmd_cfg.c @@ -2,8 +2,6 @@ \file as10x_cmd_cfg.c - \version $Id$ - \au...
c7a6c00194c05a30fecc84e101d4b9c8d44cffc9
Analyze and fix the following issue in the Linux kernel code: [media] staging: as102: Fix CodingStyle errors in file as102_usb_drv.c
Problem Details: Fix Linux kernel coding style (whitespace and indentation) errors in file as102_usb_drv.c. No functional changes. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl> Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com> Signed-off-by: Ma...
```diff diff --git a/drivers/staging/media/as102/as102_usb_drv.c b/drivers/staging/media/as102/as102_usb_drv.c index ee993960731a..6e7971994492 100644 --- a/drivers/staging/media/as102/as102_usb_drv.c +++ b/drivers/staging/media/as102/as102_usb_drv.c @@ -1,6 +1,7 @@ /* * Abilis Systems Single DVB-T Receiver * Copy...
87ad567e257523ea8857507eaaed866ba5d20d5d
Analyze and fix the following issue in the Linux kernel code: [media] staging: as102: Fix CodingStyle errors in file as102_fe.c
Problem Details: Fix Linux kernel coding style (whitespace and indentation) errors in file as102_fe.c. No functional changes. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl> Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com> Signed-off-by: Mauro C...
```diff diff --git a/drivers/staging/media/as102/as102_fe.c b/drivers/staging/media/as102/as102_fe.c index 3e6f497aed51..e9f7188ee44c 100644 --- a/drivers/staging/media/as102/as102_fe.c +++ b/drivers/staging/media/as102/as102_fe.c @@ -1,6 +1,7 @@ /* * Abilis Systems Single DVB-T Receiver * Copyright (C) 2008 Pierr...
79848e9afbdb47a230d55d29af1a6fada718427c
Analyze and fix the following issue in the Linux kernel code: [media] staging: as102: Fix CodingStyle errors in file as10x_cmd_stream.c
Problem Details: Fix Linux kernel coding style (whitespace and indentation) errors in file as10x_cmd_stream.c. No functional changes. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl> Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com> Signed-off-by:...
```diff diff --git a/drivers/staging/media/as102/as10x_cmd_stream.c b/drivers/staging/media/as102/as10x_cmd_stream.c index 4dfacf464ed1..8705894d51c7 100644 --- a/drivers/staging/media/as102/as10x_cmd_stream.c +++ b/drivers/staging/media/as102/as10x_cmd_stream.c @@ -2,8 +2,6 @@ \file as10x_cmd_stream.c - \versi...
9cc08121f177e9618fe9108b0f5e2fb690d4df33
Analyze and fix the following issue in the Linux kernel code: [media] staging: as102: Fix CodingStyle errors in file as10x_cmd.c
Problem Details: Fix Linux kernel coding style (whitespace and indentation) errors in file as10x_cmd.c. No functional changes. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl> Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com> Signed-off-by: Mauro ...
```diff diff --git a/drivers/staging/media/as102/as10x_cmd.c b/drivers/staging/media/as102/as10x_cmd.c index cecb809a51a0..222e7032ded2 100644 --- a/drivers/staging/media/as102/as10x_cmd.c +++ b/drivers/staging/media/as102/as10x_cmd.c @@ -1,6 +1,7 @@ /* * Abilis Systems Single DVB-T Receiver * Copyright (C) 2008 P...
e54d081dacdcdee7d10c1f87bacce89044519c5c
Analyze and fix the following issue in the Linux kernel code: [media] staging: as102: Fix CodingStyle errors in file as102_fw.c
Problem Details: Fix Linux kernel coding style (whitespace and indentation) errors in file as102_fw.c. No functional changes. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl> Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com> Signed-off-by: Mauro C...
```diff diff --git a/drivers/staging/media/as102/as102_fw.c b/drivers/staging/media/as102/as102_fw.c index d921a6fd6953..c019df933cc9 100644 --- a/drivers/staging/media/as102/as102_fw.c +++ b/drivers/staging/media/as102/as102_fw.c @@ -1,6 +1,7 @@ /* * Abilis Systems Single DVB-T Receiver * Copyright (C) 2008 Pierr...
c6ccdca9801604e9e2797677f1a78c2c534b2f1f
Analyze and fix the following issue in the Linux kernel code: [media] staging: as102: Fix CodingStyle errors in file as102_drv.c
Problem Details: Fix Linux kernel coding style (whitespace and indentation) errors in file as102_drv.c. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl> Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mcheha...
```diff diff --git a/drivers/staging/media/as102/as102_drv.c b/drivers/staging/media/as102/as102_drv.c index c334bffa36e4..9e5d81bb3432 100644 --- a/drivers/staging/media/as102/as102_drv.c +++ b/drivers/staging/media/as102/as102_drv.c @@ -1,6 +1,7 @@ /* * Abilis Systems Single DVB-T Receiver * Copyright (C) 2008 P...
c8c741b6eeb7c5c514a3177fd28225bff454b08f
Analyze and fix the following issue in the Linux kernel code: [media] cx18: Fix FM radio
Problem Details: The cx18 driver was not setting up the analog tuner driver to enable FM radio. This change fixes that. Thanks go to Ian Armstrong for reporting and fixing the analogous problem in ivtv. Signed-off-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/cx18/cx18-driver.c b/drivers/media/video/cx18/cx18-driver.c index 9e2f870f4258..c6ff32a6137c 100644 --- a/drivers/media/video/cx18/cx18-driver.c +++ b/drivers/media/video/cx18/cx18-driver.c @@ -1085,6 +1085,8 @@ static int __devinit cx18_probe(struct pci_dev *pci_dev, setup.a...
8f33450a4c886774345d606d615cf6b50fa193b7
Analyze and fix the following issue in the Linux kernel code: [media] ivtv: Fix radio support
Problem Details: Although the ivtv driver reports radio support through the V4L2 API, it fails to actually enable it. This patch fixes that. Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c index 0fb75524484d..41108a9a195e 100644 --- a/drivers/media/video/ivtv/ivtv-driver.c +++ b/drivers/media/video/ivtv/ivtv-driver.c @@ -1180,6 +1180,8 @@ static int __devinit ivtv_probe(struct pci_dev *pdev, setup.addr...
f7c9c6bb14f3104608a3a83cadea10a6943d2804
Analyze and fix the following issue in the Linux kernel code: [SCSI] Fix block queue and elevator memory leak in scsi_alloc_sdev
Problem Details: When looking at memory consumption issues I noticed quite a lot of memory in the kmalloc-2048 bucket: OBJS ACTIVE USE OBJ SIZE SLABS OBJ/SLAB CACHE SIZE NAME 6561 6471 98% 2.30K 243 27 15552K kmalloc-2048 Over 15MB. slub debug shows that cfq is responsible for almost all of i...
```diff diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 44e8ca398efa..72273a0e5666 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -322,6 +322,7 @@ out_device_destroy: scsi_device_set_state(sdev, SDEV_DEL); transport_destroy_device(&sdev->sdev_gendev); put_device(&sd...
ab72002bc53eb8cf06615503878ee71494921fcc
Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_dh_alua: Fix the time inteval for alua rtpg commands
Problem Details: This patch corrects the retry interval for alua rtpg command. Purpose was to retry the commands in seconds. But that was not happening. Reason is msleep takes argument in milliseconds. Also added minor text after successful attach. Signed-off-by: Babu Moger <babu.moger@netapp.com> Acked-by: Hannes Re...
```diff diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c index 627f4b5e5176..fe4df2da309c 100644 --- a/drivers/scsi/device_handler/scsi_dh_alua.c +++ b/drivers/scsi/device_handler/scsi_dh_alua.c @@ -507,7 +507,7 @@ static int alua_rtpg(struct scsi_device *sdev, struct...
eae627e4ba07cb5765bbfdfec514f6808326a691
Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_transport_iscsi: Fix documentation os parameter
Problem Details: Fixes documentation of a parameter of iscsi_bsg_host_add function to silence to make htmldocs Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
```diff diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index 1bcd65a509e6..96029e6d027f 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c @@ -520,7 +520,7 @@ fail_host_msg: /** * iscsi_bsg_host_add - Create and add the bsg hooks to rece...
e6c40fe3f4c4967f1cb486191ed4a5d5f55f3f7e
Analyze and fix the following issue in the Linux kernel code: pnfs-obj: Return PNFS_NOT_ATTEMPTED in case of read/write_pagelist
Problem Details: objlayout driver was always returning PNFS_ATTEMPTED from it's read/write_pagelist operations. Even on error. Fix that. Start by establishing an error return API from io-engine, by not returning ssize_t (length-or-error) but returning "int" 0=OK, 0>Error. And clean up all return types in io-engine. T...
```diff diff --git a/fs/nfs/objlayout/objio_osd.c b/fs/nfs/objlayout/objio_osd.c index d0cda12fddc3..0c7c9ec24e67 100644 --- a/fs/nfs/objlayout/objio_osd.c +++ b/fs/nfs/objlayout/objio_osd.c @@ -142,7 +142,7 @@ OBJIO_LSEG(struct pnfs_layout_segment *lseg) } struct objio_state; -typedef ssize_t (*objio_done_fn)(stru...
2b72c9ccd22c4a3299e5a358dcd639fb253730f4
Analyze and fix the following issue in the Linux kernel code: nfs: Remove unused variable from write.c
Problem Details: When CONFIG_NFS=y and CONFIG_NFS_V3_{,V4}=n we get the following warning. fs/nfs/write.c: In function ‘nfs_writeback_done’: fs/nfs/write.c:1246:21: warning: unused variable ‘server’ Remove the variable 'server' to fix the above warning. Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com> Signe...
```diff diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 2219c88d96b2..b016b8a36399 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -1243,7 +1243,6 @@ void nfs_writeback_done(struct rpc_task *task, struct nfs_write_data *data) { struct nfs_writeargs *argp = &data->args; struct nfs_writeres *resp = &data->res...
6f276e49fd108362be3fd67154aaaacf872ea026
Analyze and fix the following issue in the Linux kernel code: nfs: Fix unused variable warning from file.c
Problem Details: Fix the following unused variable warning. fs/nfs/file.c: In function ‘nfs_file_release’: fs/nfs/file.c:140:17: warning: unused variable ‘dentry’ fs/nfs/file.c: In function ‘nfs_file_read’: fs/nfs/file.c:237:9: warning: unused variable ‘count’ Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com> Si...
```diff diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 28b8c3f3cda3..bd7dff001106 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -137,11 +137,9 @@ nfs_file_open(struct inode *inode, struct file *filp) static int nfs_file_release(struct inode *inode, struct file *filp) { - struct dentry *dentry = filp->f_path.de...
331bcf45feb76d507a769d9d3b26ff5626804117
Analyze and fix the following issue in the Linux kernel code: ixgbe: fix reading of the buffer returned by the firmware
Problem Details: This patch fixes some issues found in the buffer read portion of ixgbe_host_interface_command() - use `bi` as the buffer index counter instead of `i` - add conversion to native cpu byte ordering on register read - fix conversion from bytes to dword - use dword_len instead of buf_len when reading the r...
```diff diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c index 834f044be4c3..f1365fef4ed2 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c @@ -3344,7 +3344,7 @@ static u8 ixgbe_calculate_check...
9487dc844054e1fc691fb82f4e19da337e2ca35e
Analyze and fix the following issue in the Linux kernel code: ixgbe: Fix compiler warnings
Problem Details: Wrap SR-IOV specific functions in CONFIG_PCI_IOV to avoid compiler warnings. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
```diff diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h index 5a7e1eb33599..4a5d8897faab 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h @@ -42,10 +42,12 @@ int ixgbe_ndo_set_vf_spoofchk(struct ...
b120818e652965669d3f1abaeaa5c3ccdfb28126
Analyze and fix the following issue in the Linux kernel code: ixgbe: fix smatch splat due to missing NULL check
Problem Details: ixgbe_ieee_ets and ixgbe_ieee_pfc are intialized at the same time. Do a check for both before configuring IEEE802.1Qaz. Also max_frame was causing a sparse warning resolved here as well. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Te...
```diff diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 2e9fd9dccf0c..8ef92d1a6aa1 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -3345,34 +3345,25 @@ static void ixgbe_configure_dcb(struc...
93d3ce8fafb888702311fc8c5917faa4c25b8266
Analyze and fix the following issue in the Linux kernel code: ixgbe: fix disabling of Tx laser at probe
Problem Details: register_netdev() calls ndo_set_features() which may result in HW reset which in turn will bring the laser back up. This patch moves ixgbe_laser_tx_disable() below register_netdev() in ixgbe_probe() to make sure laser is shut off on load. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Teste...
```diff diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index b7abf43a877e..2e9fd9dccf0c 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -7588,13 +7588,6 @@ static int __devinit ixgbe_probe(struc...
232ef6bc451de2bc17c22fd116838cd89b94e1c1
Analyze and fix the following issue in the Linux kernel code: ixgbe: Fix link issues caused by a reset while interface is down
Problem Details: Interface fails to obtain link on 82599 SFP in the following scenario: 1. Set advertised speed to GB: ethtool -s eth0 advertise 0x20 2. Bring interface down ip link set eth0 down 3. Issue any command that leads to a reset: ethtool -t eth0 4. Bring link back up: ip link set eth0 up Following patch ...
```diff diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 09b8e88b2999..b7abf43a877e 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -6125,7 +6125,6 @@ static void ixgbe_sfp_link_config_subta...
d5a0e3640c05b7d07c548f9f8f986dbb87cfad98
Analyze and fix the following issue in the Linux kernel code: igb: Fix for I347AT4 PHY cable length unit detection
Problem Details: The PHY cable length unit detection was not using the correct the correct PHY data variable for I347AT4. Signed-off-by: Tomasz Kantecki <tomasz.kantecki@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
```diff diff --git a/drivers/net/ethernet/intel/igb/e1000_phy.c b/drivers/net/ethernet/intel/igb/e1000_phy.c index 7edf31efe756..b17d7c20f817 100644 --- a/drivers/net/ethernet/intel/igb/e1000_phy.c +++ b/drivers/net/ethernet/intel/igb/e1000_phy.c @@ -1687,7 +1687,7 @@ s32 igb_get_cable_length_m88_gen2(struct e1000_hw *...
34c9ef8bc66e21bdecb215b2fb7d93092468d27d
Analyze and fix the following issue in the Linux kernel code: e1000e: demote a debugging WARN to a debug log message
Problem Details: This debugging message was recently added but it does not need to be as alarming as a WARN. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
```diff diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c index 6a17c62cb86f..e2a80a283fd3 100644 --- a/drivers/net/ethernet/intel/e1000e/ich8lan.c +++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c @@ -866,8 +866,7 @@ static s32 e1000_acquire_swflag_ich8lan(struct e1...
2ca02df6b098be2d33a99a65531dcd84a10b6e21
Analyze and fix the following issue in the Linux kernel code: drivers/misc/vmw_balloon.c: fix typo in code comment
Problem Details: Fix typo in code comment. Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com> Acked-by: Dmitry Torokhov <dtor@vmware.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c index 6983d80563cb..cd41d403c9df 100644 --- a/drivers/misc/vmw_balloon.c +++ b/drivers/misc/vmw_balloon.c @@ -151,7 +151,7 @@ MODULE_LICENSE("GPL"); struct vmballoon_stats { unsigned int timer; - /* allocation statustics */ + /* allocatio...
0e053fcbbbc4d945247cb32cad2767b483cb65f8
Analyze and fix the following issue in the Linux kernel code: drivers/power/ds2780_battery.c: fix deadlock upon insertion and removal
Problem Details: Fixes the deadlock when inserting and removing the ds2780. Signed-off-by: Clifton Barnes <cabarnes@indesign-llc.com> Cc: Evgeniy Polyakov <zbr@ioremap.net> Cc: <stable@kernel.org> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torva...
```diff diff --git a/drivers/power/ds2780_battery.c b/drivers/power/ds2780_battery.c index 2571b4143784..91a783d72360 100644 --- a/drivers/power/ds2780_battery.c +++ b/drivers/power/ds2780_battery.c @@ -39,6 +39,7 @@ struct ds2780_device_info { struct device *dev; struct power_supply bat; struct device *w1_dev; +...
e0c87bd95e8dad455c23bc56513af8dcb1737e55
Analyze and fix the following issue in the Linux kernel code: drivers/net/rionet.c: fix ethernet address macros for LE platforms
Problem Details: Modify Ethernet addess macros to be compatible with BE/LE platforms Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com> Cc: Chul Kim <chul.kim@idt.com> Cc: Kumar Gala <galak@kernel.crashing.org> Cc: Matt Porter <mporter@kernel.crashing.org> Cc: Li Yang <leoli@freescale.com> Cc: <stable@kernel...
```diff diff --git a/drivers/net/rionet.c b/drivers/net/rionet.c index 3bb131137033..7145714a5ec9 100644 --- a/drivers/net/rionet.c +++ b/drivers/net/rionet.c @@ -88,8 +88,8 @@ static struct rio_dev **rionet_active; #define dev_rionet_capable(dev) \ is_rionet_capable(dev->src_ops, dev->dst_ops) -#define RIONET_MAC...
166c050bda80bb5dd627a287b6efcdfb68d172b4
Analyze and fix the following issue in the Linux kernel code: RapidIO: fix potential null deref in rio_setup_device()
Problem Details: The "goto cleanup" path can deference "rswitch" when it is NULL. Reported-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com> Cc: Dan Carpenter <error27@gmail.com> Cc: Kumar Gala <galak@kernel.crashing.org> Cc: Matt Porter <mporter@kernel.crashing.org> Cc...
```diff diff --git a/drivers/rapidio/rio-scan.c b/drivers/rapidio/rio-scan.c index 0914f49b0a53..2bebd791a092 100644 --- a/drivers/rapidio/rio-scan.c +++ b/drivers/rapidio/rio-scan.c @@ -516,7 +516,7 @@ static struct rio_dev __devinit *rio_setup_device(struct rio_net *net, return rdev; cleanup: - if (rio_is_switch...
79975f1327850ef198ada994c2fc44b7d1ea8935
Analyze and fix the following issue in the Linux kernel code: init: add root=PARTUUID=UUID/PARTNROFF=%d support
Problem Details: Expand root=PARTUUID=UUID syntax to support selecting a root partition by integer offset from a known, unique partition. This approach provides similar properties to specifying a device and partition number, but using the UUID as the unique path prior to evaluating the offset. For example, root=PAR...
```diff diff --git a/init/do_mounts.c b/init/do_mounts.c index c0851a8e030c..0f6e1d985a3b 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -28,7 +28,7 @@ int __initdata rd_doload; /* 1 = load RAM disk, 0 = don't load */ int root_mountflags = MS_RDONLY | MS_SILENT; static char * __initdata root_device_name; st...
e57940d719e9fc5223d133b631f8cb5232d6064e
Analyze and fix the following issue in the Linux kernel code: ipc/sem.c: remove private structures from public header file
Problem Details: include/linux/sem.h contains several structures that are only used within ipc/sem.c. The patch moves them into ipc/sem.c - there is no need to expose the structures to the whole kernel. No functional changes, only whitespace cleanups and 80-char per line fixes. Signed-off-by: Manfred Spraul <manfred...
```diff diff --git a/include/linux/sem.h b/include/linux/sem.h index 1feb2de2ee57..464842621a4a 100644 --- a/include/linux/sem.h +++ b/include/linux/sem.h @@ -83,13 +83,6 @@ struct seminfo { struct task_struct; -/* One semaphore structure for each semaphore in the system. */ -struct sem { - int semval; /* curren...
3c24783bb2deafaa106b7e69a97540071afc590c
Analyze and fix the following issue in the Linux kernel code: ipc/sem.c: fix return code race with semop vs. semop +semctl(IPC_RMID)
Problem Details: sys_semtimedop() may return -EIDRM although the semaphore operation completed successfully: thread 1: thread 2: semtimedop(), sleeps semop(): * acquires sem_lock() semtimedop() woken up due to timeout sem_lock() loops * notices that thread 2 could be completed. * performs the operations that thr...
```diff diff --git a/ipc/sem.c b/ipc/sem.c index c8e00f8b4be1..fb13be17945b 100644 --- a/ipc/sem.c +++ b/ipc/sem.c @@ -1460,7 +1460,6 @@ SYSCALL_DEFINE4(semtimedop, int, semid, struct sembuf __user *, tsops, * Array removed? If yes, leave without sem_unlock(). */ if (IS_ERR(sma)) { - error = -EIDRM; goto ou...
aa6afca5bcaba8101f3ea09d5c3e4100b2b9f0e5
Analyze and fix the following issue in the Linux kernel code: proc: fix races against execve() of /proc/PID/fd**
Problem Details: fd* files are restricted to the task's owner, and other users may not get direct access to them. But one may open any of these files and run any setuid program, keeping opened file descriptors. As there are permission checks on open(), but not on readdir() and read(), operations on the kept file desc...
```diff diff --git a/fs/proc/base.c b/fs/proc/base.c index 8f0087e20e16..d4f4913f00db 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -1652,12 +1652,46 @@ out: return error; } +static int proc_pid_fd_link_getattr(struct vfsmount *mnt, struct dentry *dentry, + struct kstat *stat) +{ + struct inode *inode = den...
4799401fef9d5951b2da384c5eb08034c48e08a0
Analyze and fix the following issue in the Linux kernel code: memcg: Fix race condition in memcg_check_events() with this_cpu usage
Problem Details: Various code in memcontrol.c () calls this_cpu_read() on the calculations to be done from two different percpu variables, or does an open-coded read-modify-write on a single percpu variable. Disable preemption throughout these operations so that the writes go to the correct palces. [hannes@cmpxchg.or...
```diff diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 01e0c725de65..7af1d5ee1598 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -686,8 +686,8 @@ static bool __memcg_event_check(struct mem_cgroup *memcg, int target) { unsigned long val, next; - val = this_cpu_read(memcg->stat->events[MEM_CGROUP_EVENTS...
a61ed3cec51cfd4877855c24890ab8d3e2b143e3
Analyze and fix the following issue in the Linux kernel code: memcg: close race between charge and putback
Problem Details: There is a potential race between a thread charging a page and another thread putting it back to the LRU list: charge: putback: SetPageCgroupUsed SetPageLRU PageLRU && add to memcg LRU PageCgroupUsed && add to memcg LRU The order of setting one flag and...
```diff diff --git a/mm/memcontrol.c b/mm/memcontrol.c index ce7b35d024e9..01e0c725de65 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -993,6 +993,16 @@ void mem_cgroup_add_lru_list(struct page *page, enum lru_list lru) return; pc = lookup_page_cgroup(page); VM_BUG_ON(PageCgroupAcctLRU(pc)); + /* + * put...
715a5ee82ab3c07430f748630044354132add5ad
Analyze and fix the following issue in the Linux kernel code: memcg: fix oom schedule_timeout()
Problem Details: Before calling schedule_timeout(), task state should be changed. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Acked-by: Michal Hocko <mhocko@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 9e38abdbfd95..c02d87028b9f 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -1898,7 +1898,7 @@ bool mem_cgroup_handle_oom(struct mem_cgroup *memcg, gfp_t mask) if (test_thread_flag(TIF_MEMDIE) || fatal_signal_pending(current)) return false; /* Giv...
77ceab8ea590d7dc6c8f055ce43dfebd74428107
Analyze and fix the following issue in the Linux kernel code: cgroups: don't attach task to subsystem if migration failed
Problem Details: If a task has exited to the point it has called cgroup_exit() already, then we can't migrate it to another cgroup anymore. This can happen when we are attaching a task to a new cgroup between the call to ->can_attach_task() on subsystems and the migration that is eventually tried in cgroup_task_migrat...
```diff diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 64b0e73402df..8386b21224ef 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -2135,14 +2135,17 @@ int cgroup_attach_proc(struct cgroup *cgrp, struct task_struct *leader) oldcgrp = task_cgroup_from_root(tsk, root); if (cgrp == oldcgrp) continue; ...
33ef6b6984403a688189317ef46bb3caab3b70e0
Analyze and fix the following issue in the Linux kernel code: cgroups: more safe tasklist locking in cgroup_attach_proc
Problem Details: Fix unstable tasklist locking in cgroup_attach_proc. According to this thread - https://lkml.org/lkml/2011/7/27/243 - RCU is not sufficient to guarantee the tasklist is stable w.r.t. de_thread and exit. Taking tasklist_lock for reading, instead of rcu_read_lock, ensures proper exclusion. Signed-off...
```diff diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 453100a4159d..64b0e73402df 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -2027,7 +2027,7 @@ int cgroup_attach_proc(struct cgroup *cgrp, struct task_struct *leader) goto out_free_group_list; /* prevent changes to the threadgroup list while we ta...
434a964daa14b9db083ce20404a4a2add54d037a
Analyze and fix the following issue in the Linux kernel code: hfs: fix hfs_find_init() sb->ext_tree NULL ptr oops
Problem Details: Clement Lecigne reports a filesystem which causes a kernel oops in hfs_find_init() trying to dereference sb->ext_tree which is NULL. This proves to be because the filesystem has a corrupted MDB extent record, where the extents file does not fit into the first three extents in the file record (the firs...
```diff diff --git a/fs/hfs/btree.c b/fs/hfs/btree.c index 3ebc437736fe..1cbdeea1db44 100644 --- a/fs/hfs/btree.c +++ b/fs/hfs/btree.c @@ -46,11 +46,26 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id, btree_keycmp ke case HFS_EXT_CNID: hfs_inode_read_fork(tree->inode, mdb->drXTExtRec, mdb->drXTF...
f919b9235f930e649b374a50009c6c268bd9a073
Analyze and fix the following issue in the Linux kernel code: init/do_mounts_rd.c: fix ramdisk identification for padded cramfs
Problem Details: When a cramfs ramdisk padded with 512 bytes is given to the kernel, the current identify_ramdisk_image function fails to identify it. Tested with a padded cramfs image on an ARM based board. Signed-off-by: Neil Armstrong <narmstrong@neotion.com> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Davidlohr Bue...
```diff diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c index fe9acb0ae480..887629e24c54 100644 --- a/init/do_mounts_rd.c +++ b/init/do_mounts_rd.c @@ -119,6 +119,20 @@ identify_ramdisk_image(int fd, int start_block, decompress_fn *decompressor) goto done; } + /* + * Read 512 bytes further to check if cr...
a3defbe5c337dbc6da911f8cc49ae3cc3b49b453
Analyze and fix the following issue in the Linux kernel code: binfmt_elf: fix PIE execution with randomization disabled
Problem Details: The case of address space randomization being disabled in runtime through randomize_va_space sysctl is not treated properly in load_elf_binary(), resulting in SIGKILL coming at exec() time for certain PIE-linked binaries in case the randomization has been disabled at runtime prior to calling exec(). H...
```diff diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index dd0fdfc56d38..21ac5ee4b43f 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -795,7 +795,16 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) * might try to exec. This is because the brk will * follow the loader, an...
70b50f94f1644e2aa7cb374819cfd93f3c28d725
Analyze and fix the following issue in the Linux kernel code: mm: thp: tail page refcounting fix
Problem Details: Michel while working on the working set estimation code, noticed that calling get_page_unless_zero() on a random pfn_to_page(random_pfn) wasn't safe, if the pfn ended up being a tail page of a transparent hugepage under splitting by __split_huge_page_refcount(). He then found the problem could also th...
```diff diff --git a/arch/powerpc/mm/gup.c b/arch/powerpc/mm/gup.c index fec13200868f..b9e1c7ff5f6d 100644 --- a/arch/powerpc/mm/gup.c +++ b/arch/powerpc/mm/gup.c @@ -22,8 +22,9 @@ static inline void get_huge_page_tail(struct page *page) * __split_huge_page_refcount() cannot run * from under us. */ - VM_BUG_ON...
f43d623164022dcbf6750ef220b7a1133a1183eb
Analyze and fix the following issue in the Linux kernel code: usb, xhci: fix lockdep warning on endpoint timeout
Problem Details: While debugging a usb3 problem, I stumbled upon this lockdep warning. Oct 18 21:41:17 dhcp47-74 kernel: ================================= Oct 18 21:41:17 dhcp47-74 kernel: [ INFO: inconsistent lock state ] Oct 18 21:41:17 dhcp47-74 kernel: 3.1.0-rc4nmi+ #456 Oct 18 21:41:17 dhcp47-74 kernel: ---------...
```diff diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 940321b3ec68..9f1d4b15d818 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -816,23 +816,24 @@ void xhci_stop_endpoint_command_watchdog(unsigned long arg) struct xhci_ring *ring; struct xhci_td *cur...
f956c34e2a665a1c457d0af7db7604b22f5acb19
Analyze and fix the following issue in the Linux kernel code: iwlwifi: don't perform "echo test" when cmd queue stuck
Problem Details: Perform "echo test" when cmd queue stuck detected, somethime it will cause calltrace. I am not sure how to fix it yet, just remove the action now until find a better way to handle it. Reported-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index b247a56d5135..001fdf140abb 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c @@ -1755,16 +1755,6 @@ static inline int iwl_check_stuck_queue(struct iwl_priv *priv,...
3209e061ad04465b3999091f315049c95ac6cbcb
Analyze and fix the following issue in the Linux kernel code: libertas: ensure we clean up a scan request properly
Problem Details: Commit 2e30168b ("libertas: terminate scan when stopping interface") adds cleanup code to lbs_eth_stop to call cfg80211_scan_done if there's an outstanding cfg80211_scan_request. However, it assumes that the scan request was allocated via the cfg80211 stack. Libertas has its own internal allocation m...
```diff diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c index ff6378276ff0..4fcd653bddc4 100644 --- a/drivers/net/wireless/libertas/cfg.c +++ b/drivers/net/wireless/libertas/cfg.c @@ -728,15 +728,9 @@ static void lbs_scan_worker(struct work_struct *work) le16_to_cpu(scan_cmd->h...
93348928f2c980718434b1bc42f9d7638d665db4
Analyze and fix the following issue in the Linux kernel code: ath9k_hw: Fix noise floor calibration timeout on fast channel change
Problem Details: During the fast channel change noise floor values are being loaded twice at init_cal and after channel_change. The commit "ath9k_hw: Improve fast channel change for AR9003 chips" overlooked it that caused failure to load nf while doing bgscan. This patch performs noise floor calibration after the fast ...
```diff diff --git a/drivers/net/wireless/ath/ath9k/ar9002_calib.c b/drivers/net/wireless/ath/ath9k/ar9002_calib.c index e0ab0657cc3a..88279e325dca 100644 --- a/drivers/net/wireless/ath/ath9k/ar9002_calib.c +++ b/drivers/net/wireless/ath/ath9k/ar9002_calib.c @@ -868,10 +868,6 @@ static bool ar9002_hw_init_cal(struct at...
98fb2cc115b4ef1ea0a2d87a170c183bd395dd6c
Analyze and fix the following issue in the Linux kernel code: ath9k_hw: Update AR9485 initvals to fix system hang issue
Problem Details: This patch fixes system hang when resuming from S3 state and lower rate sens failure issue. Cc: stable@kernel.org Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/ath/ath9k/ar9485_initvals.h b/drivers/net/wireless/ath/ath9k/ar9485_initvals.h index 611ea6ce8508..d16d029f81a9 100644 --- a/drivers/net/wireless/ath/ath9k/ar9485_initvals.h +++ b/drivers/net/wireless/ath/ath9k/ar9485_initvals.h @@ -521,7 +521,7 @@ static const u32 ar9485_1_1_r...
e3a4cc2f073739c9c9c2e97efc774703061f034a
Analyze and fix the following issue in the Linux kernel code: mac80211: Fix TDLS support validation in add_station handler
Problem Details: We need to verify whether the command is successful before allocating the station entry to avoid extra processing. This also fixes a memory leak on the error path. Signed-off-by: Jouni Malinen <j@w1.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index ebd7fb101fbf..d06c65fa5526 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -832,6 +832,12 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev, if (is_multicast_ether_addr(mac)) return -EINVAL; + /* Only TDL...
94d55d62bd757611f07a9122e5e07ce929b8d38d
Analyze and fix the following issue in the Linux kernel code: carl9170: fix AMPDU TX_CTL_REQ_TX_STATUS handling
Problem Details: Previously the driver did not care if TX_CTL_REQ_TX_STATUS was set on aggregated frames or not and it would silently drop successfully sent frames if possible [much like: "no news is good news!"]. But, TX_CTL_REQ_TX_STATUS was invented for a reason and no tx status report should ever be dropped if it ...
```diff diff --git a/drivers/net/wireless/ath/carl9170/tx.c b/drivers/net/wireless/ath/carl9170/tx.c index d20946939cd8..59472e1605cd 100644 --- a/drivers/net/wireless/ath/carl9170/tx.c +++ b/drivers/net/wireless/ath/carl9170/tx.c @@ -296,7 +296,8 @@ static void carl9170_tx_release(struct kref *ref) super = (void *...
fd26981cf53ee91951a92fae53416e4ce639164c
Analyze and fix the following issue in the Linux kernel code: ath9k_hw: Fix regression of register offset of AR9330/AR9340
Problem Details: The commit ce407afc10 introduced regression for AR9330/AR9340 register offsets. Some of the register offsets are common for AR9330/AR9340/AR9485 except AR9380. Fix that. Cc: stable@kernel.org [3.1.0+] Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com> Signed-off-by: Rajkumar Manoharan <rmanohar@q...
```diff diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.h b/drivers/net/wireless/ath/ath9k/ar9003_phy.h index 70e01031714f..4114fe752c6b 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.h +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.h @@ -651,7 +651,7 @@ #define AR_SWITCH_TABLE_ALL_S (0) #define AR_...
eaa7af2ae582c9a8c51b374c48d5970b748a5ce2
Analyze and fix the following issue in the Linux kernel code: mac80211: fix remain_off_channel regression
Problem Details: The offchannel code is currently broken - we should remain_off_channel if the work was started, and the work's channel and channel_type are the same as local->tmp_channel and local->tmp_channel_type. However, if wk->chan_type and local->tmp_channel_type coexist (e.g. have the same channel type), we wo...
```diff diff --git a/net/mac80211/work.c b/net/mac80211/work.c index 94472eb34d76..bf5be22a977c 100644 --- a/net/mac80211/work.c +++ b/net/mac80211/work.c @@ -1084,8 +1084,8 @@ static void ieee80211_work_work(struct work_struct *work) continue; if (wk->chan != local->tmp_channel) continue; - if (ieee80211_w...
91ae4d02913808fc4056168766185d1a3bd63f65
Analyze and fix the following issue in the Linux kernel code: ath9k_hw: Fix radio retention for AR9462
Problem Details: IQ calibration during fast channel change sometimes failed with RTT. And also restoring invalid radio retention readings during init cal could cause failure to set the channel properly. This patch counts the valid rtt history readings and clears rtt mask. Signed-off-by: Rajkumar Manoharan <rmanohar@qc...
```diff diff --git a/drivers/net/wireless/ath/ath9k/ar9003_calib.c b/drivers/net/wireless/ath/ath9k/ar9003_calib.c index 16851cb109a6..a4cd1617092b 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c @@ -908,12 +908,15 @@ static bool ar9003_hw_rtt_restore(struc...
52d6d4ef5e6d1517688e27c11c01ab303ec681dd
Analyze and fix the following issue in the Linux kernel code: ath9k_hw: Fix regression of register offset for AR9003 chips
Problem Details: My recent commits (3782c69d, 324c74a) introduced regression for register offset selection that based on the macversion. Not using parentheses in proper manner for ternary operator leads to select wrong offset for the registers. This issue was observed with AR9462 chip that immediate disconnect after t...
```diff diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.h b/drivers/net/wireless/ath/ath9k/ar9003_phy.h index 2f4023e66081..70e01031714f 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.h +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.h @@ -572,14 +572,14 @@ #define AR_PHY_TXGAIN_TABLE (AR_SM_BASE...
cda4ee3f2e6907e89baf7a12e02e02fa208c0625
Analyze and fix the following issue in the Linux kernel code: iwlagn: fix the race in the unmapping of the HCMD
Problem Details: As Stanislaw pointed out, my patch iwlagn: fix a race in the unmapping of the TFDs solved only part of the problem. The race still exists for TFDs of the host commands. Fix that too. Reported-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> ...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c index 8e8c75c997ee..da3411057afc 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c @@ -407,6 +407,7 @@ static void iwl_tx_queue_unmap(struct iwl...
b958f7a7cbdfbf59ba61de7ebb9c59b0ee3a7967
Analyze and fix the following issue in the Linux kernel code: mfd: Fix missing abx500 header file updates
Problem Details: I missed to include a patch adding the new silicon revision define CUT3P3 and remove the retired CUT0 versions of AB8500. Also delete the reference to the retired AB3550 from the header. Reported-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off...
```diff diff --git a/include/linux/mfd/abx500.h b/include/linux/mfd/abx500.h index 6d096e8b7746..9970337ff041 100644 --- a/include/linux/mfd/abx500.h +++ b/include/linux/mfd/abx500.h @@ -34,11 +34,11 @@ #define AB5500_2_0 0x24 /* AB8500 CIDs*/ -#define AB8500_CUTEARLY 0x00 #define AB8500_CUT1P0 0x10 #define AB850...
5a4c8666c6d576f076a7c6824589cdbb984c0f84
Analyze and fix the following issue in the Linux kernel code: iscsi-target: Fix non-immediate TMR handling
Problem Details: This patch addresses two issues with non immediate TMR handling in iscsit_handle_task_mgt_cmd(). The first involves breakage due to v3.1-rc conversion of iscsit_sequence_cmd(), which upon good status would hit the iscsit_add_reject_from_cmd() block of code. This patch adds an explict check for CMDSN_...
```diff diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index 7855a63d49fc..1bf057ed9931 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c @@ -1821,17 +1821,16 @@ attach: int cmdsn_ret = iscsit_sequence_cmd(conn, cmd, hdr->cmdsn); if ...
98dd932b6a02b3eea2d6c671b48b2d5d7deb5afe
Analyze and fix the following issue in the Linux kernel code: ASoC: Fix sort of jz4740 in Makefile
Problem Details: Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile index d7a5ff30a3a5..a7c415dc22fe 100644 --- a/sound/soc/codecs/Makefile +++ b/sound/soc/codecs/Makefile @@ -21,6 +21,7 @@ snd-soc-cx20442-objs := cx20442.o snd-soc-da7210-objs := da7210.o snd-soc-dfbmcs320-objs := dfbmcs320.o snd-soc-dmic-obj...
f854b5bc264023b21bbcb4b358cd858d5d45a4cb
Analyze and fix the following issue in the Linux kernel code: ARM: imx: Fix typo 'MACH_MX31_3DS_MXC_NAND_USE_BBT'
Problem Details: Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Tested-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/arch/arm/mach-imx/mach-mx31_3ds.c b/arch/arm/mach-imx/mach-mx31_3ds.c index c20be7530927..5750ca55c1f7 100644 --- a/arch/arm/mach-imx/mach-mx31_3ds.c +++ b/arch/arm/mach-imx/mach-mx31_3ds.c @@ -542,7 +542,7 @@ static const struct mxc_nand_platform_data mx31_3ds_nand_board_info __initconst = { .w...
8535639810e578960233ad39def3ac2157b0c3ec
Analyze and fix the following issue in the Linux kernel code: um: fix ubd cow size
Problem Details: ubd_file_size() cannot use ubd_dev->cow.file because at this time ubd_dev->cow.file is not initialized. Therefore, ubd_file_size() will always report a wrong disk size when COW files are used. Reading from /dev/ubd* would crash the kernel. We have to read the correct disk size from the COW file's back...
```diff diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index b3c854523e6c..944453a3ec99 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c @@ -511,8 +511,37 @@ __uml_exitcall(kill_io_thread); static inline int ubd_file_size(struct ubd *ubd_dev, __u64 *size_out) { char *fi...
0d65ede0a605d6252acc5c8a9c536c4cd0211f3c
Analyze and fix the following issue in the Linux kernel code: um: Fix kmalloc argument order in um/vdso/vma.c
Problem Details: kmalloc size is 1st arg, not second. Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Richard Weinberger <richard@nod.at> Cc: <stable@kernel.org> # 3.0.x [richard@nod.at: on 3.0 the to be patched file is arch/um/sys-x86_64/vdso/vma.c]
```diff diff --git a/arch/x86/um/vdso/vma.c b/arch/x86/um/vdso/vma.c index 9495c8d0ce37..91f4ec9a0a56 100644 --- a/arch/x86/um/vdso/vma.c +++ b/arch/x86/um/vdso/vma.c @@ -28,7 +28,7 @@ static int __init init_vdso(void) um_vdso_addr = task_size - PAGE_SIZE; - vdsop = kmalloc(GFP_KERNEL, sizeof(struct page *)); + v...
c039aff672a540f8976770e74599d350de1805cb
Analyze and fix the following issue in the Linux kernel code: UserModeLinux-HOWTO.txt: fix a typo
Problem Details: Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Signed-off-by: Richard Weinberger <richard@nod.at>
```diff diff --git a/Documentation/virtual/uml/UserModeLinux-HOWTO.txt b/Documentation/virtual/uml/UserModeLinux-HOWTO.txt index a7af9cf065e2..77dfecf4e2d6 100644 --- a/Documentation/virtual/uml/UserModeLinux-HOWTO.txt +++ b/Documentation/virtual/uml/UserModeLinux-HOWTO.txt @@ -770,7 +770,7 @@ - will cause seria...
4d211093e838ddd049b5cf4f0773aa5ac67f9976
Analyze and fix the following issue in the Linux kernel code: um: fix gcov build breakage
Problem Details: a) exports in gmon_syms.c duplicate kernel/gcov/* ones b) excluding -pg in vdso compile is not enough - -fprofile-arcs and -ftest-coverage also needs to be excluded Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Richard Weinberger <richard@nod.at>
```diff diff --git a/arch/um/kernel/gmon_syms.c b/arch/um/kernel/gmon_syms.c index 72eccd2a4113..e9bcf247bcee 100644 --- a/arch/um/kernel/gmon_syms.c +++ b/arch/um/kernel/gmon_syms.c @@ -7,18 +7,3 @@ extern void __bb_init_func(void *) __attribute__((weak)); EXPORT_SYMBOL(__bb_init_func); - -/* - * This is defined ...
32096ea1aac14e6f29d4744924092eca52b937b0
Analyze and fix the following issue in the Linux kernel code: vfs: fix dentry leak in simple_fill_super()
Problem Details: put dentry if inode allocation failed, d_genocide() cannot release it Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org> Signed-off-by: Christoph Hellwig <hch@lst.de>
```diff diff --git a/fs/libfs.c b/fs/libfs.c index c18e9a1235b6..a2c0029cd95f 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -510,8 +510,10 @@ int simple_fill_super(struct super_block *s, unsigned long magic, if (!dentry) goto out; inode = new_inode(s); - if (!inode) + if (!inode) { + dput(dentry); goto ...
2edcd4ca43df3c1d1d392753531cc73a53e709ba
Analyze and fix the following issue in the Linux kernel code: net: fix typo in drivers/net/ethernet/xilinx/ll_temac_main.c
Problem Details: Commit 9e903e085262 ("net: add skb frag size accessors") used frag_size instead of skb_frag_size in this file. Fixes this build error: drivers/net/ethernet/xilinx/ll_temac_main.c: In function 'temac_start_xmit': drivers/net/ethernet/xilinx/ll_temac_main.c:717:3: error: implicit declaration of functio...
```diff diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c index 4d1658e78dee..caf3659e173c 100644 --- a/drivers/net/ethernet/xilinx/ll_temac_main.c +++ b/drivers/net/ethernet/xilinx/ll_temac_main.c @@ -716,8 +716,8 @@ static int temac_start_xmit(struct sk_buff *skb, ...
0ad92ad03aa444b312bd318b0341011a8be09d13
Analyze and fix the following issue in the Linux kernel code: udp: fix a race in encap_rcv handling
Problem Details: udp_queue_rcv_skb() has a possible race in encap_rcv handling, since this pointer can be changed anytime. We should use ACCESS_ONCE() to close the race. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 131d8a720086..ab0966df1e2a 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -1397,6 +1397,8 @@ int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) nf_reset(skb); if (up->encap_type) { + int (*encap_rcv)(struct sock *sk, struct sk_buff *skb); +...
501e89d3aef10f9a5b79137fbb0bcd5bf9cac2ac
Analyze and fix the following issue in the Linux kernel code: x25: Fix NULL dereference in x25_recvmsg
Problem Details: commit cb101ed2 in 3.0 introduced a bug in x25_recvmsg() When passed bogus junk from userspace, x25->neighbour can be NULL, as shown in this oops.. BUG: unable to handle kernel NULL pointer dereference at 000000000000001c IP: [<ffffffffa05482bd>] x25_recvmsg+0x4d/0x280 [x25] PGD 1015f3067 PUD 10507206...
```diff diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 5f03e4ea65bf..3e16c6abde4f 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c @@ -1261,14 +1261,19 @@ static int x25_recvmsg(struct kiocb *iocb, struct socket *sock, struct x25_sock *x25 = x25_sk(sk); struct sockaddr_x25 *sx25 = (struct sockaddr_x25 *...
2d24cdaa6e389f85dad51eda39f1c2684a4f15b0
Analyze and fix the following issue in the Linux kernel code: virtio: console: make discard_port_data() use get_inbuf()
Problem Details: discard_port_data() used virtqueue_get_buf() directly instead of using get_inbuf(). Fix this, so that we get accounting for all received bytes. This also simplifies the code a lot. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
```diff diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 0538425e9a71..105181c1e6be 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -386,28 +386,23 @@ static int add_inbuf(struct virtqueue *vq, struct port_buffer *buf) static void discard_port_data(stru...
defde66996476295dc7b1b60ea318965f8c3ad86
Analyze and fix the following issue in the Linux kernel code: virtio: console: Fix return type for get_inbuf()
Problem Details: get_inbuf() returns void *. There's no reason to return void pointers instead of the correct struct port_buffer *. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
```diff diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 8f49d0f034e0..3516aeb7f06c 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -348,7 +348,7 @@ fail: } /* Callers should take appropriate locks */ -static void *get_inbuf(struct port *port) +stati...
286f9a226f11e4a05d08999417fd838c0ca91d7a
Analyze and fix the following issue in the Linux kernel code: virtio: console: Fix indentation
Problem Details: Convert spaces to tabs and fix indentation for an if statement split into multiple lines. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
```diff diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index ed99f3bf341a..10280a29a34b 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -1563,7 +1563,7 @@ static int init_vqs(struct ports_device *portdev) portdev->out_vqs = kmalloc(nr_ports * sizeof(struct...
0a3360e1e18fc6bbe10bebe416db42de5fa02dbd
Analyze and fix the following issue in the Linux kernel code: net/ethernet: Move mac89x0.c from apple to cirrus
Problem Details: Macintosh CS89x0 based ethernet cards use a Crystal Semiconductor (Now Cirrus Logic) CS89x0 chip, so the mac89x0 driver should be in drivers/net/ethernet/cirrus instead of drivers/net/ethernet/apple. This also fixes a build problem, as the driver needs a header file from the cirrus directory: drivers...
```diff diff --git a/drivers/net/ethernet/apple/Kconfig b/drivers/net/ethernet/apple/Kconfig index a759d5483ab9..1375e2dc9468 100644 --- a/drivers/net/ethernet/apple/Kconfig +++ b/drivers/net/ethernet/apple/Kconfig @@ -52,18 +52,6 @@ config BMAC To compile this driver as a module, choose M here: the module will...
47a6770ac6cd0d28f14dd9e1b17705abe6f05e41
Analyze and fix the following issue in the Linux kernel code: msm: boards: Fix fallout from removal of machine_desc in fixup
Problem Details: After 0744a3ee (ARM: platform fixups: remove mdesc argument to fixup function, 2010-12-20) the fixup functions introduced in 9e775ad (ARM: 7012/1: Set proper TEXT_OFFSET for newer MSMs, 2011-08-12) cause warnings like: arch/arm/mach-msm/board-msm8x60.c:85: warning: initialization from incompatible poi...
```diff diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c index 71de5062c71e..db81ed531031 100644 --- a/arch/arm/mach-msm/board-msm7x30.c +++ b/arch/arm/mach-msm/board-msm7x30.c @@ -42,8 +42,8 @@ extern struct sys_timer msm_timer; -static void __init msm7x30_fixup(struct machine_de...
f2a44523b20f323e4aef7c16261d34d6f0a4bf06
Analyze and fix the following issue in the Linux kernel code: jbd2: Unify log messages in jbd2 code
Problem Details: Some jbd2 code prints out kernel messages with "JBD2: " prefix, at the same time other jbd2 code prints with "JBD: " prefix. Unify the prefix to "JBD2: ". Signed-off-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
```diff diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c index eef6979821a4..68d704db787f 100644 --- a/fs/jbd2/commit.c +++ b/fs/jbd2/commit.c @@ -352,7 +352,7 @@ void jbd2_journal_commit_transaction(journal_t *journal) J_ASSERT(commit_transaction->t_state == T_RUNNING); trace_jbd2_start_commit(journal, commit_tr...
bf52c6f7af55c48ab0fd5f990460b884b428d906
Analyze and fix the following issue in the Linux kernel code: ext4: let ext4_ext_rm_leaf work with EXT_DEBUG defined
Problem Details: The variable 'block' is removed by commit 750c9c47, so use the replacement ex_ee_block instead. Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
```diff diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 8cacaf645e36..61fa9e1614af 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -2424,7 +2424,7 @@ ext4_ext_rm_leaf(handle_t *handle, struct inode *inode, if (err) goto out; - ext_debug("new extent: %u:%u:%llu\n", block, num, + ext_debug("...
32de67569059d22b02dd9323a40220d953642b7e
Analyze and fix the following issue in the Linux kernel code: ext4: fix a syntax error in ext4_ext_insert_extent when debugging enabled
Problem Details: This patch fixes a syntax error which omits a comma. Besides this, logical block number is unsigend 32 bits, so printk should use %u instead %d. Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
```diff diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 2798945a1920..8cacaf645e36 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -1682,7 +1682,7 @@ int ext4_ext_insert_extent(handle_t *handle, struct inode *inode, /* try to insert block into found extent and return */ if (ex && !(flag & EXT4_GE...
fb223c32b4d3ee593c8dce07e983680d06abe387
Analyze and fix the following issue in the Linux kernel code: crypto: user - Fix rwsem leak in crypto_user
Problem Details: The list_empty case in crypto_alg_match() will return without calling up_read() on crypto_alg_sem. We could do the "goto out" routine, but the function will clearly do the right thing with that test simply removed. Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Herbert Xu <herbert@gon...
```diff diff --git a/crypto/crypto_user.c b/crypto/crypto_user.c index 2abca780312d..0605a2bbba75 100644 --- a/crypto/crypto_user.c +++ b/crypto/crypto_user.c @@ -44,9 +44,6 @@ static struct crypto_alg *crypto_alg_match(struct crypto_user_alg *p, int exact) down_read(&crypto_alg_sem); - if (list_empty(&crypto_alg...
048ca16935fdfbe17d1593e022eef4713c70c7e2
Analyze and fix the following issue in the Linux kernel code: isdn: hisax: Fix typo 'HISAX_DE_AOC'
Problem Details: That should probably be 'CONFIG_DE_AOC'. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/isdn/hisax/l3dss1.c b/drivers/isdn/hisax/l3dss1.c index b0d9ab1f21c0..6a8acf65777d 100644 --- a/drivers/isdn/hisax/l3dss1.c +++ b/drivers/isdn/hisax/l3dss1.c @@ -353,7 +353,7 @@ l3dss1_parse_facility(struct PStack *st, struct l3_process *pc, { l3dss1_dummy_invoke(st, cr, id, id...
98f41f694f46085fda475cdee8cc0b6d2c5e6f1f
Analyze and fix the following issue in the Linux kernel code: bonding:update speed/duplex for NETDEV_CHANGE
Problem Details: Zheng Liang(lzheng@redhat.com) found a bug that if we config bonding with arp monitor, sometimes bonding driver cannot get the speed and duplex from its slaves, it will assume them to be 100Mb/sec and Full, please see /proc/net/bonding/bond0. But there is no such problem when uses miimon. (Take igb fo...
```diff diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index c34cc1e7c6f6..b2b9109b6712 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -550,7 +550,7 @@ down: /* * Get link speed and duplex from the slave's base driver * using ethtool. If for so...
ff56b0bc84c01fb2c5d2ec6438becfe0f5f2f78f
Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix object refcount leak on mmappable size limit error path.
Problem Details: I've been seeing memory leaks on my system in the form of large (300-400MB) GEM objects created by now-dead processes laying around clogging up memory. I usually notice when it gets to about 1.2GB of them. Hopefully this clears up the issue, but I just found this bug by inspection. Signed-off-by: Er...
```diff diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 6651c36b6e8a..d18b07adcffa 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -1396,7 +1396,7 @@ i915_gem_mmap_gtt(struct drm_file *file, if (obj->base.size > dev_priv->mm.gtt_mappable_end...
16cdf04d30c24a6e698863351c11d9a8da2591ed
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: allocate vram scratch page on 6xx+
Problem Details: The vram scratch was originally only used on some 7xx asics to work around a hw bug. Allocate the scratch page on all 6xx+ radeons and set the MC_VM_SYSTEM_APERTURE_DEFAULT_ADDR to point to it. We shouldn't ever hit it since we limit the system aperture to vram or vram and AGP, but better safe than s...
```diff diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index ed406e8404a3..db9027d871e3 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c @@ -3031,6 +3031,10 @@ static int evergreen_startup(struct radeon_device *rdev) } } + r = r600_vra...
77b1bad423599c9841ea282a82172f039bb2ff92
Analyze and fix the following issue in the Linux kernel code: drm/radeon: flush read cache for gtt with fence on r6xx and newer GPU V3
Problem Details: Cayman seems to be particularly sensitive to read cache returning old data after bind/unbind to GTT. Flush read cache for GTT range with each fences for all new hw. Should fix several rendering glitches. Like V2 flush whole address space V3 also flush shader read cache https://bugs.freedesktop.org/sh...
```diff diff --git a/drivers/gpu/drm/radeon/evergreen_blit_kms.c b/drivers/gpu/drm/radeon/evergreen_blit_kms.c index 551e76f283f7..914e5af84163 100644 --- a/drivers/gpu/drm/radeon/evergreen_blit_kms.c +++ b/drivers/gpu/drm/radeon/evergreen_blit_kms.c @@ -625,9 +625,9 @@ int evergreen_blit_init(struct radeon_device *rde...
8052ee5f5fd9be153129eaa06ced4a786415abc1
Analyze and fix the following issue in the Linux kernel code: HID: drivers/hid/hid-roccat.c: eliminate a null pointer dereference
Problem Details: It is not possible to take the lock in device if device is NULL. The mutex_lock is thus moved after the NULL test. New error handling labels are added at the end to differentiate between the cases where different sets of locks should be unlocks, and between whether or not reader should be freed (only ...
```diff diff --git a/drivers/hid/hid-roccat.c b/drivers/hid/hid-roccat.c index 5666e7587b18..56ce12c23b02 100644 --- a/drivers/hid/hid-roccat.c +++ b/drivers/hid/hid-roccat.c @@ -162,27 +162,27 @@ static int roccat_open(struct inode *inode, struct file *file) device = devices[minor]; - mutex_lock(&device->readers...
e1d01d5416f3ab7fc88b5850d56510e47e4f62e4
Analyze and fix the following issue in the Linux kernel code: isdn: hisax: Fix wrong macro name 'HISAX_DE_AOC'
Problem Details: That should be 'CONFIG_DE_AOC'. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/isdn/hisax/l3dss1.c b/drivers/isdn/hisax/l3dss1.c index b0d9ab1f21c0..6a8acf65777d 100644 --- a/drivers/isdn/hisax/l3dss1.c +++ b/drivers/isdn/hisax/l3dss1.c @@ -353,7 +353,7 @@ l3dss1_parse_facility(struct PStack *st, struct l3_process *pc, { l3dss1_dummy_invoke(st, cr, id, id...
c6e13b528f5a6c6a6ae260007d4fd14c3dbc5648
Analyze and fix the following issue in the Linux kernel code: EDAC: Fix incorrect edac mode reporting in sb_edac
Problem Details: The edac driver for Sandy Bridge was found to be reporting "FPM" for edac_mode, which clearly doesn't make sense. It was found that sb_edac.c:get_dimm_config was reusing a variable for both mem_type and edac_type, and thus was overwriting the value after setting it correctly. This patch fixes that issu...
```diff diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c index 8118f12cb8c7..7a402bfbee7d 100644 --- a/drivers/edac/sb_edac.c +++ b/drivers/edac/sb_edac.c @@ -559,6 +559,7 @@ static int get_dimm_config(const struct mem_ctl_info *mci) unsigned long last_page = 0; u32 reg; enum edac_type mode; + enum me...
5f032119d6f1cc48d0d1a28b8014f270ca4c4e47
Analyze and fix the following issue in the Linux kernel code: i7300_edac: Fix error cleanup logic
Problem Details: The error cleanup logic was broken. Due to that, one error is generated for every error polling. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/edac/i7300_edac.c b/drivers/edac/i7300_edac.c index a76fe8366b68..6104dba380b6 100644 --- a/drivers/edac/i7300_edac.c +++ b/drivers/edac/i7300_edac.c @@ -372,7 +372,7 @@ static const char *get_err_from_table(const char *table[], int size, int pos) static void i7300_process_error_global(str...