id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
23de5dc9be28b59a8474bcbba278230c66f0759d
Analyze and fix the following issue in the Linux kernel code: ath9k: fix tx locking issues
Problem Details: The commit "ath9k: simplify tx locking" introduced a soft lockup triggered by mac80211 sending a BAR frame triggered by a driver call to ieee80211_tx_send_bar or ieee80211_tx_status. Fix these issues by queueing processed tx status skbs and submitting them to mac80211 outside of the lock. Signed-off-b...
```diff diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index 130e5dba9555..95276e914c1b 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h @@ -196,6 +196,7 @@ struct ath_txq { u8 txq_headidx; u8 txq_tailidx; int pending_fr...
b9116b9a2b5db63187d28f99e038f473fad036dc
Analyze and fix the following issue in the Linux kernel code: rtlwifi: Fix locking problem introduces with commit 6539306b
Problem Details: When I tested commit 6539306, I did not notice that loading an out-of-tree module turns off lockdep testing in kernel 3.2. For that reason, I missed the kernel WARNING shown below: The solution fixes the warning by partially reverting commit 6539306. [ 84.168146] ------------[ cut here ]-----------...
```diff diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c index d81a6021a30f..7c1d82d8d71c 100644 --- a/drivers/net/wireless/rtlwifi/base.c +++ b/drivers/net/wireless/rtlwifi/base.c @@ -449,6 +449,7 @@ int rtl_init_core(struct ieee80211_hw *hw) /* <4> locks */ mutex_init(&rtlpri...
8763349b7d49c314efd624d0b3cef27a4a383846
Analyze and fix the following issue in the Linux kernel code: brcm80211: fmac: move debug level macros to dhd_dbg.h
Problem Details: Debug message level macros are used for debug purpose. It would be more appropriate to place them at dhd_dbg.h. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Alwin Beukers <alwin@broadcom.com> Signed-off-by: Franky Lin <frank...
```diff diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd.h b/drivers/net/wireless/brcm80211/brcmfmac/dhd.h index 45b076ed668b..a828d82fcc8c 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd.h +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd.h @@ -667,21 +667,6 @@ extern void brcmf_c_pktfilter_offload_en...
bad6919469662b7c92bc6353642aaaa777b36bac
Analyze and fix the following issue in the Linux kernel code: b43: avoid packet losses in the dma worker code.
Problem Details: Following Rafal request, we verified that on "modern" CPUs using one or more workers is equivalent. Here is patch V3 that addresses the packet loss bug in the dma engine using only one worker. ------- This patch addresses a bug in the dma worker code that keeps draining packets even when the hardware...
```diff diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h index 37110dfd2c96..f19605e8eb4c 100644 --- a/drivers/net/wireless/b43/b43.h +++ b/drivers/net/wireless/b43/b43.h @@ -667,6 +667,7 @@ struct b43_key { }; /* SHM offsets to the QOS data structures for the 4 different queues. */ +#de...
645d35902c8f05a1b12fa838aa9052d8eeaf161e
Analyze and fix the following issue in the Linux kernel code: NFC: Fix LLCP related build failure
Problem Details: llcp_mac routines should be static and inlined or build will fail with NFC selected without LLCP. This patch fixes: LD [M] net/nfc/nfc.o net/nfc/netlink.o: In function `nfc_llcp_mac_is_down': netlink.c:(.text+0x0): multiple definition of `nfc_llcp_mac_is_down' net/nfc/core.o:(.text+0x0): first defin...
```diff diff --git a/net/nfc/nfc.h b/net/nfc/nfc.h index 2c2c4015c68b..6d28d75995b0 100644 --- a/net/nfc/nfc.h +++ b/net/nfc/nfc.h @@ -60,11 +60,11 @@ void nfc_llcp_exit(void); #else -void nfc_llcp_mac_is_down(struct nfc_dev *dev) +static inline void nfc_llcp_mac_is_down(struct nfc_dev *dev) { } -void nfc_llcp...
29d1b16145e78e0f4af54751965c4a09e83bd872
Analyze and fix the following issue in the Linux kernel code: IB/qib: Correct sense on freectxts increment and decrement
Problem Details: Commit 53ab1c64983 ("IB/qib: Correct nfreectxts for multiple HCAs") reversed the increments and decrements of dd->nfreectxts. Fix it. Reviewed-by: Ram Vepa <ram.vepa@qlogic.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
```diff diff --git a/drivers/infiniband/hw/qib/qib_file_ops.c b/drivers/infiniband/hw/qib/qib_file_ops.c index 574600ef5b42..a7403248d83d 100644 --- a/drivers/infiniband/hw/qib/qib_file_ops.c +++ b/drivers/infiniband/hw/qib/qib_file_ops.c @@ -1285,7 +1285,7 @@ static int setup_ctxt(struct qib_pportdata *ppd, int ctxt, ...
04ded1672402577cd3f390c764f3046cc704a42a
Analyze and fix the following issue in the Linux kernel code: RDMA/cma: Verify private data length
Problem Details: private_data_len is defined as a u8. If the user specifies a large private_data size (> 220 bytes), we will calculate a total length that exceeds 255, resulting in private_data_len wrapping back to 0. This can lead to overwriting random kernel memory. Avoid this by verifying that the resulting size ...
```diff diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 75ff821c0af0..d0d4aa9f4802 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -2513,6 +2513,9 @@ static int cma_resolve_ib_udp(struct rdma_id_private *id_priv, req.private_data_len = sizeof(struct...
e0197aae59e55c06db172bfbe1a1cdb8c0e1cab3
Analyze and fix the following issue in the Linux kernel code: cgroups: fix a css_set not found bug in cgroup_attach_proc
Problem Details: There is a BUG when migrating a PF_EXITING proc. Since css_set_prefetch() is not called for the PF_EXITING case, find_existing_css_set() will return NULL inside cgroup_task_migrate() causing a BUG. This bug is easy to reproduce. Create a zombie and echo its pid to cgroup.procs. $ cat zombie.c \#inclu...
```diff diff --git a/kernel/cgroup.c b/kernel/cgroup.c index d9d5648f3cdc..a184470cf9b5 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -2098,11 +2098,6 @@ int cgroup_attach_proc(struct cgroup *cgrp, struct task_struct *leader) continue; /* get old css_set pointer */ task_lock(tsk); - if (tsk->flags & ...
913050b91eb94f194392dd797b1ff3779f606ac0
Analyze and fix the following issue in the Linux kernel code: oprofile: Fix uninitialized memory access when writing to writing to oprofilefs
Problem Details: If oprofilefs_ulong_from_user() is called with count equals zero, *val remains unchanged. Depending on the implementation it might be uninitialized. Change oprofilefs_ulong_from_user()'s interface to return count on success. Thus, we are able to return early if count equals zero which avoids using *va...
```diff diff --git a/arch/s390/oprofile/init.c b/arch/s390/oprofile/init.c index 6efc18b5e60a..bd58b72454cf 100644 --- a/arch/s390/oprofile/init.c +++ b/arch/s390/oprofile/init.c @@ -88,7 +88,7 @@ static ssize_t hwsampler_write(struct file *file, char const __user *buf, return -EINVAL; retval = oprofilefs_ulong_...
12275dd4b747f5d87fa36229774d76bca8e63068
Analyze and fix the following issue in the Linux kernel code: Revert "xen/pv-on-hvm kexec: add xs_reset_watches to shutdown watches from old kernel"
Problem Details: This reverts commit ddacf5ef684a655abe2bb50c4b2a5b72ae0d5e05. As when booting the kernel under Amazon EC2 as an HVM guest it ends up hanging during startup. Reverting this we loose the fix for kexec booting to the crash kernels. Fixes Canonical BZ #901305 (http://bugs.launchpad.net/bugs/901305) Teste...
```diff diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c index b3b8f2f3ad10..ede860f921df 100644 --- a/drivers/xen/xenbus/xenbus_xs.c +++ b/drivers/xen/xenbus/xenbus_xs.c @@ -621,15 +621,6 @@ static struct xenbus_watch *find_watch(const char *token) return NULL; } -static void xs_reset_...
1f8cd0d9d7513d157aea0a93fbe87fde7365d285
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix mgmt_(block,unblock)_device opcodes
Problem Details: This patch fixes the opcodes of the Block/Unblock device commands to match with what user-space expects and to confirm with the latest mgmt specification. The reason the values were wrong was a missing Confirm Name command definition (which will be added by a subsequent patch). Signed-off-by: Johan He...
```diff diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h index 9f7a956a2ec3..f4786a853ca3 100644 --- a/include/net/bluetooth/mgmt.h +++ b/include/net/bluetooth/mgmt.h @@ -268,12 +268,12 @@ struct mgmt_cp_start_discovery { #define MGMT_OP_STOP_DISCOVERY 0x0022 -#define MGMT_OP_BLOCK_DEVICE ...
7422ba5343b8c1dbe1a517d0fcc15e7d671ca960
Analyze and fix the following issue in the Linux kernel code: usb: gadget: epautoconf: do not change number of streams
Problem Details: We should not change gadget driver's descriptors just because we think it's right to do so. There are several of reasons which would support this statement but it suffices to say that this was probably never tested because it updates bmAttributes without asking the driver if it's ok to do so. This me...
```diff diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c index 596a0b464e61..4dff83d2f265 100644 --- a/drivers/usb/gadget/epautoconf.c +++ b/drivers/usb/gadget/epautoconf.c @@ -130,9 +130,6 @@ ep_matches ( num_req_streams = ep_comp->bmAttributes & 0x1f; if (num_req_streams > ep->ma...
4d4b2562fc9f47becffa4593e254c16a59e87d49
Analyze and fix the following issue in the Linux kernel code: cpuimx35: fix touchscreen support
Problem Details: Signed-off-by: Eric Bénard <eric@eukrea.com> Cc: Sascha Hauer <kernel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
```diff diff --git a/arch/arm/mach-imx/mach-cpuimx35.c b/arch/arm/mach-imx/mach-cpuimx35.c index 66af2e8f7e57..362aae780601 100644 --- a/arch/arm/mach-imx/mach-cpuimx35.c +++ b/arch/arm/mach-imx/mach-cpuimx35.c @@ -53,12 +53,18 @@ static const struct imxi2c_platform_data .bitrate = 100000, }; +#define TSC2007_IRQ...
a69aa72af34f051b0ddd0d553f6a7b5098878c9d
Analyze and fix the following issue in the Linux kernel code: cpuimx35sd: fix Kconfig
Problem Details: in 0d6cfa3a75f5cde5b3ca0dde748fd22625b4f34c I fixed the mach-types records. We also need to make the name consistent in Kconfig else the machine_is_eukrea_cpuimx35sd macro fails, and thus audio codec is not properly initalized. Signed-off-by: Eric Bénard <eric@eukrea.com> Cc: Sascha Hauer <kernel@peng...
```diff diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index d2c24d5592cf..0e6f1af260b6 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -542,7 +542,7 @@ config MACH_MX35_3DS Include support for MX35PDK platform. This includes specific configurations for the board an...
9cd39fba1b877e194a8d9bbec02dfa1fdd48f0e7
Analyze and fix the following issue in the Linux kernel code: clock-imx35: fix reboot in internal boot mode
Problem Details: commit 8d75a26 "ARM: mx35: use generic function for displaying silicon revision" disabled IIM clock after reading silicon revision which will prevent reboot in internal boot mode. Signed-off-by: Eric Bénard <eric@eukrea.com> Cc: Jason Liu <jason.hui@linaro.org> Cc: Sascha Hauer <kernel@pengutronix.de>...
```diff diff --git a/arch/arm/mach-imx/clock-imx35.c b/arch/arm/mach-imx/clock-imx35.c index 8116f119517d..ac8238caecb9 100644 --- a/arch/arm/mach-imx/clock-imx35.c +++ b/arch/arm/mach-imx/clock-imx35.c @@ -507,7 +507,7 @@ static struct clk_lookup lookups[] = { int __init mx35_clocks_init() { - unsigned int cgr2 = ...
eb444fee92895cd793911b002b7e56795caf9914
Analyze and fix the following issue in the Linux kernel code: dma: MX3_IPU fix depends
Problem Details: ARCH_MX3 was removed in commit a89cf59 : "arm/imx: merge i.MX3 and i.MX6" thus preventing to select MX3_IPU, thus preventing IPU and display to work on i.MX3x SOC. i.MX SDMA support is also affected. Signed-off-by: Eric Bénard <eric@eukrea.com> Cc: Sascha Hauer <kernel@pengutronix.de> Cc: Vinod Koul <...
```diff diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig index ab8f469f5cf8..5a99bb3f255a 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig @@ -124,7 +124,7 @@ config MV_XOR config MX3_IPU bool "MX3x Image Processing Unit support" - depends on ARCH_MX3 + depends on SOC_IMX31 || SOC_IMX35 select DM...
01dd520a5029bc8ec30375e7b16a87c06658ee30
Analyze and fix the following issue in the Linux kernel code: cpuimx25sd: fix Kconfig
Problem Details: in 0d6cfa3a75f5cde5b3ca0dde748fd22625b4f34c I fixed the mach-types records. We also need to make the name consistent in Kconfig else the machine_is_eukrea_cpuimx25sd macro fails, and thus audio codec is not properly initalized. Signed-off-by: Eric Bénard <eric@eukrea.com> Cc: Sascha Hauer <kernel@peng...
```diff diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index c44aa974e79c..d2c24d5592cf 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -132,7 +132,7 @@ config MACH_MX25_3DS select IMX_HAVE_PLATFORM_MXC_NAND select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX -config MACH_EUKREA...
e1bff3149a68baaa9bbc3c38da04690df340b173
Analyze and fix the following issue in the Linux kernel code: arm/imx: fix cpufreq section mismatch
Problem Details: WARNING: arch/arm/plat-mxc/built-in.o(.data+0x488): Section mismatch in reference from the variable mxc_driver to the function .init.text:mxc_cpufreq_init() The variable mxc_driver references the function __init mxc_cpufreq_init() If the reference is valid then annotate the variable with __init* or __r...
```diff diff --git a/arch/arm/plat-mxc/cpufreq.c b/arch/arm/plat-mxc/cpufreq.c index adbff706ef6f..73db34bf588a 100644 --- a/arch/arm/plat-mxc/cpufreq.c +++ b/arch/arm/plat-mxc/cpufreq.c @@ -98,7 +98,7 @@ static int mxc_set_target(struct cpufreq_policy *policy, return ret; } -static int __init mxc_cpufreq_init(str...
5776ac2eb33164c77cdb4d2b48feee15616eaba3
Analyze and fix the following issue in the Linux kernel code: ARM:imx:fix pwm period value
Problem Details: According to imx pwm RM, the real period value should be PERIOD value in PWMPR plus 2. PWMO (Hz) = PCLK(Hz) / (period +2) Signed-off-by: Jason Chen <jason.chen@linaro.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Cc: stable@kernel.org
```diff diff --git a/arch/arm/plat-mxc/pwm.c b/arch/arm/plat-mxc/pwm.c index 845de59f07ed..e032717f7d02 100644 --- a/arch/arm/plat-mxc/pwm.c +++ b/arch/arm/plat-mxc/pwm.c @@ -77,6 +77,15 @@ int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns) do_div(c, period_ns); duty_cycles = c; + /* + * acco...
b1b73d095084e754562961c443aa8f6587a55f8e
Analyze and fix the following issue in the Linux kernel code: time/clocksource: Fix kernel-doc warnings
Problem Details: Fix various KernelDoc build warnings. Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp> Cc: John Stultz <johnstul@us.ibm.com> Link: http://lkml.kernel.org/r/20111219091320.0D5AF6FC03D@msa105.auone-net.jp Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index c86c940d1de3..081147da0564 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h @@ -71,7 +71,7 @@ struct timecounter { /** * cyclecounter_cyc2ns - converts cycle counter cycles to nanoseconds - * @tc: Pointe...
cde944803d12450f70f0adc4d418afcd8e42db2e
Analyze and fix the following issue in the Linux kernel code: ALSA: Add missing module parameters for als300 and cs5530 drivers
Problem Details: These drviers defined only variables but didn't declare as module parameters. Also fix the enable variable to bool type. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/als300.c b/sound/pci/als300.c index 8dc77a0a5d8b..8196e229b2df 100644 --- a/sound/pci/als300.c +++ b/sound/pci/als300.c @@ -115,7 +115,14 @@ MODULE_SUPPORTED_DEVICE("{{Avance Logic,ALS300},{Avance Logic,ALS300+}}"); static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; static char *id[SN...
d66c266ad40e92a5c24fd0c5bbcf08c04ae41b6c
Analyze and fix the following issue in the Linux kernel code: HID: Kconfig: fix syntax
Problem Details: Replace mistakenly used '==' by '='. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index 7745c3e42397..a4591596131d 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig @@ -33,7 +33,7 @@ config HID config HID_BATTERY_STRENGTH bool - depends on HID && POWER_SUPPLY && HID == POWER_SUPPLY + depends on HID && POWER_SUPPLY && HID = ...
86bb702813010a0870c45d7f080669450a95be8d
Analyze and fix the following issue in the Linux kernel code: usb: gadget: mv_udc: fix readl error
Problem Details: readl expected 'const volatile void *' as the argument. Signed-off-by: Neil Zhang <zhangwm@marvell.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
```diff diff --git a/drivers/usb/gadget/mv_udc_core.c b/drivers/usb/gadget/mv_udc_core.c index b229edeb2bb6..635ee47dd4eb 100644 --- a/drivers/usb/gadget/mv_udc_core.c +++ b/drivers/usb/gadget/mv_udc_core.c @@ -1196,7 +1196,7 @@ static int mv_udc_get_frame(struct usb_gadget *gadget) udc = container_of(gadget, struc...
3f53638c805f75989f4b4be07efcfd173cdd5e2d
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix old bug in prom_init setting of the color
Problem Details: We have an array of 16 entries and a loop of 32 iterations... oops. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
```diff diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 32b5b05082ea..55b4080a821e 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c @@ -2080,7 +2080,7 @@ static void __init prom_check_displays(void) /* Setup a usable color table when the appropri...
b206590c04a5ffde7d4348964d3b09b574555a66
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix comment explaining our VSID layout
Problem Details: We support 16TB of user address space and half a million contexts so update the comment to reflect this. Signed-off-by: Anton Blanchard <anton@samba.org> 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 db645ec842bd..412ba493cb98 100644 --- a/arch/powerpc/include/asm/mmu-hash64.h +++ b/arch/powerpc/include/asm/mmu-hash64.h @@ -312,10 +312,9 @@ extern void slb_set_size(u16 size); * (i.e. everything above 0xC000000...
9f5072d4f63f28d30d343573830ac6c85fc0deff
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix wrong divisor in usecs_to_cputime
Problem Details: Commit d57af9b (taskstats: use real microsecond granularity for CPU times) renamed msecs_to_cputime to usecs_to_cputime, but failed to update all numbers on the way. This causes nonsensical cpu idle/iowait values to be displayed in /proc/stat (the only user of usecs_to_cputime so far). This also rena...
```diff diff --git a/arch/powerpc/include/asm/cputime.h b/arch/powerpc/include/asm/cputime.h index 1cf20bdfbeca..33a35801f7c9 100644 --- a/arch/powerpc/include/asm/cputime.h +++ b/arch/powerpc/include/asm/cputime.h @@ -126,11 +126,11 @@ static inline u64 cputime64_to_jiffies64(const cputime_t ct) /* * Convert cputim...
2011b1d0d31ae469c7a075061e03b7d4f5b49ba6
Analyze and fix the following issue in the Linux kernel code: powerpc/mm: Fix section mismatch for read_n_cells
Problem Details: read_n_cells() cannot be marked as .devinit.text since it is referenced from two functions that are not in that section: of_get_lmb_size() and hot_add_drconf_scn_to_nid(). Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
```diff diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 8bb0b4d938d9..542156637487 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c @@ -406,7 +406,7 @@ static void __init get_n_mem_cells(int *n_addr_cells, int *n_size_cells) of_node_put(memory); } -static unsigned long __devinit ...
28e86bdbc9863d3d81711db02abedbc54528099e
Analyze and fix the following issue in the Linux kernel code: powerpc/mm: Fix section mismatch for mark_reserved_regions_for_nid
Problem Details: mark_reserved_regions_for_nid() is only called from do_init_bootmem(), which is in .init.text, so it must be in the same section to avoid a section mismatch warning. Reported-by: Subrata Modak <subrata@linux.vnet.ibm.com> Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Benjamin Herr...
```diff diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index b22a83a91cb8..8bb0b4d938d9 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c @@ -969,7 +969,7 @@ static struct notifier_block __cpuinitdata ppc64_numa_nb = { .priority = 1 /* Must run before sched domains notifier. */ }; -sta...
d7660918fce210f421cc58c060ca3de71e4ffd37
Analyze and fix the following issue in the Linux kernel code: Revert "Bluetooth: Revert: Fix L2CAP connection establishment"
Problem Details: This reverts commit 4dff523a913197e3314c7b0d08734ab037709093. It was reported that this patch cause issues when trying to connect to legacy devices so reverting it. Reported-by: David Fries <david@fries.net> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
```diff diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index e0af7237cd92..c1c597e3e198 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -673,7 +673,7 @@ int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type) goto encrypt; auth: - if (test_and_set_bit...
1095843489f7a805106dc0cc39187d5df960d11a
Analyze and fix the following issue in the Linux kernel code: ARM: ux500: fix the smp_twd clock calculation
Problem Details: The clock for the smp_twd block is not equal to the CPU frequency, actually it is divided by two, so fix this, and set the initial frequency to half of 1GHz which is the most common case. Reported-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
```diff diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c index 2ebf998bc77d..737907537004 100644 --- a/arch/arm/mach-ux500/clock.c +++ b/arch/arm/mach-ux500/clock.c @@ -651,7 +651,7 @@ err_out: late_initcall(clk_debugfs_init); #endif /* defined(CONFIG_DEBUG_FS) */ -unsigned long clk_smp_twd_ra...
acd6ad83517639e8f09a8c5525b1dccd81cd2a10
Analyze and fix the following issue in the Linux kernel code: ext4: fix error handling on inode bitmap corruption
Problem Details: When insert_inode_locked() fails in ext4_new_inode() it most likely means inode bitmap got corrupted and we allocated again inode which is already in use. Also doing unlock_new_inode() during error recovery is wrong since the inode does not have I_NEW set. Fix the problem by jumping to fail: (instead o...
```diff diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index 00beb4f9cc4f..8fb6844f9734 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -885,8 +885,12 @@ got: if (IS_DIRSYNC(inode)) ext4_handle_sync(handle); if (insert_inode_locked(inode) < 0) { - err = -EINVAL; - goto fail_drop; + /* + * Likely a...
497f16f21a04060098c0da6ed522fbcafb90c0db
Analyze and fix the following issue in the Linux kernel code: pci: Fix hotplug of Express Module with pci bridges
Problem Details: I noticed that hotplug of one setup does not work with recent change in pci tree. After checking the bridge conf setup, I noticed that the bridges get assigned but do not get enabled. The reason is the following commit, while simply ignores bridge resources when enabling a pci device: | commit bbef9...
```diff diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index faccb8937706..6d4a5319148d 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -1129,7 +1129,11 @@ static int __pci_enable_device_flags(struct pci_dev *dev, if (atomic_add_return(1, &dev->enable_cnt) > 1) return 0; /* already enabled */ - fo...
c9c2659f1ea84f860af82cac504cc58f17067523
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Use correct struct for user_confirm_neg_reply
Problem Details: This patch fixes user_confirm_neg_reply to use the appropriate struct for accessing the call parameters. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
```diff diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 6cb8c7f708b5..8413f55cc13c 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -1690,7 +1690,7 @@ static int user_confirm_reply(struct sock *sk, u16 index, void *data, u16 len) static int user_confirm_neg_reply(struct sock *sk, u16 inde...
3d57dc6806599ca7d389fc9410eefbc1a7dc32bc
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Change l2cap chan_list to use RCU
Problem Details: This list has much more reads than writes, so RCU makes senses here, also it avoid deadlock against the socket lock. Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
```diff diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index d6165199fc8b..a1766adee397 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -89,24 +89,36 @@ static inline void chan_put(struct l2cap_chan *c) static struct l2cap_chan *__l2cap_get_chan_by_dcid(struct l2cap_...
03a001948166d966d0d580cddb8ae3a23f8b795b
Analyze and fix the following issue in the Linux kernel code: Bluetooth: invert locking order in connect path
Problem Details: This move some checking code that was in l2cap_sock_connect() to l2cap_chan_connect(). Thus we can invert the lock calls, i.e., call lock_sock() before hci_dev_lock() to avoid a deadlock scenario. Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi...
```diff diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index f79137476cb6..c0d168adf9be 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h @@ -806,7 +806,8 @@ int l2cap_add_scid(struct l2cap_chan *chan, __u16 scid); struct l2cap_chan *l2cap_chan_create(struct so...
3c54711c4fd103edf2044ab60726939f1de02b0c
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Don't disable tasklets to call hdev->notify()
Problem Details: It's pointless, we aren't protecting anything since btusb_notify() schedules a work to run, then all it operation happens without protection. If protection is really needed here, we will fix it further. Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusio...
```diff diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 5e9e193ac71e..385cccbcafe0 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -419,11 +419,8 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst) hci_dev_hold(hdev); hci_conn_hash_add(hde...
1d5a34fe990c9e2e2f672b238ad881d0d4ed376b
Analyze and fix the following issue in the Linux kernel code: I2C: OMAP: fix FIFO usage for OMAP4
Problem Details: Currently the fifo depth is set to zero for OMAP4 which disables the FIFO usage. This patch enables the FIFO usage for I2C transactions on OMAP4 also. Tested on omap4430 and 3430. Tested-and-Reported-by: Nishanth Menon <nm@ti.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Kev...
```diff diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index a43d0023446a..fa23faa20f0e 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -1047,13 +1047,14 @@ omap_i2c_probe(struct platform_device *pdev) * size. This is to ensure that we can handle the sta...
8ebe661dd2ab16e2e9c272ed5c86019c7407b9a1
Analyze and fix the following issue in the Linux kernel code: i2c-s3c2410: Fix return code of s3c24xx_i2c_parse_dt_gpio
Problem Details: s3c24xx_i2c_parse_dt_gpio is called when cfg_gpio is not defined in the platform data of the i2c device. When DT is not enabled, the above function always returns -EINVAL. Since there can be some i2c devices which don't need to configure any gpio lines, the probe of such devices would fail here. Changi...
```diff diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index 37b2de106808..4c1718081685 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -787,7 +787,7 @@ static void s3c24xx_i2c_dt_gpio_free(struct s3c24xx_i2c *i2c) #else static int s3c24xx_i2c_...
d79a8869d8a4b565b12a88faeff834b09a36368c
Analyze and fix the following issue in the Linux kernel code: x86/mrst: Add additional debug prints for pb_keys
Problem Details: Added additional debug output that we always seem to add during power ons to validate firmware operation. Signed-off-by: Michael Demeter <michael.demeter@intel.com> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Link: http://lkml.kern...
```diff diff --git a/arch/x86/platform/mrst/mrst.c b/arch/x86/platform/mrst/mrst.c index 6a21f603bd78..b6a33d2bd4d6 100644 --- a/arch/x86/platform/mrst/mrst.c +++ b/arch/x86/platform/mrst/mrst.c @@ -983,6 +983,7 @@ static int __init pb_keys_init(void) num = sizeof(gpio_button) / sizeof(struct gpio_keys_button); for...
a0c3832a578c84d4a93c61e22cb09c99fa9447ea
Analyze and fix the following issue in the Linux kernel code: x86/apb: Fix configuration constraints
Problem Details: The APB timer requires SFI, SCU and MID support Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Alan Cox <alan@linux.intel.com> Link: http://lkml.kernel.org/r/20111217215719.3743.93550.stgit@bob.linux.org.uk Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 2b54a2fb3ab0..ca4ee7644855 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -665,6 +665,7 @@ config APB_TIMER def_bool y if MRST prompt "Langwell APB Timer Support" if X86_MRST select DW_APB_TIMER + depends on X86_INTEL_...
7ccb9ad5364d6ac0c803096c67e76a7545cf7a77
Analyze and fix the following issue in the Linux kernel code: writeback: max, min and target dirty pause time
Problem Details: Control the pause time and the call intervals to balance_dirty_pages() with three parameters: 1) max_pause, limited by bdi_dirty and MAX_PAUSE 2) the target pause time, grows with the number of dd tasks and is normally limited by max_pause/2 3) the minimal pause, set to half the target pause a...
```diff diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 491932155825..5830991f261a 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -962,40 +962,81 @@ static unsigned long dirty_poll_interval(unsigned long dirty, return 1; } -static unsigned long bdi_max_pause(struct backing_dev_info *bdi...
32c7f202a4801252a0f3578807b75a961f792870
Analyze and fix the following issue in the Linux kernel code: btrfs: fix dirtied pages accounting on sub-page writes
Problem Details: When doing 1KB sequential writes to the same page, balance_dirty_pages_ratelimited_nr() should be called once instead of 4 times, the latter makes the dirtier tasks be throttled much too heavy. Fix it with proper de-accounting on clear_page_dirty_for_io(). CC: Chris Mason <chris.mason@oracle.com> Sig...
```diff diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 97fbe939c050..bfb620ead295 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1136,7 +1136,8 @@ again: GFP_NOFS); } for (i = 0; i < num_pages; i++) { - clear_page_dirty_for_io(pages[i]); + if (clear_page_dirty_for_io(pages[i])) + account...
2f800fbd777b792de54187088df19a7df0251254
Analyze and fix the following issue in the Linux kernel code: writeback: fix dirtied pages accounting on redirty
Problem Details: De-account the accumulative dirty counters on page redirty. Page redirties (very common in ext4) will introduce mismatch between counters (a) and (b) a) NR_DIRTIED, BDI_DIRTIED, tsk->nr_dirtied b) NR_WRITTEN, BDI_WRITTEN This will introduce systematic errors in balanced_rate and result in dirty page...
```diff diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 05eaf5e3aad7..b30419cd425e 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h @@ -197,6 +197,8 @@ void writeback_set_ratelimit(void); void tag_pages_for_writeback(struct address_space *mapping, pgoff_t start, ...
d3bc1fef9389e409a772ea174a5e41a6f93d9b7b
Analyze and fix the following issue in the Linux kernel code: writeback: fix dirtied pages accounting on sub-page writes
Problem Details: When dd in 512bytes, generic_perform_write() calls balance_dirty_pages_ratelimited() 8 times for the same page, but obviously the page is only dirtied once. Fix it by accounting tsk->nr_dirtied and bdp_ratelimits at page dirty time. Acked-by: Jan Kara <jack@suse.cz> Acked-by: Peter Zijlstra <a.p.zijl...
```diff diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 619c445fc03c..5d1ef5d8613a 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -1258,8 +1258,6 @@ void balance_dirty_pages_ratelimited_nr(struct address_space *mapping, if (bdi->dirty_exceeded) ratelimit = min(ratelimit, 32 >> (PAGE_SHI...
54848d73f9f254631303d6eab9b976855988b266
Analyze and fix the following issue in the Linux kernel code: writeback: charge leaked page dirties to active tasks
Problem Details: It's a years long problem that a large number of short-lived dirtiers (eg. gcc instances in a fast kernel build) may starve long-run dirtiers (eg. dd) as well as pushing the dirty pages to the global hard limit. The solution is to charge the pages dirtied by the exited gcc to the other random dirtying...
```diff diff --git a/include/linux/writeback.h b/include/linux/writeback.h index a378c295851f..05eaf5e3aad7 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h @@ -7,6 +7,8 @@ #include <linux/sched.h> #include <linux/fs.h> +DECLARE_PER_CPU(int, dirty_throttle_leaks); + /* * The 1/4 region unde...
5183c137974da0c8192fc4c5cc5cae5974125b06
Analyze and fix the following issue in the Linux kernel code: [media] budget-ci: Fix Hauppauge RC-5 IR support
Problem Details: Hauppauge RC-5 tables require the full scancodes. The code at budget-ci handles it right, however, it request the rc-code to mask them with 0xff, breaking support for some remote controllers. Fix it by not selecting a scancode mask when the driver is on full_rc5 mode. Reported-by: Brian May <brian@mi...
```diff diff --git a/drivers/media/dvb/ttpci/budget-ci.c b/drivers/media/dvb/ttpci/budget-ci.c index ca02e9722172..ab180f99fde6 100644 --- a/drivers/media/dvb/ttpci/budget-ci.c +++ b/drivers/media/dvb/ttpci/budget-ci.c @@ -193,7 +193,6 @@ static int msp430_ir_init(struct budget_ci *budget_ci) dev->input_phys = budget...
ddf536d0d7e1f0b63a681c970888730a4437414d
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP: AM3517/3505: fix crash on boot due to incorrect voltagedomain data
Problem Details: AM3517/3505 chips don't have voltage controller and voltage processor IP blocks. Trying to use OMAP34xx/36xx voltage domain data on these chips causes a crash during boot: omap_vc_init_channel: PMIC info requried to configure vc forvdd_core not populated.Hence cannot initialize vc Unable to handl...
```diff diff --git a/arch/arm/mach-omap2/voltagedomains3xxx_data.c b/arch/arm/mach-omap2/voltagedomains3xxx_data.c index 071101debbbc..636b688bca78 100644 --- a/arch/arm/mach-omap2/voltagedomains3xxx_data.c +++ b/arch/arm/mach-omap2/voltagedomains3xxx_data.c @@ -31,6 +31,14 @@ * VDD data */ +/* OMAP3-common volta...
aacf094128759cfb29a3ce88f92d08b79b74a4e8
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP2+: hwmod: Add a new flag to handle hwmods left enabled at init
Problem Details: An hwmod with a 'HWMOD_INIT_NO_IDLE' flag set, is left in enabled state by the hwmod framework post the initial setup. Once a real user of the device (a driver) tries to enable it at a later point, the hwmod framework throws a WARN() about the device being already in enabled state. Fix this by introdu...
```diff diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 529142aff766..f673f808725f 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -1441,6 +1441,25 @@ static int _enable(struct omap_hwmod *oh) pr_debug("omap_hwmod: %s: enabling\n", oh->n...
c001dff0f6715813bdb8e978dc8c05416c01962b
Analyze and fix the following issue in the Linux kernel code: staging: android: switch: minor code formatting cleanups
Problem Details: This fixes a number of minor space issues in the Android switch code. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/android/switch/switch.h b/drivers/staging/android/switch/switch.h index 3e4c748e343a..4fcb3109875a 100644 --- a/drivers/staging/android/switch/switch.h +++ b/drivers/staging/android/switch/switch.h @@ -30,7 +30,7 @@ struct switch_dev { struct gpio_switch_platform_data { const c...
093019cf1b18dd31b2c3b77acce4e000e2cbc9ce
Analyze and fix the following issue in the Linux kernel code: xfs: fix acl count validation in xfs_acl_from_disk()
Problem Details: Commit fa8b18ed didn't prevent the integer overflow and possible memory corruption. "count" can go negative and bypass the check. Signed-off-by: Xi Wang <xi.wang@gmail.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Ben Myers <bpm@sgi.com>
```diff diff --git a/fs/xfs/xfs_acl.c b/fs/xfs/xfs_acl.c index 76e4266d2e7e..ac702a6eab9b 100644 --- a/fs/xfs/xfs_acl.c +++ b/fs/xfs/xfs_acl.c @@ -39,7 +39,7 @@ xfs_acl_from_disk(struct xfs_acl *aclp) struct posix_acl_entry *acl_e; struct posix_acl *acl; struct xfs_acl_entry *ace; - int count, i; + unsigned int c...
ed4a51842a9d9e618d4f4c31349b15b974dba5df
Analyze and fix the following issue in the Linux kernel code: Revert "drm/i915: fix infinite recursion on unbind due to ilk vt-d w/a"
Problem Details: This reverts commit eb1711bb94991e93669c5a1b5f84f11be2d51ea1. It blows up the i915 seqno tracking, resulting in the BUG_ON(seqno == 0); in i915_wait_request() triggering, which will cause lock-ups. See for example https://bugs.launchpad.net/ubuntu/+source/linux/+bug/903010 https://lkml.org/lkm...
```diff diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 60ff1b63b568..8359dc777041 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -2026,13 +2026,8 @@ i915_wait_request(struct intel_ring_buffer *ring, * to handle this, the waiter on a request...
c607b2ed84929e143d9fb5653c4b5d0109147cde
Analyze and fix the following issue in the Linux kernel code: net: fix compilation with !CONFIG_NET
Problem Details: Reported-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Glauber Costa <glommer@parallels.com> CC: Hiroyouki Kamezawa <kamezawa.hiroyu@jp.fujitsu.com> CC: David S. Miller <davem@davemloft.net> CC: Eric Dumazet <eric.dumazet@gmail.com> CC: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Da...
```diff diff --git a/include/net/sock.h b/include/net/sock.h index 6fe0dae81451..3144c7950649 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -66,8 +66,20 @@ struct cgroup; struct cgroup_subsys; +#ifdef CONFIG_NET int mem_cgroup_sockets_init(struct cgroup *cgrp, struct cgroup_subsys *ss); void mem_cgr...
36b77a52087a9fca4228c06e0730750f9b6468f0
Analyze and fix the following issue in the Linux kernel code: net: fix sleeping while atomic problem in sock mem_cgroup.
Problem Details: We can't scan the proto_list to initialize sock cgroups, as it holds a rwlock, and we also want to keep the code generic enough to avoid calling the initialization functions of protocols directly, Convert proto_list_lock into a mutex, so we can sleep and do the necessary allocations. This lock is seld...
```diff diff --git a/net/core/sock.c b/net/core/sock.c index 5a6a90620656..0c67facf42f3 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -136,7 +136,7 @@ #include <net/tcp.h> #endif -static DEFINE_RWLOCK(proto_list_lock); +static DEFINE_MUTEX(proto_list_mutex); static LIST_HEAD(proto_list); #ifdef CONFIG_C...
cb9ffb76949cd7b17c8468f8bf10d0ff75d4cdd2
Analyze and fix the following issue in the Linux kernel code: mlx4: Fix compile error when driver is comiled-in
Problem Details: This patch fixes a compile error that occurs when the driver is compile into the kernel and not as a module. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/mellanox/mlx4/port.c b/drivers/net/ethernet/mellanox/mlx4/port.c index 00a9547773c1..88b52e547524 100644 --- a/drivers/net/ethernet/mellanox/mlx4/port.c +++ b/drivers/net/ethernet/mellanox/mlx4/port.c @@ -783,7 +783,7 @@ int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port) return...
220b07e90e3b7b3adc60b8a72c79ad4465312072
Analyze and fix the following issue in the Linux kernel code: batman-adv: Fix merge error.
Problem Details: I didn't resolve the merge properly during the last pull of the net tree into net-next. The code in the final resolution should set flags to TT_CLIENT_ROAM not TT_CLIENT_PENDING. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index 46a2b3791d9c..ab8dea8b0b2e 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c @@ -244,7 +244,7 @@ void tt_local_add(struct net_device *soft_iface, const uint8_t *addr, tt_global_en...
af69592aa098ff8cd640e8109ba946db3c1cdb4e
Analyze and fix the following issue in the Linux kernel code: staging: drm/omap: avoid aquiring mutex in atomic context (v2)
Problem Details: omap_gem_roll() could be called by fbcon in atomic context or when struct_mutext is held. Avoid aquiring mutex (deadlock), or calling tiler_pin() (which itself is not safe for atomic context) in these cases. Signed-off-by: Rob Clark <rob@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/omapdrm/omap_gem.c b/drivers/staging/omapdrm/omap_gem.c index 96848913085f..63490f75350a 100644 --- a/drivers/staging/omapdrm/omap_gem.c +++ b/drivers/staging/omapdrm/omap_gem.c @@ -538,10 +538,22 @@ int omap_gem_roll(struct drm_gem_object *obj, uint32_t roll) return -EINVAL; }...
0156bb3ea7fa2664b4934806fa40a9b80750d1c5
Analyze and fix the following issue in the Linux kernel code: staging: fix build problem with staging/rtl8192e
Problem Details: The rtllib and rtllib_crypt drivers are both required for a fully functional rtllib. Make sure both are always available by having rtllib select rtllib_crypt. Reported-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Sean MacLennan <seanm@seanm.ca> Acked-by: Randy Dunlap <rdunlap@xenotime.net> S...
```diff diff --git a/drivers/staging/rtl8192e/Kconfig b/drivers/staging/rtl8192e/Kconfig index a24305d7ae39..878f384c0aab 100644 --- a/drivers/staging/rtl8192e/Kconfig +++ b/drivers/staging/rtl8192e/Kconfig @@ -2,6 +2,7 @@ config RTLLIB tristate "Support for rtllib wireless devices" depends on WLAN && m default n...
70fe742c94d4d5e7763c3f864f13c0e907ac3d48
Analyze and fix the following issue in the Linux kernel code: staging: comedi_fops.c whitespace fixes
Problem Details: Changed whitespaces in comedi/*.c to tabs where necessary. All .c files within comedi now have no obvious style problems as reported by checkpatch.pl Signed-off-by: Florian Schmaus <fschmaus@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index 9c8b33cc438e..0d18d80bcd25 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -1479,10 +1479,10 @@ static int comedi_mmap(struct file *file, struct vm_area_struct *vma) ...
d5396716f68d34ce8cb60528c6bc144c6bdabecf
Analyze and fix the following issue in the Linux kernel code: staging: crystalhd: bc_dts_defs.h: Fix up coding style
Problem Details: Fix comments style on structs and enums Break long lines. Signed-off-by: Jorgyano Vieira <jorgyano@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/crystalhd/bc_dts_defs.h b/drivers/staging/crystalhd/bc_dts_defs.h index fde5b0627f6b..8cd51a7aad8e 100644 --- a/drivers/staging/crystalhd/bc_dts_defs.h +++ b/drivers/staging/crystalhd/bc_dts_defs.h @@ -296,43 +296,79 @@ enum { vdecColourPrimariesSMPTE240M, vdecColourPrimariesGen...
277cdd01d6e831e2168cb3f2c082eecd7fcaac06
Analyze and fix the following issue in the Linux kernel code: Staging: android: fixed white spaces coding style issue in logger.c
Problem Details: This patch fixes some space-before-tabs warnings found by checkpatch tool on the staging android driver file logger.c Signed-off-by: Marco Navarra <fromenglish@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/android/logger.c b/drivers/staging/android/logger.c index fa76ce7678a6..ffc2d043dd8e 100644 --- a/drivers/staging/android/logger.c +++ b/drivers/staging/android/logger.c @@ -37,7 +37,7 @@ * mutex 'mutex'. */ struct logger_log { - unsigned char *buffer;/* the ring buffer itsel...
2aac7a2cb0d9d8c65fc7dde3e19e46b3e878d23d
Analyze and fix the following issue in the Linux kernel code: unix_diag: Pending connections IDs NLA
Problem Details: When establishing a unix connection on stream sockets the server end receives an skb with socket in its receive queue. Report who is waiting for these ends to be accepted for listening sockets via NLA. There's a lokcing issue with this -- the unix sk state lock is required to access the peer, and it ...
```diff diff --git a/include/linux/unix_diag.h b/include/linux/unix_diag.h index 2d74a86024ac..03ffb7de15b6 100644 --- a/include/linux/unix_diag.h +++ b/include/linux/unix_diag.h @@ -14,6 +14,7 @@ struct unix_diag_req { #define UDIAG_SHOW_NAME 0x00000001 /* show name (not path) */ #define UDIAG_SHOW_VFS 0x00000002 ...
aec8dc62f66199aef153d86e1f90d9c1d14696e3
Analyze and fix the following issue in the Linux kernel code: sock_diag: Fix module netlink aliases
Problem Details: I've made a mistake when fixing the sock_/inet_diag aliases :( 1. The sock_diag layer should request the family-based alias, not just the IPPROTO_IP one; 2. The inet_diag layer should request for AF_INET+protocol alias, not just the protocol one. Thus fix this. Signed-off-by: Pavel Emelyanov <...
```diff diff --git a/net/core/sock_diag.c b/net/core/sock_diag.c index 9c27bcda59be..cee96f368108 100644 --- a/net/core/sock_diag.c +++ b/net/core/sock_diag.c @@ -64,7 +64,7 @@ static inline struct sock_diag_handler *sock_diag_lock_handler(int family) { if (sock_diag_handlers[family] == NULL) request_module("net-...
f094148a1751d6ece9374851eb2926bc3cfd16ef
Analyze and fix the following issue in the Linux kernel code: xen-blkfront: Use kcalloc instead of kzalloc to allocate array
Problem Details: The advantage of kcalloc is, that will prevent integer overflows which could result from the multiplication of number of elements and size and it is also a bit nicer to read. The semantic patch that makes this change is available in https://lkml.org/lkml/2011/11/25/107 Signed-off-by: Thomas Meyer <th...
```diff diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 351ddeffd430..8cb0c27f2654 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -157,7 +157,7 @@ static int xlbd_reserve_minors(unsigned int minor, unsigned int nr) if (end > nr_minors) { unsigned long...
3b5c78a35cf7511c15e09a9b0ffab290a42d9bcf
Analyze and fix the following issue in the Linux kernel code: drm/i915/dp: Dither down to 6bpc if it makes the mode fit
Problem Details: Some active adaptors (VGA usually) only have two lanes at 2.7GHz. That's a maximum pixel clock of 144MHz at 8bpc, but 192MHz at 6bpc. Fixes Asus UX31 panel being black at startup due to no valid modes since dc22ee6fc18ce0f15424e753e8473c306ece95c1. v2: Rebased to current code, resulting in the fix ap...
```diff diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 91b5f8707a62..d809b038ca88 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -4670,6 +4670,7 @@ static inline bool intel_panel_use_ssc(struct drm_i915_private *dev_priv) ...
f45b55575cedb7efa782e43f1ea74338456d0381
Analyze and fix the following issue in the Linux kernel code: drm/i915: enable semaphores on per-device defaults
Problem Details: This adds a default setting for semaphores parameter, and enables semaphores by default on IVB. For now, as semaphores interaction with VTd causes random issues on SNB, we do not enable them by default. But they can still be enabled via the semaphores=1 kernel parameter. v2: enables semaphores on SNB...
```diff diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 47a42eb6cc43..a1103fc6597d 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -58,10 +58,10 @@ module_param_named(powersave, i915_powersave, int, 0600); MODULE_PARM_DESC(powersave, "Enable...
7317c75e66fce0c9f82fbe6f72f7e5256b315422
Analyze and fix the following issue in the Linux kernel code: drm/i915: don't set unpin_work if vblank_get fails
Problem Details: This fixes a race where we may try to finish a page flip and decrement the refcount even if our vblank_get failed and we ended up with a spurious flip pending interrupt. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=34211. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Kei...
```diff diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index d544de9e6634..91b5f8707a62 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -7189,11 +7189,16 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc, work->old_fb_obj...
c0f372b3746d4ede07b2ace2beabd38d9c045b25
Analyze and fix the following issue in the Linux kernel code: drm/i915: By default, enable RC6 on IVB and SNB when reasonable
Problem Details: RC6 should always work on IVB, and should work on SNB whenever IO remapping is disabled. RC6 never works on Ironlake. Make the default value for the parameter follow these guidelines. Setting the value to either 0 or 1 will force the specified behavior. Signed-off-by: Keith Packard <keithp@keithp.com>...
```diff diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 28836fe72211..47a42eb6cc43 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -63,10 +63,10 @@ module_param_named(semaphores, i915_semaphores, int, 0600); MODULE_PARM_DESC(semaphores, "Use...
522200858093a6f31af9830672109f6d9807dd1e
Analyze and fix the following issue in the Linux kernel code: drm/i915/sdvo: Include LVDS panels for the IS_DIGITAL check
Problem Details: We were checking whether the supplied edid matched the connector it was read from. We do this in case a DDC read returns an EDID for another device on a multifunction or otherwise interesting card. However, we failed to include LVDS as a digital device and so rejecting an otherwise valid EDID. Fixes t...
```diff diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index e308d674c669..f7b9268df266 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c @@ -50,6 +50,7 @@ #define IS_TMDS(c) (c->output_flag & SDVO_TMDS_MASK) #define IS_LVDS(c) (c->output_flag &...
4ed0b577457eb6aeb7cdc7e7316576e63d15abb2
Analyze and fix the following issue in the Linux kernel code: drm/i915: prevent division by zero when asking for chipset power
Problem Details: This prevents an in-kernel division by zero which happens when we are asking for i915_chipset_val too quickly, or within a race condition between the power monitoring thread and userspace accesses via debugfs. The issue can be reproduced easily via the following command: while ``; do cat /sys/kernel/d...
```diff diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index a9533c54c93c..a9ae374861e7 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -1454,6 +1454,14 @@ unsigned long i915_chipset_val(struct drm_i915_private *dev_priv) diff1 = now - dev_priv->...
3573c4103f7a486838bb6b5b8353788103f91802
Analyze and fix the following issue in the Linux kernel code: drm/i915: set the right SDVO transcoder for CPT
Problem Details: v2: add a CPT-specific macro, make code cleaner v3: fix commit message Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41272 Cc: stable@kernel.org Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Keith Packard <keithp@kei...
```diff diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 6ef68c74189d..a26d5b0a3690 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -3303,10 +3303,10 @@ /* or SDVOB */ #define HDMIB 0xe1140 #define PORT_ENABLE (1 << 31) -#define TRANSCO...
0999bbe08196cd9459683204974fda4d62a7d1b3
Analyze and fix the following issue in the Linux kernel code: drm/i915: no-lvds quirk for ASUS AT5NM10T-I
Problem Details: https://bugzilla.redhat.com/show_bug.cgi?id=750006 Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
```diff diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index 42f165a520de..e44191132ac4 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c @@ -715,6 +715,14 @@ static const struct dmi_system_id intel_no_lvds[] = { DMI_MATCH(DMI_PRODUCT_NAME, "E...
243082e0d59f169a1fa502f51ee5a820889fae93
Analyze and fix the following issue in the Linux kernel code: xen/gntalloc: fix reference counts on multi-page mappings
Problem Details: When a multi-page mapping of gntalloc is created, the reference counts of all pages in the vma are incremented. However, the vma open/close operations only adjusted the reference count of the first page in the mapping, leaking the other pages. Store a struct in the vm_private_data to track the original...
```diff diff --git a/drivers/xen/gntalloc.c b/drivers/xen/gntalloc.c index f330a4b8b685..e8ea56583b4c 100644 --- a/drivers/xen/gntalloc.c +++ b/drivers/xen/gntalloc.c @@ -99,6 +99,12 @@ struct gntalloc_file_private_data { uint64_t index; }; +struct gntalloc_vma_private_data { + struct gntalloc_gref *gref; + int us...
631b84c5c6daa18ec6c9602081b8f0dbdfd618ac
Analyze and fix the following issue in the Linux kernel code: iwlwifi: add debug in Tx path in AGG flow
Problem Details: This will allow us to catch bad cases in which the packets aren't in the right place on the ring. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c index 5085dae14892..bd29568177e6 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c @@ -408,6 +408,7 @@ static void iwlagn_tx_queue_s...
aca15f81fffb71e5df8fd72e76ef5f1a3128bd11
Analyze and fix the following issue in the Linux kernel code: iwlwifi: fix endianity issue in debug prints
Problem Details: ba_resp->seq_ctl is __le16, need to translate to cpu endianity. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c index b484578afa17..1cac701c4182 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c @@ -925,7 +925,7 @@ int iwlagn_rx_reply_compressed_ba(struct iwl_priv *priv, ...
5ce543d148bf7590294e76bc30f4c4d6777fe094
Analyze and fix the following issue in the Linux kernel code: cfg80211: Restore orig channel values upon disconnect
Problem Details: When we restore regulatory settings the world regulatory domain is properly reset on cfg80211 (or user prefered regulatory domain) but we were never setting back channel values for drivers that use WIPHY_FLAG_CUSTOM_REGULATORY. Set these values up again by using the orig_ channel parameters. This fixe...
```diff diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 481caafc6ba5..c45c8b772ddd 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -1792,6 +1792,26 @@ static void restore_alpha2(char *alpha2, bool reset_user) REG_DBG_PRINT("Restoring regulatory settings\n"); } +static void restore_custom_re...
061acaae76dfb760f4f3fddf0cde43915b7d673c
Analyze and fix the following issue in the Linux kernel code: cfg80211: allow following country IE power for custom regdom cards
Problem Details: By definition WIPHY_FLAG_STRICT_REGULATORY was intended to allow the wiphy to adjust itself to the country IE power information if the card had no regulatory data but we had no way to tell cfg80211 that if the card also had its own custom regulatory domain (these are typically custom world regulatory d...
```diff diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 5eda5933ae01..9f85fca0b676 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -1699,7 +1699,9 @@ struct cfg80211_ops { * regulatory domain no user regulatory domain can enable these channels * at a later time. This can be us...
a1910f9cad2b4b9cc0d5d326aa65632a23c16088
Analyze and fix the following issue in the Linux kernel code: mac80211_hwsim: fix wmediumd_pid
Problem Details: Fix a few minor issues with wmediumd_pid: a) make static b) use u32 to match the snd_pid type c) use ACCESS_ONCE since we don't lock it d) don't explicitly initialize to 0 Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 6cf6d6d25e21..52bcdf40d5bd 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -37,7 +37,8 @@ MODULE_AUTHOR("Jouni Malinen"); MODULE_DESCRIPTION("Software simulator of ...
6ae0516b8a50ece5d766be608a305707e0450060
Analyze and fix the following issue in the Linux kernel code: block, cfq: fix empty queue crash caused by request merge
Problem Details: All requests of a queue could be merged to other requests of other queue. Such queue will not have request in it, but it's in service tree. This will cause kernel oops. I encounter a BUG_ON() in cfq_dispatch_request() with next patch, but the issue should exist without the patch. Signed-off-by: Shaohu...
```diff diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 4c12869fcf77..3548705b04e4 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -1655,6 +1655,8 @@ cfq_merged_requests(struct request_queue *q, struct request *rq, struct request *next) { struct cfq_queue *cfqq = RQ_CFQQ(rq); + stru...
4a0b75c7d02c2bd46ed227d4ba5941ba8a0aba5d
Analyze and fix the following issue in the Linux kernel code: block, cfq: fix empty queue crash caused by request merge
Problem Details: All requests of a queue could be merged to other requests of other queue. Such queue will not have request in it, but it's in service tree. This will cause kernel oops. I encounter a BUG_ON() in cfq_dispatch_request() with next patch, but the issue should exist without the patch. Signed-off-by: Shaohu...
```diff diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index f3b44c394e6d..163263ddd381 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -1656,6 +1656,8 @@ cfq_merged_requests(struct request_queue *q, struct request *rq, struct request *next) { struct cfq_queue *cfqq = RQ_CFQQ(rq); + stru...
ab2789213d224202237292d78aaa0c386c7b28b2
Analyze and fix the following issue in the Linux kernel code: sched: Fix select_idle_sibling() regression in selecting an idle SMT sibling
Problem Details: Mike Galbraith reported that this recent commit: commit 4dcfe1025b513c2c1da5bf5586adb0e80148f612 Author: Peter Zijlstra <peterz@infradead.org> Date: Thu Nov 10 13:01:10 2011 +0100 sched: Avoid SMT siblings in select_idle_sibling() if possible stopped selecting an idle SMT sibling w...
```diff diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index a78ed2736ba7..8a39fa3e3c6c 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c @@ -2352,13 +2352,11 @@ again: if (!smt && (sd->flags & SD_SHARE_CPUPOWER)) continue; - if (!(sd->flags & SD_SHARE_PKG_RESOURCES)) { - if (!smt) { - s...
3e8f9451d3db669d7c0d8b330d4f5770149d90d5
Analyze and fix the following issue in the Linux kernel code: x86: Fix INTEL_MID silly
Problem Details: Doh.. pass the brown paper bags - preferably filled with mince pies.. This fixes occasional build failures. Signed-off-by: Alan Cox <alan@linux.intel.com> Link: http://lkml.kernel.org/n/tip-r0oc1knlvzuqr69artaeq8s8@git.kernel.org [ extended the changelog a bit ] Signed-off-by: Ingo Molnar <mingo@elte...
```diff diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index faf39a0d6242..2b54a2fb3ab0 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -429,6 +429,7 @@ config X86_MDFLD select SPI select INTEL_SCU_IPC select X86_PLATFORM_DEVICES + select X86_INTEL_MID ---help--- Medfield is Intel's Low Power Inte...
c45471eac2bdc271df40963ac8448d76ac434872
Analyze and fix the following issue in the Linux kernel code: ASoC: Fix compile error in sound/soc/mid-x86/sst_platform.c
Problem Details: The variable ret_val is used but not declared. This causes the following compile error: sound/soc/mid-x86/sst_platform.c: In function ‘sst_platform_open’: sound/soc/mid-x86/sst_platform.c:274:2: error: ‘ret_val’ undeclared (first use in this function) sound/soc/mid-x86/sst_platform.c:274:2: note: each...
```diff diff --git a/sound/soc/mid-x86/sst_platform.c b/sound/soc/mid-x86/sst_platform.c index 24f947146947..11c39c548a06 100644 --- a/sound/soc/mid-x86/sst_platform.c +++ b/sound/soc/mid-x86/sst_platform.c @@ -267,6 +267,7 @@ static int sst_platform_open(struct snd_pcm_substream *substream) { struct snd_pcm_runtime...
91a36bdb3ada99ebf3a613a0dab2d741445ffd7f
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP: hwmod data: fix the panic on Nokia RM-680 during boot
Problem Details: Booting the Linux kernel on Nokia RM-680 board has been broken since 2.6.39 due to the following: [ 0.217193] omap_hwmod: timer12: enabling [ 0.221435] Unhandled fault: external abort on non-linefetch (0x1028) at 0xfa304010 [ 0.229431] Internal error: : 1028 [#1] SMP [ 0.233825] Modules li...
```diff diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index eef43e2e163e..126cb49c0de7 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c @@ -3198,7 +3198,6 @@ static __initdata struct omap_hwmod *omap3xxx_hwmod...
7c17c7701cf3c176dc245aeabecb3ae4b166618f
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP: hwmod data: fix iva and mailbox hwmods for OMAP 3
Problem Details: Seems the commit 7e89098 was overly aggressive in adding iva and mailbox hwmods so now they are registered twice. ------------[ cut here ]------------ WARNING: at arch/arm/mach-omap2/omap_hwmod.c:1959 omap_hwmod_register+0x104/0x12c() omap_hwmod: iva: _register returned -22 Modules linked in: [<c0012a...
```diff diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index 7f8915ad5099..eef43e2e163e 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c @@ -3247,18 +3247,14 @@ static __initdata struct omap_hwmod *omap3xxx_hwm...
b8aa09fd880eb4c2881b9f3c8a8d09c0404cd4eb
Analyze and fix the following issue in the Linux kernel code: apparmor: fix module parameter handling
Problem Details: The 'aabool' wrappers actually pass off to the 'bool' parse functions, so you should use the same check function. Similarly for aauint and uint. (Note that 'bool' module parameters also allow 'int', which is why you got away with this, but that's changing very soon.) Cc: linux-security-module@vger.k...
```diff diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c index 37832026e58a..41ae0c6cb903 100644 --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c @@ -671,7 +671,7 @@ static struct security_operations apparmor_ops = { static int param_set_aabool(const char *val, const struct kernel_param *kp)...
78c5c68a4cf4329d17abfa469345ddf323d4fd62
Analyze and fix the following issue in the Linux kernel code: powerpc/pmac: Fix SMP kernels on pre-core99 UP machines
Problem Details: The code for "powersurge" SMP would kick in and cause a crash at boot due to the lack of a NULL test. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
```diff diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c index e6f7378f4a49..44d769258ebf 100644 --- a/arch/powerpc/platforms/powermac/smp.c +++ b/arch/powerpc/platforms/powermac/smp.c @@ -414,7 +414,7 @@ static struct irqaction psurge_irqaction = { static void __init smp_ps...
a79dd5ae5a8f49688d65b89a859f2b98a7ee5538
Analyze and fix the following issue in the Linux kernel code: tty/serial/pmac_zilog: Fix suspend & resume
Problem Details: This patch reworks & simplifies pmac_zilog handling of suspend/resume, essentially removing all the specific code in there and using the generic uart helpers. This required properly registering the tty as a child of the macio (or platform) device, so I had to delay the registration a bit (we used to r...
```diff diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c index 51941f02e936..e9c2dfe471a2 100644 --- a/drivers/tty/serial/pmac_zilog.c +++ b/drivers/tty/serial/pmac_zilog.c @@ -99,6 +99,9 @@ MODULE_LICENSE("GPL"); #define PMACZILOG_NAME "ttyPZ" #endif +#define pmz_debug(fmt, arg...) p...
6c52961743f38747401b47127b82159ab6d8a7a4
Analyze and fix the following issue in the Linux kernel code: NFS: Fix a regression in nfs_file_llseek()
Problem Details: After commit 06222e491e663dac939f04b125c9dc52126a75c4 (fs: handle SEEK_HOLE/SEEK_DATA properly in all fs's that define their own llseek) the behaviour of llseek() was changed so that it always revalidates the file size. The bug appears to be due to a logic error in the afore-mentioned commit, which alw...
```diff diff --git a/fs/nfs/file.c b/fs/nfs/file.c index eca56d4b39c0..606ef0f20aed 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -147,7 +147,7 @@ static loff_t nfs_file_llseek(struct file *filp, loff_t offset, int origin) * origin == SEEK_END || SEEK_DATA || SEEK_HOLE => we must revalidate * the cached file ...
83d99df7c4bf37176d8c7b199e3b129a51fa04c8
Analyze and fix the following issue in the Linux kernel code: x86, bitops: Move fls64.h inside __KERNEL__
Problem Details: We would include <asm-generic/bitops/fls64.h> even without __KERNEL__, but that doesn't make sense, as: 1. That file provides fls64(), but the corresponding function fls() is not exported to user space. 2. The implementation of fls64.h uses kernel-only symbols. 3. fls64.h is not exported to user sp...
```diff diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h index 1775d6e5920e..4a6235b053cb 100644 --- a/arch/x86/include/asm/bitops.h +++ b/arch/x86/include/asm/bitops.h @@ -380,6 +380,8 @@ static inline unsigned long __fls(unsigned long word) return word; } +#undef ADDR + #ifdef __KERNEL...
ddf5a25c5fdd4cc276edf451871c38002eec0f95
Analyze and fix the following issue in the Linux kernel code: ARM: unwinder: fix bisection to find origin in .idx section
Problem Details: The bisection implemented in unwind_find_origin() stopped to early. If there is only a single entry left to check the original code just took the end point as origin which might be wrong. This was introduced in commit de66a979012d ("ARM: 7187/1: fix unwinding for XIP kernels"). Reported-and-tested-b...
```diff diff --git a/arch/arm/kernel/unwind.c b/arch/arm/kernel/unwind.c index 3f03fe0c3269..00df012c4678 100644 --- a/arch/arm/kernel/unwind.c +++ b/arch/arm/kernel/unwind.c @@ -160,12 +160,12 @@ static const struct unwind_idx *unwind_find_origin( const struct unwind_idx *start, const struct unwind_idx *stop) { ...
aa1f2f0a3218a9b6ce979fca3d6ebdb1c5544dd8
Analyze and fix the following issue in the Linux kernel code: brcm80211: smac: precendence bug in wlc_phy_attach()
Problem Details: Negate has higher precendence than compare and since neither zero nor one are equal to four or eight the original condition is always false. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_cmn.c b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_cmn.c index 5b57caa7c3af..264f8c4c703d 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_cmn.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_cmn.c @@ -482,8 +482,8 @@ wlc_phy_a...
9b203c8fc2aa05d7bc28261d7c2bee52a0945789
Analyze and fix the following issue in the Linux kernel code: ath: add a debug level for DFS
Problem Details: This can later be used by other drivers that implement DFS support. Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com> Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h index 0b93babcaa1b..c1d699fd5717 100644 --- a/drivers/net/wireless/ath/ath.h +++ b/drivers/net/wireless/ath/ath.h @@ -218,6 +218,7 @@ do { \ * @ATH_DBG_MCI: Message Coexistence Interface, a private protocol * used exclusivel...
55e435de9153581fda21631f0e68bb793072234d
Analyze and fix the following issue in the Linux kernel code: ath: document ATH_DBG_MCI
Problem Details: A debug level was added to the ath module for printing MCI messages but no documentation was provided. Clarify that MCI is the Message Coexistence Interface, a private protocol used exclusively for WLAN-BT coexistence starting from AR9462. Cc: wtsao@qca.qualcomm.com Cc: rmanohar@qca.qualcomm.com Cc: m...
```diff diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h index 3e4dd2d483b8..0b93babcaa1b 100644 --- a/drivers/net/wireless/ath/ath.h +++ b/drivers/net/wireless/ath/ath.h @@ -215,6 +215,9 @@ do { \ * @ATH_DBG_HWTIMER: hardware timer handling * @ATH_DBG_BTCOEX: bluetooth coexistanc...
1478acb392d8564d109c4add9de6a0c6258c4057
Analyze and fix the following issue in the Linux kernel code: mac80211: Fix power save in change interface
Problem Details: we found that power save is not getting enabled when we do change interface in this order STA->IBSS->STA. this is because ieee80211_setup_sdata clears type-dependent union Reported-by: Leela Kella <leela@qca.qualcomm.com> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-b...
```diff diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index e895ad560d55..a984f1f60ddb 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -2371,6 +2371,7 @@ void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata) (unsigned long) sdata); ifmgd->flags = 0; + ifmgd->powersave = s...
29623892e185b65a503c925236ff73894a842d38
Analyze and fix the following issue in the Linux kernel code: mac80211: count authorized stations per BSS
Problem Details: Currently, each AP interface will send multicast traffic if any interface has a station entry even if that station entry is allocated only. With the new station state management we can easily fix it by adding a counter that counts each authorized station only and send multicast traffic only when the co...
```diff diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c index 8df28910b8ee..176c08ffb13c 100644 --- a/net/mac80211/debugfs_netdev.c +++ b/net/mac80211/debugfs_netdev.c @@ -321,6 +321,7 @@ static ssize_t ieee80211_if_parse_tkip_mic_test( __IEEE80211_IF_FILE_W(tkip_mic_test); /* AP attribut...
9f57bd4d6dc69a4e3bf43044fa00fcd24dd363e3
Analyze and fix the following issue in the Linux kernel code: percpu: fix per_cpu_ptr_to_phys() handling of non-page-aligned addresses
Problem Details: per_cpu_ptr_to_phys() incorrectly rounds up its result for non-kmalloc case to the page boundary, which is bogus for any non-page-aligned address. This affects the only in-tree user of this function - sysfs handler for per-cpu 'crash_notes' physical address. The trouble is that the crash_notes per-cp...
```diff diff --git a/mm/percpu.c b/mm/percpu.c index 3bb810a72006..716eb4acf2fc 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -1023,9 +1023,11 @@ phys_addr_t per_cpu_ptr_to_phys(void *addr) if (!is_vmalloc_addr(addr)) return __pa(addr); else - return page_to_phys(vmalloc_to_page(addr)); + return page_to_p...
cb0c05c5fae12eeb7c85c205578df277bd706155
Analyze and fix the following issue in the Linux kernel code: xen: fix build breakage in xen-selfballoon.c caused by sysdev conversion
Problem Details: This adds the needed include file for xen-selfballoon.c to fix the build error reported by Stephen Rothwell. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/xen/xen-selfballoon.c b/drivers/xen/xen-selfballoon.c index b7b9e95f8717..767ff656d5a7 100644 --- a/drivers/xen/xen-selfballoon.c +++ b/drivers/xen/xen-selfballoon.c @@ -74,6 +74,7 @@ #include <linux/mman.h> #include <linux/module.h> #include <linux/workqueue.h> +#include <linux/device.h...
87b9b0e0d50db3282fb1eb702307ccfca8775744
Analyze and fix the following issue in the Linux kernel code: gpio: Fix DA9052 GPIO build errors.
Problem Details: This patch is functionally tested on Samsung SMDKV6410. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David Dajun Chen <dchen@diasemi.com> Signed-off-by: Ashish Jangam <ashish.jangam@kpitcummins.com> [grant.likely: don't create an unnecessary header file] Signed-off-by: Grant Lik...
```diff diff --git a/drivers/gpio/gpio-da9052.c b/drivers/gpio/gpio-da9052.c index 038f5eb8b13d..f8ce29ef9f88 100644 --- a/drivers/gpio/gpio-da9052.c +++ b/drivers/gpio/gpio-da9052.c @@ -22,7 +22,6 @@ #include <linux/mfd/da9052/da9052.h> #include <linux/mfd/da9052/reg.h> #include <linux/mfd/da9052/pdata.h> -#include...
4f272096054b6154e31e850f192eef5782f156c6
Analyze and fix the following issue in the Linux kernel code: tg3: Enable EEE support for capable 10/100 devs
Problem Details: There are some devices in the 57765 ASIC rev that are EEE capable. Unfortunately the EEE setup code only gets executed if the device is gigabit capable. This patch fixes the problem. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjam...
```diff diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index 19791518f6ae..8a6ea1970ea7 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c @@ -3595,18 +3595,17 @@ static int tg3_phy_autoneg_cfg(struct tg3 *tp, u32 advertise, u32 flowctrl) ...
c48e074c7c75c0de4652ea5f5bf4e74c8cf4e3dd
Analyze and fix the following issue in the Linux kernel code: tcp_memcontrol: fix reversed if condition
Problem Details: We should only dereference the pointer if it's valid, not the other way round. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/tcp_memcontrol.c b/net/ipv4/tcp_memcontrol.c index 171d7b64f803..7fed04f875c1 100644 --- a/net/ipv4/tcp_memcontrol.c +++ b/net/ipv4/tcp_memcontrol.c @@ -44,7 +44,7 @@ static inline struct tcp_memcontrol *tcp_from_cgproto(struct cg_proto *cg_proto) static void memcg_tcp_enter_memory_pres...