id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
a4ee8d978e47e79d536226dccb48991f70091168
Analyze and fix the following issue in the Linux kernel code: LOCKD: fix races in nsm_client_get
Problem Details: Commit e9406db20fecbfcab646bad157b4cfdc7cadddfb (lockd: per-net NSM client creation and destruction helpers introduced) contains a nasty race on initialisation of the per-net NSM client because it doesn't check whether or not the client is set after grabbing the nsm_create_mutex. Reported-by: Nix <nix...
```diff diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c index e4fb3ba5a58a..fe695603e395 100644 --- a/fs/lockd/mon.c +++ b/fs/lockd/mon.c @@ -85,29 +85,38 @@ static struct rpc_clnt *nsm_create(struct net *net) return rpc_create(&args); } +static struct rpc_clnt *nsm_client_set(struct lockd_net *ln, + struct rpc_clnt...
b9d2bb2ee537424a7f855e1f93eed44eb9ee0854
Analyze and fix the following issue in the Linux kernel code: Revert "SUNRPC: Ensure we close the socket on EPIPE errors too..."
Problem Details: This reverts commit 55420c24a0d4d1fce70ca713f84aa00b6b74a70e. Now that we clear the connected flag when entering TCP_CLOSE_WAIT, the deadlock described in this commit is no longer possible. Instead, the resulting call to xs_tcp_shutdown() can interfere with pending reconnection attempts. Reported-by: ...
```diff diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 6e6967d5400e..7e2dd0d69f1b 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -737,10 +737,10 @@ static int xs_tcp_send_request(struct rpc_task *task) dprintk("RPC: sendmsg returned unrecognized error %d\n", -status); ...
168bfeef7bba3f9784f7540b053e4ac72b769ce9
Analyze and fix the following issue in the Linux kernel code: amd64_edac:__amd64_set_scrub_rate(): avoid overindexing scrubrates[]
Problem Details: If none of the elements in scrubrates[] matches, this loop will cause __amd64_set_scrub_rate() to incorrectly use the n+1th element. As the function is designed to use the final scrubrates[] element in the case of no match, we can fix this bug by simply terminating the array search at the n-1th elemen...
```diff diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 5a297a26211d..cc8e7c78a23c 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -170,8 +170,11 @@ static int __amd64_set_scrub_rate(struct pci_dev *ctl, u32 new_bw, u32 min_rate) * memory controller and apply to reg...
9efade1b3e981f5064f9db9ca971b4dc7557ae42
Analyze and fix the following issue in the Linux kernel code: crypto: cryptd - disable softirqs in cryptd_queue_worker to prevent data corruption
Problem Details: cryptd_queue_worker attempts to prevent simultaneous accesses to crypto workqueue by cryptd_enqueue_request using preempt_disable/preempt_enable. However cryptd_enqueue_request might be called from softirq context, so add local_bh_disable/local_bh_enable to prevent data corruption and panics. Bug repo...
```diff diff --git a/crypto/cryptd.c b/crypto/cryptd.c index 671d4d6d14df..7bdd61b867c8 100644 --- a/crypto/cryptd.c +++ b/crypto/cryptd.c @@ -137,13 +137,18 @@ static void cryptd_queue_worker(struct work_struct *work) struct crypto_async_request *req, *backlog; cpu_queue = container_of(work, struct cryptd_cpu_qu...
b6e0e543f75729f207b9c72b0162ae61170635b2
Analyze and fix the following issue in the Linux kernel code: drm/i915: clear the entire sdvo infoframe buffer
Problem Details: Like in the case of native hdmi, which is fixed already in commit adf00b26d18e1b3570451296e03bcb20e4798cdd Author: Paulo Zanoni <paulo.r.zanoni@intel.com> Date: Tue Sep 25 13:23:34 2012 -0300 drm/i915: make sure we write all the DIP data bytes we need to clear the entire sdvo buffer to avoid u...
```diff diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index c01d97db0061..79d308da29ff 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c @@ -894,6 +894,45 @@ static void intel_sdvo_dump_hdmi_buf(struct intel_sdvo *intel_sdvo) } #endif +static...
572c7f8429e3c015dd8931b2d3f71b512a7f15f1
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix LE MTU reporting for HCIGETDEVINFO
Problem Details: This patch fixes the use of le_mtu and le_pkts values in the HCIGETDEVINFO ioctl for LE-only controllers. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
```diff diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 854202679c49..5a3400d8a6e5 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -992,10 +992,17 @@ int hci_get_dev_info(void __user *arg) di.type = (hdev->bus & 0x0f) | (hdev->dev_type << 4); di.flags = hdev->fl...
3200da8d9afb3d0dc617515a2fe364d9d59ef523
Analyze and fix the following issue in the Linux kernel code: crypto: tegra - fix missing unlock on error case
Problem Details: Add the missing unlock on the error handling path in function tegra_aes_get_random() and tegra_aes_rng_reset(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
```diff diff --git a/drivers/crypto/tegra-aes.c b/drivers/crypto/tegra-aes.c index 37185e6630cd..19adf1c7faa2 100644 --- a/drivers/crypto/tegra-aes.c +++ b/drivers/crypto/tegra-aes.c @@ -674,8 +674,10 @@ static int tegra_aes_get_random(struct crypto_rng *tfm, u8 *rdata, mutex_lock(&aes_lock); ret = clk_prepare_en...
525fae21317658ae556ca850f3004319004641d1
Analyze and fix the following issue in the Linux kernel code: pinctrl: at91: fix typo on PULL_UP
Problem Details: Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Ludovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
```diff diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index 01bf92459fdc..f10fad2079c5 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++ b/drivers/pinctrl/pinctrl-at91.c @@ -58,7 +58,7 @@ static struct at91_gpio_chip *gpio_chips[MAX_GPIO_BANKS]; static int gpio_banks; -#define PULL_UP ...
26fd12209c08fe947be1828896ef4ffc5bd0e6df
Analyze and fix the following issue in the Linux kernel code: dmaengine: sirf: fix a typo in moving running dma_desc to active queue
Problem Details: list_move_tail(&schan->queued, &schan->active) makes the list_empty(schan->queued) undefined, we either should change it to: list_move_tail(schan->queued.next, &schan->active) or list_move_tail(&sdesc->node, &schan->active) Signed-off-by: Barry Song <Baohua.Song@csr.com> Cc: stable <stable@vger.kernel...
```diff diff --git a/drivers/dma/sirf-dma.c b/drivers/dma/sirf-dma.c index 649fd6c965eb..d451caace806 100644 --- a/drivers/dma/sirf-dma.c +++ b/drivers/dma/sirf-dma.c @@ -109,7 +109,7 @@ static void sirfsoc_dma_execute(struct sirfsoc_dma_chan *schan) sdesc = list_first_entry(&schan->queued, struct sirfsoc_dma_desc, ...
5997e089e4c3a7f0958a8fb0a54ec2b5a6f06168
Analyze and fix the following issue in the Linux kernel code: dmaengine: sirf: fix a typo in dma_prep_interleaved
Problem Details: either DEV_TO_MEM or MEM_TO_DEV is supported, so change OR to AND. Signed-off-by: Barry Song <Baohua.Song@csr.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
```diff diff --git a/drivers/dma/sirf-dma.c b/drivers/dma/sirf-dma.c index 64385cde044b..649fd6c965eb 100644 --- a/drivers/dma/sirf-dma.c +++ b/drivers/dma/sirf-dma.c @@ -428,7 +428,7 @@ static struct dma_async_tx_descriptor *sirfsoc_dma_prep_interleaved( unsigned long iflags; int ret; - if ((xt->dir != DMA_MEM_T...
94777fc51b3ad85ff9f705ddf7cdd0eb3bbad5a6
Analyze and fix the following issue in the Linux kernel code: x86/irq/ioapic: Check for valid irq_cfg pointer in smp_irq_move_cleanup_interrupt
Problem Details: Posting this patch to fix an issue concerning sparse irq's that I raised a while back. There was discussion about adding refcounting to sparse irqs (to fix other potential race conditions), but that does not appear to have been addressed yet. This covers the only issue of this type that I've encounte...
```diff diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index c265593ec2cd..1817fa911024 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -2257,6 +2257,9 @@ asmlinkage void smp_irq_move_cleanup_interrupt(void) continue; cfg = irq_cfg(irq); + if (...
3e8fa263a97079c74880675c451587bb6899e661
Analyze and fix the following issue in the Linux kernel code: x86/efi: Fix oops caused by incorrect set_memory_uc() usage
Problem Details: Calling __pa() with an ioremap'd address is invalid. If we encounter an efi_memory_desc_t without EFI_MEMORY_WB set in ->attribute we currently call set_memory_uc(), which in turn calls __pa() on a potentially ioremap'd address. On CONFIG_X86_32 this results in the following oops: BUG: unable to ha...
```diff diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h index c9dcc181d4d1..36ff332da130 100644 --- a/arch/x86/include/asm/efi.h +++ b/arch/x86/include/asm/efi.h @@ -35,7 +35,7 @@ extern unsigned long asmlinkage efi_call_phys(void *, ...); #define efi_call_virt6(f, a1, a2, a3, a4, a5, a6) \ efi_...
d638108484d186bf97a838d037f165d9b404e6ee
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix extent buffer reference for tree mod log roots
Problem Details: In get_old_root we grab a lock on the extent buffer before we obtain a reference on that buffer. That order is changed now. Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
```diff diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index ef68c33eefd9..f6739903d072 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -1279,6 +1279,7 @@ get_old_root(struct btrfs_root *root, u64 time_seq) if (!eb) return NULL; + extent_buffer_get(eb); btrfs_tree_read_lock(eb); if (old_root) { ...
e4074b3049f99c6ad6e1a33e6d93d8ec0652e2c1
Analyze and fix the following issue in the Linux kernel code: perf/x86: Enable overflow on Intel KNC with a custom knc_pmu_handle_irq()
Problem Details: Although based on the Intel P6 design, the interrupt mechnanism for KNC more closely resembles the Intel architectural perfmon one. We can't just re-use that code though, because KNC has different MSR numbers for the status and ack registers. In this case we just cut-and paste from perf_event_intel.c...
```diff diff --git a/arch/x86/kernel/cpu/perf_event_knc.c b/arch/x86/kernel/cpu/perf_event_knc.c index f3a2af41552d..4b7731bf23a8 100644 --- a/arch/x86/kernel/cpu/perf_event_knc.c +++ b/arch/x86/kernel/cpu/perf_event_knc.c @@ -3,6 +3,8 @@ #include <linux/perf_event.h> #include <linux/types.h> +#include <asm/hardirq...
ae5ba47a990a18c869d66916fd72fb334c45cf91
Analyze and fix the following issue in the Linux kernel code: perf/x86: Make Intel KNC use full 40-bit width of counters
Problem Details: Early versions of Intel KNC chips have a bug where bits above 32 were not properly set. We worked around this by only using the bottom 32 bits (out of 40 that should be available). It turns out this workaround breaks overflow handling. The buggy silicon will in theory never be used in production sys...
```diff diff --git a/arch/x86/kernel/cpu/perf_event_knc.c b/arch/x86/kernel/cpu/perf_event_knc.c index 7c46bfdbc373..73bcfbdedd50 100644 --- a/arch/x86/kernel/cpu/perf_event_knc.c +++ b/arch/x86/kernel/cpu/perf_event_knc.c @@ -226,12 +226,11 @@ static __initconst struct x86_pmu knc_pmu = { .event_map = knc_pmu_event...
032c3851f51141e30de02ed0bc50a7743dfd776d
Analyze and fix the following issue in the Linux kernel code: perf/x86/uncore: Handle pci_read_config_dword() errors
Problem Details: This, beyond handling corner cases, also fixes some build warnings: arch/x86/kernel/cpu/perf_event_intel_uncore.c: In function ‘snbep_uncore_pci_disable_box’: arch/x86/kernel/cpu/perf_event_intel_uncore.c:124:9: warning: ‘config’ is used uninitialized in this function [-Wuninitialized] arch/x86/ker...
```diff diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c index 5df8d32ba91e..6f874771ee65 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c @@ -118,22 +118,24 @@ static void snbep_uncore_pci_disable_bo...
fc09e3672ed623f9c8e73ded3cbcd2cfcf304aac
Analyze and fix the following issue in the Linux kernel code: can: sja1000: fix/add miniPCIe/cPCI PC/104Plus PCI/104e PEAK-System boards
Problem Details: This patch adds the support for 4 new PCI boards based on the SJA1000 CAN controller, from PEAK-System Technik: . PCAN-miniPCIe (PCI-Express Mini slots, available as single or dual-channel) . PCAN-cPCI (CompactPCI format, available as single or dual-channel) . PCAN-PC/104-Plus (PC/104-Plus system, av....
```diff diff --git a/drivers/net/can/sja1000/peak_pci.c b/drivers/net/can/sja1000/peak_pci.c index f5b82aeb2540..6525dbcca4e3 100644 --- a/drivers/net/can/sja1000/peak_pci.c +++ b/drivers/net/can/sja1000/peak_pci.c @@ -30,9 +30,10 @@ #include "sja1000.h" -MODULE_AUTHOR("Wolfgang Grandegger <wg@grandegger.com>"); +...
876ee61aadf01aa0db981b5d249cbdd53dc28b5e
Analyze and fix the following issue in the Linux kernel code: x86-64: Fix page table accounting
Problem Details: Commit 20167d3421a089a1bf1bd680b150dc69c9506810 ("x86-64: Fix accounting in kernel_physical_mapping_init()") went a little too far by entirely removing the counting of pre-populated page tables: this should be done at boot time (to cover the page tables set up in early boot code), but shouldn't be done...
```diff diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 2b6b4a3c8beb..3baff255adac 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -386,7 +386,8 @@ phys_pte_init(pte_t *pte_page, unsigned long addr, unsigned long end, * these mappings are more intelligent. */ if (pte_val(*p...
171fe76877d3d8071a901e64eb63eeee6c7760a2
Analyze and fix the following issue in the Linux kernel code: ath6kl: Fix mapping uplink endpoint for AR6004
Problem Details: AR6004(UB134) firmware supports only LP Endpoint, So map all Access Categories to Low Priority endpoints. This fixes a WPA2 connection issue as the uplink(tx) endpoint is appropriately mapped in sync with the firmware. Tested-by: Ben Gray <ben.r.gray@gmail.com> Reported-by: Ben Gray <ben.r.gray@gmail....
```diff diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h index 95fc9b37e6a6..1778bd3c732e 100644 --- a/drivers/net/wireless/ath/ath6kl/core.h +++ b/drivers/net/wireless/ath/ath6kl/core.h @@ -151,6 +151,7 @@ struct ath6kl_fw_ie { enum ath6kl_hw_flags { ATH6KL_HW_64BIT_RATES...
7ac25eacc6766617edaac69d928f431a9983ccf2
Analyze and fix the following issue in the Linux kernel code: ath6kl: Fix inactivity timeout for AR6004
Problem Details: Currently AR6004 handles the inactivity timeout resolution in minutes rather than seconds. So parse the inactivity timeout to the firmware in minutes. For now we will cleanup the inactive station entries to the nearest converted minutes (ex: an inactive time of 70 seconds would take atleast 2 - 3 minu...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index 6d143e453f9e..bf5e7d519398 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -2760,6 +2760,7 @@ static int ath6kl_start_ap(struct wiphy *wiphy, str...
baec5c6d0b191a44977a5fca131b5215e1868341
Analyze and fix the following issue in the Linux kernel code: ath6kl: Fix random rx data corruption
Problem Details: The skb->tail pointer of rx buffers is not adjusted after skb->data pointer is aligned to 4-byte, this causes random rx data corruption. Signed-off-by: Jin Navy <nhjin@qca.qualcomm.com> Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.c...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c index cf4380d573c4..c4501a9f051c 100644 --- a/drivers/net/wireless/ath/ath6kl/txrx.c +++ b/drivers/net/wireless/ath/ath6kl/txrx.c @@ -894,8 +894,11 @@ void ath6kl_rx_refill(struct htc_target *target, enum htc_endpoint_i...
d54601b92fbde2a7021a844e1373ba8c778cc0a3
Analyze and fix the following issue in the Linux kernel code: ath6kl: Check for valid rate table index
Problem Details: There are 28 items defined in rate table array 'wmi_rate_tbl'. The rate table index (reply->rate_index) in ath6kl_wmi_bitrate_reply_rx() func is not checked for the valid max limit index before accessing rate table array. There may be some incidents to get memory crashes without safe max check. Fix thi...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c index 64b81fd554b3..f3aeebb2fd42 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.c +++ b/drivers/net/wireless/ath/ath6kl/wmi.c @@ -1174,6 +1174,9 @@ static int ath6kl_wmi_bitrate_reply_rx(struct wmi *wmi, u8 *datap, int ...
43a06b346d1350009c8f7eaa1a2a137395874ca0
Analyze and fix the following issue in the Linux kernel code: ath6kl: Avoid null ptr dereference while printing reg domain pair
Problem Details: Return value of ath6kl_get_regpair() is stored in 'regpair' in ath6kl_wmi_regdomain_event() func and it's directly accessed in the debug prints without checking for NULL value. There are situation to get NULL pointer as a return value from ath6kl_get_regpair() func. Fix this. Found this on code review...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c index 68b46bda498a..64b81fd554b3 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.c +++ b/drivers/net/wireless/ath/ath6kl/wmi.c @@ -936,8 +936,12 @@ static void ath6kl_wmi_regdomain_event(struct wmi *wmi, u8 *datap, int l...
58109df67aa073756eb5a2dc2ae068bc1bbcc125
Analyze and fix the following issue in the Linux kernel code: ath6kl: Fix reconnection issue after recovery
Problem Details: Disallowing any wmi commands while re-initializing the firmware results in connection failures after recovery is done in open/WEP mode. To fix this, clear WMI_READY, to make sure no wmi command is tried while fw is down. Remove ATH6KL_STATE_RECOVERY state check in ath6kl_control_tx() so that any config...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index c8b6be44fa20..530eede4f5e2 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -151,6 +151,10 @@ static bool __ath6kl_cfg80211_sscan_stop(struct ath6...
527f6570300980251e818e80865b437eefb4e5d3
Analyze and fix the following issue in the Linux kernel code: ath6kl: fix uninitialized variable in ath6kl_sdio_enable_scatter()
Problem Details: gcc 4.8 warns /backup/lsrc/git/linux-lto-2.6/drivers/net/wireless/ath/ath6kl/sdio.c: In function 'ath6kl_sdio_enable_scatter': /backup/lsrc/git/linux-lto-2.6/drivers/net/wireless/ath/ath6kl/sdio.c:748:16: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized] if (virt_scat...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c index a72a4d02a4c8..d111980d44c0 100644 --- a/drivers/net/wireless/ath/ath6kl/sdio.c +++ b/drivers/net/wireless/ath/ath6kl/sdio.c @@ -709,7 +709,7 @@ static int ath6kl_sdio_enable_scatter(struct ath6kl *ar) { struct ...
66ddcc39420f3c6d2356f7618fbed3dd61177cee
Analyze and fix the following issue in the Linux kernel code: ath6kl: Make fw error recovery configurable
Problem Details: Add a modparam to configure recovery. Recovery from firmware error is disabled by default to debug the actual issue further. To recovery from error, modprobe ath6kl_core recovery_enable=1. Reported-by: Jin Navy <nhjin@qca.qualcomm.com> Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.co...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/core.c b/drivers/net/wireless/ath/ath6kl/core.c index fd5dd3aca771..4b46adbe8c92 100644 --- a/drivers/net/wireless/ath/ath6kl/core.c +++ b/drivers/net/wireless/ath/ath6kl/core.c @@ -33,6 +33,7 @@ static unsigned int wow_mode; static unsigned int uart_debug; static ...
9d9188409aef2f3bebd1956d2f15bc970efcea7b
Analyze and fix the following issue in the Linux kernel code: ath6kl: Fix bug in scheduling hb_timer
Problem Details: hb_timer should be scheduled only when hb_poll is non-zero. But in ath6kl_recovery_work() the timer is scheduled based on fw_recovery.enable instead which is wrong. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
```diff diff --git a/drivers/net/wireless/ath/ath6kl/recovery.c b/drivers/net/wireless/ath/ath6kl/recovery.c index 03edeb8c2ce3..c30df50b7ba4 100644 --- a/drivers/net/wireless/ath/ath6kl/recovery.c +++ b/drivers/net/wireless/ath/ath6kl/recovery.c @@ -34,7 +34,7 @@ static void ath6kl_recovery_work(struct work_struct *wo...
83685091acb878980711c3b28fe42e8959583e84
Analyze and fix the following issue in the Linux kernel code: ath6kl: fix link speed when using sgi
Problem Details: The MSB of rate index from FW is used for sgi. But the ath6kl_wmi_get_rate doesn't handle it. The access to wmi_rate_tbl array may be out of range if sgi is 1. This may cause the return value of ath6kl_wmi_get_rate() function is incorrect link rate. We add sgi adjustment to avoid such case. kvalo: cha...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c index e95b035168ad..cd2db42c0989 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.c +++ b/drivers/net/wireless/ath/ath6kl/wmi.c @@ -3263,10 +3263,21 @@ int ath6kl_wmi_set_regdomain_cmd(struct wmi *wmi, const char *alpha2)...
a3b3842c2e27ba07f8f7944a76013425d182c47b
Analyze and fix the following issue in the Linux kernel code: ath6kl: check usb_register() return value
Problem Details: ath6kl_usb_init() does not check usb_register() return value. As a result it may incorrectly report success of driver initialization. Found by Linux Driver Verification project (linuxtesting.org). kvalo: fix commit title and make cosmetic changes to the code to follow more the style used in the drive...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/usb.c b/drivers/net/wireless/ath/ath6kl/usb.c index 4aa97aa66114..a6d13775467f 100644 --- a/drivers/net/wireless/ath/ath6kl/usb.c +++ b/drivers/net/wireless/ath/ath6kl/usb.c @@ -1196,7 +1196,14 @@ static struct usb_driver ath6kl_usb_driver = { static int ath6kl_us...
8114f9b6d28686de02c3f83f0543665728b1a15b
Analyze and fix the following issue in the Linux kernel code: ath6kl: Fix potential memory leak in ath6kl_tx_complete()
Problem Details: We bail out from ath6kl_tx_complete() if any of the sanity checks on skb and ath6kl_cookie fails. By doing this we potentially leak few remaining buffers in packet_queue. Make sure to proceed processing the remaining buffers as well. This issue is found during code review. Reported-by: Wang yufeng <yu...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c index aab825152b19..740a488ef504 100644 --- a/drivers/net/wireless/ath/ath6kl/txrx.c +++ b/drivers/net/wireless/ath/ath6kl/txrx.c @@ -698,21 +698,26 @@ void ath6kl_tx_complete(struct htc_target *target, list_del(&pac...
0616dc1f2bef563d7916c0dcedbb1bff7d9bd80b
Analyze and fix the following issue in the Linux kernel code: ath6kl: Fix potential skb double free in ath6kl_wmi_sync_point()
Problem Details: skb given to ath6kl_control_tx() is owned by ath6kl_control_tx(). Calling function should not free the skb for error cases. This is found during code review. kvalo: fix a checkpatch warning in ath6kl_wmi_cmd_send() Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Ka...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c index 7dfa0fd86d7b..aab825152b19 100644 --- a/drivers/net/wireless/ath/ath6kl/txrx.c +++ b/drivers/net/wireless/ath/ath6kl/txrx.c @@ -288,8 +288,10 @@ int ath6kl_control_tx(void *devt, struct sk_buff *skb, int status ...
f21243a82253e34f64187aeb3d7f93fb7cb92536
Analyze and fix the following issue in the Linux kernel code: ath6kl: reconfigure RSN capabilities when restarting AP
Problem Details: If the firmware decides to initiate a channel switch on an AP vif running an RSN BSS, reconfigure the saved RSN IE capabilities as well. Fixes a bug where the beacon and 4-way handshake would have a capability mismatch after a channel switch, since the firmware apparently clears these on an AP disconn...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index e8b9c1e2a04c..75ddfafb11b7 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -2924,6 +2924,7 @@ static int ath6kl_start_ap(struct wiphy *wiphy, str...
fd4377b6bacc0f04bb1898f3ccab9510172a7561
Analyze and fix the following issue in the Linux kernel code: ath6kl: configure wow filters per-vif
Problem Details: Only WoW filters for the first vif were being set, causing failures to wake up on any concurrent connected vifs. Handle all per-vif suspend and resume tasks. Since cfg80211 issues user wow filters on a per-wiphy basis, set any custom filters on all connected vifs. Starting WoW in firmware and setting...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index f620af5e0dbb..e8b9c1e2a04c 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -2092,33 +2092,16 @@ static int ath6kl_cfg80211_host_sleep(struct ath6...
f8c0305383121817c77d400c788d82ca1a74582c
Analyze and fix the following issue in the Linux kernel code: ath6kl: fix incorrect use of IEEE80211_NUM_BANDS
Problem Details: ath6kl was incorrectly assuming that IEEE80211_NUM_BANDS will always be 2 and used that also in the firmware WMI interface definitions. But after the support for 60 GHz was added to cfg80211 IEEE80211_NUM_BANDS changed to 3 and this can cause all sort of problems, possibly even memory corruption. I onl...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c index cf91348fdbdb..d485a7c3428d 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.c +++ b/drivers/net/wireless/ath/ath6kl/wmi.c @@ -2695,11 +2695,13 @@ static int ath6kl_set_bitrate_mask64(struct wmi *wmi, u8 if_idx, { ...
4aca81bfb0b13b927320448c6e4820ffb95f095b
Analyze and fix the following issue in the Linux kernel code: ath6kl: Make use of return value from ath6kl_diag_read()
Problem Details: In ath6kl_read_fwlogs(), return value from ath6kl_diag_read()is not used to bail out in case of any errors in reading fw log. No real issue is observed because of this, reported by source code analyzer. kvalo: fix a long line warning Signed-off-by: Pandiyarajan Pitchaimuthu <c_ppitch@qca.qualcomm.com...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c index c189e28e86a9..6beffdee9a82 100644 --- a/drivers/net/wireless/ath/ath6kl/main.c +++ b/drivers/net/wireless/ath/ath6kl/main.c @@ -293,13 +293,17 @@ int ath6kl_read_fwlogs(struct ath6kl *ar) } address = TARG_VT...
3fded963cdae12ff891a55efc866437506c3f912
Analyze and fix the following issue in the Linux kernel code: perf tools: Fix PMU object alias initialization
Problem Details: The pmu_lookup should return pmus that do not expose the 'events' group attribute in sysfs. Also it should fail when any other error during 'events' lookup is hit (pmu_aliases fails). Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Cc: Paul Mackerras ...
```diff diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c index 8a2229da594f..18e84801d4d1 100644 --- a/tools/perf/util/pmu.c +++ b/tools/perf/util/pmu.c @@ -164,7 +164,7 @@ static int pmu_aliases(char *name, struct list_head *head) "%s/bus/event_source/devices/%s/events", sysfs, name); if (stat(path, ...
e09df47885d767e418902067ce1885aafa3b27db
Analyze and fix the following issue in the Linux kernel code: perf/x86: Update/fix generic events on P6 PMU
Problem Details: This patch updates the generic events on p6, including some new extended cache events. Values for these events were taken from the equivelant PAPI predefined events. Tested on a Pentium II. Signed-off-by: Vince Weaver <vincent.weaver@maine.edu> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> ...
```diff diff --git a/arch/x86/kernel/cpu/perf_event_p6.c b/arch/x86/kernel/cpu/perf_event_p6.c index 0ff5f7fb64cd..9582fcbcd8ec 100644 --- a/arch/x86/kernel/cpu/perf_event_p6.c +++ b/arch/x86/kernel/cpu/perf_event_p6.c @@ -8,13 +8,106 @@ */ static const u64 p6_perfmon_event_map[] = { - [PERF_COUNT_HW_CPU_CYCLES] ...
7991c9ca40d3127dd2ffa3a9c1e33f7d4005495a
Analyze and fix the following issue in the Linux kernel code: perf/x86: Fix P6 FP_ASSIST event constraint
Problem Details: According to Intel SDM Volume 3B, FP_ASSIST is limited to Counter 1 only, not Counter 0. Tested on a Pentium II. Signed-off-by: Vince Weaver <vincent.weaver@maine.edu> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/alpine.DEB.2.02.1210191728570.14552@vincent-wea...
```diff diff --git a/arch/x86/kernel/cpu/perf_event_p6.c b/arch/x86/kernel/cpu/perf_event_p6.c index e4dd0f7a0453..0ff5f7fb64cd 100644 --- a/arch/x86/kernel/cpu/perf_event_p6.c +++ b/arch/x86/kernel/cpu/perf_event_p6.c @@ -34,7 +34,7 @@ static struct event_constraint p6_event_constraints[] = { INTEL_EVENT_CONSTRAINT...
f269ae0469fc882332bdfb5db15d3c1315fe2a10
Analyze and fix the following issue in the Linux kernel code: sched: Update_cfs_shares at period edge
Problem Details: Now that our measurement intervals are small (~1ms) we can amortize the posting of update_shares() to be about each period overflow. This is a large cost saving for frequently switching tasks. Signed-off-by: Paul Turner <pjt@google.com> Reviewed-by: Ben Segall <bsegall@google.com> Signed-off-by: Pete...
```diff diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index dcc27d8ae6ba..002a7697f437 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -1187,6 +1187,7 @@ static void update_cfs_rq_blocked_load(struct cfs_rq *cfs_rq, int force_update) } __update_cfs_rq_tg_load_contrib(cfs_rq, force_update); ...
41b3996e3b6825bd3a0624d62fde53fbad092ed0
Analyze and fix the following issue in the Linux kernel code: GPIO: clps711x: Fix return value for gpio_clps711x_get
Problem Details: Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
```diff diff --git a/drivers/gpio/gpio-clps711x.c b/drivers/gpio/gpio-clps711x.c index ea21822b3de9..0753b3a9a34d 100644 --- a/drivers/gpio/gpio-clps711x.c +++ b/drivers/gpio/gpio-clps711x.c @@ -47,7 +47,7 @@ static void __iomem *clps711x_pdirs[] = { static int gpio_clps711x_get(struct gpio_chip *chip, unsigned offs...
6760bca9fd16256210f4922a3e9f067d2c7017d7
Analyze and fix the following issue in the Linux kernel code: perf, cpu hotplug: Run CPU_STARTING notifiers with irqs disabled
Problem Details: The CPU_STARTING notifiers are supposed to be run with irqs disabled. But the perf_cpu_notifier() macro invokes them without doing that. Fix it. Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: peterz@infradead.org Cc: ac...
```diff diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 2e902359aee5..06478056da03 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -803,10 +803,13 @@ static inline void perf_event_task_tick(void) { } do { \ static struct notifier_block fn##_nb __cpuin...
7b16bbf97375d9fb7fc107b3f80afeb94a204e44
Analyze and fix the following issue in the Linux kernel code: Revert "x86/mm: Fix the size calculation of mapping tables"
Problem Details: Commit: 722bc6b16771 x86/mm: Fix the size calculation of mapping tables Tried to address the issue that the first 2/4M should use 4k pages if PSE enabled, but extra counts should only be valid for x86_32. This commit caused a kdump regression: the kdump kernel hangs. Work is in progress to funda...
```diff diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index ab1f6a93b527..8653b3a722be 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c @@ -29,14 +29,8 @@ int direct_gbpages #endif ; -struct map_range { - unsigned long start; - unsigned long end; - unsigned page_size_mask; -}; - -static void __init f...
bffd5fc26043cce33158d4e027576e79fab2f7bb
Analyze and fix the following issue in the Linux kernel code: x86/perf: Fix virtualization sanity check
Problem Details: In check_hw_exists() we try to detect non-emulated MSR accesses by writing an arbitrary value into one of the PMU registers and check if it's value after a readout is still the same. This algorithm silently assumes that the register does not contain the magic value already, which is wrong in at least o...
```diff diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 3373f84d1397..4a3374e61a93 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c @@ -208,12 +208,14 @@ static bool check_hw_exists(void) } /* - * Now write a value and read it back to see...
bcee6e2a13d580f6c21d748fcd7239ccc66cb4b8
Analyze and fix the following issue in the Linux kernel code: mm/sl[au]b: Move print_slabinfo_header to slab_common.c
Problem Details: The header format is highly similar between slab and slub. The main difference lays in the fact that slab may optionally have statistics added here in case of CONFIG_SLAB_DEBUG, while the slub will stick them somewhere else. By making sure that information conditionally lives inside a globally-visible...
```diff diff --git a/mm/slab.c b/mm/slab.c index a6e045c13b8d..73811ca0ae29 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -4276,30 +4276,6 @@ out: } #ifdef CONFIG_SLABINFO - -void print_slabinfo_header(struct seq_file *m) -{ - /* - * Output format version, so at least we can change it - * without _too_ many complaint...
c31cba8af8c2fde418c146e3ead341d5053f3225
Analyze and fix the following issue in the Linux kernel code: OMAPDSS: DISPC: fix dispc_mgr_lclk_rate for DIGIT output
Problem Details: dispc_mgr_lclk_rate() cannot currently be called with DIGIT channel parameter, even if dispc_ovl_lclk_rate() can. Fix this by making dispc_mgr_lclk_rate() handle DIGIT channel also. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
```diff diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index 817d671e2baa..198e321d9cfd 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c @@ -3167,28 +3167,32 @@ unsigned long dispc_mgr_lclk_rate(enum omap_channel channel) unsigned long r; u32 l; - ...
3dd7ea922051e68854e016cfd2992226cfb5bb43
Analyze and fix the following issue in the Linux kernel code: ARM: dma-mapping: fix build warning in __dma_alloc()
Problem Details: Fix build warning in __dma_alloc() as below: arch/arm/mm/dma-mapping.c: In function '__dma_alloc': arch/arm/mm/dma-mapping.c:653:29: warning: 'page' may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprows...
```diff diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 477a2d23ddf1..58bc3e4d3bd0 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -610,7 +610,7 @@ static void *__dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp, pgprot_t prot, bool is_cohe...
c57d75c099e55500b620f50a207e61b9e20ecd29
Analyze and fix the following issue in the Linux kernel code: gpio: mvebu: correctly set the value in direction_output()
Problem Details: The ->direction_output() operation of gpio_chip is supposed to set the direction to output but also to set the GPIO to an initial value. Unfortunately, this last part was not done until now, causing for example the LEDs to not be properly set to their default initial value. This patch fixes this by cal...
```diff diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c index 902af437eaf2..1bb43e3f9a61 100644 --- a/drivers/gpio/gpio-mvebu.c +++ b/drivers/gpio/gpio-mvebu.c @@ -244,6 +244,8 @@ static int mvebu_gpio_direction_output(struct gpio_chip *chip, unsigned pin, if (ret) return ret; + mvebu_gpio_set...
5c092f41fdb636859a20f57372f8dd25633adbef
Analyze and fix the following issue in the Linux kernel code: staging: ced1401: fix a frame size warning
Problem Details: gcc/sparse complain about the following: drivers/staging/ced1401/ced_ioc.c:931:1: warning: the frame size of 4144 bytes is larger than 2048 bytes [-Wframe-larger-than=] Fix it by dynamically allocating it. Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <greg...
```diff diff --git a/drivers/staging/ced1401/ced_ioc.c b/drivers/staging/ced1401/ced_ioc.c index 5813aee6b348..0adba75be8b7 100644 --- a/drivers/staging/ced1401/ced_ioc.c +++ b/drivers/staging/ced1401/ced_ioc.c @@ -913,18 +913,24 @@ int GetTransfer(DEVICE_EXTENSION * pdx, TGET_TX_BLOCK __user * pTX) iReturn = U14ERR...
5ee60a7038c79d2276ae315ac6d6764391ed386f
Analyze and fix the following issue in the Linux kernel code: staging: "winbond" Fix typos.
Problem Details: Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/winbond/mds.c b/drivers/staging/winbond/mds.c index 1b8b8ace39e0..43990e87d641 100644 --- a/drivers/staging/winbond/mds.c +++ b/drivers/staging/winbond/mds.c @@ -315,7 +315,7 @@ static void Mds_HeaderCopy(struct wbsoft_priv *adapter, struct wb35_descriptor * pT00->T00_tx_packet_...
56c645ff7f1d57781a2231071be858cba5107678
Analyze and fix the following issue in the Linux kernel code: staging: comedi: ni_660x: cleanup ni_660x_dio_insn_config()
Problem Details: This function handles all the insn_config instructions for the digital i/o subdevice. These functions are supposed to return the number of instruction parameters used (insn->n) or an -errno. Fix the switch() so that the correct result is returned for all INSN_CONFIG_* cases. To clarify the code, add a...
```diff diff --git a/drivers/staging/comedi/drivers/ni_660x.c b/drivers/staging/comedi/drivers/ni_660x.c index 360d873e57ef..318057546485 100644 --- a/drivers/staging/comedi/drivers/ni_660x.c +++ b/drivers/staging/comedi/drivers/ni_660x.c @@ -1116,49 +1116,54 @@ static int ni_660x_set_pfi_routing(struct comedi_device *...
0608882d01671983be20097e3ffd6be20c9a7724
Analyze and fix the following issue in the Linux kernel code: staging: slicoss: return -ENOMEM if kzalloc fail
Problem Details: this takes up the error path cleanup, fixes a crash too due to null deref Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index 945428084914..f6af3fe46c5e 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -3667,6 +3667,8 @@ static u32 slic_card_locate(struct adapter *adapter) if (!physcard) { /* no struct...
05b371964049be1f15dec46caa63f106dd22d20d
Analyze and fix the following issue in the Linux kernel code: Staging: bcm: InterfaceIdleMode.h: Checkpatch fixes
Problem Details: This fixes the following checkpatch issues: WARNING: line over 80 characters +INT InterfaceIdleModeRespond(struct bcm_mini_adapter *Adapter, unsigned int *puiBuffer); ERROR: "foo * bar" should be "foo *bar" +INT InterfaceWakeUp(struct bcm_mini_adapter * Adapter); Signed-off-by: Ceri James <jamesceri...
```diff diff --git a/drivers/staging/bcm/InterfaceIdleMode.h b/drivers/staging/bcm/InterfaceIdleMode.h index c3338c8a1dc8..2ef64003aa89 100644 --- a/drivers/staging/bcm/InterfaceIdleMode.h +++ b/drivers/staging/bcm/InterfaceIdleMode.h @@ -3,11 +3,12 @@ INT InterfaceIdleModeWakeup(struct bcm_mini_adapter *Adapter); ...
89babccccb575e5ca67757c874a62f2c67e1365c
Analyze and fix the following issue in the Linux kernel code: Staging: bcm: LeakyBucket.c: Checkpatch fixes
Problem Details: This fixes the following checkpatch issues: WARNING: line over 80 characters + BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TOKEN_COUNTS, DBG_LVL_ALL, "=====>\n"); ERROR: space required after that ',' (ctx:VxV) + BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TOKEN_COUNTS, DBG_LVL_ALL, "=====>\n"); ...
```diff diff --git a/drivers/staging/bcm/LeakyBucket.c b/drivers/staging/bcm/LeakyBucket.c index 6e8a3279698b..877cf0b2bee1 100644 --- a/drivers/staging/bcm/LeakyBucket.c +++ b/drivers/staging/bcm/LeakyBucket.c @@ -21,10 +21,12 @@ static VOID UpdateTokenCount(register struct bcm_mini_adapter *Adapter) INT i = 0; s...
720dfd250e48a8c7fd1b2b8645955413989c4ee0
Analyze and fix the following issue in the Linux kernel code: dmaengine: imx-dma: fix missing unlock on error in imxdma_xfer_desc()
Problem Details: Add the missing unlock on the error handling path in function imxdma_xfer_desc(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Cc: stable <stable@vger.kernel.org> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
```diff diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c index f11b5b2b1a1c..7d9554cc4976 100644 --- a/drivers/dma/imx-dma.c +++ b/drivers/dma/imx-dma.c @@ -474,8 +474,10 @@ static int imxdma_xfer_desc(struct imxdma_desc *d) slot = i; break; } - if (slot < 0) + if (slot < 0) { + spin_unlock_irq...
036546bf950b7916dcc051eb0d450e23028b487a
Analyze and fix the following issue in the Linux kernel code: usb hub: use flush_work instead of flush_work_sync
Problem Details: flush_work_sync and flush_work are now the same and flush_work_sync has been deprecated. This fixes the following warning: drivers/usb/core/hub.c: In function hub_quiesce: drivers/usb/core/hub.c:1216:3: warning: flush_work_sync is deprecated (declared at include/linux/workqueue.h:448) [-Wdeprecated-de...
```diff diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 1181e917fec7..1af04bdeaf0c 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -1213,7 +1213,7 @@ static void hub_quiesce(struct usb_hub *hub, enum hub_quiescing_type type) if (hub->has_indicators) cancel_delayed_work_sync(&...
983e4b3566d73e8532b172a12608b2bebc68e5c4
Analyze and fix the following issue in the Linux kernel code: staging: et131x: Fix i386 build warnings from use of dma_addr_t
Problem Details: dma_addr_t can be of size 64 or 32bits, depending on the architecture. This fixes these build warnings for ARCH=i386, and also tested on x86_64: drivers/staging/et131x/et131x.c: In function ‘et131x_rx_dma_memory_alloc’: drivers/staging/et131x/et131x.c:2356:11: warning: passing argument 2 of ‘et131x_a...
```diff diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index c33cafd5c117..70fe33b57817 100644 --- a/drivers/staging/et131x/et131x.c +++ b/drivers/staging/et131x/et131x.c @@ -292,10 +292,10 @@ struct fbr_lookup { dma_addr_t ring_physaddr; void *mem_virtaddrs[MAX_DESC_PER_RING_RX / ...
ea5a5c73a278b24f05022b6f073bf5d196a2b271
Analyze and fix the following issue in the Linux kernel code: Bluetooth: trivial: Remove newline before EOF
Problem Details: Trivial fix. Signed-off-by: Syam Sidhardhan <s.syam@samsung.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
```diff diff --git a/net/bluetooth/Kconfig b/net/bluetooth/Kconfig index 1c11d0dcd863..d3f3f7b1d32c 100644 --- a/net/bluetooth/Kconfig +++ b/net/bluetooth/Kconfig @@ -48,4 +48,3 @@ source "net/bluetooth/cmtp/Kconfig" source "net/bluetooth/hidp/Kconfig" source "drivers/bluetooth/Kconfig" - ```
3185bd26188223195dc2e659a3d00219cad71a0f
Analyze and fix the following issue in the Linux kernel code: alpha: separate thread-synchronous flags
Problem Details: ... and fix the race in updating unaligned control ones Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/arch/alpha/include/asm/thread_info.h b/arch/alpha/include/asm/thread_info.h index 4554ecbff7c6..1f8c72959fb6 100644 --- a/arch/alpha/include/asm/thread_info.h +++ b/arch/alpha/include/asm/thread_info.h @@ -7,6 +7,7 @@ #include <asm/processor.h> #include <asm/types.h> #include <asm/hwrpb.h> +#inc...
5909cf30f380d13bb59e81e4cb17c3714cb94e68
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Remove unnecessary intermediate function
Problem Details: Resolves a conflict resolution issue in "Bluetooth: Fix L2CAP coding style". The remaining connect and create channel response handler is renamed to better reflect its use for both response types. Signed-off-by: Mat Martineau <mathewm@codeaurora.org> Acked-by: Marcel Holtmann <marcel@holtmann.org> Ac...
```diff diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 2b3eef706899..31750945298b 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -3538,7 +3538,7 @@ static int l2cap_connect_req(struct l2cap_conn *conn, return 0; } -static inline int l2cap_connect_rsp(struct ...
12ac7f9e117facfe128d6e569953fa73d2d676b3
Analyze and fix the following issue in the Linux kernel code: ARM: AM33XX: Fix configuration of dmtimer parent clock by dmtimer driverDate:Wed, 17 Oct 2012 13:55:55 -0500
Problem Details: Add dmtimer clock aliases for AM33XX devices so that the parent clock for the dmtimer can be set correctly by the dmtimer driver. Without these clock aliases the dmtimer driver will fail to find the parent clocks for the dmtimer. Verified that DMTIMERs can be successfully requested on AM335x beagle bo...
```diff diff --git a/arch/arm/mach-omap2/clock33xx_data.c b/arch/arm/mach-omap2/clock33xx_data.c index 114ab4b8e0e3..1a45d6bd2539 100644 --- a/arch/arm/mach-omap2/clock33xx_data.c +++ b/arch/arm/mach-omap2/clock33xx_data.c @@ -1073,6 +1073,8 @@ static struct omap_clk am33xx_clks[] = { CLK(NULL, "gfx_fck_div_ck", &gfx...
16b45fdf9c4e82f5d3bc53aa70737650e7c8d5ed
Analyze and fix the following issue in the Linux kernel code: xhci: fix integer overflow
Problem Details: xhci_service_interval_to_ns() returns long long to avoid an overflow. However, the type cast happens too late. The fix is to force ULL from the beginning. This patch should be backported to kernels as old as 3.5, that contain the commit e3567d2c15a7a8e2f992a5f7c7683453ca406d82 "xhci: Add Intel U1/U2 t...
```diff diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 8d3c454dad76..9ec939646b42 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -4021,7 +4021,7 @@ int xhci_update_device(struct usb_hcd *hcd, struct usb_device *udev) static unsigned long long xhci_service_interval_to_ns( ...
340f588bbaed6cb518aa65e7a330dcc3fff911f8
Analyze and fix the following issue in the Linux kernel code: rcu: Fix precedence error in cpu_needs_another_gp()
Problem Details: The fix introduced by a10d206e (rcu: Fix day-one dyntick-idle stall-warning bug) has a C-language precedence error. It turns out that this error is harmless in that the same result is computed for all inputs, but the code is nevertheless a potential source of confusion. This commit therefore introduce...
```diff diff --git a/kernel/rcutree.c b/kernel/rcutree.c index f9c17c399538..effd47a54b36 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c @@ -313,7 +313,7 @@ static int cpu_needs_another_gp(struct rcu_state *rsp, struct rcu_data *rdp) { return *rdp->nxttail[RCU_DONE_TAIL + - ACCESS_ONCE(rsp->completed) ...
abfd6e58aed4f89fd69b9b17bc4b4527efe3a645
Analyze and fix the following issue in the Linux kernel code: rcu: Fix comment about _rcu_barrier()/orphanage exclusion
Problem Details: In the old days, _rcu_barrier() acquired ->onofflock to exclude rcu_send_cbs_to_orphanage(), which allowed the latter to avoid memory barriers in callback handling. However, _rcu_barrier() recently started doing get_online_cpus() to lock out CPU-hotplug operations entirely, which means that the commen...
```diff diff --git a/kernel/rcutree.c b/kernel/rcutree.c index 74df86bd9204..ac8aed8ee417 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c @@ -1581,8 +1581,8 @@ rcu_send_cbs_to_orphanage(int cpu, struct rcu_state *rsp, { /* * Orphan the callbacks. First adjust the counts. This is safe - * because ->onofflo...
f191eec58803e1e16c3421638cdcc9195c425851
Analyze and fix the following issue in the Linux kernel code: Documentation: Fix memory-barriers.txt example
Problem Details: This commit fixes a broken example of overlapping stores in the Documentation/memory-barriers.txt file. Reported-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
```diff diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt index 2759f7c188f0..3c4e1b3b80a1 100644 --- a/Documentation/memory-barriers.txt +++ b/Documentation/memory-barriers.txt @@ -251,12 +251,13 @@ And there are a number of things that _must_ or _must_not_ be assumed: And for:...
9e13db806e07ae9fdb1c2135fc60ea09fcbf3f3c
Analyze and fix the following issue in the Linux kernel code: ALSA: ice1712: Fix build errors
Problem Details: Fix build errors by using correct kconfig symbol name: sound/pci/ice1712/psc724.c:417:5: error: 'struct snd_ice1712' has no member named 'pm_resume' sound/pci/ice1712/psc724.c:418:5: error: 'struct snd_ice1712' has no member named 'pm_suspend_enabled' [Fixed another #ifdef CONFIG_PM in the same file,...
```diff diff --git a/sound/pci/ice1712/psc724.c b/sound/pci/ice1712/psc724.c index 457cbaab0c6e..0b6c4e69b8d0 100644 --- a/sound/pci/ice1712/psc724.c +++ b/sound/pci/ice1712/psc724.c @@ -382,7 +382,7 @@ static void psc724_set_pro_rate(struct snd_ice1712 *ice, unsigned int rate) /* power management */ -#ifdef CONFI...
82ed61fa1a4e08d5f9e86fb1b715b50ed678b6ac
Analyze and fix the following issue in the Linux kernel code: drm/i915: make edp panel power sequence setup more robust
Problem Details: 3 changes: - If a given value is unset, use the maximal limits from the eDP spec. - Write back the new values, since otherwise the panel power sequencing hw will not dtrt. - Revert the early bail-out in case the register values are unset. The last change reverts commit bfa3384a9a84aaaa59443bbd776c1...
```diff diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 2a48e47f289d..c7c4b96c6650 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -4010,6 +4010,11 @@ #define PANEL_LIGHT_ON_DELAY_SHIFT 0 #define PCH_PP_OFF_DELAYS 0xc720c +#define PANEL_PO...
068b054fde5cc0516717b4ec4d58d0659e1ca43b
Analyze and fix the following issue in the Linux kernel code: USB: OHCI: sm501: fix build failure after ohci_finish_controller_resume removal
Problem Details: Commit cfa49b4b (USB: ohci: merge ohci_finish_controller_resume with ohci_resume) merged ohci_finish_controller_resume with ohci_resume but forgot to update the ohci-sm501 driver accordingly, thus causing the folllowing build failure: drivers/usb/host/ohci-sm501.c: In function 'ohci_sm501_resume': dri...
```diff diff --git a/drivers/usb/host/ohci-sm501.c b/drivers/usb/host/ohci-sm501.c index 5596ac2ba1ca..3b5b908fd47b 100644 --- a/drivers/usb/host/ohci-sm501.c +++ b/drivers/usb/host/ohci-sm501.c @@ -238,7 +238,7 @@ static int ohci_sm501_resume(struct platform_device *pdev) ohci->next_statechange = jiffies; sm501_...
b3ce5ae1fb6ba45c70e7c4d144182d38f0b0aef7
Analyze and fix the following issue in the Linux kernel code: ipv6: fix sparse warnings in rt6_info_hash_nhsfn()
Problem Details: Adding by commit 51ebd3181572 which adds the support of ECMP for IPv6. Spotted-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 126da562d3eb..c42650cf8d4d 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -397,32 +397,32 @@ static int rt6_info_hash_nhsfn(unsigned int candidate_count, { unsigned int val = fl6->flowi6_proto; - val ^= fl6->daddr.s6_addr32[0]; - val ^= fl6->d...
be7164467372a829e5730696b7162b10bc4c8403
Analyze and fix the following issue in the Linux kernel code: be2net: Fix smatch warnings in be_main.c
Problem Details: FW flashing code, even though it works correctly, makes some hidden assumptions about buffer sizes. This is causing code analysers to report error. Cleanup FW flashing code to remove these hidden assumptions. Reported-by: Yuanhan Liu <yuanhan.liu@intel.com> Signed-off-by: Vasundhara Volam <vasundhara....
```diff diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c index 8d35750eace8..7ea1ea4ff242 100644 --- a/drivers/net/ethernet/emulex/benet/be_cmds.c +++ b/drivers/net/ethernet/emulex/benet/be_cmds.c @@ -2160,7 +2160,7 @@ int be_cmd_get_flash_crc(struct be_adapter *ada...
3cf164c8dee834cef9dac4e7325f89a207339ac8
Analyze and fix the following issue in the Linux kernel code: mlx4_core: Remove annoying debug messages from SR-IOV flow
Problem Details: These debug prints left behind by commits c82e9aa0a8bc ("mlx4_core: resource tracking for HCA resources used by guests"), 54679e148287 ("mlx4: Implement QP paravirtualization and maintain phys_pkey_cache for smp_snoop") and 993c401e2079 ("mlx4_core: Add IB port-state machine and port mgmt event propaga...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx4/eq.c b/drivers/net/ethernet/mellanox/mlx4/eq.c index 51c764901ad2..194221b75b90 100644 --- a/drivers/net/ethernet/mellanox/mlx4/eq.c +++ b/drivers/net/ethernet/mellanox/mlx4/eq.c @@ -329,9 +329,6 @@ int set_and_calc_slave_port_state(struct mlx4_dev *dev, int slave...
08eda32b13c045b6219464764d6028d86d3c58a8
Analyze and fix the following issue in the Linux kernel code: drm/radeon: fix header size estimation in VM code
Problem Details: Only NI uses 3dw headers, SI uses 4dw headers. Signed-off-by: Christian König <deathsimple@vodafone.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c index 926dc9db644f..e9e8953e74a8 100644 --- a/drivers/gpu/drm/radeon/radeon_gart.c +++ b/drivers/gpu/drm/radeon/radeon_gart.c @@ -1147,17 +1147,17 @@ int radeon_vm_bo_update_pte(struct radeon_device *rdev, if (RADEON_VM...
d7025d893897da3e2c26943c57e40d2296146f82
Analyze and fix the following issue in the Linux kernel code: drm/radeon: fix si_set_page v2
Problem Details: Handle requests that won't fit into a single packet. v2: pe needs to increase as well. Signed-off-by: Christian König <deathsimple@vodafone.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c index da184de021bd..b0db712060fb 100644 --- a/drivers/gpu/drm/radeon/si.c +++ b/drivers/gpu/drm/radeon/si.c @@ -2808,26 +2808,31 @@ void si_vm_set_page(struct radeon_device *rdev, uint64_t pe, { struct radeon_ring *ring = &rdev->ring[rdev...
f9fdffa51dff6744726507c641d8151fadbc7cd7
Analyze and fix the following issue in the Linux kernel code: drm/radeon: fix cayman_vm_set_page v2
Problem Details: Handle requests that won't fit into a single packet. v2: pe needs to increase as well. Signed-off-by: Christian König <deathsimple@vodafone.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c index 19b7fe1248be..81e6a568c29d 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c @@ -1538,26 +1538,31 @@ void cayman_vm_set_page(struct radeon_device *rdev, uint64_t pe, { struct radeon_ring *ring = &rdev->ring[...
58f8cf56f937840aa3c1416eed29f595159c60a3
Analyze and fix the following issue in the Linux kernel code: drm/radeon: fix PFP sync in vm_flush
Problem Details: Otherwise the next IB might start reading commands with the page table still invalid. Signed-off-by: Christian König <deathsimple@vodafone.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c index 8c74c729586d..19b7fe1248be 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c @@ -1586,4 +1586,8 @@ void cayman_vm_flush(struct radeon_device *rdev, int ridx, struct radeon_vm *vm) /* bits 0-7 are the VM conte...
614499b4d844dcceae5ae2f1e53a2963789a8933
Analyze and fix the following issue in the Linux kernel code: drm/radeon: give each backlight a unique id
Problem Details: In cases where we have multiple radeons with backlight controls. Should fix: https://bugzilla.kernel.org/show_bug.cgi?id=48941 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c index 49cbb3795a10..ba498f8e47a2 100644 --- a/drivers/gpu/drm/radeon/atombios_encoders.c +++ b/drivers/gpu/drm/radeon/atombios_encoders.c @@ -184,6 +184,7 @@ void radeon_atom_backlight_init(struct radeon_encoder...
1518d7fb5d42aec6ec7349b3be8712af132b46fa
Analyze and fix the following issue in the Linux kernel code: drm/radeon: fix sparse warning
Problem Details: Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c index a7677dd1ce98..4f6b09e78159 100644 --- a/drivers/gpu/drm/radeon/radeon_gart.c +++ b/drivers/gpu/drm/radeon/radeon_gart.c @@ -577,7 +577,7 @@ void radeon_vm_manager_fini(struct radeon_device *rdev) * * Global and lo...
5d890f591d15d1161131546c2af371178c967734
Analyze and fix the following issue in the Linux kernel code: ALSA: hda: support for wallclock timestamps
Problem Details: Reuse code from clocksource to handle wall clock counter. Since wrapparound occurs, the audio timestamp is reinitialized to zero on a trigger. Synchronized linked devices will start counting from same reference to avoid any drift. Max buffer time is limited to 178 seconds to make sure wall clock count...
```diff diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 8fd250d8ed77..d96a14e1fa95 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -47,6 +47,9 @@ #include <linux/reboot.h> #include <linux/io.h> #include <linux/pm_runtime.h> +#include <linux/clocksource.h> +#include ...
2b88ff4a75f2175902389e3356d6227d7030e382
Analyze and fix the following issue in the Linux kernel code: gpio: samsung: Fix input mode setting function for GPIO int
Problem Details: This patch makes GPIO pin to INTERRUPT mode or INPUT mode according to bitmap_gpio_int. When the related bit of bitmap_gpio_int is set, it makes GPIO pin to INTERRUPT mode instrad of INPUT mode in the samsung_gpiolib_4bit_input function. Signed-off-by: Eunki Kim <eunki_kim@samsung.com> Acked-by: Linus...
```diff diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c index a006f0db15af..15be3d9aebe9 100644 --- a/drivers/gpio/gpio-samsung.c +++ b/drivers/gpio/gpio-samsung.c @@ -596,7 +596,10 @@ static int samsung_gpiolib_4bit_input(struct gpio_chip *chip, unsigned long con; con = __raw_readl(base + ...
ba1bfbd592c1adddd5d0005f587a6e308e25c949
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix a tree mod logging issue for root replacement operations
Problem Details: Avoid the implicit free by tree_mod_log_set_root_pointer, which is wrong in two places. Where needed, we call tree_mod_log_free_eb explicitly now. Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
```diff diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 44a7e25353a6..e6b75ccd2850 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -647,8 +647,6 @@ tree_mod_log_insert_root(struct btrfs_fs_info *fs_info, if (tree_mod_dont_log(fs_info, NULL)) return 0; - __tree_mod_log_free_eb(fs_info, old_root); -...
213d27a42ce1646989966011d2af8563feac5635
Analyze and fix the following issue in the Linux kernel code: spi/pl022: Revert recent runtime PM changes
Problem Details: [Originally sent by Ulf as two changes, squashed down into one with a redone changelog, thanks to Russell King for analysis. -- broonie] This reverts commit 688723 (spi/pl022: enable runtime PM) and commit 2fb30d (spi/pl022: fix spi-pl022 pm enable at probe). Commit "spi/pl022: enable runtime PM" int...
```diff diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c index 919464102d33..a1db91a99b89 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c @@ -2186,8 +2186,6 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id) printk(KERN_INFO "pl022: mapped registers from 0x%08x to %p\n...
871ae57adc5ed092c1341f411514d0e8482e2611
Analyze and fix the following issue in the Linux kernel code: ARM: dma-mapping: support debug_dma_mapping_error
Problem Details: Without the patch, kind of below warning will be dumped if DMA-API debug is enabled: [ 11.069763] ------------[ cut here ]------------ [ 11.074645] WARNING: at lib/dma-debug.c:948 check_unmap+0x770/0x860() [ 11.081420] ehci-omap ehci-omap.0: DMA-API: device driver failed to check map error[devic...
```diff diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index 23004847bb05..78d8e9b5544f 100644 --- a/arch/arm/include/asm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h @@ -91,6 +91,7 @@ static inline dma_addr_t virt_to_dma(struct device *dev, void *addr) */ static inlin...
5e97f3f918c27c68c092bdca7917266615aec62f
Analyze and fix the following issue in the Linux kernel code: drivers: cma: Fix wrong CMA selected region size default value
Problem Details: Kconfig lists CMA_SIZE_SEL_ABSOLUTE as the default value fo the CMA selected region size, but that option isn't available in the defined choices. Set the default to CMA_SIZE_SEL_MBYTES instead. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Marek Szyprowski <m.szypr...
```diff diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig index 08b4c5209384..b34b5cda5ae1 100644 --- a/drivers/base/Kconfig +++ b/drivers/base/Kconfig @@ -236,7 +236,7 @@ config CMA_SIZE_PERCENTAGE choice prompt "Selected region size" - default CMA_SIZE_SEL_ABSOLUTE + default CMA_SIZE_SEL_MBYTES config ...
ba4d93bc9ea4510a145161f0af3537b4f380af01
Analyze and fix the following issue in the Linux kernel code: drivers: dma-coherent: Fix typo in dma_mmap_from_coherent documentation
Problem Details: The function documentation incorrectly references dma_release_coherent. Fix it. Don't mention a specific function name as dma_mmap_from_coherent as multiple callers. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
```diff diff --git a/drivers/base/dma-coherent.c b/drivers/base/dma-coherent.c index 560a7173f810..bc256b641027 100644 --- a/drivers/base/dma-coherent.c +++ b/drivers/base/dma-coherent.c @@ -191,9 +191,8 @@ EXPORT_SYMBOL(dma_release_from_coherent); * This checks whether the memory was allocated from the per-device ...
7f6658ef35a470cd641ea35a1da409c4bc5bae1e
Analyze and fix the following issue in the Linux kernel code: drm/i915: VGA needs to be on pipe A on i830M
Problem Details: The bit doesn't stick, and the output is always cloned from pipe A, even when it's supposed to scan out from pipe B. Shuts up annoying warnings from the modeset-rework, too. I've noticed that with this patch we know get and unknown connection state since the code can't find a suitable pipe for load d...
```diff diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c index f78061af7045..b726b478a4f5 100644 --- a/drivers/gpu/drm/i915/intel_crt.c +++ b/drivers/gpu/drm/i915/intel_crt.c @@ -729,7 +729,7 @@ void intel_crt_init(struct drm_device *dev) crt->base.type = INTEL_OUTPUT_ANALOG; crt->...
a9193983f4f292a82a00c72971c17ec0ee8c6c15
Analyze and fix the following issue in the Linux kernel code: drm/i915: fix overlay on i830M
Problem Details: The overlay on the i830M has a peculiar failure mode: It works the first time around after boot-up, but consistenly hangs the second time it's used. Chris Wilson has dug out a nice errata: "1.5.12 Clock Gating Disable for Display Register Address Offset: 06200h–06203h "Bit 3 Ovrunit Clock Gating Dis...
```diff diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c index 495625914e4a..d7bc817f51a0 100644 --- a/drivers/gpu/drm/i915/intel_overlay.c +++ b/drivers/gpu/drm/i915/intel_overlay.c @@ -341,9 +341,17 @@ static int intel_overlay_off(struct intel_overlay *overlay) intel_ring_emi...
b4dd784ba8af03bf1f9ee5118c792d7abd4919bd
Analyze and fix the following issue in the Linux kernel code: pinctrl: fix missing unlock on error in pinctrl_groups_show()
Problem Details: Add the missing unlock on the error handle path in function pinctrl_groups_show(). Cc: stable@kernel.org Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
```diff diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 0f1ec9e8ff14..2e39c04fc16b 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -1061,8 +1061,10 @@ static int pinctrl_groups_show(struct seq_file *s, void *what) seq_printf(s, "group: %s\n", gname); for (i = 0; i < num_pi...
55fdd45bcf02565b8764c0e036fa752c1f854966
Analyze and fix the following issue in the Linux kernel code: ixgbevf: fix softirq-safe to unsafe splat on internal mbx_lock
Problem Details: The lockdep splat below identifies a case where irq safe to unsafe lock order is detected. Resolved by making mbx_lock bh. ====================================================== [ INFO: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected ] 3.6.0-rc5jk-net-next+ #119 Not tainted ------------------------...
```diff diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c index 805e02cf74aa..846ac5193584 100644 --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c @@ -1138,12 +1138,12 @@ static int ixgbevf_vl...
59f301046b276f87483b3afa3201a4273def06a9
Analyze and fix the following issue in the Linux kernel code: igb: Update get cable length function for i210/i211
Problem Details: There was a problem in the initial implementation of the get cable length function for i210 and it did not work properly. This patch fixes that problem for i210/i211 devices. Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jef...
```diff diff --git a/drivers/net/ethernet/intel/igb/e1000_phy.c b/drivers/net/ethernet/intel/igb/e1000_phy.c index 3404bc79f4ca..c62a4c388194 100644 --- a/drivers/net/ethernet/intel/igb/e1000_phy.c +++ b/drivers/net/ethernet/intel/igb/e1000_phy.c @@ -1710,6 +1710,26 @@ s32 igb_get_cable_length_m88_gen2(struct e1000_hw ...
68b25325a7fd290b5e472bba0df9cbe8c1a81d8f
Analyze and fix the following issue in the Linux kernel code: ARM: imx: select HAVE_IMX_SRC when SMP is enabled
Problem Details: With being part of multi-platform support, SMP can be enabled by other platform even when SOC_IMX6Q is deselected. It leads to a situation that arch/arm/mach-imx/platsmp.c is built without HAVE_IMX_SRC selection which will cause build error. For example, the following link errors will be seen when bu...
```diff diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 66bcf1df14b9..f1bf610e2900 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -72,7 +72,7 @@ config HAVE_IMX_MMDC bool config HAVE_IMX_SRC - bool + def_bool y if SMP config IMX_HAVE_IOMUX_V1 bool @@ -837,7 ...
909f9ec0a42eeff94dbcac226664d225a11f10d6
Analyze and fix the following issue in the Linux kernel code: extcon: Fix kerneldoc for extcon_set_cable_state and extcon_set_cable_state_
Problem Details: Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
```diff diff --git a/drivers/extcon/extcon-class.c b/drivers/extcon/extcon-class.c index 79f5dbae0147..c27d58d6bbd2 100644 --- a/drivers/extcon/extcon-class.c +++ b/drivers/extcon/extcon-class.c @@ -356,7 +356,7 @@ int extcon_get_cable_state(struct extcon_dev *edev, const char *cable_name) EXPORT_SYMBOL_GPL(extcon_get...
03019759b98de92b5507c8c2f6e253a35d59c868
Analyze and fix the following issue in the Linux kernel code: extcon: adc-jack: Fix checking return value of request_any_context_irq
Problem Details: On failure, request_any_context_irq() returns a negative value. On success, it returns either IRQC_IS_HARDIRQ or IRQC_IS_NESTED. Also ensure adc_jack_probe() return 0 on success. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
```diff diff --git a/drivers/extcon/extcon-adc-jack.c b/drivers/extcon/extcon-adc-jack.c index 725eb5aa8d8c..2cc6bec9f625 100644 --- a/drivers/extcon/extcon-adc-jack.c +++ b/drivers/extcon/extcon-adc-jack.c @@ -161,13 +161,12 @@ static int __devinit adc_jack_probe(struct platform_device *pdev) err = request_any_conte...
5cd3c277ebc64e4bc30c5eb6412edd43b5730a4f
Analyze and fix the following issue in the Linux kernel code: extcon: Fix return value in extcon_register_interest()
Problem Details: Propagate the value returned from extcon_find_cable_index() instead of -ENODEV. For readability, -EINVAL is returned in place of the variable. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
```diff diff --git a/drivers/extcon/extcon-class.c b/drivers/extcon/extcon-class.c index 54dc00b7b9f6..79f5dbae0147 100644 --- a/drivers/extcon/extcon-class.c +++ b/drivers/extcon/extcon-class.c @@ -469,7 +469,7 @@ int extcon_register_interest(struct extcon_specific_cable_nb *obj, obj->cable_index = extcon_find_cab...
0dc77b6dabec8fd298392018cc0de5214af2dc43
Analyze and fix the following issue in the Linux kernel code: extcon: Unregister compat class at module unload to fix oops
Problem Details: If you compile extcon with CONFIG_ANDROID and then load and unload the module you get a simple oops as the driver does not unregister its compat class and thus cannot register it again. Full trace: root@(none):~# modprobe extcon_class root@(none):~# rmmod extcon_class root@(none):~# modprobe extcon_c...
```diff diff --git a/drivers/extcon/extcon-class.c b/drivers/extcon/extcon-class.c index 1ce76a8d777b..63715cdfe988 100644 --- a/drivers/extcon/extcon-class.c +++ b/drivers/extcon/extcon-class.c @@ -819,6 +819,9 @@ module_init(extcon_class_init); static void __exit extcon_class_exit(void) { +#if defined(CONFIG_ANDR...
1cb60156defa4f23d5318ea1ddd400f25b2d0ce5
Analyze and fix the following issue in the Linux kernel code: usb: renesas_usbhs: fixup dma transfer stall
Problem Details: renesas_usbhs driver can switch DMA/PIO transfer by using handler, and each handler have push/pop direction. But unfortunately, current dma push handler didn't a path which calls usbhs_pipe_enable(). Thus, dma transfer never happened. this patch fixes it. Signed-off-by: Kuninori Morimoto <kuninori.mor...
```diff diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c index 143c4e9e1be4..c021b202c0f3 100644 --- a/drivers/usb/renesas_usbhs/fifo.c +++ b/drivers/usb/renesas_usbhs/fifo.c @@ -795,6 +795,7 @@ static void xfer_work(struct work_struct *work) dev_dbg(dev, " %s %d (%d/ %d)\n", fifo-...
4f053a24eca933ec10ce68eef61d38d179f34e50
Analyze and fix the following issue in the Linux kernel code: usb: renesas_usbhs: fixup: avoid NULL access on error case pipe detach
Problem Details: If renesas_usbhs or DMAEngine interrupt didn't happen by a certain cause, urb->ep will be NULL by usb time out. Then, host mode will access to it and crash kernel. This patch fixes it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
```diff diff --git a/drivers/usb/renesas_usbhs/mod_host.c b/drivers/usb/renesas_usbhs/mod_host.c index 9b69a1323294..069cd765400c 100644 --- a/drivers/usb/renesas_usbhs/mod_host.c +++ b/drivers/usb/renesas_usbhs/mod_host.c @@ -334,6 +334,11 @@ static void usbhsh_pipe_detach(struct usbhsh_hpriv *hpriv, struct device *...
000b7f5127900f695668191353a3291832c1914e
Analyze and fix the following issue in the Linux kernel code: usb: gadget: net2272: fix missing unlock on error in net2272_irq()
Problem Details: Add the missing unlock on the error handle path in function net2272_irq(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Felipe Balbi <balbi@ti.com>
```diff diff --git a/drivers/usb/gadget/net2272.c b/drivers/usb/gadget/net2272.c index 43ac7482fa91..c009263a47e3 100644 --- a/drivers/usb/gadget/net2272.c +++ b/drivers/usb/gadget/net2272.c @@ -2069,8 +2069,10 @@ static irqreturn_t net2272_irq(int irq, void *_dev) #if defined(PLX_PCI_RDK2) /* see if PCI int for us ...
ca749b2a2e72b39b3a46d1e4d096e338bf714a3c
Analyze and fix the following issue in the Linux kernel code: usb: musb: dsps: fix res_name length
Problem Details: The res_name is used for the name construction of a DT property as follows: sprintf(res_name, "port%d-mode", id); Hence, res_name must be at least 11 characters long in order to store the name including the terminating '\0'. While at it, use to snprintf() rather than sprintf() when accessing this ...
```diff diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 444346e1e10d..ff5f112053d2 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c @@ -458,11 +458,11 @@ static int __devinit dsps_create_musb_pdev(struct dsps_glue *glue, u8 id) struct platform_device *musb; ...
dad957d7386873c600a365a9d0dcc7cc73f36883
Analyze and fix the following issue in the Linux kernel code: net: cdc_ncm: workaround NTB input size firmware bug
Problem Details: Some devices do not support the 8 byte variants of the NTB input size control messages despite announcing such support in their NCM or MBIM functional descriptor. According to the NCM specification, all devices must support the 4 byte variant regardless of whether or not the flag is set: If bit D5 ...
```diff diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c index 4cd582a4f625..32bdf542be1c 100644 --- a/drivers/net/usb/cdc_ncm.c +++ b/drivers/net/usb/cdc_ncm.c @@ -215,41 +215,21 @@ static u8 cdc_ncm_setup(struct cdc_ncm_ctx *ctx) /* inform device about NTB input size changes */ if (ctx->rx_max...
95ebcea69c888fc644e2a64586c74e2299ca47ca
Analyze and fix the following issue in the Linux kernel code: net/macb: fix truncate warnings
Problem Details: When building macb on x86_64 the following warnings show up: drivers/net/ethernet/cadence/macb.c: In function macb_interrupt: drivers/net/ethernet/cadence/macb.c:556:4: warning: large integer implicitly truncated to unsigned type [-Woverflow] drivers/net/ethernet/cadence/macb.c: In function macb_...
```diff diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c index 6c84a1104aff..6a4f4998cfe5 100644 --- a/drivers/net/ethernet/cadence/macb.c +++ b/drivers/net/ethernet/cadence/macb.c @@ -553,7 +553,7 @@ static irqreturn_t macb_interrupt(int irq, void *dev_id) while (status) { /*...
a35279f002c5843c2b2faaa4538963c8eb18446c
Analyze and fix the following issue in the Linux kernel code: pch_gbe: don't reset MAC_RX on FIFO overflow
Problem Details: Currently, when FIFO_ERR happens, we stop the dma, wait for it to become idle and then reset the whole MAC_RX logic (and after that we must re-set multicast addresses and also re-enable MAC_RX when we're finally ready to accept new packets). This leads to CRC errors on high number of incoming packets a...
```diff diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c index 4ffad780c7ac..a8854d04c275 100644 --- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c @@ -338,26 +338,6 @@ static void ...