id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
2b3e38c4fbeb88092390f7c29b4934212abe9ded
Analyze and fix the following issue in the Linux kernel code: ARM: mach-shmobile: convert mackerel to use the generic MMC GPIO hotplug helper
Problem Details: This also fixes the following modular mmc build failure: arch/arm/mach-shmobile/built-in.o: In function `ag5evm_sdhi0_gpio_cd': pfc-sh73a0.c:(.text+0x7c0): undefined reference to `mmc_detect_change' on this platform by eliminating the use of an inline function, which calls into the mmc core. Signed-...
```diff diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index f49e28abe0ab..8c6202bb6aeb 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c @@ -1011,21 +1011,12 @@ static int slot_cn7_get_cd(struct platform_device *pdev) } ...
f8abc080d33e69dfa2c3dd0f84c31832e2679091
Analyze and fix the following issue in the Linux kernel code: SPEAr: Call clk_prepare() before calling clk_enable
Problem Details: With common clock framework, it is must to call clk_{un}prepare() before/after clk_{dis}enable. This patch fixes this for SPEAr timer. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Reviewed-by: Mike Turquette <mturquette@linaro.org>
```diff diff --git a/arch/arm/plat-spear/time.c b/arch/arm/plat-spear/time.c index abb5bdecd509..1c94989d725f 100644 --- a/arch/arm/plat-spear/time.c +++ b/arch/arm/plat-spear/time.c @@ -219,10 +219,10 @@ void __init spear_setup_timer(void) goto err_iomap; } - ret = clk_enable(gpt_clk); + ret = clk_prepare_enabl...
e20289ed3f83e3b065f53d36dc1805937ce55d84
Analyze and fix the following issue in the Linux kernel code: usb/net: rndis: fixup a few name prefixes
Problem Details: This switches a horde of NDIS_*-prefixed variables to the RNDIS_* prefix. Most of them aren't used much and causes no changes. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c index d747e8912627..b35babed6fcb 100644 --- a/drivers/usb/gadget/rndis.c +++ b/drivers/usb/gadget/rndis.c @@ -346,8 +346,8 @@ static int gen_ndis_query_resp(int configNr, u32 OID, u8 *buf, case RNDIS_OID_GEN_MAC_OPTIONS: /* from WinME */ ...
17c51b6ccc7d470a8801135e0af7f97915f46e32
Analyze and fix the following issue in the Linux kernel code: usb/net: rndis: merge media type definitions
Problem Details: Let's have a unified table of RNDIS media. We used to have a similar table with NDIS_* prefix from the gadget driver, but since we're only using RNDIS in the kernel (IIRC NDIS, non-remote, is for the windows- internal network drivers so what do we care) let's prefix everything with RNDIS. Some of the d...
```diff diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c index 52343654f5df..d4f823f463e9 100644 --- a/drivers/usb/gadget/f_rndis.c +++ b/drivers/usb/gadget/f_rndis.c @@ -637,7 +637,7 @@ static void rndis_open(struct gether *geth) DBG(cdev, "%s\n", __func__); - rndis_set_param_medium(rndis...
c3ef5eae862f642d3526f518086d75b575587e5e
Analyze and fix the following issue in the Linux kernel code: usb/net: rndis: delete surplus defines
Problem Details: These defines are not used in the kernel, and they have duplicate definitions under the RNDIS_* prefix. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/linux/rndis.h b/include/linux/rndis.h index 62aecb75b054..70bd80ae8b44 100644 --- a/include/linux/rndis.h +++ b/include/linux/rndis.h @@ -58,10 +58,6 @@ /* From drivers/usb/gadget/ndis.h */ -#define NDIS_STATUS_MULTICAST_FULL 0xC0010009 -#define NDIS_STATUS_MULTICAST_EXISTS 0xC0...
918f832290f01b7759826f86bf08562820545e00
Analyze and fix the following issue in the Linux kernel code: sparc32: fix warning in floopy glue
Problem Details: Fix following warning: arch/sparc/include/asm/floppy_32.h:342:5: warning: 'op' may be used uninitialized in this function The warning are legitimite and we can end up using op uninitialized. This fixes build with my gcc on UP. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Mil...
```diff diff --git a/arch/sparc/include/asm/floppy_32.h b/arch/sparc/include/asm/floppy_32.h index f9548568ca8f..491eb68c3bb3 100644 --- a/arch/sparc/include/asm/floppy_32.h +++ b/arch/sparc/include/asm/floppy_32.h @@ -334,6 +334,7 @@ static int sun_floppy_init(void) /* Look up irq in platform_device. * We try "SU...
c889e91d2cc22123f20f40dde0c0a91856a20eea
Analyze and fix the following issue in the Linux kernel code: i2c: tegra: notify transfer-complete after clearing status.
Problem Details: The notification of the transfer complete by calling complete() should be done after clearing all interrupt status. This avoids the race condition of misconfigure the i2c controller in multi-core environment. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Acked-by: Stephen Warren <swarren@wwwdo...
```diff diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c index 18067b3ee8c9..8b2e555a9563 100644 --- a/drivers/i2c/busses/i2c-tegra.c +++ b/drivers/i2c/busses/i2c-tegra.c @@ -401,8 +401,6 @@ static irqreturn_t tegra_i2c_isr(int irq, void *dev_id) disable_irq_nosync(i2c_dev->irq); i2c...
998de4acb2ba188d20768d1065658377a2e7d29b
Analyze and fix the following issue in the Linux kernel code: ARM: 7417/1: vfp: ensure preemption is disabled when enabling VFP access
Problem Details: The vfp_enable function enables access to the VFP co-processor register space (cp10 and cp11) on the current CPU and must be called with preemption disabled. Unfortunately, the vfp_init late initcall does not disable preemption and can lead to an oops during boot if thread migration occurs at the wrong...
```diff diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index bc683b8219b5..c5767b5a4318 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c @@ -11,6 +11,7 @@ #include <linux/types.h> #include <linux/cpu.h> #include <linux/cpu_pm.h> +#include <linux/hardirq.h> #include <linux/kerne...
353f56b5f3093b6d75e81f523a8b10748a40f278
Analyze and fix the following issue in the Linux kernel code: i2c: tegra: fix 10bit address configuration
Problem Details: The slave address of device to be configured in packet header as follows: 7 bit address: PacketHeader3[7:1] 10 bit address: PacketHeader3[9:0] Fixing the code to make packet header3 properly. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Acked-by: Jean Delvare <khali@linux-fr.org> Sig...
```diff diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c index 55e5ea62ccee..18067b3ee8c9 100644 --- a/drivers/i2c/busses/i2c-tegra.c +++ b/drivers/i2c/busses/i2c-tegra.c @@ -476,12 +476,15 @@ static int tegra_i2c_xfer_msg(struct tegra_i2c_dev *i2c_dev, packet_header = msg->len - 1; i2c_...
ec39ef83eb9b22cc732329e85fc4ec03e76d9dda
Analyze and fix the following issue in the Linux kernel code: i2c-s3c2410: Add HDMIPHY quirk for S3C2440
Problem Details: This patch adds support for s3c2440 I2C bus controller dedicated HDMIPHY device on Exynos4 platform. Some quirks are introduced due to differences between HDMIPHY and other I2C controllers on Exynos4. These differences are: - no GPIOs, HDMIPHY is inside the SoC and the controller is connected intern...
```diff diff --git a/Documentation/devicetree/bindings/i2c/samsung-i2c.txt b/Documentation/devicetree/bindings/i2c/samsung-i2c.txt index 38832c712919..b6cb5a12c672 100644 --- a/Documentation/devicetree/bindings/i2c/samsung-i2c.txt +++ b/Documentation/devicetree/bindings/i2c/samsung-i2c.txt @@ -6,14 +6,18 @@ Required pr...
d9afca37dea077d11ed67fc7f93b95c003e58819
Analyze and fix the following issue in the Linux kernel code: of/i2c: call i2c_verify_client from of_find_i2c_device_by_node
Problem Details: i2c_bus_type may contain both I2C clients and I2C adapters. Fix of_find_i2c_device_by_node to call i2c_verify_client to ensure that it only returns non-NULL of I2C clients. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Wolfram Sang <w...
```diff diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c index f37fbeb66a44..068488717f69 100644 --- a/drivers/of/of_i2c.c +++ b/drivers/of/of_i2c.c @@ -90,7 +90,7 @@ struct i2c_client *of_find_i2c_device_by_node(struct device_node *node) if (!dev) return NULL; - return to_i2c_client(dev); + return i2c_ver...
75fb1f25d48b64ff11081623c2104ad345882c9f
Analyze and fix the following issue in the Linux kernel code: i2c: eg20t: use NULL instead of 0
Problem Details: sparse rightfully says: drivers/i2c/busses/i2c-eg20t.c:990:59: warning: Using plain integer as NULL pointer Signed-off-by: Wolfram Sang <wolfram@the-dreams.de> Cc: Tomoya MORINAGA <tomoya.rohm@gmail.com>
```diff diff --git a/drivers/i2c/busses/i2c-eg20t.c b/drivers/i2c/busses/i2c-eg20t.c index 9da12cecb3bb..6e9e0759f7df 100644 --- a/drivers/i2c/busses/i2c-eg20t.c +++ b/drivers/i2c/busses/i2c-eg20t.c @@ -872,7 +872,7 @@ static void __devexit pch_i2c_remove(struct pci_dev *pdev) pci_iounmap(pdev, adap_info->pch_data[0...
d4eb56a16273a04f10eb7f959e1bb59b6f88d8c9
Analyze and fix the following issue in the Linux kernel code: regulator: da903x: Fix list voltage for da9030 ldo14
Problem Details: da903x_list_voltage does not return correct voltage for da9030 ldo14. Implement da9030_list_ldo14_voltage to return correct voltage for da9030 ldo14. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/drivers/regulator/da903x.c b/drivers/regulator/da903x.c index 682bdb391abd..a9c4590061c1 100644 --- a/drivers/regulator/da903x.c +++ b/drivers/regulator/da903x.c @@ -267,6 +267,24 @@ static int da9030_get_ldo14_voltage(struct regulator_dev *rdev) info->step_uV * (val & ~0x4); } +static int d...
96061a91a1265d2f8dae6f4a6064bd77faec4df5
Analyze and fix the following issue in the Linux kernel code: sparc32: Restore SMP build and rectify sun4m NMI when non-SMP.
Problem Details: The non-SMP sun4m NMI handler was still accessing SUN4C registers. Fix that and share the sun4m NMI trap code between SMP and non-SMP cases. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S index 1b87ea088e1a..4976d655c9c3 100644 --- a/arch/sparc/kernel/entry.S +++ b/arch/sparc/kernel/entry.S @@ -306,8 +306,8 @@ maybe_smp4m_msg_out: RESTORE_ALL .align 4 - .globl linux_trap_ipi15 -linux_trap_ipi15: + .globl linux_trap_ipi15_su...
054768a132c5c78d1aebf8be1b2927814c670845
Analyze and fix the following issue in the Linux kernel code: sparc32: drop sun4c window overflow stack checking routine
Problem Details: Also drop run-time patching for srmmu Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc/kernel/wof.S b/arch/sparc/kernel/wof.S index 3bbcd8dc9abf..4c2de3cf309b 100644 --- a/arch/sparc/kernel/wof.S +++ b/arch/sparc/kernel/wof.S @@ -163,9 +163,8 @@ spwin_fromuser: * the label 'spwin_user_stack_is_bolixed' which will take * care of things at that point. */ - .globl sp...
c3a0ce2eab76daf9516c817c3f227ea3f4549bd8
Analyze and fix the following issue in the Linux kernel code: dm thin: fix unprotected use of prepared_discards list
Problem Details: Fix two places in commit 104655fd4dce ("dm thin: support discards") that didn't use pool->lock to protect against concurrent changes to the prepared_discards list. Without this fix, thin_endio() can race with process_discard(), leading to concurrent list_add()s that result in the processes locking up ...
```diff diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index 301db0f45d3b..69a2d51ef4e1 100644 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c @@ -1180,6 +1180,7 @@ static void no_space(struct cell *cell) static void process_discard(struct thin_c *tc, struct bio *bio) { int r; + unsigned long flags;...
03aaae7cdc71bc306888440b1f569d463e917b6d
Analyze and fix the following issue in the Linux kernel code: dm thin: reinstate missing mempool_free in cell_release_singleton
Problem Details: Fix a significant memory leak inadvertently introduced during simplification of cell_release_singleton() in commit 6f94a4c45a6f744383f9f695dde019998db3df55 ("dm thin: fix stacked bi_next usage"). A cell's hlist_del() must be accompanied by a mempool_free(). Use __cell_release() to do this, like before...
```diff diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index 213ae32a0fc4..301db0f45d3b 100644 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c @@ -279,8 +279,10 @@ static void __cell_release(struct cell *cell, struct bio_list *inmates) hlist_del(&cell->list); - bio_list_add(inmates, cell->holder);...
2760f7adbb6c4e39bd3ae733f56d4ac8fb5e3521
Analyze and fix the following issue in the Linux kernel code: gpio/exynos: Fix compiler warnings when non-exynos machines are selected
Problem Details: Fixes the following compiler warnings: drivers/gpio/gpio-samsung.c: In function ‘samsung_gpiolib_init’: drivers/gpio/gpio-samsung.c:2980:1: warning: label ‘err_ioremap1’ defined but not used [-Wunused-label] drivers/gpio/gpio-samsung.c:2978:1: warning: label ‘err_ioremap2’ defined but not used [-Wunus...
```diff diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c index 19d6fc0229c3..e991d9171961 100644 --- a/drivers/gpio/gpio-samsung.c +++ b/drivers/gpio/gpio-samsung.c @@ -452,12 +452,14 @@ static struct samsung_gpio_cfg s3c24xx_gpiocfg_banka = { }; #endif +#if defined(CONFIG_ARCH_EXYNOS4) || def...
1b1287032df3a69d3ef9a486b444f4ffcca50d01
Analyze and fix the following issue in the Linux kernel code: gpio/omap: fix missing check in *_runtime_suspend()
Problem Details: We do checking for bank->enabled_non_wakeup_gpios in order to skip redundant operations. Somehow, the check got missed while doing the cleanup series. Just to make sure that we do context restore correctly in *_runtime_resume(), the bank->workaround_enabled check is moved after context restore. Otherw...
```diff diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index 2c70617e6b45..9b71f04538aa 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -1157,6 +1157,9 @@ static int omap_gpio_runtime_suspend(struct device *dev) spin_lock_irqsave(&bank->lock, flags); + if (!bank->enabled_...
d13710a7e6241f1725da34004928b93a71b05508
Analyze and fix the following issue in the Linux kernel code: gpio/omap: remove virtual_irq_start variable
Problem Details: This cleanup got missed while implementing following: 25db711 gpio/omap: Fix IRQ handling for SPARSE_IRQ 384ebe1 gpio/omap: Add DT support to GPIO driver Cc: Kevin Hilman <khilman@ti.com> Cc: Tony Lindgren <tony@atomide.com> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com> Cc: Cousson, Benoit <b-couss...
```diff diff --git a/arch/arm/mach-omap1/gpio15xx.c b/arch/arm/mach-omap1/gpio15xx.c index 634903ef8292..ebef15e5e7b7 100644 --- a/arch/arm/mach-omap1/gpio15xx.c +++ b/arch/arm/mach-omap1/gpio15xx.c @@ -46,7 +46,6 @@ static struct omap_gpio_reg_offs omap15xx_mpuio_regs = { }; static struct __initdata omap_gpio_plat...
b9322252727bc3af6e64b8d75058403edeaddea5
Analyze and fix the following issue in the Linux kernel code: usb: chipidea: isr_reset_handler fix missing locking
Problem Details: Move spin_lock under the done label, so the lock will also be pulled in the error paths. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> [rebased on top of the patchset] Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linux...
```diff diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 9133a59450f4..ddd27d3443f8 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -645,9 +645,9 @@ __acquires(udc->lock) if (udc->status == NULL) retval = -ENOMEM; +done: spin_lock(&udc->lock); - done: i...
5f36e231e9dbffb5264612e5b5817ab574a5e5db
Analyze and fix the following issue in the Linux kernel code: usb: chipidea: add support for roles
Problem Details: Add some generic code for roles and implement simple role switching based on ID pin state and/or a sysfs file. At this, we also rename the device to ci_hdrc, which is what it is. The "manual" switch is made into a sysfs file and not debugfs, because it might be useful even in non-debug context. For so...
```diff diff --git a/drivers/usb/chipidea/bits.h b/drivers/usb/chipidea/bits.h index 5fbff11cf220..62c35af1a5af 100644 --- a/drivers/usb/chipidea/bits.h +++ b/drivers/usb/chipidea/bits.h @@ -50,6 +50,24 @@ #define DEVLC_PSPD (0x03UL << 25) #define DEVLC_PSPD_HS (0x02UL << 25) +/* OTGSC */ +#defin...
1ce029968718477149e7f1fb245a8e82c690cc4a
Analyze and fix the following issue in the Linux kernel code: arm: omap3: am35x: Don't mark missing features as present
Problem Details: The Chip Identification register on the am35x family of SoCs has bits 12, 7:5, and 3:2 marked as reserved and are read as zeroes. Unfortunately, on other omap SoCs, a 0 bit means a feature is "Full Use" so the OMAP3_CHECK_FEATURE() macro called by omap3_check_features() will incorrectly interpret thos...
```diff diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index f611e3097157..38ae74f8e77a 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -246,6 +246,17 @@ void __init omap3xxx_check_features(void) omap_features |= OMAP3_HAS_SDRC; + /* + * am35x fixups: + * - The am35x Ch...
99b59df04899a048d1a3ed8bc2b1263779816868
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP3: PM: fix shared PRCM interrupts: leave disabled at boot
Problem Details: By default, request_irq() will auto-enable the requested IRQ. For PRCM interrupts, we may want to avoid that until the PM core code is fully ready to handle the interrupts. This is particularily true for IO pad interrupts on OMAP3, which are shared between the hwmod core and the PRM core. In order t...
```diff diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 703bd1099259..4f44ee517f78 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -729,6 +729,7 @@ static int __init omap3_pm_init(void) ret = request_irq(omap_prcm_event_to_irq("io"), _prcm_int_handle_i...
e3c83c2db458f1e040c5b4bb19773c458e0240a8
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP2+: INTC: fix suspend abort, set IRQCHIP_SKIP_SET_WAKE
Problem Details: Without an ->irq_set_wake() method in an irq_chip, calls to enable_irq_wake() will fail. This also causes these interrupts to not be able to abort suspend (via check_wakeup_irqs() in late suspend.) Currently, we don't implement ->irq_set_wake() for INTC interrupts because they default to be wakeup en...
```diff diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c index 65f0d2571c9a..b0790a995dc9 100644 --- a/arch/arm/mach-omap2/irq.c +++ b/arch/arm/mach-omap2/irq.c @@ -148,6 +148,7 @@ omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num) ct->chip.irq_ack = omap_mask_ack_irq; ct-...
1fce677971e29ceaa7c569741fa9c685a7b1052a
Analyze and fix the following issue in the Linux kernel code: printk: add stub for prepend_timestamp()
Problem Details: Add a stub for prepend_timestamp() when CONFIG_PRINTK is not enabled. Fixes this build error: kernel/printk.c:1770:3: error: implicit declaration of function 'prepend_timestamp' Cc: Kay Sievers <kay@vrfy.org> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Greg Kroah-Hartman <gregk...
```diff diff --git a/kernel/printk.c b/kernel/printk.c index 8b027bdf4606..c42faf97404a 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -1439,6 +1439,10 @@ static struct log *log_from_idx(u32 idx) { return NULL; } static u32 log_next(u32 idx) { return 0; } static char *log_text(const struct log *msg) { return N...
7c0482e3d055e5de056d3c693b821e39205b99ae
Analyze and fix the following issue in the Linux kernel code: powerpc/irq: Fix another case of lazy IRQ state getting out of sync
Problem Details: So we have another case of paca->irq_happened getting out of sync with the HW irq state. This can happen when a perfmon interrupt occurs while soft disabled, as it will return to a soft disabled but hard enabled context while leaving a stale PACA_IRQ_HARD_DIS flag set. This patch fixes it, and also ad...
```diff diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index fc6015027a86..ef2074c3e906 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S @@ -588,23 +588,19 @@ _GLOBAL(ret_from_except_lite) fast_exc_return_irq: restore: /* - * This is the main kernel exi...
405b84487438efa1360740a70ec3e3cd1a90bd62
Analyze and fix the following issue in the Linux kernel code: usb: gadget: ci13xxx: fix the context of register map
Problem Details: The regmap field is an array of register pointers, not the other way around. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/usb/gadget/ci13xxx_udc.h b/drivers/usb/gadget/ci13xxx_udc.h index 553cc817b2dc..a4cad41634fc 100644 --- a/drivers/usb/gadget/ci13xxx_udc.h +++ b/drivers/usb/gadget/ci13xxx_udc.h @@ -122,7 +122,7 @@ struct hw_bank { void __iomem *cap; /* bus map offset + CAP offset */ void __iomem *op...
b37fd4154e758c7226fda663e2ea3a97c6e8c732
Analyze and fix the following issue in the Linux kernel code: ARM: tegra30: MC: Remove unnecessary BUG*()
Problem Details: Accessing interleaved MC register offsets/ranges are verified. BUG*()s in accessors can be removed. Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/memory/tegra30-mc.c b/drivers/memory/tegra30-mc.c index c9821258117a..ec9fc7894801 100644 --- a/drivers/memory/tegra30-mc.c +++ b/drivers/memory/tegra30-mc.c @@ -91,18 +91,18 @@ struct tegra30_mc { static inline u32 mc_readl(struct tegra30_mc *mc, u32 offs) { + u32 val = 0; + if (offs...
0c733a427c430b54a6fa574fbc6e96baf7b9202f
Analyze and fix the following issue in the Linux kernel code: ARM: tegra20: MC: Remove unnecessary BUG*()
Problem Details: Accessing interleaved MC register offsets/ranges are verified. BUG*()s in accessors can be removed. Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/memory/tegra20-mc.c b/drivers/memory/tegra20-mc.c index c0bfffacdc64..2a437e92756c 100644 --- a/drivers/memory/tegra20-mc.c +++ b/drivers/memory/tegra20-mc.c @@ -53,12 +53,14 @@ struct tegra20_mc { static inline u32 mc_readl(struct tegra20_mc *mc, u32 offs) { + u32 val = 0; + if (offs...
6b0b79d38806481c1c8fffa7c5842f3c83679a42
Analyze and fix the following issue in the Linux kernel code: USB: cdc-wdm: cannot use dev_printk when device is gone
Problem Details: We cannot dereference a removed USB interface for dev_printk. Use pr_debug instead where necessary. Flush errors are expected if device is unplugged and are therefore best ingored at this point. Move the kill_urbs() call in wdm_release with dev_dbg() for the non disconnect, as we know it has already ...
```diff diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c index 765227575d3b..90bc916d7cbd 100644 --- a/drivers/usb/class/cdc-wdm.c +++ b/drivers/usb/class/cdc-wdm.c @@ -533,7 +533,9 @@ static int wdm_flush(struct file *file, fl_owner_t id) struct wdm_device *desc = file->private_data; wait_e...
b8cacf33f09c60208a914b36b3e6de8e9ba228d5
Analyze and fix the following issue in the Linux kernel code: usb: dwc3: Fix the dwc3 dependency
Problem Details: The warning shown up when ran with randconfig, warning: (USB_DWC3) selects USB_XHCI_PLATFORM which has unmet direct dependencies (USB_SUPPORT && USB_XHCI_HCD) Signed-off-by: joseph daniel <josephdanielwalter@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig index d8f741f9e56e..d13c60f42139 100644 --- a/drivers/usb/dwc3/Kconfig +++ b/drivers/usb/dwc3/Kconfig @@ -4,7 +4,7 @@ config USB_DWC3 select USB_OTG_UTILS select USB_GADGET_DUALSPEED select USB_GADGET_SUPERSPEED - select USB_XHCI_PLATFORM + ...
72688dc95afcb42f4d5e8762f8790144cec9a280
Analyze and fix the following issue in the Linux kernel code: usb: gadget: dummy_hcd: fix build when BUG is not set
Problem Details: Use WARN_ON() instead of __WARN, which also means we won't use any internal macros. Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c index 83bb2e3fa861..b799106027ad 100644 --- a/drivers/usb/gadget/dummy_hcd.c +++ b/drivers/usb/gadget/dummy_hcd.c @@ -598,7 +598,7 @@ static void dummy_free_request(struct usb_ep *_ep, struct usb_request *_req) struct dummy_request *...
fdf6e6390a567963e302a62ef676dd648d11661c
Analyze and fix the following issue in the Linux kernel code: usb: host: mips: sead3: Fix for big endian.
Problem Details: Fix driver to work properly in big endian mode. Signed-off-by: Steven J. Hill <sjhill@mips.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/usb/host/ehci-sead3.c b/drivers/usb/host/ehci-sead3.c index 4c164308ed20..cc199e87a7a9 100644 --- a/drivers/usb/host/ehci-sead3.c +++ b/drivers/usb/host/ehci-sead3.c @@ -28,17 +28,17 @@ static int ehci_sead3_setup(struct usb_hcd *hcd) ehci->caps = hcd->regs + 0x100; +#ifdef __BIG_ENDI...
c53cff5e42a06b81495983bd01741b9a954f11f0
Analyze and fix the following issue in the Linux kernel code: vhost-net: fix handle_rx buffer size
Problem Details: Take vlan header length into account, when vlan id is stored as vlan_tci. Otherwise tagged packets coming from macvtap will be truncated. Signed-off-by: Basil Gor <basil.gor@gmail.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 1f21d2a1e528..5c170100de9c 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -24,6 +24,7 @@ #include <linux/if_arp.h> #include <linux/if_tun.h> #include <linux/if_macvlan.h> +#include <linux/if_vlan.h> #include <net/sock.h> @@ -283...
b943fbb09036bf7ff8e780af511a21576fe60a1e
Analyze and fix the following issue in the Linux kernel code: net: of/phy: fix build error when phylib is built as a module
Problem Details: CONFIG_OF_MDIO is tristate and will be m if PHYLIB is m. Use IS_ENABLED macro to prevent build error: ERROR: "of_mdio_find_bus" [drivers/net/phy/mdio-mux.ko] undefined! Reported-by: Randy Dunlap <rdunlap@xenotime.net> Cc: David Daney <david.daney@cavium.com> Signed-off-by: Bjørn Mork <bjorn@mork.no...
```diff diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 83d5c9f55686..683ef1ce5519 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c @@ -88,7 +88,7 @@ static struct class mdio_bus_class = { .dev_release = mdiobus_release, }; -#ifdef CONFIG_OF_MDIO +#if IS_ENABLED(C...
065899c9974c4adf45ddc308d84a2a7df519f70b
Analyze and fix the following issue in the Linux kernel code: ASoC: fsl: fix the binding of imx-sgtl5000
Problem Details: The sgtl5000 data sheet does not particularly mention that the Mic Bias will internally supplies to MIC_IN, so fix the example in imx-sgtl5000 binding document to have a better reflection of the actual circuit. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Mark Brown <broonie@opensour...
```diff diff --git a/Documentation/devicetree/bindings/sound/imx-audio-sgtl5000.txt b/Documentation/devicetree/bindings/sound/imx-audio-sgtl5000.txt index d09b4e31461c..e4acdd891e49 100644 --- a/Documentation/devicetree/bindings/sound/imx-audio-sgtl5000.txt +++ b/Documentation/devicetree/bindings/sound/imx-audio-sgtl50...
7df4a691fb6645405c9d3dad8d27f8e5e3451e00
Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: Fix comment
Problem Details: Explained by Takashi in <s5hfwbtmz0q.wl%tiwai@suse.de> > The reason is because get_min_max*() isn't called in the place you > created these controls, and get_min_max() would be called only for > integer volumes later even if uninitialized. A short cut for booleans. Signed-off-by: Mark Hills <mark@po...
```diff diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c index 12125ca7167f..41f4b6911920 100644 --- a/sound/usb/mixer_quirks.c +++ b/sound/usb/mixer_quirks.c @@ -79,16 +79,8 @@ static int snd_create_std_mono_ctl(struct usb_mixer_interface *mixer, cval->control = control; cval->cmask = cmask; - /*...
b723b0eb91e08a0ee9a401c0b22c0d52966d9daa
Analyze and fix the following issue in the Linux kernel code: PM / Domains: Fix computation of maximum domain off time
Problem Details: The default domain power off governor function for generic PM domains, default_power_down_ok(), may violate subdomain maximum off time limit by allowing the master domain to be off for too long. Namely, it only finds the minium of all device maximum off times over the domain's devices and uses that to...
```diff diff --git a/drivers/base/power/domain_governor.c b/drivers/base/power/domain_governor.c index 3a5c5346bc47..28dee3053f1f 100644 --- a/drivers/base/power/domain_governor.c +++ b/drivers/base/power/domain_governor.c @@ -105,7 +105,7 @@ static bool default_power_down_ok(struct dev_pm_domain *pd) struct generic_...
4fcac10d28e7a046120b51a106b19082d2e57401
Analyze and fix the following issue in the Linux kernel code: PM / Domains: Fix link checking when add subdomain
Problem Details: Current pm_genpd_add_subdomain() will allow duplicated link between master and slave domain. This patch fixed it. Because when current pm_genpd_add_subdomain() checks whether the link between the master and slave generic PM domain already exists, slave_links instead of master_links of master domain i...
```diff diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index cde5983de6c2..c3eaa08a8f96 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -1448,7 +1448,7 @@ int pm_genpd_add_subdomain(struct generic_pm_domain *genpd, goto out; } - list_for_each_entry(link, &gen...
c4870eb874ac16dccef40e1bc7a002c7e9156adc
Analyze and fix the following issue in the Linux kernel code: IB/core: Fix mismatch between locked and pinned pages
Problem Details: Commit bc3e53f682d9 ("mm: distinguish between mlocked and pinned pages") introduced a separate counter for pinned pages and used it in the IB stack. However, in ib_umem_get() the pinned counter is incremented, but ib_umem_release() wrongly decrements the locked counter. Fix this. Signed-off-by: Yish...
```diff diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c index 71f0c0f7df94..a84112322071 100644 --- a/drivers/infiniband/core/umem.c +++ b/drivers/infiniband/core/umem.c @@ -269,7 +269,7 @@ void ib_umem_release(struct ib_umem *umem) } else down_write(&mm->mmap_sem); - current->mm->lo...
26e87b13834f04fc209e887f124e8ef4f3ca526c
Analyze and fix the following issue in the Linux kernel code: ARM: msm: fix compilation flags for MSM_SCM (part 2)
Problem Details: eca55f4 (ARM: msm: fix compilation flags for MSM_SCM, 2011-11-08) added the correct assembler directive for the first smc instance but missed the second instance in scm_get_version(). Add it so we can compile this file with newer binutils. Cc: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Stephen...
```diff diff --git a/arch/arm/mach-msm/scm.c b/arch/arm/mach-msm/scm.c index bafabb502580..c536fd6bf827 100644 --- a/arch/arm/mach-msm/scm.c +++ b/arch/arm/mach-msm/scm.c @@ -282,6 +282,9 @@ u32 scm_get_version(void) __asmeq("%1", "r1") __asmeq("%2", "r0") __asmeq("%3", "r1") +#ifdef REQUIRES_SEC + ".arch...
19b08b33fa4c60d66d4e341d4d1d9a6e86ffc9e6
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP: OTG integration: fix compiler warning
Problem Details: Tony reported the following compile warning after commit eeb3711b89d68e147e05e7b43a49ecc5009dc157 ("ARM: OMAP2+: clean up some cppcheck warnings"): arch/arm/plat-omap/usb.c: In function 'omap_otg_init': arch/arm/plat-omap/usb.c:40: warning: unused variable 'status' This happens if CONFIG_ARCH_OMAP_OT...
```diff diff --git a/arch/arm/plat-omap/usb.c b/arch/arm/plat-omap/usb.c index 5db75619f213..daa0327381b5 100644 --- a/arch/arm/plat-omap/usb.c +++ b/arch/arm/plat-omap/usb.c @@ -37,7 +37,6 @@ void __init omap_otg_init(struct omap_usb_config *config) { u32 syscon; - int status; int alt_pingroup = 0; /* NOT...
121e1a73a6246df206e779cc163ce95fbd300877
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP1: USB: fix ocpi_enable compile problem on non-1610 builds
Problem Details: Janusz Krzysztofik reported the following build break on OMAP1 builds that don't include CONFIG_ARCH_OMAP16XX: LD .tmp_vmlinux1 arch/arm/mach-omap1/built-in.o: In function `omap1_usb_init': lcd_dma.c:(.init.text+0x1420): undefined reference to `ocpi_enable' make: *** [.tmp_vmlinux1] Error 1 Th...
```diff diff --git a/arch/arm/mach-omap1/common.h b/arch/arm/mach-omap1/common.h index 8cc616e6f54a..bb7779b57795 100644 --- a/arch/arm/mach-omap1/common.h +++ b/arch/arm/mach-omap1/common.h @@ -67,6 +67,10 @@ extern bool omap_32k_timer_init(void); extern u32 omap_irq_flags; +#ifdef CONFIG_ARCH_OMAP16XX extern in...
62363a486019b57be1b286f5235bc0d637aa1dda
Analyze and fix the following issue in the Linux kernel code: gma500: Turn on the IRQ for everything
Problem Details: Keep this as a patch of its own in case of bug reports. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c index 2bfbeb6c05dd..7473d3b8fffe 100644 --- a/drivers/gpu/drm/gma500/psb_drv.c +++ b/drivers/gpu/drm/gma500/psb_drv.c @@ -356,8 +356,8 @@ static int psb_driver_load(struct drm_device *dev, unsigned long chipset) PSB_WVDC32(0x0000...
31a0685a421078fbd6d89ea6f2c52e13430d113f
Analyze and fix the following issue in the Linux kernel code: gma500: Clean up some of the noise
Problem Details: We have a lot of debug type stuff we don't actually need any more. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/gma500/cdv_device.c b/drivers/gpu/drm/gma500/cdv_device.c index 148e3e7524d9..d94a9e6fa6a3 100644 --- a/drivers/gpu/drm/gma500/cdv_device.c +++ b/drivers/gpu/drm/gma500/cdv_device.c @@ -255,7 +255,7 @@ static int cdv_save_display_registers(struct drm_device *dev) struct psb_save_a...
a373bedd7e70c1932f3f37d6858f437b69ef01c6
Analyze and fix the following issue in the Linux kernel code: gma500: Fix build without ACPI
Problem Details: Reported-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/gma500/Makefile b/drivers/gpu/drm/gma500/Makefile index dd7d6b57996f..abfa2a93f0d0 100644 --- a/drivers/gpu/drm/gma500/Makefile +++ b/drivers/gpu/drm/gma500/Makefile @@ -13,7 +13,6 @@ gma500_gfx-y += gem_glue.o \ intel_i2c.o \ intel_gmbus.o \ mmu.o \ - opregion.o \ ...
1b76b02f15c70d5f392ee2e231fbd20a26063a77
Analyze and fix the following issue in the Linux kernel code: mm: raise MemFree by reverting percpu_pagelist_fraction to 0
Problem Details: Why is there less MemFree than there used to be? It perturbed a test, so I've just been bisecting linux-next, and now find the offender went upstream yesterday. Commit 93278814d359 "mm: fix division by 0 in percpu_pagelist_fraction()" mistakenly initialized percpu_pagelist_fraction to the sysctl's mi...
```diff diff --git a/mm/page_alloc.c b/mm/page_alloc.c index b21b3db15a7f..918330f71dba 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -105,7 +105,7 @@ unsigned long totalreserve_pages __read_mostly; */ unsigned long dirty_balance_reserve __read_mostly; -int percpu_pagelist_fraction = 8; +int percpu_pagelis...
477d7eafa9585ded87ee1c6f69638a6baf9d8922
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix the comment for find_first_extent_bit
Problem Details: The return value of find_first_extent_bit is 1 or 0, no < 0. And if found something, return 0; if nothing was found, return 1. Fix the comment. Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
```diff diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 455daec2b6ce..fe91305e12fb 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -1293,7 +1293,7 @@ out: * returned if we find something, and *start_ret and *end_ret are * set to reflect the state struct that was found. * - * If noth...
39bab87ba6f4d8cce2b70c19e60233ad8030d7b4
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix btrfs_release_extent_buffer_page with the right usage of num_extent_pages
Problem Details: num_extent_pages returns the number of pages in the specific range, not the index of the last page in the eb range. btrfs_release_extent_buffer_page is called with start_idx set 0 in current codes, so it's not a problem yet. But the logic is indeed wrong. Fix it here. Signed-off-by: Wang Sheng-Hui <...
```diff diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index aeb98ceda51c..455daec2b6ce 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -3981,11 +3981,13 @@ static void btrfs_release_extent_buffer_page(struct extent_buffer *eb, unsigned long start_idx) { unsigned long index; + unsign...
080399aaaf3531f5b8761ec0ac30ff98891e8686
Analyze and fix the following issue in the Linux kernel code: block: don't mark buffers beyond end of disk as mapped
Problem Details: Hi, We have a bug report open where a squashfs image mounted on ppc64 would exhibit errors due to trying to read beyond the end of the disk. It can easily be reproduced by doing the following: [root@ibm-p750e-02-lp3 ~]# ls -l install.img -rw-r--r-- 1 root root 142032896 Apr 30 16:46 install.img [roo...
```diff diff --git a/fs/block_dev.c b/fs/block_dev.c index e08f6a20a5bb..ba11c30f302d 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -70,7 +70,7 @@ static void bdev_inode_switch_bdi(struct inode *inode, spin_unlock(&dst->wb.list_lock); } -static sector_t max_block(struct block_device *bdev) +sector_t blkdev_m...
a09ba13eefb155a00d8d50008a0c0a2406985ddd
Analyze and fix the following issue in the Linux kernel code: mtip32xx: release the semaphore on an error path
Problem Details: Release the semaphore in an error path in mtip_hw_get_scatterlist(). This fixes the smatch warning inconsistent returns. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
```diff diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c index 00f9fc992090..304000c3d433 100644 --- a/drivers/block/mtip32xx/mtip32xx.c +++ b/drivers/block/mtip32xx/mtip32xx.c @@ -2510,8 +2510,10 @@ static struct scatterlist *mtip_hw_get_scatterlist(struct driver_data *dd, up(&dd->...
44d27f7dfedd9aadc082cda31462f6600f56e4ec
Analyze and fix the following issue in the Linux kernel code: HID: logitech: read all 32 bits of report type bitfield
Problem Details: On big-endian systems (e.g., Apple PowerBook), trying to use a logitech wireless mouse with the Logitech Unifying Receiver does not work with v3.2 and later kernels. The device doesn't show up in /dev/input. Older kernels work fine. That is because the new hid-logitech-dj driver claims the device. ...
```diff diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c index 2b56efcbdf61..d44ea58c597e 100644 --- a/drivers/hid/hid-logitech-dj.c +++ b/drivers/hid/hid-logitech-dj.c @@ -26,6 +26,7 @@ #include <linux/hid.h> #include <linux/module.h> #include <linux/usb.h> +#include <asm/unaligned.h> #in...
fefa53297112f85d99d77374c745e247ba78831c
Analyze and fix the following issue in the Linux kernel code: batman-adv: fix checkpatch string complaint
Problem Details: Regression introduced by: f76d019194e0a88c57371df169ecc979690a04c2 Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
```diff diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c index bafb47370b4c..abd10c490fd9 100644 --- a/net/batman-adv/bat_iv_ogm.c +++ b/net/batman-adv/bat_iv_ogm.c @@ -1061,8 +1061,8 @@ static void bat_iv_ogm_process(const struct ethhdr *ethhdr, if (batman_ogm_packet->flags & NOT_BEST_NEXT_HO...
e23d83b0c92bbe30d1fe9d5c0b972e50c6593946
Analyze and fix the following issue in the Linux kernel code: OMAPDSS: DSI: use dsi_get_dsidev_id(dsidev) instead of dsidev->id
Problem Details: The DSI driver uses dsi_get_dsidev_id() to get the ID number for the DSI instance. However, there were a few places where dsidev->id was used instead of the function. Fix those places to use the function. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
```diff diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 446e13667471..a243e65b870f 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -2306,7 +2306,7 @@ static int dsi_cio_init(struct omap_dss_device *dssdev) DSSDBGF(); - r = dsi->enable_pads(dsidev-...
3a028bb99d1f1e5c444060a176cbd4bf93530df3
Analyze and fix the following issue in the Linux kernel code: OMAPFB: fix parsing of vram parameter
Problem Details: omapfb_parse_vram_param()'s check for end pointer returned from simple_strtoul() is wrong, causing the code to bug if the second or later vram parameters are non-parseable, for example "omapfb.vram=0:2M,:5M". However, even in that case the code will most likely bail out with -EINVAL in the following c...
```diff diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c index b00db4068d21..7f02e7f90d63 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c @@ -1502,7 +1502,7 @@ static int omapfb_parse_vram_param(const char *param, int m...
774dfc9bb7f2ab1950a790a8f13eca3d5c580033
Analyze and fix the following issue in the Linux kernel code: iommu/tegra: gart: Fix register offset correctly
Problem Details: DT passes the exact GART register ranges without any overlapping with MC register ranges. GART register offset needs to be adjusted by one passed by DT correctly. Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Joerg Roedel <joerg.roedel@a...
```diff diff --git a/Documentation/devicetree/bindings/iommu/nvidia,tegra20-gart.txt b/Documentation/devicetree/bindings/iommu/nvidia,tegra20-gart.txt index 2d87b9191fce..099d9362ebc1 100644 --- a/Documentation/devicetree/bindings/iommu/nvidia,tegra20-gart.txt +++ b/Documentation/devicetree/bindings/iommu/nvidia,tegra2...
41db1ab9bed189cb904f7b0e145c3c6030c094c6
Analyze and fix the following issue in the Linux kernel code: GFS2: Add rgrp information to block_alloc trace point
Problem Details: This is a second attempt at a patch that adds rgrp information to the block allocation trace point for GFS2. As suggested, the patch was modified to list the rgrp information _after_ the fields that exist today. Again, the reason for this patch is to allow us to trace and debug problems with the block...
```diff diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 645c16fcc252..f74fb9bd1973 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c @@ -1556,7 +1556,7 @@ int gfs2_alloc_blocks(struct gfs2_inode *ip, u64 *bn, unsigned int *nblocks, ip->i_inode.i_gid); rgd->rd_free_clone -= *nblocks; - trace_gfs2_block_allo...
d41af627638a0e1e964d546e385b20650e769ce5
Analyze and fix the following issue in the Linux kernel code: pinctrl/nomadik: implement pin configuration
Problem Details: This implements the pin configuration interface for the Nomadik pin controller. As part of the exercise we add a bit in the pin_cfg_t for the Nomadik pinctrl driver that indicates if the pin should be forced into GPIO mode. This is not done to go behind the back of the GPIO subsystem, but to ensure th...
```diff diff --git a/arch/arm/plat-nomadik/include/plat/pincfg.h b/arch/arm/plat-nomadik/include/plat/pincfg.h index c015133a7ad3..9c949c7c98a7 100644 --- a/arch/arm/plat-nomadik/include/plat/pincfg.h +++ b/arch/arm/plat-nomadik/include/plat/pincfg.h @@ -124,6 +124,19 @@ typedef unsigned long pin_cfg_t; #define PIN_LO...
24cbdd75c4a868bf1ebc986337ffcacf3f8a4109
Analyze and fix the following issue in the Linux kernel code: pinctrl/nomadik: reuse GPIO debug function for pins
Problem Details: Since all pins we can control are GPIOs, match a GPIO range to each pin in the debug function and call into the GPIO debug print function to have the per-pin information. Acked-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
```diff diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c index 8ed7917d513d..7543eb243c12 100644 --- a/drivers/pinctrl/pinctrl-nomadik.c +++ b/drivers/pinctrl/pinctrl-nomadik.c @@ -1326,10 +1326,36 @@ static int nmk_get_group_pins(struct pinctrl_dev *pctldev, unsigned selector, retur...
6f4350a6da99652423039765b9d1c57784150d39
Analyze and fix the following issue in the Linux kernel code: pinctrl/nomadik: break out single GPIO debug function
Problem Details: Break out the code displaying the status of a single pin so we can use the same code in the pinctrl debug function. Acked-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
```diff diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c index 7d5484fee5f3..8ed7917d513d 100644 --- a/drivers/pinctrl/pinctrl-nomadik.c +++ b/drivers/pinctrl/pinctrl-nomadik.c @@ -943,14 +943,16 @@ static int nmk_gpio_to_irq(struct gpio_chip *chip, unsigned offset) #include <linux/...
8ab5415d6c701a59dd6fc2bc93cf476ecc03ada5
Analyze and fix the following issue in the Linux kernel code: ath6kl: Use correct max-scan-SSIDs limit
Problem Details: The currently used firmware images support 16 SSIDs in the scan request (indexes 0..15), so update the host driver to use the same limit to allow some more SSIDs to be scanned per request. In addition, change the max-index to max-SSIDs to make it easier to understand the implementation and fix couple o...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index b869a358ce43..a6bebc20fd18 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -888,7 +888,7 @@ static int ath6kl_set_probed_ssids(struct ath6kl *ar,...
9205cc521ec74bd510857a464d4ac4edee949bfd
Analyze and fix the following issue in the Linux kernel code: batman-adv: fix wrong dhcp option list browsing
Problem Details: In is_type_dhcprequest(), while parsing a DHCP message, if the entry we found in the option list is neither a padding nor the dhcp-type, we have to ignore it and jump as many bytes as its length + 1. The "+ 1" byte is given by the subtype field itself that has to be jumped too. Reported-by: Marek Lind...
```diff diff --git a/net/batman-adv/gateway_client.c b/net/batman-adv/gateway_client.c index 6f9b9b78f77d..47f7186dcefc 100644 --- a/net/batman-adv/gateway_client.c +++ b/net/batman-adv/gateway_client.c @@ -558,10 +558,10 @@ static bool is_type_dhcprequest(struct sk_buff *skb, int header_len) p++; /* ...and t...
785d7fab3eb0c39bcd8086055e7bd144c48158e4
Analyze and fix the following issue in the Linux kernel code: ARM: imx6: Add UART2 for low-level debug
Problem Details: To be able to enable early debugging on boards using the UART2 for the console, add the option for early debugging on UART2. Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
```diff diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 85348a09d655..0f876c20bb1e 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -180,6 +180,14 @@ choice Say Y here if you want kernel low-level debugging support on i.MX50 or i.MX53. + config DEBUG_IMX6Q_UART2 + bool...
ef44180680aafb29f50654f3325cf7791fa5433d
Analyze and fix the following issue in the Linux kernel code: ARM: imx6q: register phy fixup only when CONFIG_PHYLIB is enabled
Problem Details: It fixes the following compile error with network disabled in imx_v6_v7_defconfig. arch/arm/mach-imx/built-in.o: In function `ksz9021rn_phy_fixup': imx53-dt.c:(.text+0x5f70): undefined reference to `mdiobus_write' imx53-dt.c:(.text+0x5f84): undefined reference to `mdiobus_write' imx53-dt.c:(.text+0x5f...
```diff diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 706e45c2a839..e0cc3dac3bec 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c @@ -63,21 +63,24 @@ soft: /* For imx6q sabrelite board: set KSZ9021RN RGMII pad skew */ static int ksz9021rn_phy_fixup(...
eab21585580344c8533d5e7bc4edea27ad1e268f
Analyze and fix the following issue in the Linux kernel code: dmaengine: pl330: dont complete descriptor for cyclic dma
Problem Details: the cookie updates completed the cyclic dma descriptor wrongly. This caused the BUG_ON to be hit as submit is called for completed descriptor Fix this by not marking the cyclic descriptor as complete Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com> Tested-by: Thomas Abraham <thomas.abraham@lina...
```diff diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 2ee6e23930ad..fa3fb21e60be 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2322,7 +2322,8 @@ static void pl330_tasklet(unsigned long data) /* Pick up ripe tomatoes */ list_for_each_entry_safe(desc, _dt, &pch->work_list, node) if ...
abd9ccc84c35cf1e296335a7b655bba40c92386c
Analyze and fix the following issue in the Linux kernel code: dma: imx-sdma: keep the callbacks invoked in the tasklet
Problem Details: The current code keeps the callbacks invoked from interrupt context, this does not conform to the Documentation/dmaengine.txt. So add tasklet support to fix this issue. Signed-off-by: Huang Shijie <b32955@freescale.com> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
```diff diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index d3e38e28bb6b..5a457777f5c0 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -271,6 +271,7 @@ struct sdma_channel { enum dma_status status; unsigned int chn_count; unsigned int chn_real_count; + struct tasklet_struc...
f77621cc640a7c50b3d8c5254ecc5d91eaa99d0d
Analyze and fix the following issue in the Linux kernel code: Input: omap-keypad - dynamically handle register offsets
Problem Details: Hi Dmitry, On Wed, May 9, 2012 at 3:14 PM, Poddar, Sourav <sourav.poddar@ti.com> wrote: > Hi Dmitry, > > I did some minor fixes to the patch which you suggested above and > the keypad is functional now. > > Changes: > - Move "pm_runtime_enable" before using "pm_runtime_get_sync". > > Sending the patch...
```diff diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig index 7eaf93fe5128..ea4bbaae9e02 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig @@ -522,9 +522,9 @@ config KEYBOARD_OMAP module will be called omap-keypad. config KEYBOARD_OMAP4 - tristate "TI O...
1a49a0a04d13049ac4f90d2e61da9b29a36962f7
Analyze and fix the following issue in the Linux kernel code: Input: synaptics - fix compile warning
Problem Details: Move synaptics_invert_y() inside CONFIG_MOUSE_PS2_SYNAPTICS to get rid of a compile warning when we don't select synaptics support. drivers/input/mouse/synaptics.c:53:12: warning: ‘synaptics_invert_y’ defined but not used [-Wunused-function] Signed-off-by: JJ Ding <dgdunix@gmail.com> Reviewed-by: Dan...
```diff diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 8081a0a5d602..c778f27a59f0 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c @@ -45,16 +45,6 @@ #define YMIN_NOMINAL 1408 #define YMAX_NOMINAL 4448 -/* - * Synaptics touchpads report the y c...
06a4c1c55dbe5d9f7a708e8f1a52fd2ac8e5874f
Analyze and fix the following issue in the Linux kernel code: 6lowpan: IPv6 link local address
Problem Details: According to the RFC4944 (Transmission of IPv6 Packets over IEEE 802.15.4 Networks), chapter 7: The IPv6 link-local address [RFC4291] for an IEEE 802.15.4 interface is formed by appending the Interface Identifier, as defined above, to the prefix FE80::/64. 10 bits 54 bits ...
```diff diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index e3b3421f8dad..8b7f100a4b45 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -66,6 +66,7 @@ #include <net/sock.h> #include <net/snmp.h> +#include <net/af_ieee802154.h> #include <net/ipv6.h> #include <net/protocol.h> #include <net/nd...
13a8e0c8cdb43982372bd6c65fb26839c8fd8ce9
Analyze and fix the following issue in the Linux kernel code: bonding: don't increase rx_dropped after processing LACPDUs
Problem Details: Since commit 3aba891d, bonding processes LACP frames (802.3ad mode) with bond_handle_frame(). Currently a copy of the skb is made and the original is left to be processed by other rx_handlers and the rest of the network stack by returning RX_HANDLER_ANOTHER. As there is no protocol handler for PKT_TYP...
```diff diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index 793b00138275..3463b469e657 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c @@ -2173,9 +2173,10 @@ re_arm: * received frames (loopback). Since only the payload is given to this * function, it c...
d301e3256866bfd3ae3093aeb43d3ca9570d758e
Analyze and fix the following issue in the Linux kernel code: l2tp: fix data packet sequence number handling
Problem Details: If enabled, L2TP data packets have sequence numbers which a receiver can use to drop out of sequence frames or try to reorder them. The first frame has sequence number 0, but the L2TP code currently expects it to be 1. This results in the first data frame being handled as out of sequence. This one-lin...
```diff diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c index d1ab3a236cca..0d6aedc3a0ce 100644 --- a/net/l2tp/l2tp_core.c +++ b/net/l2tp/l2tp_core.c @@ -1762,7 +1762,7 @@ struct l2tp_session *l2tp_session_create(int priv_size, struct l2tp_tunnel *tunn session->session_id = session_id; session->peer_se...
38d40b3f4e223336422b7e87cb483e758ef87e3a
Analyze and fix the following issue in the Linux kernel code: l2tp: fix reorder timeout recovery
Problem Details: When L2TP data packet reordering is enabled, packets are held in a queue while waiting for out-of-sequence packets. If a packet gets lost, packets will be held until the reorder timeout expires, when we are supposed to then advance to the sequence number of the next packet but we don't currently do so....
```diff diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c index 456b52d8f6d8..d1ab3a236cca 100644 --- a/net/l2tp/l2tp_core.c +++ b/net/l2tp/l2tp_core.c @@ -428,6 +428,7 @@ start: session->name, L2TP_SKB_CB(skb)->ns, L2TP_SKB_CB(skb)->length, session->nr, skb_queue_len(&session->r...
7dfd2bd70228d1f8d468d58cb3d12ecd618479ed
Analyze and fix the following issue in the Linux kernel code: spi: Dont call prepare/unprepare transfer if not populated
Problem Details: Currently the prepare/unprepare transfer are called unconditionally. The assumption is that every driver using the spi core queue infrastructure has to populate the prepare and unprepare functions. This encourages drivers to populate empty functions to prevent crashing. This patch prevents the call to ...
```diff diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 37c555ec59ab..2d65b1684cdc 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -532,7 +532,7 @@ static void spi_pump_messages(struct kthread_work *work) /* Lock queue and check for queue work */ spin_lock_irqsave(&master->queue_lock, flags); i...
38bf1953987c1735f3c9140fca762949a8cae507
Analyze and fix the following issue in the Linux kernel code: connector/userns: replace netlink uses of cap_raised() with capable()
Problem Details: In 2009 Philip Reiser notied that a few users of netlink connector interface needed a capability check and added the idiom cap_raised(nsp->eff_cap, CAP_SYS_ADMIN) to a few of them, on the premise that netlink was asynchronous. In 2011 Patrick McHardy noticed we were being silly because netlink is sync...
```diff diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index abfaacaaf346..946166e13953 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c @@ -2297,7 +2297,7 @@ static void drbd_connector_callback(struct cn_msg *req, struct netlink_skb_parms return; } - if (!ca...
c57b54684060c8aced64a5b78ff69ff289af97b9
Analyze and fix the following issue in the Linux kernel code: pktgen: fix crash at module unload
Problem Details: commit 7d3d43dab4e9 (net: In unregister_netdevice_notifier unregister the netdevices.) makes pktgen crashing at module unload. [ 296.820578] BUG: spinlock bad magic on CPU#6, rmmod/3267 [ 296.820719] lock: ffff880310c38000, .magic: ffff8803, .owner: <none>/-1, .owner_cpu: -1 [ 296.820943] Pid: 326...
```diff diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 4d8ce93cd503..77a59980b579 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -1931,7 +1931,7 @@ static int pktgen_device_event(struct notifier_block *unused, { struct net_device *dev = ptr; - if (!net_eq(dev_net(dev), &init_net)) + if (!net_e...
380ec964bc19f865af70c0339dff1cb75dc4f8f2
Analyze and fix the following issue in the Linux kernel code: ehea: fix losing of NEQ events when one event occurred early
Problem Details: The NEQ interrupt is only triggered when there was no previous pending interrupt. If we request irq handling after an interrupt has occurred, we will never get an interrupt until we call H_RESET_EVENTS. Events seem to be cleared when we first register the NEQ. So, when we requested irq handling right ...
```diff diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c index c9069a28832b..f4d2da0db1b1 100644 --- a/drivers/net/ethernet/ibm/ehea/ehea_main.c +++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c @@ -3335,6 +3335,8 @@ static int __devinit ehea_probe_adapter(struct platform...
cfb8c3aa59302636c69890be10b2ef23a7ca83b2
Analyze and fix the following issue in the Linux kernel code: igb: fix rtnl race in PM resume path
Problem Details: Since the caller (PM resume code) is not the one holding rtnl, when taking the 'else' branch rtnl may be released at any moment, thereby defeating the whole purpose of this code block. Signed-off-by: Benjamin Poirier <bpoirier@suse.de> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by:...
```diff diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index d22350055285..8683ca4748c8 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -1111,9 +1111,12 @@ msi_only: adapter->flags |= IGB_FLAG_HAS_MSI; out:...
34d0b02e08470c56a411ba6da1f377bc6da02826
Analyze and fix the following issue in the Linux kernel code: x86, realmode: Fix no cache bits test in reboot_32.S
Problem Details: Before the new real-mode code infrastructure %edx was used for testing CD and NW bits with andl in order to decide whether to flush the processor caches or not. The value of cr0 was also stored in %eax, which was later used to set cr0 after masking out lower byte (except TS bit) in order to enter real-...
```diff diff --git a/arch/x86/realmode/rm/reboot_32.S b/arch/x86/realmode/rm/reboot_32.S index 8d9bfd13a93e..114044876b3d 100644 --- a/arch/x86/realmode/rm/reboot_32.S +++ b/arch/x86/realmode/rm/reboot_32.S @@ -76,7 +76,7 @@ machine_real_restart_asm16: movl %edx, %cr0 movl %ecx, %cr3 movl %cr0, %edx - andl $0x600...
e7f3eb0c912ca334fa67429a060389cbea6e815d
Analyze and fix the following issue in the Linux kernel code: staging: android: logger: Fix some sparse and whitespace issues
Problem Details: Fix a few sparse warnings, and improve whitespace. Cc: Brian Swetland <swetland@google.com> Signed-off-by: Tim Bird <tim.bird@am.sony.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/android/logger.c b/drivers/staging/android/logger.c index ed7e55247374..b2e71c6fd175 100644 --- a/drivers/staging/android/logger.c +++ b/drivers/staging/android/logger.c @@ -65,9 +65,9 @@ struct logger_reader { }; /* logger_offset - returns index 'n' into the log via (optimized)...
9b05b1ec40bf6b1b20493617461e97c6a5d55403
Analyze and fix the following issue in the Linux kernel code: parisc: add missing include of asm/page.h to asm/pgtable.h
Problem Details: Fixes these errors: In file included from arch/parisc/include/asm/io.h:5:0, from include/linux/io.h:22, from include/linux/pci.h:54, from arch/parisc/kernel/setup.c:35: arch/parisc/include/asm/pgtable.h:92:6: warning: "PAGE_SHIFT" is not defined [-Wun...
```diff diff --git a/arch/parisc/include/asm/pgtable.h b/arch/parisc/include/asm/pgtable.h index 22dadeb58695..ee99f2339356 100644 --- a/arch/parisc/include/asm/pgtable.h +++ b/arch/parisc/include/asm/pgtable.h @@ -44,6 +44,8 @@ struct vm_area_struct; #endif /* !__ASSEMBLY__ */ +#include <asm/page.h> + #define pt...
25fe853d2ce5cad4115a211c568b430b1e4080bc
Analyze and fix the following issue in the Linux kernel code: parisc: add missing forward declarations in asm/hardware.h
Problem Details: Fixes this warnings: In file included from arch/parisc/include/asm/processor.h:15:0, from arch/parisc/include/asm/spinlock.h:4, from arch/parisc/include/asm/atomic.h:20, from include/linux/atomic.h:4, from arch/parisc/include/asm/bito...
```diff diff --git a/arch/parisc/include/asm/hardware.h b/arch/parisc/include/asm/hardware.h index 4e9626836bab..036e70310fcd 100644 --- a/arch/parisc/include/asm/hardware.h +++ b/arch/parisc/include/asm/hardware.h @@ -95,12 +95,14 @@ struct bc_module { #define HPHW_MC 15 #define HPHW_FAULTY 31 +struct pa...
6bc2e853c6b46a6041980d58200ad9b0a73a60ff
Analyze and fix the following issue in the Linux kernel code: mm: nobootmem: fix sign extend problem in __free_pages_memory()
Problem Details: Systems with 8 TBytes of memory or greater can hit a problem where only the the first 8 TB of memory shows up. This is due to "int i" being smaller than "unsigned long start_aligned", causing the high bits to be dropped. The fix is to change `i' to unsigned long to match start_aligned and end_aligned...
```diff diff --git a/mm/nobootmem.c b/mm/nobootmem.c index e53bb8a256b1..1983fb1c7026 100644 --- a/mm/nobootmem.c +++ b/mm/nobootmem.c @@ -82,8 +82,7 @@ void __init free_bootmem_late(unsigned long addr, unsigned long size) static void __init __free_pages_memory(unsigned long start, unsigned long end) { - int i; - u...
8c7577637ca31385e92769a77e2ab5b428e8b99c
Analyze and fix the following issue in the Linux kernel code: memcg: free spare array to avoid memory leak
Problem Details: When the last event is unregistered, there is no need to keep the spare array anymore. So free it to avoid memory leak. Signed-off-by: Sha Zhengju <handai.szj@taobao.com> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Reviewed-by: Kirill A. Shutemov <kirill@shutemov.name> Signed-off-by:...
```diff diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 31ab9c3f0178..b659260c56ad 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -4507,6 +4507,12 @@ static void mem_cgroup_usage_unregister_event(struct cgroup *cgrp, swap_buffers: /* Swap primary and spare array */ thresholds->spare = thresholds->prima...
5e2bf0142231194d36fdc9596b36a261ed2b9fe7
Analyze and fix the following issue in the Linux kernel code: namespaces, pid_ns: fix leakage on fork() failure
Problem Details: Fork() failure post namespace creation for a child cloned with CLONE_NEWPID leaks pid_namespace/mnt_cache due to proc being mounted during creation, but not unmounted during cleanup. Call pid_ns_release_proc() during cleanup. Signed-off-by: Mike Galbraith <efault@gmx.de> Acked-by: Oleg Nesterov <oleg...
```diff diff --git a/kernel/fork.c b/kernel/fork.c index b9372a0bff18..687a15d56243 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -47,6 +47,7 @@ #include <linux/audit.h> #include <linux/memcontrol.h> #include <linux/ftrace.h> +#include <linux/proc_fs.h> #include <linux/profile.h> #include <linux/rmap.h> #incl...
4998a6c0edce7fae9c0a5463f6ec3fa585258ee7
Analyze and fix the following issue in the Linux kernel code: hugetlb: prevent BUG_ON in hugetlb_fault() -> hugetlb_cow()
Problem Details: Commit 66aebce747eaf ("hugetlb: fix race condition in hugetlb_fault()") added code to avoid a race condition by elevating the page refcount in hugetlb_fault() while calling hugetlb_cow(). However, one code path in hugetlb_cow() includes an assertion that the page count is 1, whereas it may now also ha...
```diff diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 5a16423a512c..ae8f708e3d75 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -2498,7 +2498,6 @@ retry_avoidcopy: if (outside_reserve) { BUG_ON(huge_pte_none(pte)); if (unmap_ref_private(mm, vma, old_page, address)) { - BUG_ON(page_count(old_page) != 1);...
93278814d3590eba0ee360b8d69a35c7f2203ea8
Analyze and fix the following issue in the Linux kernel code: mm: fix division by 0 in percpu_pagelist_fraction()
Problem Details: percpu_pagelist_fraction_sysctl_handler() has only considered -EINVAL as a possible error from proc_dointvec_minmax(). If any other error is returned, it would proceed to divide by zero since percpu_pagelist_fraction wasn't getting initialized at any point. For example, writing 0 bytes into the proc ...
```diff diff --git a/mm/page_alloc.c b/mm/page_alloc.c index a712fb9e04ce..b21b3db15a7f 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -105,7 +105,7 @@ unsigned long totalreserve_pages __read_mostly; */ unsigned long dirty_balance_reserve __read_mostly; -int percpu_pagelist_fraction; +int percpu_pagelist_fr...
d530296f63c039a5683db665acc5ecdb3b593eb2
Analyze and fix the following issue in the Linux kernel code: USB: serial: opticon: hook up suspend/resume callbacks
Problem Details: With a previous patch, the usb_driver suspend/resume callbacks got overridden and were never called if a usb_serial driver defined them. This patch fixes the opticon driver to move the suspend/resume callbacks into the usb_serial_driver structure where they will be properly called. It then removes the...
```diff diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c index 91f89044e08d..02cb1b7f6559 100644 --- a/drivers/usb/serial/opticon.c +++ b/drivers/usb/serial/opticon.c @@ -557,18 +557,16 @@ static void opticon_release(struct usb_serial *serial) kfree(priv); } -static int opticon_suspend(stru...
9b63776fa3ca96c4ecda76f6fa947b7b0add66ac
Analyze and fix the following issue in the Linux kernel code: tracing: Do not enable function event with enable
Problem Details: With the adding of function tracing event to perf, it caused a side effect that produces the following warning when enabling all events in ftrace: # echo 1 > /sys/kernel/debug/tracing/events/enable [console] event trace: Could not enable event function This is because when enabling all events via t...
```diff diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 5f3f3be5af09..176a939d1547 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h @@ -179,6 +179,7 @@ enum { TRACE_EVENT_FL_RECORDED_CMD_BIT, TRACE_EVENT_FL_CAP_ANY_BIT, TRACE_EVENT_FL_NO_SET_FILTER_BIT, +...
80134da9d244eddbc840a446bdda2ac80932a769
Analyze and fix the following issue in the Linux kernel code: usb: gadget: rndis: Fix re-binding f_rndis
Problem Details: f_rndis checks if rndis_string_defs[0].id is null to setup rndis and allocate string ids when it is bound to the first configuration: /* maybe allocate device-global string IDs */ if (rndis_string_defs[0].id == 0) { /* ... and setup RNDIS itself */ status = rndis_init(); if (status < 0) re...
```diff diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c index 52343654f5df..241225a37649 100644 --- a/drivers/usb/gadget/f_rndis.c +++ b/drivers/usb/gadget/f_rndis.c @@ -820,6 +820,7 @@ rndis_unbind(struct usb_configuration *c, struct usb_function *f) rndis_deregister(rndis->config); rndi...
f639554b8a3a4aac18193a0c98a4639d432c48f0
Analyze and fix the following issue in the Linux kernel code: USB: gadget: ci13xx_udc: fix potential crash in irq handler
Problem Details: As pointed out by Dan Carpenter, we should not be trying to call dev_err() on a structure that was previously determined to be NULL, that's just foolish and asking for trouble. So just delete the message, it's not going to do anyone any good to have it anyway. This problem was caused by 0f089094cde5:...
```diff diff --git a/drivers/usb/gadget/ci13xxx_udc.c b/drivers/usb/gadget/ci13xxx_udc.c index 560b539b9def..5bd95b0a23d7 100644 --- a/drivers/usb/gadget/ci13xxx_udc.c +++ b/drivers/usb/gadget/ci13xxx_udc.c @@ -2719,10 +2719,8 @@ static irqreturn_t udc_irq(int irq, void *data) trace(udc ? udc->dev : NULL, ""); - ...
bb6abcf440c4c861a2131c0651b683dbd2edba84
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP2+: Kconfig: convert SOC_OMAPAM33XX to SOC_AM33XX
Problem Details: No need to have an OMAP prefix on these SoCs that are in the family but arent' really called OMAP. Simple rename: CONFIG_SOC_OMAPAM33XX --> CONFIG_SOC_AM33XX No functional change. Signed-off-by: Kevin Hilman <khilman@ti.com> Acked-by: Vaibhav Hiremath <hvaibhav@ti.com> [tony@atomide.com: updated for...
```diff diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 7f89697aa5c2..61bf3c3ce6fc 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -82,7 +82,7 @@ config SOC_TI81XX depends on ARCH_OMAP3 default y -config SOC_OMAPAM33XX +config SOC_AM33XX bool "AM33XX su...
33959553b81e46640994cbcdb4888d60022dc6fd
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP2+: Kconfig: convert SOC_OMAPTI81XX to SOC_TI81XX
Problem Details: No need to have an OMAP prefix on these SoCs that are in the family but arent' really called OMAP. Simple rename: CONFIG_SOC_OMAPTI81XX --> CONFIG_SOC_TI81XX No functional change. Signed-off-by: Kevin Hilman <khilman@ti.com> Acked-by: Vaibhav Hiremath <hvaibhav@ti.com> Signed-off-by: Tony Lindgren <...
```diff diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 8141b76283a6..7f89697aa5c2 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -77,7 +77,7 @@ config SOC_OMAP3430 default y select ARCH_OMAP_OTG -config SOC_OMAPTI81XX +config SOC_TI81XX bool "TI81XX s...
a5a737e090e25981e99d69f01400e3a80356581c
Analyze and fix the following issue in the Linux kernel code: sparc64: Do not clobber %g2 in xcall_fetch_glob_regs().
Problem Details: %g2 is meant to hold the CPUID number throughout this routine, since at the very beginning, and at the very end, we use %g2 to calculate indexes into per-cpu arrays. However we erroneously clobber it in order to hold the %cwp register value mid-stream. Fix this code to use %g3 for the %cwp read and r...
```diff diff --git a/arch/sparc/kernel/central.c b/arch/sparc/kernel/central.c index 38d48a59879c..9708851a8b9f 100644 --- a/arch/sparc/kernel/central.c +++ b/arch/sparc/kernel/central.c @@ -269,4 +269,4 @@ static int __init sunfire_init(void) return 0; } -subsys_initcall(sunfire_init); +fs_initcall(sunfire_init);...
0e545f6d165ad0180b0d04fe1291f6f6268047ff
Analyze and fix the following issue in the Linux kernel code: staging: rts5139: remove unused variable option.ww_enable
Problem Details: Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net> Acked-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rts5139/rts51x_chip.c b/drivers/staging/rts5139/rts51x_chip.c index a21f490974d3..db88d7a194b8 100644 --- a/drivers/staging/rts5139/rts51x_chip.c +++ b/drivers/staging/rts5139/rts51x_chip.c @@ -78,20 +78,18 @@ int rts51x_reset_chip(struct rts51x_chip *chip) chip->option.s...
39d65739be5e9a45427d8d2871c0cd32394b8a9a
Analyze and fix the following issue in the Linux kernel code: staging: rts5139: remove unused variable in rts51x_chip.h
Problem Details: the SENSE_TYPE_FORMAT_IN_PROGRESS was checked by rts51x_scsi.c but never set. Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net> Acked-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rts5139/rts51x_chip.h b/drivers/staging/rts5139/rts51x_chip.h index 175ea7992f45..6755816fa7fa 100644 --- a/drivers/staging/rts5139/rts51x_chip.h +++ b/drivers/staging/rts5139/rts51x_chip.h @@ -75,7 +75,6 @@ #define MAX_ALLOWED_LUN_CNT 8 #define CMD_BUF_LEN 1024 -#define RSP_BU...
c76dde55f1978e34122030093d38e75375e1f66e
Analyze and fix the following issue in the Linux kernel code: staging: rts5139: remove unused variable in rts51x.h
Problem Details: Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net> Acked-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rts5139/rts51x.h b/drivers/staging/rts5139/rts51x.h index 2d2b315571af..ecc0109a5b1a 100644 --- a/drivers/staging/rts5139/rts51x.h +++ b/drivers/staging/rts5139/rts51x.h @@ -47,7 +47,6 @@ #define RTS51X_DESC "Realtek RTS5139/29 USB card reader driver" #define RTS51X_NAME "rts513...
0ed226100aa04eb01c816279ca34640794226e8a
Analyze and fix the following issue in the Linux kernel code: staging: rts5139: remove unused TUNE_SD18_*
Problem Details: Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net> Acked-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rts5139/rts51x_card.h b/drivers/staging/rts5139/rts51x_card.h index ef9cc8952425..c5c03cce98bd 100644 --- a/drivers/staging/rts5139/rts51x_card.h +++ b/drivers/staging/rts5139/rts51x_card.h @@ -204,13 +204,7 @@ /* LDO_POWER_CFG */ #define TUNE_SD18_MASK 0x1C -#define TUNE_SD18...
19434aa179fe107831f436bbc8e21aa4c4fb0757
Analyze and fix the following issue in the Linux kernel code: staging: rts5139: remove unused polling_time variable
Problem Details: Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net> Acked-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rts5139/rts51x.c b/drivers/staging/rts5139/rts51x.c index 7d2c93cb6738..c3fe7dda1f4e 100644 --- a/drivers/staging/rts5139/rts51x.c +++ b/drivers/staging/rts5139/rts51x.c @@ -517,7 +517,6 @@ static void rts51x_init_options(struct rts51x_chip *chip) option->sd20_pad_drive = 0; opt...
711c273c07bba69fd85cf7bfc6565420ff2fc7b6
Analyze and fix the following issue in the Linux kernel code: staging: rts5139: remove unused rcc_bug_fix_en
Problem Details: Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net> Acked-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rts5139/rts51x.c b/drivers/staging/rts5139/rts51x.c index 108499762356..7d2c93cb6738 100644 --- a/drivers/staging/rts5139/rts51x.c +++ b/drivers/staging/rts5139/rts51x.c @@ -516,7 +516,6 @@ static void rts51x_init_options(struct rts51x_chip *chip) option->rts5129_D3318_off_enable ...