id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
fa94f8dce1459eef1f0f8d5b1e4f26c3f058dec2
Analyze and fix the following issue in the Linux kernel code: mxc: add common debug board for 3-stack platforms
Problem Details: The debug board is little different for all mxc 3-stack(PDK) platforms, it is possible here to add a common implementation to support this board. Signed-off-by: Jason Wang <jason77.wang@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
```diff diff --git a/arch/arm/plat-mxc/3ds_debugboard.c b/arch/arm/plat-mxc/3ds_debugboard.c new file mode 100644 index 000000000000..639c54a07992 --- /dev/null +++ b/arch/arm/plat-mxc/3ds_debugboard.c @@ -0,0 +1,202 @@ +/* + * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright (C) 201...
310894b72b9c8f816bd516b6dd7a0875baa0d981
Analyze and fix the following issue in the Linux kernel code: mx51/iomux: Fix mux mode and input path for two pads
Problem Details: For pad EIM_D27 to work in UART3_RTS mode, the input path should be 3 instead of 0; for pad USBH1_STP to work in GPIO_1_27 mode, the mux value should be 2 instead of 8. Signed-off-by: Jason Wang <jason77.wang@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
```diff diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx51.h b/arch/arm/plat-mxc/include/mach/iomux-mx51.h index a52d37e18e24..6ce13acf7d39 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mx51.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx51.h @@ -84,7 +84,7 @@ typedef enum iomux_config { #define MX51_PAD_EIM_D...
2518507f727e6bf663fd0f276369cbdeb6a0ccc0
Analyze and fix the following issue in the Linux kernel code: i.MX25: fix USB gadget support
Problem Details: i.MX25's udc port is the same as i.MX35's one Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
```diff diff --git a/drivers/usb/gadget/fsl_mxc_udc.c b/drivers/usb/gadget/fsl_mxc_udc.c index d0b8bde59e59..eafa6d2c5ed7 100644 --- a/drivers/usb/gadget/fsl_mxc_udc.c +++ b/drivers/usb/gadget/fsl_mxc_udc.c @@ -30,7 +30,7 @@ int fsl_udc_clk_init(struct platform_device *pdev) pdata = pdev->dev.platform_data; - if ...
4ea0af0275d7340e5a6823c02e6167b8f3e244fd
Analyze and fix the following issue in the Linux kernel code: i.MX25: fix EHCI support
Problem Details: i.MX25's EHCI is the same as i.MX35's one. Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
```diff diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c index 544ccfd7056e..56f275097e0e 100644 --- a/drivers/usb/host/ehci-mxc.c +++ b/drivers/usb/host/ehci-mxc.c @@ -182,7 +182,7 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev) } clk_enable(priv->usbclk); - if (!cpu_is_mx35(...
a6e92b49ae5ef48e1791e5df8368af1fe8b3bd9a
Analyze and fix the following issue in the Linux kernel code: i.MX25: fix get_rate_otg to return the correct value
Problem Details: usb drivers need to get the right value for otg clock so calculate and return it Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
```diff diff --git a/arch/arm/mach-mx25/clock.c b/arch/arm/mach-mx25/clock.c index f44d65765b9a..84f0f1efea4b 100644 --- a/arch/arm/mach-mx25/clock.c +++ b/arch/arm/mach-mx25/clock.c @@ -131,7 +131,10 @@ static unsigned long get_rate_lcdc(struct clk *clk) static unsigned long get_rate_otg(struct clk *clk) { - retur...
e8c74860a724c714fbf041a779d7cfd147145b6f
Analyze and fix the following issue in the Linux kernel code: eukrea_mbimx27: fix audio support when SOC is compiled as module
Problem Details: Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
```diff diff --git a/arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c b/arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c index 80f626803401..d66a6c439583 100644 --- a/arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c +++ b/arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c @@ -96,7 +96,8 @@ static int eukrea_mbimx27_pins[] = { PD30_PF_...
cbb052c905367e20c11f3b107cfe07e36dd6c8cd
Analyze and fix the following issue in the Linux kernel code: mach-cpuimx27: fix USB_ULPI build warnings
Problem Details: when CONFIG_USB_ULPI is not defined we actually get : warning: 'otg_pdata' defined but not used warning: 'usbh2_pdata' defined but not used Signed-off-by: Eric Bénard <eric@eukrea.com> Cc: linux-arm-kernel@lists.infradead.org Cc: s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix....
```diff diff --git a/arch/arm/mach-mx2/mach-cpuimx27.c b/arch/arm/mach-mx2/mach-cpuimx27.c index dc2dca3ff9b7..55291787d5d1 100644 --- a/arch/arm/mach-mx2/mach-cpuimx27.c +++ b/arch/arm/mach-mx2/mach-cpuimx27.c @@ -219,6 +219,7 @@ static struct platform_device serial_device = { }; #endif +#if defined(CONFIG_USB_ULP...
9b839ec0a880977d05ec4d25028ca4a0c3216c61
Analyze and fix the following issue in the Linux kernel code: arm: mxc: utilise usecount field in clock operations
Problem Details: This patch fixes the clock refcounting when reparenting is used. Boot-tested on imx51 babbage board. Sascha pointed out a good explanation of refcounting here: http://www.spinics.net/lists/arm-kernel/msg85879.html Signed-off-by: Amit Kucheria <amit.kucheria@canonical.com> Signed-off-by: Sascha Hauer...
```diff diff --git a/arch/arm/plat-mxc/clock.c b/arch/arm/plat-mxc/clock.c index 323ff8ccc877..2ed3ab173add 100644 --- a/arch/arm/plat-mxc/clock.c +++ b/arch/arm/plat-mxc/clock.c @@ -52,13 +52,14 @@ static void __clk_disable(struct clk *clk) { if (clk == NULL || IS_ERR(clk)) return; - - __clk_disable(clk->parent)...
5ea32021c173c0c97482a1342a9069733032b647
Analyze and fix the following issue in the Linux kernel code: mxc_nand: Fix OOB handling
Problem Details: The OOB handling in the mxc_nand driver is broken for v1 type controllers (i.MX27/31) with 512 byte page size. This perhaps did not show up because ubi does not use OOB. Update the driver to always read/write a whole page even if only OOB is requested. With this patch the driver passes the mtd_oobtest ...
```diff diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index 82e94389824e..6e8aa34e4dfc 100644 --- a/drivers/mtd/nand/mxc_nand.c +++ b/drivers/mtd/nand/mxc_nand.c @@ -623,8 +623,7 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command, else host->buf_start = column + mtd->...
62d725b1d38856c50aebc5542707c6f5ea07a451
Analyze and fix the following issue in the Linux kernel code: eukrea_mbimx27: fix ADS7846 support
Problem Details: Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
```diff diff --git a/arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c b/arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c index fff6c8dc4b3b..385abd100002 100644 --- a/arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c +++ b/arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c @@ -35,6 +35,7 @@ #include <mach/hardware.h> #include <mach/mmc...
ebb4fc821d02b356a3685dc03c2948744a84c28e
Analyze and fix the following issue in the Linux kernel code: mach-cpuimx27: fix QuadUART's IRQ typo in pins'setup
Problem Details: Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
```diff diff --git a/arch/arm/mach-mx2/mach-cpuimx27.c b/arch/arm/mach-mx2/mach-cpuimx27.c index 5c6a16b45891..a3449ed7c45c 100644 --- a/arch/arm/mach-mx2/mach-cpuimx27.c +++ b/arch/arm/mach-mx2/mach-cpuimx27.c @@ -88,10 +88,10 @@ static int eukrea_cpuimx27_pins[] = { #endif #if defined(CONFIG_SERIAL_8250) || defined...
4eaad66adf607ba005e2cf118e9a542899bf0187
Analyze and fix the following issue in the Linux kernel code: eukrea_mbimx27-baseboard: fix typo in display name
Problem Details: Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
```diff diff --git a/arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c b/arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c index f3b169d5245f..c9e4452e5dba 100644 --- a/arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c +++ b/arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c @@ -127,7 +127,7 @@ static struct platform_device leds_gpio = { ...
c18e8fa5e56b07b5c723535c6539850c2ad95a19
Analyze and fix the following issue in the Linux kernel code: pcm037/pcm043/pca100: fix ULPI-related build warnings
Problem Details: Like this one (if CONFIG_USB_ULPI is not set): arch/arm/mach-mx3/mach-pcm043.c:312: warning: 'otg_pdata' defined but not used arch/arm/mach-mx3/mach-pcm043.c:317: warning: 'usbh1_pdata' defined but not used Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengu...
```diff diff --git a/arch/arm/mach-mx2/mach-pca100.c b/arch/arm/mach-mx2/mach-pca100.c index a87422ed4ff5..7651d0ef4666 100644 --- a/arch/arm/mach-mx2/mach-pca100.c +++ b/arch/arm/mach-mx2/mach-pca100.c @@ -253,6 +253,7 @@ static struct imxmmc_platform_data sdhc_pdata = { .exit = pca100_sdhc2_exit, }; +#if defined...
4609a179c97ae60fef173547a9bbb214359808ce
Analyze and fix the following issue in the Linux kernel code: ARM: Fix csum_partial_copy_from_user()
Problem Details: Using the parent functions frame pointer to access our arguments is completely wrong, whether or not we're building with frame pointers or not. What we should be using is the stack pointer to get at the word above the registers we stacked ourselves. Reported-by: Bosko Radivojevic <bosko.radivojevic@g...
```diff diff --git a/arch/arm/lib/csumpartialcopyuser.S b/arch/arm/lib/csumpartialcopyuser.S index 59ff6fdc1e63..7d08b43d2c0e 100644 --- a/arch/arm/lib/csumpartialcopyuser.S +++ b/arch/arm/lib/csumpartialcopyuser.S @@ -71,7 +71,7 @@ .pushsection .fixup,"ax" .align 4 9001: mov r4, #-EFAULT - ldr r5, [fp, #4] @...
392c57a2ec811db37ae45adc513704cf92ba3e69
Analyze and fix the following issue in the Linux kernel code: ARM: fix build warning in asm/elf.h
Problem Details: CC kernel/elfcore.o In file included from include/linux/elf.h:7, from kernel/elfcore.c:1: arch/arm/include/asm/elf.h:124: warning: 'struct mm_struct' declared inside parameter list arch/arm/include/asm/elf.h:124: warning: its scope is only this definition or declaration, which is ...
```diff diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h index 0a96e8c1b82a..6750b8e45a49 100644 --- a/arch/arm/include/asm/elf.h +++ b/arch/arm/include/asm/elf.h @@ -121,6 +121,7 @@ int dump_task_regs(struct task_struct *t, elf_gregset_t *elfregs); extern void elf_set_personality(const struct elf3...
b042245fc2ca8c0326f3f1ea6c4dafc561bb3a82
Analyze and fix the following issue in the Linux kernel code: ARM: 6264/1: fix Versatile Express LED oversight
Problem Details: My attempt to make the LEDs only compile for RealView and Versatile was futile: I missed the Versatile Express. So invert the logic and explicitly include the platforms to compile for. Signed-off-by: Linus Walleij <triad@df.lth.se> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/plat-versatile/Makefile b/arch/arm/plat-versatile/Makefile index 505a8f89601c..5cf88e8427b1 100644 --- a/arch/arm/plat-versatile/Makefile +++ b/arch/arm/plat-versatile/Makefile @@ -1,7 +1,8 @@ obj-y := clock.o obj-$(CONFIG_ARM_TIMER_SP804) += timer-sp.o -# For all but the Integrator, com...
f9578fc07832ee8db8b0fbde489e00ad35452ac9
Analyze and fix the following issue in the Linux kernel code: ARM: 6265/1: kirkwood: move qnap_tsx1x_register_flash() to .init.text
Problem Details: qnap_tsx1x_register_flash is only called by qnap_ts219_init and qnap_ts41x_init which both live in .init.text, too. So the move is OK. This fixes the following warning in kirkwood_defconfig: WARNING: vmlinux.o(.text+0x9334): Section mismatch in reference from the function qnap_tsx1x_register_flash()...
```diff diff --git a/arch/arm/mach-kirkwood/tsx1x-common.c b/arch/arm/mach-kirkwood/tsx1x-common.c index 7221c20b2afa..f781164e623f 100644 --- a/arch/arm/mach-kirkwood/tsx1x-common.c +++ b/arch/arm/mach-kirkwood/tsx1x-common.c @@ -77,7 +77,7 @@ struct spi_board_info __initdata qnap_tsx1x_spi_slave_info[] = { }, }; ...
51aa87beb9dff42ccc3612811e83d1ad98141e0b
Analyze and fix the following issue in the Linux kernel code: ARM: 6263/1: ns9xxx: fix FTBFS for zImage
Problem Details: the different putc variants used an initialized local static variable which is broken since 5de813b (ARM: Eliminate decompressor -Dstatic= PIC hack) This needs to be initialized at runtime and so needs to be global. While at it give it a better name. Signed-off-by: Uwe Kleine-König <u.kleine-koenig...
```diff diff --git a/arch/arm/mach-ns9xxx/include/mach/uncompress.h b/arch/arm/mach-ns9xxx/include/mach/uncompress.h index 1b12d324b087..770a68c46e81 100644 --- a/arch/arm/mach-ns9xxx/include/mach/uncompress.h +++ b/arch/arm/mach-ns9xxx/include/mach/uncompress.h @@ -20,50 +20,49 @@ static void putc_dummy(char c, void _...
73bcc76aeee6afb21471ad9ec33341c7452b4d6f
Analyze and fix the following issue in the Linux kernel code: ARM: 6262/1: arm/clps711x: fix debug macro compilation failure
Problem Details: We need mach/hardware.h for CLPS7111_VIRT_BASE. Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-clps711x/include/mach/debug-macro.S b/arch/arm/mach-clps711x/include/mach/debug-macro.S index fedd8076a689..072cc6b61ba3 100644 --- a/arch/arm/mach-clps711x/include/mach/debug-macro.S +++ b/arch/arm/mach-clps711x/include/mach/debug-macro.S @@ -11,6 +11,7 @@ * */ +#include <mach/h...
31e967daab6c79b68829875fb67bdb9abfac52a4
Analyze and fix the following issue in the Linux kernel code: ARM: 6261/1: arm/shark: fix debug macro compilation failure
Problem Details: We need a waituart macro. Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-shark/include/mach/debug-macro.S b/arch/arm/mach-shark/include/mach/debug-macro.S index 50f071c5bf4d..5ea24d4d1ba6 100644 --- a/arch/arm/mach-shark/include/mach/debug-macro.S +++ b/arch/arm/mach-shark/include/mach/debug-macro.S @@ -20,6 +20,9 @@ strb \rd, [\rx] .endm + .macro...
e6b8b3e21a85b06b0617401f5ad8018b9927f6ac
Analyze and fix the following issue in the Linux kernel code: ARM: 6260/1: arm/plat-spear: fix debug macro compilation failure
Problem Details: mov rx, =<immediate> isn't valid, use #<immediate> instead. Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/plat-spear/include/plat/debug-macro.S b/arch/arm/plat-spear/include/plat/debug-macro.S index 1670734b7e51..37fa593884ee 100644 --- a/arch/arm/plat-spear/include/plat/debug-macro.S +++ b/arch/arm/plat-spear/include/plat/debug-macro.S @@ -17,8 +17,8 @@ .macro addruart, rx mrc p15, 0, \...
f63a79f65358d27a25fa31f912738b61bfcec589
Analyze and fix the following issue in the Linux kernel code: ARM: 6259/1: arm/ns9xxx: fix debug macro compilation failure
Problem Details: We need asm/memory.h for NS9XXX_CSxSTAT_PHYS (via mach/memory.h). Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-ns9xxx/include/mach/debug-macro.S b/arch/arm/mach-ns9xxx/include/mach/debug-macro.S index 0859336a8e6d..5c934bdb7158 100644 --- a/arch/arm/mach-ns9xxx/include/mach/debug-macro.S +++ b/arch/arm/mach-ns9xxx/include/mach/debug-macro.S @@ -8,6 +8,7 @@ * the Free Software Foundation. *...
9729c0ca197a5030d65937be6a1fb41b8d6f9c86
Analyze and fix the following issue in the Linux kernel code: ARM: 6258/1: arm/h720x: fix debug macro compilation failure
Problem Details: IO_BASE shoule be IO_VIRT, and IO_START should be IO_PHYS. We also need mach/hardware.h for these definitions. Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-h720x/include/mach/debug-macro.S b/arch/arm/mach-h720x/include/mach/debug-macro.S index a9ee8f0d48b7..27cafd12f033 100644 --- a/arch/arm/mach-h720x/include/mach/debug-macro.S +++ b/arch/arm/mach-h720x/include/mach/debug-macro.S @@ -11,8 +11,10 @@ * */ - .equ io_virt, IO_BASE ...
7424713b83587006da72da84d7922471e366faba
Analyze and fix the following issue in the Linux kernel code: padata: Check for valid cpumasks
Problem Details: Now that we allow to change the cpumasks from userspace, we have to check for valid cpumasks in padata_do_parallel. This patch adds the necessary check. This fixes a division by zero crash if the parallel cpumask contains no active cpu. Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Si...
```diff diff --git a/kernel/padata.c b/kernel/padata.c index 6a519454a5bd..7f895e2b4efb 100644 --- a/kernel/padata.c +++ b/kernel/padata.c @@ -114,7 +114,7 @@ int padata_do_parallel(struct padata_instance *pinst, pd = rcu_dereference(pinst->pd); err = -EINVAL; - if (!(pinst->flags & PADATA_INIT)) + if (!(pinst->f...
b89661dff525a46edb7ee8a4423b5212068c05c0
Analyze and fix the following issue in the Linux kernel code: padata: Allocate cpumask dependend recources in any case
Problem Details: The cpumask separation work assumes the cpumask dependend recources present regardless of valid or invalid cpumasks. With this patch we allocate the cpumask dependend recources in any case. This fixes two NULL pointer dereference crashes in padata_replace and in padata_get_cpumask. Signed-off-by: Stef...
```diff diff --git a/kernel/padata.c b/kernel/padata.c index 4287868bbe37..6a519454a5bd 100644 --- a/kernel/padata.c +++ b/kernel/padata.c @@ -417,7 +417,7 @@ static void padata_init_pqueues(struct parallel_data *pd) } num_cpus = cpumask_weight(pd->cpumask.pcpu); - pd->max_seq_nr = (MAX_SEQ_NR / num_cpus) * num_c...
fad3a906d324c02b3c25ef51f702384154089846
Analyze and fix the following issue in the Linux kernel code: padata: Fix cpu index counting
Problem Details: The counting of the cpu index got lost with a recent commit. This patch restores it. This fixes a hang of the parallel worker threads on cpu hotplug. Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
```diff diff --git a/kernel/padata.c b/kernel/padata.c index 526f9ea2fcc8..4287868bbe37 100644 --- a/kernel/padata.c +++ b/kernel/padata.c @@ -408,6 +408,7 @@ static void padata_init_pqueues(struct parallel_data *pd) pqueue = per_cpu_ptr(pd->pqueue, cpu); pqueue->pd = pd; pqueue->cpu_index = cpu_index; + cpu_...
7b5e078cf04ea5b8b7ccffaf9a3607097f5c2359
Analyze and fix the following issue in the Linux kernel code: forcedeth: Fix different hardware statistics versions.
Problem Details: The macros for the values of the bit field describing the four different versions of statistics supported by different hardware variants were being misused. Where the code was trying to test if the hardware implements V3, it was actually testing whether it implements any of V1, V2, or V3, causing the ...
```diff diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 9ef6a9d5fbcb..4da05b1b445c 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c @@ -89,8 +89,10 @@ #define DEV_HAS_MSI_X 0x0000080 /* device supports MSI-X */ #define DEV_HAS_POWER_CNTRL 0x0000100 /* devic...
ac2f40be46ce6ab3bec4c8c297d6923f941741ce
Analyze and fix the following issue in the Linux kernel code: md/bitmap: white space clean up and similar.
Problem Details: Fixes some whitespace problems Fixed some checkpatch.pl complaints. Replaced kmalloc ... memset(0), with kzalloc Fixed an unlikely memory leak on an error path. Reformatted a number of 'if/else' sets, sometimes replacing goto with an else clause. Removed some old comments and commented-out code. Signe...
```diff diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index 4518994712c7..67fb32d1124d 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c @@ -13,7 +13,6 @@ * Still to do: * * flush after percent set rather than just time based. (maybe both). - * wait if count gets too high, wake when it drops to ...
0ccb3a75fe81ec3c4ceb7344c34d0497cbabb369
Analyze and fix the following issue in the Linux kernel code: drm/nv50: fix some not-error error messages
Problem Details: Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c index 0ab868722114..f13ad0de9c8f 100644 --- a/drivers/gpu/drm/nouveau/nv50_display.c +++ b/drivers/gpu/drm/nouveau/nv50_display.c @@ -380,6 +380,9 @@ nv50_display_init(struct drm_device *dev) list_for_each_entry(conne...
c04c5b1da18ec73eaabc7b8a8757545865426fc2
Analyze and fix the following issue in the Linux kernel code: drm/nouveau: Fix TV-out detection on unposted cards lacking a usable DCB table.
Problem Details: Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nv04_display.c b/drivers/gpu/drm/nouveau/nv04_display.c index cd70bd827614..9e28cf772e3c 100644 --- a/drivers/gpu/drm/nouveau/nv04_display.c +++ b/drivers/gpu/drm/nouveau/nv04_display.c @@ -78,6 +78,14 @@ nv04_display_store_initial_head_owner(struct drm_device *dev) int nv...
8bded189552800cae6c333475a54dabe048a74aa
Analyze and fix the following issue in the Linux kernel code: drm/nv30: Init the PFB+0x3xx memory timing regs.
Problem Details: Fixes the randomly flashing vertical lines seen on some nv3x after a cold-boot. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/Makefile b/drivers/gpu/drm/nouveau/Makefile index 4a1db73b3669..b6ed6051ed3f 100644 --- a/drivers/gpu/drm/nouveau/Makefile +++ b/drivers/gpu/drm/nouveau/Makefile @@ -12,7 +12,7 @@ nouveau-y := nouveau_drv.o nouveau_state.o nouveau_channel.o nouveau_mem.o \ nouv...
5620ba4680db0ba25b89952bdda41a9c8fd11f50
Analyze and fix the following issue in the Linux kernel code: drm/nouveau: fix build without CONFIG_ACPI
Problem Details: Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index 20ca5b82ad6f..11c077899a12 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h @@ -833,7 +833,7 @@ static inline void nouveau_register_dsm_handler(void) {} static inline v...
45d60d1bfcbaa660a510e3b4be5d857ca8d81088
Analyze and fix the following issue in the Linux kernel code: drm/nouveau: Reset CRTC owner to 0 before BIOS init.
Problem Details: Fixes suspend+multihead on some boards that also use BIOS scripts for modesetting. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index 3b5523eff43a..aae29cc0cd80 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c @@ -6551,8 +6551,10 @@ nouveau_run_vbios_init(struct drm_device *dev) int i, ret = 0; ...
eae6192a9d0d31f657b50873789175794767bf38
Analyze and fix the following issue in the Linux kernel code: drm/nouveau: Fix a sparse warning.
Problem Details: It doesn't like variable length arrays. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index 0eb1b5ad0db1..31183a41b8d6 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c @@ -209,20 +209,20 @@ static struct methods shadow_methods[] = { { "PCIROM", load_vbios...
c58754703c7d448c94aebf5e500d4278f6fc0678
Analyze and fix the following issue in the Linux kernel code: drm/nv50: fix regression that break LVDS in some places
Problem Details: A previous commit started additionally using the SOR link when trying to match the correct output script. However, we never fill in this field for LVDS so we can never match a script at all. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index 256c6ed7d9e0..0eb1b5ad0db1 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c @@ -5627,6 +5627,7 @@ parse_dcb20_entry(struct drm_device *dev, struct dcb_table *dcb, ...
59f6fbe4291fcc078ba26ce4edf8373a7620a13a
Analyze and fix the following issue in the Linux kernel code: tpm_tis: fix subsequent suspend failures
Problem Details: Fix subsequent suspends by issuing tpm_continue_selftest during resume. Otherwise, the tpm chip seems to be not fully initialized and will reject the save state command during suspend, thus preventing the whole system to suspend. Addresses https://bugzilla.kernel.org/show_bug.cgi?id=16256 Signed-off-...
```diff diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index 24314a9cffe8..1030f8420137 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c @@ -623,7 +623,14 @@ static int tpm_tis_pnp_suspend(struct pnp_dev *dev, pm_message_t msg) static int tpm_tis_pnp_resume(struct pnp_de...
1f4b16128439b225c2986f06d015c848c290d7d9
Analyze and fix the following issue in the Linux kernel code: net-next: Fix an overflow bug in vmxnet3 Tx descriptor
Problem Details: Fix an overflow bug in vmxnet3 Tx descriptor This patch fixes a bug where a 16K buffer on a Tx descriptor was overflowing into the 'gen' bit in the descriptor thereby corrupting the descriptor and stalling the transmit ring. Signed-off-by: Bhavesh Davda <bhavesh@vmware.com> Signed-off-by: Shreyas Bha...
```diff diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 9d64186050f3..abe0ff53daf3 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c @@ -664,8 +664,13 @@ vmxnet3_map_pkt(struct sk_buff *skb, struct vmxnet3_tx_ctx *ctx, while (len) { u32 ...
57e46248a71bfcafb3937a7a5ed8ad324c9fc4f0
Analyze and fix the following issue in the Linux kernel code: qlcnic: fix diag resource allocation
Problem Details: netif_device_attach missing from error path in qlcnic_diag_alloc_res Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c index f147958e05a1..b9615bd745ea 100644 --- a/drivers/net/qlcnic/qlcnic_main.c +++ b/drivers/net/qlcnic/qlcnic_main.c @@ -1176,6 +1176,7 @@ int qlcnic_diag_alloc_res(struct net_device *netdev, int test) ret = qlcnic_fw_create_ctx...
36a1898ddfde3e36a6813ac72540e011a3de57ae
Analyze and fix the following issue in the Linux kernel code: qlcnic: fix loopback test
Problem Details: o Loopback not supported for virtual function. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/qlcnic/qlcnic.h b/drivers/net/qlcnic/qlcnic.h index fad8e9a51a54..970389331bbc 100644 --- a/drivers/net/qlcnic/qlcnic.h +++ b/drivers/net/qlcnic/qlcnic.h @@ -1301,8 +1301,6 @@ struct qlcnic_nic_template { int (*get_mac_addr) (struct qlcnic_adapter *, u8*); int (*config_bridged_mode)...
89c0fd014d34d409a7b196667c2b9a4813b6c968
Analyze and fix the following issue in the Linux kernel code: nilfs2: reject filesystem with unsupported block size
Problem Details: This inserts sanity check that refuses to mount a filesystem with unsupported block size. Previously, kernel code of nilfs was looking only limitation of devices though mkfs.nilfs2 limits the range of block sizes; there was no check that prevents rec_len overflow with larger block sizes. With this ch...
```diff diff --git a/fs/nilfs2/the_nilfs.c b/fs/nilfs2/the_nilfs.c index da67b560f3c3..37de1f062d81 100644 --- a/fs/nilfs2/the_nilfs.c +++ b/fs/nilfs2/the_nilfs.c @@ -671,7 +671,7 @@ int init_nilfs(struct the_nilfs *nilfs, struct nilfs_sb_info *sbi, char *data) goto out; } - blocksize = sb_min_blocksize(sb, BLOC...
6cda9fa2575ec0869fe77b0bdf295c0e51868cab
Analyze and fix the following issue in the Linux kernel code: nilfs2: avoid rec_len overflow with 64KB block size
Problem Details: With 64KB blocksize, a directory entry can have size 64KB which does not fit into 16 bits we have for entry length. So this patch stores 0xffff instead and converts value when read from / written to disk. Nilfs derives its directory implementation from ext2 filesystem, and this draws upon the corresp...
```diff diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c index d8d183e6d095..b60277b44468 100644 --- a/fs/nilfs2/dir.c +++ b/fs/nilfs2/dir.c @@ -141,7 +141,7 @@ static void nilfs_check_page(struct page *page) } for (offs = 0; offs <= limit - NILFS_DIR_REC_LEN(1); offs += rec_len) { p = (struct nilfs_dir_entry *)(k...
3b87956ea645fb4de7e59c7d0aa94de04be72615
Analyze and fix the following issue in the Linux kernel code: net sched: fix race in mirred device removal
Problem Details: This fixes hang when target device of mirred packet classifier action is removed. If a mirror or redirection action is configured to cause packets to go to another device, the classifier holds a ref count, but was assuming the adminstrator cleaned up all redirections before removing. The fix is to add...
```diff diff --git a/include/net/tc_act/tc_mirred.h b/include/net/tc_act/tc_mirred.h index ceac661cdfd5..cfe2943690ff 100644 --- a/include/net/tc_act/tc_mirred.h +++ b/include/net/tc_act/tc_mirred.h @@ -9,6 +9,7 @@ struct tcf_mirred { int tcfm_ifindex; int tcfm_ok_push; struct net_device *tcfm_dev; + struct l...
ef3db4a5954281bc1ea49a4739c88eaea091dc71
Analyze and fix the following issue in the Linux kernel code: tun: avoid BUG, dump packet on GSO errors
Problem Details: There are still some LRO cards that cause GSO errors in tun, and BUG on this is an unfriendly way to tell the admin to disable LRO. Further, experience shows we might have more GSO bugs lurking. See https://bugzilla.kernel.org/show_bug.cgi?id=16413 as a recent example. dumping a packet will make it ea...
```diff diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 6ad6fe706312..63042596f0cf 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -736,8 +736,18 @@ static __inline__ ssize_t tun_put_user(struct tun_struct *tun, gso.gso_type = VIRTIO_NET_HDR_GSO_TCPV6; else if (sinfo->gso_type & SKB_GSO_UDP)...
55bad82385f036a844429ff8989732f0ea3bfff9
Analyze and fix the following issue in the Linux kernel code: ixgbe: fix ethtool stats
Problem Details: In latest changes about 64bit stats on 32bit arches, [commit 28172739f0a276eb8 (net: fix 64 bit counters on 32 bit arches)], I missed ixgbe uses a bit of magic in its ixgbe_gstrings_stats definition. IXGBE_NETDEV_STAT() must now assume offsets relative to rtnl_link_stats64, not relative do dev->stats....
```diff diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c index da54b38bb480..dcebc82c6f4d 100644 --- a/drivers/net/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ixgbe/ixgbe_ethtool.c @@ -54,14 +54,14 @@ struct ixgbe_stats { sizeof(((struct ixgbe_adapter *)0)->m), \ offsetof(struct ...
9963a8bde60f3c139b7683e2ec7e0bf83c0d7581
Analyze and fix the following issue in the Linux kernel code: qlcnic: fix bandwidth check
Problem Details: Fix maximum and minmum bandwith value. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/qlcnic/qlcnic.h b/drivers/net/qlcnic/qlcnic.h index e1894775e5aa..fad8e9a51a54 100644 --- a/drivers/net/qlcnic/qlcnic.h +++ b/drivers/net/qlcnic/qlcnic.h @@ -1074,8 +1074,8 @@ struct qlcnic_eswitch { /* Return codes for Error handling */ #define QL_STATUS_INVALID_PARAM -1 -#define M...
d8190dff018ffe932d17cae047c6b3d1c5fc7574
Analyze and fix the following issue in the Linux kernel code: bonding: set device in RLB ARP packet handler
Problem Details: After: commit 6146b1a4da98377e4abddc91ba5856bef8f23f1e Author: Jay Vosburgh <fubar@us.ibm.com> Date: Tue Nov 4 17:51:15 2008 -0800 bonding: Fix ALB mode to balance traffic on VLANs the dev field in the RLB ARP packet handler was set to NULL to wildcard and accommodate balancing VLANs on top of...
```diff diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index df483076eda6..8d7dfd2f1e90 100644 --- a/drivers/net/bonding/bond_alb.c +++ b/drivers/net/bonding/bond_alb.c @@ -822,7 +822,7 @@ static int rlb_initialize(struct bonding *bond) /*initialize packet type*/ pk_type->type = cpu_...
72ad5d77fb981963edae15eee8196c80238f5ed0
Analyze and fix the following issue in the Linux kernel code: ACPI / Sleep: Allow the NVS saving to be skipped during suspend to RAM
Problem Details: Commit 2a6b69765ad794389f2fc3e14a0afa1a995221c2 (ACPI: Store NVS state even when entering suspend to RAM) caused the ACPI suspend code save the NVS area during suspend and restore it during resume unconditionally, although it is known that some systems need to use acpi_sleep=s4_nonvs for hibernation to...
```diff diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index c268783bc4e7..1571c0c83dba 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt @@ -647,3 +647,10 @@ Who: Stefan Richter <stefanr@s5r6.in-berlin.de> -...
d2f718398a21cdb925f12c2b332d206eacd967a6
Analyze and fix the following issue in the Linux kernel code: of/irq: Fix endian issues in parsing interrupt specifiers
Problem Details: This patch fixes some instances where interrupt specifiers are dereferenced directly instead of doing a be32_to_cpu() conversion first. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
```diff diff --git a/drivers/of/irq.c b/drivers/of/irq.c index 65cfae1bd670..6e595e5a3977 100644 --- a/drivers/of/irq.c +++ b/drivers/of/irq.c @@ -91,8 +91,8 @@ static struct device_node *of_irq_find_parent(struct device_node *child) * properties, for example when resolving PCI interrupts when no device * node exis...
9a6b2e588c7809e86161236da3d29581bf5f8402
Analyze and fix the following issue in the Linux kernel code: of: Fix phandle endian issues
Problem Details: The flat tree code wasn't fixing the endianness on phandle values when unflattening the tree, and the code in drivers/of wasn't always doing a be32_to_cpu before trying to dereference the phandle values. This patch fixes them. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
```diff diff --git a/drivers/of/base.c b/drivers/of/base.c index e3f7af882e45..aa805250de76 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -605,14 +605,14 @@ EXPORT_SYMBOL(of_find_node_by_phandle); struct device_node * of_parse_phandle(struct device_node *np, const char *phandle_name, int index) { - const...
883c2cfc8bcc0fd00c5d9f596fb8870f481b5bda
Analyze and fix the following issue in the Linux kernel code: of/flattree: fix of_flat_dt_is_compatible() to match the full compatible string
Problem Details: With the current string comparison, a device tree compatible of "foo-bar" would match as compatible with a driver looking for "foo". This patch fixes the function to use the of_compat_cmp() macro so that it does the right thing on all platforms (If sparc ever uses this code, it will still want the str...
```diff diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index d61fda836e03..dc876cbbd9dd 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -169,7 +169,7 @@ int __init of_flat_dt_is_compatible(unsigned long node, const char *compat) if (cp == NULL) return 0; while (cplen > 0) { - if (strncasecmp(cp, compa...
c0dd394ca5e78649b7013c3ce2d6338af9f228f0
Analyze and fix the following issue in the Linux kernel code: of: remove of_default_bus_ids
Problem Details: This list used was by only two platforms with all other platforms defining an own list of valid bus id's to pass to of_platform_bus_probe. This patch: i) copies the default list to the two platforms that depended on it (powerpc) ii) remove the usage of of_default_bus_ids in of_platform_bus_probe i...
```diff diff --git a/arch/microblaze/kernel/Makefile b/arch/microblaze/kernel/Makefile index 727e2cbff9c6..7fcc5f7b5a46 100644 --- a/arch/microblaze/kernel/Makefile +++ b/arch/microblaze/kernel/Makefile @@ -16,7 +16,7 @@ extra-y := head.o vmlinux.lds obj-y += dma.o exceptions.o \ hw_exception_handler.o init_task.o...
40f2b6ffe525e975203c1621d4d4abaa7689b674
Analyze and fix the following issue in the Linux kernel code: fscache: fix build on !CONFIG_SYSCTL
Problem Details: Commit 8b8edefa (fscache: convert object to use workqueue instead of slow-work) made fscache_exit() call unregister_sysctl_table() unconditionally breaking build when sysctl is disabled. Fix it by putting it inside CONFIG_SYSCTL. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Randy Dunlap <ran...
```diff diff --git a/fs/fscache/main.c b/fs/fscache/main.c index 500936d9fff2..f9d856773f79 100644 --- a/fs/fscache/main.c +++ b/fs/fscache/main.c @@ -186,7 +186,9 @@ static void __exit fscache_exit(void) kobject_put(fscache_root); kmem_cache_destroy(fscache_cookie_jar); +#ifdef CONFIG_SYSCTL unregister_sysctl_...
1dadcce358a4c4078e1ea0bc4365c3f67b8e373e
Analyze and fix the following issue in the Linux kernel code: ceph: fix dentry lease release
Problem Details: When we embed a dentry lease release notification in a request, invalidate our lease so we don't think we still have it. Otherwise we can get all sorts of incorrect client behavior when multiple clients are interacting with the same part of the namespace. Signed-off-by: Sage Weil <sage@newdream.net>
```diff diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 74144d6389f0..6afc1affb50a 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -2984,6 +2984,7 @@ int ceph_encode_dentry_release(void **p, struct dentry *dentry, memcpy(*p, dentry->d_name.name, dentry->d_name.len); *p += dentry->d_name.len; rel->dname_...
344e0f623cec5eba273db06fe57db080988d6b26
Analyze and fix the following issue in the Linux kernel code: 3c59x: Fix call to mdio_sync() with the wrong argument
Problem Details: commit a095cfc40ec7ebe63e9532383c5b5c2a27b14075 "3c59x: Specify window explicitly for access to windowed registers" changed the first parameter to mdio_sync(), from a pointer to the register mapping, to a pointer to the vortex_private structure, and changed all but one of the call sites. Fix that last...
```diff diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index ebd4c19e30ae..c44d599cc5ef 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c @@ -1393,7 +1393,7 @@ static int __devinit vortex_probe1(struct device *gendev, mii_preamble_required++; if (vp->drv_flags & EXTRA_PREAMBLE) mii_preamble_r...
9c1797808996eef47a7954ec580c6db7de1fff76
Analyze and fix the following issue in the Linux kernel code: net: s2io: fix buffer overflow
Problem Details: vpd_data[] is allocated as kmalloc(256, GFP_KERNEL), so if cnt = 255 then (cnt + 3) overflows 256. memset() is executed without checking. vpd_data[cnt+2] must be less than 256-cnt-2 as the latter is number of vpd_data[] elements to copy. Do not fill with zero the beginning of nic->serial_num as it wil...
```diff diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index b8b85843c614..18bc5b718bbb 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c @@ -5796,7 +5796,7 @@ static void s2io_vpd_read(struct s2io_nic *nic) { u8 *vpd_data; u8 data; - int i = 0, cnt, fail = 0; + int i = 0, cnt, len, fail = 0; int vp...
f89f5d0e94e001e0a09bd433c0c0f089eaf0dea9
Analyze and fix the following issue in the Linux kernel code: net: 3c59x: fix leak of iomaps
Problem Details: If vortex_probe1() fails we should unmap ioaddr mapped earlier. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index 9b137e14dbb0..ebd4c19e30ae 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c @@ -1029,6 +1029,7 @@ static int __devinit vortex_init_one(struct pci_dev *pdev, rc = vortex_probe1(&pdev->dev, ioaddr, pdev->irq, ent->driver_data, unit); ...
c4236282e5921a410e8f074fec795b6ca0af36d5
Analyze and fix the following issue in the Linux kernel code: intel_idle: delete substates DEBUG modparam
Problem Details: it isn't useful anymore Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index 54f0fb4cd5d2..82c9a58b3ab0 100755 --- a/drivers/idle/intel_idle.c +++ b/drivers/idle/intel_idle.c @@ -79,7 +79,7 @@ static struct cpuidle_driver intel_idle_driver = { static int max_cstate = MWAIT_MAX_NUM_CSTATES - 1; static int power_po...
75e0de13631e115768a97131a2d7f5259217512d
Analyze and fix the following issue in the Linux kernel code: qeth: Clear mac_bits field when switching between Layer 2 and Layer 3
Problem Details: This patch fixes a problem that occurs when switching from layer 3 to layer 2 mode. Resetting this mac_bits makes sure that we retrieve our mac address from the card, otherwise the interface simply would'nt work. Signed-off-by: Carsten Otte <cotte@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blasc...
```diff diff --git a/drivers/s390/net/qeth_core_sys.c b/drivers/s390/net/qeth_core_sys.c index 2eb022ff2610..6b7fd88e8e4d 100644 --- a/drivers/s390/net/qeth_core_sys.c +++ b/drivers/s390/net/qeth_core_sys.c @@ -433,6 +433,7 @@ static ssize_t qeth_dev_layer2_store(struct device *dev, if (card->options.layer2 == newdis...
8c696737aa61316a252c4514d09dd163f1464d33
Analyze and fix the following issue in the Linux kernel code: ceph: fix leak of dentry in ceph_init_dentry() error path
Problem Details: If we fail to allocate a ceph_dentry_info, don't leak the dn reference. Signed-off-by: Sage Weil <sage@newdream.net>
```diff diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 8f9b9fe8ef9f..3582e79f46e0 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -1199,8 +1199,10 @@ retry_lookup: goto out; } err = ceph_init_dentry(dn); - if (err < 0) + if (err < 0) { + dput(dn); goto out; + } } else if (dn->d...
bc4fdca85734d12cd2c7a25c52323ef6e6e5adef
Analyze and fix the following issue in the Linux kernel code: ceph: fix pg_mapping leak on pg_temp updates
Problem Details: Free the ceph_pg_mapping structs when they are removed from the pg_temp rbtree. Also fix a leak in the __insert_pg_mapping() error path. Signed-off-by: Sage Weil <sage@newdream.net>
```diff diff --git a/fs/ceph/osdmap.c b/fs/ceph/osdmap.c index 277f8b339577..416d46adbf87 100644 --- a/fs/ceph/osdmap.c +++ b/fs/ceph/osdmap.c @@ -831,12 +831,13 @@ struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end, /* remove any? */ while (rbp && pgid_cmp(rb_entry(rbp, struct ceph_pg_mapping, ...
252af5214682191e34e57204e1a31924fb82c207
Analyze and fix the following issue in the Linux kernel code: ceph: fix d_release dop for snapdir, snapped dentries
Problem Details: We need to set the d_release dop for snapdir and snapped dentries so that the ceph_dentry_info struct gets released. We also use the dcache to cache readdir results when possible, which only works if we know when dentries are dropped from the cache. Since we don't use the dcache for readdir in the hi...
```diff diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index ea36ba9960d3..f94ed3c7f6a5 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -1014,18 +1014,22 @@ out_touch: /* * When a dentry is released, clear the dir I_COMPLETE if it was part - * of the current dir gen. + * of the current dir gen or if this is in the s...
704da534af1e366214f790b381fed73ba6c5d37b
Analyze and fix the following issue in the Linux kernel code: iwlagn: fix firmware loading TLV error path
Problem Details: gcc complains about the firmware loading: iwl-agn.c: In function ‘iwlagn_load_firmware’: iwl-agn.c:1860: warning: ‘tlv_len’ may be used uninitialized in this function iwl-agn.c:1861: warning: ‘tlv_type’ may be used uninitialized in this function iwl-agn.c:1862: warning: ‘tlv_data’ may be used uninitia...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index db86f70d1a3f..573a81b494ea 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c @@ -1828,7 +1828,6 @@ static int iwlagn_load_firmware(struct iwl_priv *priv, u32 tlv_le...
af29a5b1781bf642a29b5e9bb6162dccfcd626df
Analyze and fix the following issue in the Linux kernel code: viafb: fix accel_flags check_var bug
Problem Details: viafb: fix accel_flags check_var bug In check_var we should check and modify the var given and not the one which is currently active. So this code was obviously wrong. Probably this was doing no harm because all acceleration functions also check whether acceleration is possible. (otherwise I would exp...
```diff diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c index 0f56eb28227d..bdd0e4130f4e 100644 --- a/drivers/video/via/viafbdev.c +++ b/drivers/video/via/viafbdev.c @@ -216,9 +216,9 @@ static int viafb_check_var(struct fb_var_screeninfo *var, /* Adjust var according to our driver's own tab...
65123c68d16257e7d21b742e9d80df947c891a6d
Analyze and fix the following issue in the Linux kernel code: viafb: update fix before calculating depth
Problem Details: viafb: update fix before calculating depth As the depth calculation depends on information in fix it is saner to do the update first. No runtime change expected as the value visual in fix used never changes to MONO. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <...
```diff diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c index 1082541358f0..ab3955264559 100644 --- a/drivers/video/via/viafbdev.c +++ b/drivers/video/via/viafbdev.c @@ -234,6 +234,7 @@ static int viafb_set_par(struct fb_info *info) struct VideoModeTable *vmode_entry, *vmode_entry1 = NULL; ...
ad0676cf81c240e3857dc090c9ce0dde7537ac93
Analyze and fix the following issue in the Linux kernel code: viafb: fix PCI table
Problem Details: viafb: fix PCI table This patch fixes an oddity in the device table where the P4M890 ID was assigned with the enumeration value of CN700 which itself was missing. This is a regression introduced by "viafb: make viafb a first-class citizen using pci_driver" While at it reorder the table to reflect th...
```diff diff --git a/drivers/video/via/via-core.c b/drivers/video/via/via-core.c index e8cfe8392110..4afa3c5c059d 100644 --- a/drivers/video/via/via-core.c +++ b/drivers/video/via/via-core.c @@ -613,22 +613,24 @@ static void __devexit via_pci_remove(struct pci_dev *pdev) static struct pci_device_id via_pci_table[] __d...
f1ad752a096aca76f93cd7f86815af8093366fdc
Analyze and fix the following issue in the Linux kernel code: viafb: add lcd scaling support for some IGPs
Problem Details: viafb: add lcd scaling support for some IGPs These IGPs should also support lcd scaling but likely this switch was missed when adding support for them. Fix it, allowing lcd scaling on CN750, VX800 and VX855. At least this improves the situation for VX855. (there seems to be another scaling unrelated b...
```diff diff --git a/drivers/video/via/lcd.c b/drivers/video/via/lcd.c index 55cb4ecfad00..568d15b91f0c 100644 --- a/drivers/video/via/lcd.c +++ b/drivers/video/via/lcd.c @@ -458,6 +458,9 @@ static void load_lcd_scaling(int set_hres, int set_vres, int panel_hres, case UNICHROME_K8M890: case UNICHROME_P4M890: c...
0cd14a061e32d4ddaadad24d86d06cc860010591
Analyze and fix the following issue in the Linux kernel code: nfsd: fix error handling in __write_ports_addxprt
Problem Details: __write_ports_addxprt calls nfsd_create_serv. That increases the refcount of nfsd_serv (which is tracked in sv_nrthreads). The service only decrements the thread count on error, not on success like __write_ports_addfd does, so using this interface leaves the nfsd thread count high. Fix this by having ...
```diff diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index af7469efc61c..9e8645a07fca 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c @@ -1018,6 +1018,9 @@ static ssize_t __write_ports_addxprt(char *buf) PF_INET6, port, SVC_SOCK_ANONYMOUS); if (err < 0 && err != -EAFNOSUPPORT) goto out_close; + + /* ...
78a8d7c8ca3f0cb5cd2a276c6fc17c8c006d0b3c
Analyze and fix the following issue in the Linux kernel code: nfsd: fix error handling when starting nfsd with rpcbind down
Problem Details: The refcounting for nfsd is a little goofy. What happens is that we create the nfsd RPC service, attach sockets to it but don't actually start the threads until someone writes to the "threads" procfile. To do this, __write_ports_addfd will create the nfsd service and then will decrement the refcount wh...
```diff diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index 508941c23af7..af7469efc61c 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c @@ -950,14 +950,18 @@ static ssize_t __write_ports_addfd(char *buf) return err; err = lockd_up(); - if (err != 0) - goto out; + if (err != 0) { + svc_destroy(nfsd_serv)...
4ad9a344be2291b1e594a4a5aee25c5a5df34a97
Analyze and fix the following issue in the Linux kernel code: nfsd4: fix v4 state shutdown error paths
Problem Details: If someone tries to shut down the laundry_wq while it isn't up it'll cause an oops. This can happen because write_ports can create a nfsd_svc before we really start the nfs server, and we may fail before the server is ever started. Also make sure state is shutdown on error paths in nfsd_svc(). Use a...
```diff diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 182448f7112a..9cc3b786d56c 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -51,7 +51,6 @@ static time_t boot_time; static u32 current_ownerid = 1; static u32 current_fileid = 1; static u32 current_delegid = 1; -static u32 nfs4_init; ...
0c9ae701ae1caf657326db22d61074b40a747c9d
Analyze and fix the following issue in the Linux kernel code: firewire: core: fix upper bound of possible CSR allocations
Problem Details: region->end is defined as an upper bound of the requested address range, exclusive --- i.e. as an address outside of the range in which the requested CSR is to be placed. Hence 0x0001,0000,0000,0000 is the biggest valid region->end, not 0x0000,ffff,ffff,fffc like the current check asserted. For simpl...
```diff diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-transaction.c index 6f225cacbc3d..ca7ca56661e0 100644 --- a/drivers/firewire/core-transaction.c +++ b/drivers/firewire/core-transaction.c @@ -543,8 +543,8 @@ int fw_core_add_address_handler(struct fw_address_handler *handler, int ret = -...
7f1c407579519e71a0dcadc05614fd98acec585e
Analyze and fix the following issue in the Linux kernel code: IPVS: make FTP work with full NAT support
Problem Details: Use nf_conntrack/nf_nat code to do the packet mangling and the TCP sequence adjusting. The function 'ip_vs_skb_replace' is now dead code, so it is removed. To SNAT FTP, use something like: % iptables -t nat -A POSTROUTING -m ipvs --vaddr 192.168.100.30/32 \ --vport 21 -j SNAT --to-source 192.168...
```diff diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index fe82b1e10a29..1f9e51180bdb 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h @@ -736,8 +736,6 @@ extern void ip_vs_app_inc_put(struct ip_vs_app *inc); extern int ip_vs_app_pkt_out(struct ip_vs_conn *, struct sk_buff *skb); extern int ip_v...
7b215ffc3885a38182d3d49ceb41d0a81c3e041a
Analyze and fix the following issue in the Linux kernel code: IPVS: make friends with nf_conntrack
Problem Details: Update the nf_conntrack tuple in reply direction, as we will see traffic from the real server (RIP) to the client (CIP). Once this is done we can use netfilters SNAT in POSTROUTING, especially with xt_ipvs, to do source NAT, e.g.: % iptables -t nat -A POSTROUTING -m ipvs --vaddr 192.168.100.30/32 --v...
```diff diff --git a/net/netfilter/ipvs/Kconfig b/net/netfilter/ipvs/Kconfig index d80b41abec09..366244492ac7 100644 --- a/net/netfilter/ipvs/Kconfig +++ b/net/netfilter/ipvs/Kconfig @@ -3,7 +3,7 @@ # menuconfig IP_VS tristate "IP virtual server support" - depends on NET && INET && NETFILTER + depends on NET && INE...
9c3e1c39679144c250dda95098333ecb5f1f407a
Analyze and fix the following issue in the Linux kernel code: netfilter: xt_ipvs (netfilter matcher for IPVS)
Problem Details: This implements the kernel-space side of the netfilter matcher xt_ipvs. [ minor fixes by Simon Horman <horms@verge.net.au> ] Signed-off-by: Hannes Eder <heder@google.com> Signed-off-by: Simon Horman <horms@verge.net.au> [ Patrick: added xt_ipvs.h to Kbuild ] Signed-off-by: Patrick McHardy <kaber@trash...
```diff diff --git a/include/linux/netfilter/Kbuild b/include/linux/netfilter/Kbuild index b93b64dc9fae..0cb62c857187 100644 --- a/include/linux/netfilter/Kbuild +++ b/include/linux/netfilter/Kbuild @@ -31,6 +31,7 @@ header-y += xt_dscp.h header-y += xt_esp.h header-y += xt_hashlimit.h header-y += xt_iprange.h +head...
58f915a311c1eac464e0e1caca2f85a05b66c930
Analyze and fix the following issue in the Linux kernel code: nconfig: Fix segfault when help contains special characters
Problem Details: nconfig segfaults when help text contains the character '%'. For a quick example, navigate to the kernel compression options and get the help for bzip2. Doing so triggers a call to mvwprintw() with a string containing '%' and no extra arguments to fill in the specifier's value. Fix this case by printin...
```diff diff --git a/scripts/kconfig/nconf.gui.c b/scripts/kconfig/nconf.gui.c index 115edb437fb1..a9d9344e1365 100644 --- a/scripts/kconfig/nconf.gui.c +++ b/scripts/kconfig/nconf.gui.c @@ -226,7 +226,7 @@ void fill_window(WINDOW *win, const char *text) int len = get_line_length(line); strncpy(tmp, line, min(len...
f1cba532e8c1001a39650379aa7e04ad974d0592
Analyze and fix the following issue in the Linux kernel code: Input: adxl34x - fix leak and use after free
Problem Details: These are a couple smatch issues. In the original code, if only one of the allocation fails we leak the other variable so we should goto out_free_mem. Also there was a use after free if debugging was enabled and so I moved the kfree() down a line. Signed-off-by: Dan Carpenter <error27@gmail.com> Sig...
```diff diff --git a/drivers/input/misc/adxl34x.c b/drivers/input/misc/adxl34x.c index bb9c10f9dfd3..e2ca01708080 100644 --- a/drivers/input/misc/adxl34x.c +++ b/drivers/input/misc/adxl34x.c @@ -432,11 +432,10 @@ void adxl34x_resume(struct adxl34x *ac) if (ac->suspended && !ac->disabled && ac->opened) __adxl34x_en...
6aa0b9dec5d6dde26ea17b0b5be8fccfe19df3c9
Analyze and fix the following issue in the Linux kernel code: KVM: MMU: fix conflict access permissions in direct sp
Problem Details: In no-direct mapping, we mark sp is 'direct' when we mapping the guest's larger page, but its access is encoded form upper page-struct entire not include the last mapping, it will cause access conflict. For example, have this mapping: [W] / PDE1 -> |---| P[W] | | LPA \...
```diff diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 89d66ca4d87c..2331bdc2b549 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h @@ -342,6 +342,7 @@ static u64 *FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr, /* advance table_gfn when emulating 1gb pages with 4k...
da5e37efe8704fc2b354626467f80f73c5e3c020
Analyze and fix the following issue in the Linux kernel code: vmlinux.lds: fix .data..init_task output section (fix popwerpc boot)
Problem Details: The .data..init_task output section was missing a load offset causing a popwerpc target to fail to boot. Sean MacLennan tracked it down to the definition of INIT_TASK_DATA_SECTION(). There are only two users of INIT_TASK_DATA_SECTION() in the kernel today: cris and popwerpc. cris do not support reloc...
```diff diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 48c5299cbf26..cdfff74e9739 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -435,7 +435,7 @@ */ #define INIT_TASK_DATA_SECTION(align) \ . = ALIGN(align); \ - .data..ini...
3fdfd99051fbc210464378cd44a4b8914282bac3
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix erroneous lmb->memblock conversions
Problem Details: Oooops... we missed these. We incorrectly converted strings used when parsing the device-tree on pseries, thus breaking access to drconf memory and hotplug memory. While at it, also revert some variable names that represent something the FW calls "lmb" and thus don't need to be converted to "memblock"...
```diff diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 9d3953983fb7..fed9bf6187d1 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -414,7 +414,7 @@ static int __init early_init_dt_scan_drconf_memory(unsigned long node) u64 base, size, memblock_size; unsigned in...
4b8692c022a4b149d0c2cc3f4f7a363453fde72a
Analyze and fix the following issue in the Linux kernel code: powerpc/mm: Add some debug output when hash insertion fails
Problem Details: This adds some debug output to our MMU hash code to print out some useful debug data if the hypervisor refuses the insertion (which should normally never happen). Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> ---
```diff diff --git a/arch/powerpc/include/asm/mmu-hash64.h b/arch/powerpc/include/asm/mmu-hash64.h index 2102b214a87c..0e398cfee2c8 100644 --- a/arch/powerpc/include/asm/mmu-hash64.h +++ b/arch/powerpc/include/asm/mmu-hash64.h @@ -250,7 +250,9 @@ extern int hash_page(unsigned long ea, unsigned long access, unsigned lon...
171aa2caaad16ed32b655d33565e112a12cb3537
Analyze and fix the following issue in the Linux kernel code: powerpc/mm: Fix bugs in huge page hashing
Problem Details: There's a couple of nasty bugs lurking in our huge page hashing code. First, we don't check the access permission atomically with setting the _PAGE_BUSY bit, which means that the PTE value we end up using for the hashing might be different than the one we have checked the access permissions for. We'v...
```diff diff --git a/arch/powerpc/mm/hugetlbpage-hash64.c b/arch/powerpc/mm/hugetlbpage-hash64.c index c9acd7910eea..faae9ec4cb04 100644 --- a/arch/powerpc/mm/hugetlbpage-hash64.c +++ b/arch/powerpc/mm/hugetlbpage-hash64.c @@ -21,21 +21,13 @@ int __hash_page_huge(unsigned long ea, unsigned long access, unsigned long vs...
f8e6cc013b896d75d6ce4ec9e168014af1257fd8
Analyze and fix the following issue in the Linux kernel code: nilfs2: fix buffer head leak in nilfs_btnode_submit_block
Problem Details: nilfs_btnode_submit_block() refers to buffer head just before returning from the function, but it releases the buffer head earlier than that if nilfs_dat_translate() gets an error. This has potential for oops in the erroneous case. This fixes the issue. Signed-off-by: Ryusuke Konishi <konishi.ryusuk...
```diff diff --git a/fs/nilfs2/btnode.c b/fs/nilfs2/btnode.c index 447ce47a3306..0a6834bb278e 100644 --- a/fs/nilfs2/btnode.c +++ b/fs/nilfs2/btnode.c @@ -100,6 +100,7 @@ int nilfs_btnode_submit_block(struct address_space *btnc, __u64 blocknr, { struct buffer_head *bh; struct inode *inode = NILFS_BTNC_I(btnc); + s...
583ada4761e18bb105ce5181b0b13cf55ead6201
Analyze and fix the following issue in the Linux kernel code: nilfs2: remove constant qualifier from argument of bmap propagate
Problem Details: The first argument of bops->bop_propagate operation takes a constant qualifier, and causes compilation error when removed cast to pointer of nilfs_btree structure type. This fixes the issue to prepare for succesive removal of nilfs_btree struct. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt...
```diff diff --git a/fs/nilfs2/bmap.h b/fs/nilfs2/bmap.h index de88ddf3bf02..379fda4c668c 100644 --- a/fs/nilfs2/bmap.h +++ b/fs/nilfs2/bmap.h @@ -66,7 +66,7 @@ struct nilfs_bmap_operations { int (*bop_delete)(struct nilfs_bmap *, __u64); void (*bop_clear)(struct nilfs_bmap *); - int (*bop_propagate)(const struct...
cfa913a5077f7619869b2b4d1bf23ccb4f8b3d7b
Analyze and fix the following issue in the Linux kernel code: nilfs2: add sanity check in nilfs_btree_add_dirty_buffer
Problem Details: According to the report titled "problem with nilfs_cleanerd" from Łukasz Wójcicki, nilfs_btree_lookup_dirty_buffers or nilfs_btree_add_dirty_buffer got memory violation during garbage collection. This could happen if a level field of given btree node buffer is incorrect, which is a crucial internal bu...
```diff diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c index b27a342c5af6..386356707f90 100644 --- a/fs/nilfs2/btree.c +++ b/fs/nilfs2/btree.c @@ -1920,6 +1920,18 @@ static void nilfs_btree_add_dirty_buffer(struct nilfs_btree *btree, node = (struct nilfs_btree_node *)bh->b_data; key = nilfs_btree_node_get_key(n...
2d72b99ecdf8cbb5d9422c54b401d9d590b2faf5
Analyze and fix the following issue in the Linux kernel code: nilfs2: add missing error code in comment of nilfs_search_super_root
Problem Details: nilfs_search_super_root can return -ENOMEM, but this error code is not described in its kernel-doc comment. This fixes the discrepancy. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
```diff diff --git a/fs/nilfs2/recovery.c b/fs/nilfs2/recovery.c index f5d9c3f954ae..83e3d8c61a01 100644 --- a/fs/nilfs2/recovery.c +++ b/fs/nilfs2/recovery.c @@ -804,6 +804,8 @@ int nilfs_salvage_orphan_logs(struct the_nilfs *nilfs, * %-EINVAL - No valid segment found * * %-EIO - I/O error + * + * %-ENOMEM - Ins...
bde4e696e4a527c3cc579ed77e4844d11ca17e12
Analyze and fix the following issue in the Linux kernel code: nilfs2: do not update mount time on rw->ro remount
Problem Details: Mount time field in super block is wrongly updated when nilfs remounts the partition from read-write to read-only. This fixes the issue. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
```diff diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c index 414ef68931cf..39b28cf3cf8e 100644 --- a/fs/nilfs2/super.c +++ b/fs/nilfs2/super.c @@ -884,7 +884,6 @@ static int nilfs_remount(struct super_block *sb, int *flags, char *data) if (!(sbp->s_state & le16_to_cpu(NILFS_VALID_FS)) && (nilfs->ns_mount_...
99ad198c4978036bb9f7ebd11618b225b77046da
Analyze and fix the following issue in the Linux kernel code: xen: Fix find_unbound_irq in presence of ioapic irqs.
Problem Details: Don't break the assumption that the first 16 irqs are ISA irqs; make sure that the irq is actually free before using it. Use dynamic_irq_init_keep_chip_data instead of dynamic_irq_init so that chip_data is not NULL (a NULL chip_data breaks setup_vector_irq). Signed-off-by: Stefano Stabellini <stefano...
```diff diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 7c64473c9f3f..b5a254e9aebe 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c @@ -340,9 +340,18 @@ static int find_unbound_irq(void) int irq; struct irq_desc *desc; - for (irq = 0; irq < nr_irqs; irq++) + for (irq = 0; irq < nr_irqs;...
ca91e6c09d656c6deb1f2bc5d57186c718106aa5
Analyze and fix the following issue in the Linux kernel code: powerpc/mm: Move around testing of _PAGE_PRESENT in hash code
Problem Details: Instead of adding _PAGE_PRESENT to the access permission mask in each low level routine independently, we add it once from hash_page(). We also move the preliminary access check (the racy one before the PTE is locked) up so it applies to the huge page case. This duplicates code in __hash_page_huge() w...
```diff diff --git a/arch/powerpc/mm/hash_low_64.S b/arch/powerpc/mm/hash_low_64.S index a719f53921a5..3079f6b44cf5 100644 --- a/arch/powerpc/mm/hash_low_64.S +++ b/arch/powerpc/mm/hash_low_64.S @@ -68,9 +68,6 @@ _GLOBAL(__hash_page_4K) std r8,STK_PARM(r8)(r1) std r9,STK_PARM(r9)(r1) - /* Add _PAGE_PRESENT to ac...
94daa643c144a5f76ac9ee2506084793d608374b
Analyze and fix the following issue in the Linux kernel code: Staging: dt3155: don't use default init_module/cleanup_module function names
Problem Details: Fromy: Randy Dunlap <randy.dunlap@oracle.com> Fix the dt3155 driver to use module_init()/module_exit() instead of default init_module() and cleanup_module() function names. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Scott Smedley <ss@aao.gov.au> Cc: Marek Lindner <lindner_marek@yahoo.d...
```diff diff --git a/drivers/staging/dt3155/dt3155_drv.c b/drivers/staging/dt3155/dt3155_drv.c index 3d41f20e42e1..9e7b8809a2c8 100644 --- a/drivers/staging/dt3155/dt3155_drv.c +++ b/drivers/staging/dt3155/dt3155_drv.c @@ -47,7 +47,7 @@ MA 02111-1307 USA + might want to get rid of MAXboards for allocating initial buf...
f69b0d6451679f1466381a46ac7ab671a7b5668c
Analyze and fix the following issue in the Linux kernel code: Staging: fix typos concerning "address"
Problem Details: Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c b/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c index 8fef6f4ea6a0..e0213a903af1 100644 --- a/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c +++ b/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c @@ -635,7 +635,7 @@ void ...
f34e3e7b2c60645c45f3b083abf9a844ea7788b3
Analyze and fix the following issue in the Linux kernel code: Staging: wlan-ng: fix style in p80211netdev.c
Problem Details: Signed-off-by: Edgardo Hames <ehames@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c index 31308b434344..ead8a356fa49 100644 --- a/drivers/staging/wlan-ng/p80211netdev.c +++ b/drivers/staging/wlan-ng/p80211netdev.c @@ -819,7 +819,8 @@ int wlan_unsetup(wlandevice_t *wlandev) if (wlandev->netdev) { ...
c0cad1e7b81bc9601866586af6dcd6fde8c908ef
Analyze and fix the following issue in the Linux kernel code: Staging: batman-adv: don't use default init_module/cleanup_module function names
Problem Details: Fix two staging drivers to use module_init()/module_exit() instead of default init_module() and cleanup_module() function names so that there are no name conflicts when both are built-in. drivers/staging/dt3155/built-in.o: In function `cleanup_module': (.text+0xc0): multiple definition of `cleanup_mod...
```diff diff --git a/drivers/staging/batman-adv/main.c b/drivers/staging/batman-adv/main.c index a4d238b76b5a..2686019fe4e1 100644 --- a/drivers/staging/batman-adv/main.c +++ b/drivers/staging/batman-adv/main.c @@ -59,7 +59,7 @@ static struct packet_type batman_adv_packet_type __read_mostly = { struct workqueue_stru...
d3e7e99f2faf9f44ec0a3379f735b41c9173dfa1
Analyze and fix the following issue in the Linux kernel code: ACPI: create "processor.bm_check_disable" boot param
Problem Details: processor.bm_check_disable=1" prevents Linux from checking BM_STS before entering C3-type cpu power states. This may be useful for a system running acpi_idle where the BIOS exports FADT C-states, _CST IO C-states, or _CST FFH C-states with the BM_STS bit set; while configuring the chipset to set BM_ST...
```diff diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index b351342f1faf..1d4104855296 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -76,6 +76,8 @@ static unsigned int max_cstate __read_mostly = ACPI_PROCESSOR_MAX_POWER; module_param(max_cstate, uint, 00...
b77026b391f4f43ca148cf6c55a93f7487ff6ed8
Analyze and fix the following issue in the Linux kernel code: caif: precedence bug
Problem Details: Negate has precedence over comparison so the original assert only checked that "rfml->fragment_size" was larger than 1 or 0. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/caif/cfrfml.c b/net/caif/cfrfml.c index 4b04d25b6a3f..eb1602022ac0 100644 --- a/net/caif/cfrfml.c +++ b/net/caif/cfrfml.c @@ -193,7 +193,7 @@ out: static int cfrfml_transmit_segment(struct cfrfml *rfml, struct cfpkt *pkt) { - caif_assert(!cfpkt_getlen(pkt) < rfml->fragment_size); + caif_ass...
9b646972467fb5fdc677f9e4251875db20bdbb64
Analyze and fix the following issue in the Linux kernel code: cifs: use workqueue instead of slow-work
Problem Details: Workqueue can now handle high concurrency. Use system_nrt_wq instead of slow-work. * Updated is_valid_oplock_break() to not call cifs_oplock_break_put() as advised by Steve French. It might cause deadlock. Instead, reference is increased after queueing succeeded and cifs_oplock_break() briefl...
```diff diff --git a/fs/cifs/Kconfig b/fs/cifs/Kconfig index 80f352596807..6994a0f54f02 100644 --- a/fs/cifs/Kconfig +++ b/fs/cifs/Kconfig @@ -2,7 +2,6 @@ config CIFS tristate "CIFS support (advanced network filesystem, SMBFS successor)" depends on INET select NLS - select SLOW_WORK help This is the client ...
8af7c12436803291c90295259db23d371a7ad9cc
Analyze and fix the following issue in the Linux kernel code: fscache: convert operation to use workqueue instead of slow-work
Problem Details: Make fscache operation to use only workqueue instead of combination of workqueue and slow-work. FSCACHE_OP_SLOW is dropped and FSCACHE_OP_FAST is renamed to FSCACHE_OP_ASYNC and uses newly added fscache_op_wq workqueue to execute op->processor(). fscache_operation_init_slow() is dropped and fscache_op...
```diff diff --git a/fs/cachefiles/rdwr.c b/fs/cachefiles/rdwr.c index 0f0d41fbb03f..0e3c0924cc3a 100644 --- a/fs/cachefiles/rdwr.c +++ b/fs/cachefiles/rdwr.c @@ -422,7 +422,7 @@ int cachefiles_read_or_alloc_page(struct fscache_retrieval *op, shift = PAGE_SHIFT - inode->i_sb->s_blocksize_bits; op->op.flags &= FSC...
8b8edefa2fffbff97f9eec8b70e78ae23abad1a0
Analyze and fix the following issue in the Linux kernel code: fscache: convert object to use workqueue instead of slow-work
Problem Details: Make fscache object state transition callbacks use workqueue instead of slow-work. New dedicated unbound CPU workqueue fscache_object_wq is created. get/put callbacks are renamed and modified to take @object and called directly from the enqueue wrapper and the work function. While at it, make all op...
```diff diff --git a/Documentation/filesystems/caching/fscache.txt b/Documentation/filesystems/caching/fscache.txt index a91e2e2095b0..770267af5b3e 100644 --- a/Documentation/filesystems/caching/fscache.txt +++ b/Documentation/filesystems/caching/fscache.txt @@ -343,8 +343,8 @@ This will look something like: [root@an...
718be4aaf3613cf7c2d097f925abc3d3553c0605
Analyze and fix the following issue in the Linux kernel code: ACPI: skip checking BM_STS if the BIOS doesn't ask for it
Problem Details: It turns out that there is a bit in the _CST for Intel FFH C3 that tells the OS if we should be checking BM_STS or not. Linux has been unconditionally checking BM_STS. If the chip-set is configured to enable BM_STS, it can retard or completely prevent entry into deep C-states -- as illustrated by turb...
```diff diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c index 2e837f5080fe..fb7a5f052e2b 100644 --- a/arch/x86/kernel/acpi/cstate.c +++ b/arch/x86/kernel/acpi/cstate.c @@ -145,6 +145,15 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu, percpu_entry->states[cx->index].eax = cx->addre...
e120153ddf8620fd0a194d301e9c5a8b28483bb5
Analyze and fix the following issue in the Linux kernel code: workqueue: fix how cpu number is stored in work->data
Problem Details: Once a work starts execution, its data contains the cpu number it was on instead of pointing to cwq. This is added by commit 7a22ad75 (workqueue: carry cpu number in work data once execution starts) to reliably determine the work was last on even if the workqueue itself was destroyed inbetween. Wheth...
```diff diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index d74a529ed13e..5f76001c4e6d 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h @@ -25,17 +25,19 @@ typedef void (*work_func_t)(struct work_struct *work); enum { WORK_STRUCT_PENDING_BIT = 0, /* work item is pending e...
8a4fd31e0e8dc33f00b8949a12ac56310bac57bc
Analyze and fix the following issue in the Linux kernel code: perf tools: Fix fallback to cplus_demangle() when bfd_demangle() is not available
Problem Details: make version 3.80 doesn't support "else ifdef" on the same line, also it doesn't support unindented nested constructs. Build fails with: Makefile:608: Extraneous text after `else' directive Makefile:611: *** only one `else' per conditional. Stop. This patch fixes the build for make 3.80. Cc: Ingo M...
```diff diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 3d8f31ed771d..d75c28a825f5 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -600,30 +600,32 @@ endif ifdef NO_DEMANGLE BASIC_CFLAGS += -DNO_DEMANGLE -else ifdef HAVE_CPLUS_DEMANGLE - EXTLIBS += -liberty - BASIC_CFLAGS += -DHAVE_CPLUS...
be2b6e62357dd7ee56bdcb05e54002afb4830292
Analyze and fix the following issue in the Linux kernel code: net: Fix skb_copy_expand() handling of ->csum_start
Problem Details: It should only be adjusted if ip_summed == CHECKSUM_PARTIAL. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/core/skbuff.c b/net/core/skbuff.c index c699159b3ede..ce88293a34e2 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -932,7 +932,8 @@ struct sk_buff *skb_copy_expand(const struct sk_buff *skb, copy_skb_header(n, skb); off = newheadroom - oldheadroom; - n->csum_sta...