id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
625056b65ee9a8b4caf42136e0c844c15e6ec54f
Analyze and fix the following issue in the Linux kernel code: hung task debugging: Inject NMI when hung and going to panic
Problem Details: Send an NMI to all CPUs when a hung task is detected and the hung task code is configured to panic. This gives us a fairly uptodate snapshot of all CPUs in the system. This lets us get stack trace of all CPUs which makes life easier trying to debug a deadlock, and the NMI doesn't change anything since...
```diff diff --git a/kernel/hung_task.c b/kernel/hung_task.c index c21449f85a2a..6df614912b9d 100644 --- a/kernel/hung_task.c +++ b/kernel/hung_task.c @@ -108,8 +108,10 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout) touch_nmi_watchdog(); - if (sysctl_hung_task_panic) + if (sysctl_hun...
c847382838ca503b6c55fb599160146221a2c141
Analyze and fix the following issue in the Linux kernel code: dma: pl330: fix a couple of compilation warnings
Problem Details: Move a couple of tests and do a minor refactor to avoid: drivers/dma/pl330.c: In function 'pl330_probe': drivers/dma/pl330.c:2929:215: warning: comparison of distinct pointer types lacks a cast [enabled by default] drivers/dma/pl330.c: In function 'pl330_tasklet': drivers/dma/pl330.c:2250:8: warning: ...
```diff diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 282caf118be8..2ee6e23930ad 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2225,12 +2225,9 @@ static inline void free_desc_list(struct list_head *list) { struct dma_pl330_dmac *pdmac; struct dma_pl330_desc *desc; - struct dma_pl330...
8f9b9a2fad47af27e14b037395e03cd8278d96d7
Analyze and fix the following issue in the Linux kernel code: ipvs: fix crash in ip_vs_control_net_cleanup on unload
Problem Details: commit 14e405461e664b777e2a5636e10b2ebf36a686ec (2.6.39) ("Add __ip_vs_control_{init,cleanup}_sysctl()") introduced regression due to wrong __net_init for __ip_vs_control_cleanup_sysctl. This leads to crash when the ip_vs module is unloaded. Fix it by changing __net_init to __net_exit for the functio...
```diff diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index b3afe189af61..376d2b12d581 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c @@ -3680,7 +3680,7 @@ int __net_init ip_vs_control_net_init_sysctl(struct net *net) return 0; } -void __net_init ip_...
7118c07a844d367560ee91adb2071bde2fabcdbf
Analyze and fix the following issue in the Linux kernel code: ipvs: Verify that IP_VS protocol has been registered
Problem Details: The registration of a protocol might fail, there were no checks and all registrations were assumed to be correct. This lead to NULL ptr dereferences when apps tried registering. For example: [ 1293.226051] BUG: unable to handle kernel NULL pointer dereference at 0000000000000018 [ 1293.227038] IP: [<...
```diff diff --git a/net/netfilter/ipvs/ip_vs_proto.c b/net/netfilter/ipvs/ip_vs_proto.c index f843a8833250..a62360e29037 100644 --- a/net/netfilter/ipvs/ip_vs_proto.c +++ b/net/netfilter/ipvs/ip_vs_proto.c @@ -59,9 +59,6 @@ static int __used __init register_ip_vs_protocol(struct ip_vs_protocol *pp) return 0; } -#...
a3f29cccbe32676b1ffe46ae30ab1ccee71f5eea
Analyze and fix the following issue in the Linux kernel code: [SCSI] bfa: Fix bfa logging for Logical port state change notification
Problem Details: Made changes to have the same logging level for Logical port online and offline events, to display these events in pairs. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
```diff diff --git a/drivers/scsi/bfa/bfa_fcs_lport.c b/drivers/scsi/bfa/bfa_fcs_lport.c index cd01fc02c4cd..937000db62a8 100644 --- a/drivers/scsi/bfa/bfa_fcs_lport.c +++ b/drivers/scsi/bfa/bfa_fcs_lport.c @@ -616,7 +616,7 @@ bfa_fcs_lport_online_actions(struct bfa_fcs_lport_s *port) __port_action[port->fabric->fab_...
9d8ad782b9b5163351427ba0bcaa984aea474030
Analyze and fix the following issue in the Linux kernel code: [SCSI] bfa: sysfs model description fix.
Problem Details: Make changes to remove unsupported model numbers from the sysfs model description routine. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
```diff diff --git a/drivers/scsi/bfa/bfad_attr.c b/drivers/scsi/bfa/bfad_attr.c index d12be9dff4ba..8b6c6bf7837e 100644 --- a/drivers/scsi/bfa/bfad_attr.c +++ b/drivers/scsi/bfa/bfad_attr.c @@ -759,25 +759,10 @@ bfad_im_model_desc_show(struct device *dev, struct device_attribute *attr, else if (!strcmp(model, "Broca...
17c201b3281cfc2c7d7ecfabb33313b747e414cb
Analyze and fix the following issue in the Linux kernel code: [SCSI] bfa: Fix to defer vport delete handler invocation till firmware logo response.
Problem Details: Made changes to avoid queuing the vport delete work to IM driver work queue in the bfa_fcb_lport_delete() - since at this stage we are not completely done with using the vport structure as we are still waiting for the LOGO response from the fw in online state or just doing some cleanup. Since queuing u...
```diff diff --git a/drivers/scsi/bfa/bfa_fcs.h b/drivers/scsi/bfa/bfa_fcs.h index e75e07d25915..51c9e1345719 100644 --- a/drivers/scsi/bfa/bfa_fcs.h +++ b/drivers/scsi/bfa/bfa_fcs.h @@ -799,9 +799,6 @@ struct bfad_port_s *bfa_fcb_lport_new(struct bfad_s *bfad, enum bfa_lport_role roles, struct bf...
605c6cd201714535e2723a60197228050f863a8f
Analyze and fix the following issue in the Linux kernel code: [SCSI] be2iscsi: Return async handle of unknown opcode to free list.
Problem Details: The async handle corresponding to unknown Opcode was not freed earlier. This code does the fix for that. Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James B...
```diff diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index dad66de50aa0..d0c7d97769c3 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -1659,8 +1659,7 @@ hwi_fwd_async_msg(struct beiscsi_conn *beiscsi_conn, phdr, hdr_len, pfirst_buffer, ...
a49e06d58d91f170594af3f05454f43dbccae249
Analyze and fix the following issue in the Linux kernel code: [SCSI] be2iscsi: Fix the function return values.
Problem Details: Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
```diff diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index 00e297d8d742..3f3a4a1652e6 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -541,8 +541,7 @@ static int be_ctrl_init(struct beiscsi_hba *phba, struct pci_dev *pdev) &mbox_mem_alloc-...
c8b25598dc587b321cf97ed192c2e83d7cdc128a
Analyze and fix the following issue in the Linux kernel code: [SCSI] be2iscsi: Fix double free of MCCQ info memory.
Problem Details: In case of MCC_Q creation failed, the MCCQ info memory is freed from be_mcc_queues_destroy and be_mcc_queues_create. This caused kernel to panic because of double free. Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off...
```diff diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index f69c56bd9b23..64100247c624 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -2908,9 +2908,11 @@ beiscsi_post_pages(struct beiscsi_hba *phba) static void be_queue_free(struct beiscsi_hba *ph...
b5b9323b9514d2d5d2b09d8e1b7a93f5bbf047f0
Analyze and fix the following issue in the Linux kernel code: [SCSI] be2iscsi: Fix typo function name mismatch
Problem Details: Signed-off-by: Minh Tran <MinhDuc.Tran@Emulex.Com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
```diff diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c index 33c8f09c7ac1..2bb681ef19ef 100644 --- a/drivers/scsi/be2iscsi/be_iscsi.c +++ b/drivers/scsi/be2iscsi/be_iscsi.c @@ -221,7 +221,7 @@ int beiscsi_ep_get_param(struct iscsi_endpoint *ep, struct beiscsi_endpoint *beiscsi_ep = e...
1282ab76d983b2753b5cd4c9ae6b8019b0557b30
Analyze and fix the following issue in the Linux kernel code: [SCSI] be2iscsi: Freeing of WRB and SGL Handle in cleanup task
Problem Details: The WRB and SGL Handle allocated for Login task were not freed back to the pool after the login process was done. This code releases the WRB and SGL Handle after the login process. v2: - Fix up locking so bh calls are not done when not needed. - Make beiscsi_cleanup_task static. Signed-off-by: Jayamo...
```diff diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index 23344c8c5b79..185cf394b9f0 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -1252,9 +1252,9 @@ hwi_complete_drvr_msgs(struct beiscsi_conn *beiscsi_conn, task = pwrb_handle->pio_handle; ...
f2ba02b89a1bfccb152302fa01651e21d98e9d1b
Analyze and fix the following issue in the Linux kernel code: [SCSI] be2iscsi: Fix in ASYNC PDU stitching logic.
Problem Details: The buffer length passed for processing the ASYNC PDU was not proper. Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
```diff diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index 4765f47b612a..fef6f073c4ab 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -1655,7 +1655,7 @@ hwi_fwd_async_msg(struct beiscsi_conn *beiscsi_conn, } memcpy(pfirst_buffer + offset, ...
dc63aac62de5851ad11e8bc5fa1cf8a7f4e586fb
Analyze and fix the following issue in the Linux kernel code: [SCSI] be2iscsi: Fix in the Asynchronous Code Path
Problem Details: Set the ASYNC PDU Handle pBuffer for Data ring with the VA/PA of the allocated memory for it. To get the correct ASYNC PDY Handle iterate the list and compare the PA set during initialization with the passed PHY Address. The buffer_size and num_enteries are common for HDR and Data ring Signed-off-by: ...
```diff diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index 375756fa95cf..4765f47b612a 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -1370,8 +1370,6 @@ hwi_get_async_handle(struct beiscsi_hba *phba, struct be_bus_address phys_addr; struct list...
03e2084a843a700089a479e0ffdf5876c7059411
Analyze and fix the following issue in the Linux kernel code: ath6kl: check for sband existence when creating scan cmd
Problem Details: The patch "ath6kl: support fw reporting phy capabilities" gave the firmware the ability to disable certain wiphy supported bands. Check if this is the case in ath6kl_wmi_beginscan_cmd to avoid dereferencing a NULL pointer. kvalo: change the patch so that there's no code between declarations Signed-of...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c index bb802e49919c..102477d5900f 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.c +++ b/drivers/net/wireless/ath/ath6kl/wmi.c @@ -1818,12 +1818,14 @@ int ath6kl_wmi_beginscan_cmd(struct wmi *wmi, u8 if_idx, u32...
727c356f4d799b53f94cf8fe43e19d64482348c7
Analyze and fix the following issue in the Linux kernel code: e1000e: Fix default interrupt throttle rate not set in NIC HW
Problem Details: Based on the original patch from Ying Cai <ycai@google.com> This change ensures that the itr/itr_setting adjustment logic is used, even for the default/compiled-in value. Context: When we changed the default InterruptThrottleRate value from default (3 = dynamic mode) to 8000 for example, only ada...
```diff diff --git a/drivers/net/ethernet/intel/e1000e/param.c b/drivers/net/ethernet/intel/e1000e/param.c index ff796e42c3eb..16adeb9418a8 100644 --- a/drivers/net/ethernet/intel/e1000e/param.c +++ b/drivers/net/ethernet/intel/e1000e/param.c @@ -106,7 +106,7 @@ E1000_PARAM(RxAbsIntDelay, "Receive Absolute Interrupt De...
569a3aff70e880588fe4b3f1622ac60abbeb4a28
Analyze and fix the following issue in the Linux kernel code: e1000e: MSI interrupt test failed, using legacy interrupt
Problem Details: Following logs where seen on Systems with multiple NICs, while using MSI interrupts as shown below: Feb 16 15:09:32 (none) user.notice kernel: 0000:00:0d.0: lan0_0: NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX Feb 16 15:09:32 (none) user.notice kernel: 0000:40:0d.0: wan0_1: NIC Link is Up...
```diff diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index 19ab2154802c..9520a6ac1f30 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -3799,7 +3799,7 @@ static int e1000_test_msi_interrupt(struct e1000_ad...
37e377d2823e03528cb64f435d7c0e30b1c668eb
Analyze and fix the following issue in the Linux kernel code: rcu: Fixes to rcutorture error handling and cleanup
Problem Details: The rcutorture initialization code ignored the error returns from rcu_torture_onoff_init() and rcu_torture_stall_init(). The rcutorture cleanup code failed to NULL out a number of pointers. These bugs will normally have no effect, but this commit fixes them nevertheless. Signed-off-by: Paul E. McKen...
```diff diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c index a89b381a8c6e..1463a0636443 100644 --- a/kernel/rcutorture.c +++ b/kernel/rcutorture.c @@ -1337,6 +1337,7 @@ static void rcutorture_booster_cleanup(int cpu) /* This must be outside of the mutex, otherwise deadlock! */ kthread_stop(t); + boost_tas...
559f9badd11ddf399f88b18b4c0f110fd511ae53
Analyze and fix the following issue in the Linux kernel code: rcu: List-debug variants of rcu list routines.
Problem Details: * Make __list_add_rcu check the next->prev and prev->next pointers just like __list_add does. * Make list_del_rcu use __list_del_entry, which does the same checking at deletion time. Has been running for a week here without anything being tripped up, but it seems worth adding for completeness just...
```diff diff --git a/include/linux/rculist.h b/include/linux/rculist.h index d079290843a9..a20c05096231 100644 --- a/include/linux/rculist.h +++ b/include/linux/rculist.h @@ -30,6 +30,7 @@ * This is only for internal list manipulation where we know * the prev/next entries already! */ +#ifndef CONFIG_DEBUG_LIST s...
f02777b4c0047e75b0b6db9a67aa49d29ae57965
Analyze and fix the following issue in the Linux kernel code: drivers/ps3: Fix checkpatch warnings in ps3av.c
Problem Details: Signed-off-by: Valentin Ilie <valentin.ilie@gmail.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
```diff diff --git a/drivers/ps3/ps3av.c b/drivers/ps3/ps3av.c index a409fa050a1a..93d0a8b7718a 100644 --- a/drivers/ps3/ps3av.c +++ b/drivers/ps3/ps3av.c @@ -338,7 +338,7 @@ int ps3av_do_pkt(u32 cid, u16 send_len, size_t usr_buf_size, mutex_unlock(&ps3av->mutex); return 0; - err: +err: mutex_unlock(&ps3av...
9b4d1cbb1391ae603c20cbf8c0beb66e38397196
Analyze and fix the following issue in the Linux kernel code: ARM: SAMSUNG: add missing MMC_CAP2_BROKEN_VOLTAGE capability
Problem Details: Commit 6e8201f57c935 "mmc: core: add the capability for broken voltage" introduced a new quirk to indicate that MMC core should ignore voltage change errors reported by the regulators core. This is required to get SDHCI working on UniversalC210, NURI and GONI boards again after commit ceb6143b2df81c ("...
```diff diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c index b4f1f902ce6d..ed90aef404c3 100644 --- a/arch/arm/mach-exynos/mach-nuri.c +++ b/arch/arm/mach-exynos/mach-nuri.c @@ -112,6 +112,7 @@ static struct s3c_sdhci_platdata nuri_hsmmc0_data __initdata = { .host_caps = (MMC_CAP_8_B...
1f73f31ad6e37df0679f6842b7405d96515ec8b1
Analyze and fix the following issue in the Linux kernel code: clk: Fix typo in comment
Problem Details: CLK_MUX_INDEX_BIT is mistakenly written as CLK_MUX_INDEX_BITWISE in comment. Fix it. CLK_GATE_SET_TO_DISABLE is mistakenly written as CLK_GATE_SET_DISABLE in comment. Fix it. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Mike Turquette <mturquette@linaro.org>
```diff diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index cb82918d8fe0..8f2148942b87 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -159,7 +159,7 @@ struct clk *clk_register_fixed_rate(struct device *dev, const char *name, * Clock which can gate its output...
0f3bcfe67f175d4edf0c6ab5487fbe23b6533d4a
Analyze and fix the following issue in the Linux kernel code: staging: iio: tsl2x7x: bugfixes
Problem Details: TAOS (version 9a) tsl2x7x driver change / bug fix. Fixed - removed decimal multiplications. Added missing 'static' declarations Fixed _read_raw case logic to allow reading of _PROCESSED IIO_LIGHT Replaced udelay with mdelay to accomodate eabi. Signed-off-by: Jon Brenner <jbrenner@tao...
```diff diff --git a/drivers/staging/iio/light/tsl2x7x_core.c b/drivers/staging/iio/light/tsl2x7x_core.c index ff449894a94a..f3fc85a22b1a 100755 --- a/drivers/staging/iio/light/tsl2x7x_core.c +++ b/drivers/staging/iio/light/tsl2x7x_core.c @@ -130,6 +130,8 @@ (IIO_EV_BIT(IIO_EV_TYPE_THRESH, IIO_EV_DIR_RISING) | \ ...
bf6b47deb40f9fc8ddb4573373dc9614aab59d35
Analyze and fix the following issue in the Linux kernel code: IB/mlx4: Fix memory leaks in ib_link_query_port()
Problem Details: If the call to mlx4_MAD_IFC() fails in ib_link_query_port() we will currently do 'return err;' which will leak 'in_mad' and 'out_mad'. We should instead do 'goto out;' where we'll properly free the memory we previously allocated. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: Or Gerlitz <oge...
```diff diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index 75d305629300..cc88c9c955c9 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c @@ -247,7 +247,7 @@ static int ib_link_query_port(struct ib_device *ibdev, u8 port, err = mlx4_MAD_IFC(to_...
8ac5fd118cd137db5ca8c786778ba600f87111a0
Analyze and fix the following issue in the Linux kernel code: powerpc/ps3: Add highmem region memory early
Problem Details: Real mode memory can be limited and runs out quickly as memory is allocated during kernel startup. Having the highmem available sooner fixes this. This change simplifies the memory management code by converting from hotplug memory to logical memory blocks. Signed-off-by: Hector Martin <hector@marcan...
```diff diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c index 05a2bcb6a875..0c9f643d9e2a 100644 --- a/arch/powerpc/platforms/ps3/mm.c +++ b/arch/powerpc/platforms/ps3/mm.c @@ -20,7 +20,6 @@ #include <linux/kernel.h> #include <linux/export.h> -#include <linux/memory_hotplug.h> #includ...
f8262d476823a7ea1eb497ff9676d1eab2393c75
Analyze and fix the following issue in the Linux kernel code: PM / Hibernate: fix the number of pages used for hibernate/thaw buffering
Problem Details: Hibernation regression fix, since 3.2. Calculate the number of required free pages based on non-high memory pages only, because that is where the buffers will come from. Commit 081a9d043c983f161b78fdc4671324d1342b86bc introduced a new buffer page allocation logic during hibernation, in order to impro...
```diff diff --git a/kernel/power/swap.c b/kernel/power/swap.c index 8742fd013a94..eef311a58a64 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c @@ -51,6 +51,23 @@ #define MAP_PAGE_ENTRIES (PAGE_SIZE / sizeof(sector_t) - 1) +/* + * Number of free pages that are not high. + */ +static inline unsigned long...
151b61284776be2d6f02d48c23c3625678960b97
Analyze and fix the following issue in the Linux kernel code: USB: EHCI: fix crash during suspend on ASUS computers
Problem Details: This patch (as1545) fixes a problem affecting several ASUS computers: The machine crashes or corrupts memory when going into suspend if the ehci-hcd driver is bound to any controllers. Users have been forced to unbind or unload ehci-hcd before putting their systems to sleep. After extensive testing, ...
```diff diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c index 622b4a48e732..57ed9e400c06 100644 --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c @@ -493,6 +493,15 @@ static int hcd_pci_suspend_noirq(struct device *dev) pci_save_state(pci_dev); + /* + * Some systems crash if ...
6fff5a11fd07d7f918ac3737da4846558518c31d
Analyze and fix the following issue in the Linux kernel code: ARM: EXYNOS: Fix compilation error when CONFIG_OF is not defined
Problem Details: Fixed following compile time error. arch/arm/mach-exynos/common.c: In function 'exynos5_init_irq': arch/arm/mach-exynos/common.c:539:2: error: implicit declaration of function 'of_irq_init' arch/arm/mach-exynos/common.c:539:14: error: 'exynos4_dt_irq_match' undeclared (first use in this function) arch/...
```diff diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 6c0e4f54c94d..5ccd6e80a607 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c @@ -547,7 +547,9 @@ void __init exynos5_init_irq(void) { int irq; +#ifdef CONFIG_OF of_irq_init(exynos4_dt_irq_match);...
ffabec4ef7ad6ca9365d39f643b8a24c0fce04e7
Analyze and fix the following issue in the Linux kernel code: ARM: EXYNOS: Fix resource on dev-dwmci.c
Problem Details: Should be EXYNOS4_IRQ_DWMCI instead of IRQ_DWMCI, and use DEFINE_RES_{MEM,IRQ}. Reported-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
```diff diff --git a/arch/arm/mach-exynos/dev-dwmci.c b/arch/arm/mach-exynos/dev-dwmci.c index b025db4bf602..79035018fb74 100644 --- a/arch/arm/mach-exynos/dev-dwmci.c +++ b/arch/arm/mach-exynos/dev-dwmci.c @@ -16,6 +16,7 @@ #include <linux/dma-mapping.h> #include <linux/platform_device.h> #include <linux/interrupt....
7518dde92c27f845a685cdc559c83c666cc01840
Analyze and fix the following issue in the Linux kernel code: ARM: S3C24XX: Fix build warning for S3C2410_PM
Problem Details: warning: (CPU_S3C2440 && CPU_S3C2442) selects S3C2410_PM which has unmet direct dependencies (ARCH_S3C24XX && CPU_S3C2410) warning: (CPU_S3C2440 && CPU_S3C2442) selects S3C2410_PM which has unmet direct dependencies (ARCH_S3C24XX && CPU_S3C2410) Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
```diff diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig index 0f3a327ebcaa..b34287ab5afd 100644 --- a/arch/arm/mach-s3c24xx/Kconfig +++ b/arch/arm/mach-s3c24xx/Kconfig @@ -111,10 +111,6 @@ config S3C24XX_SETUP_TS help Compile in platform device definition for Samsung TouchScreen. -# c...
18ea1fcd7ef19e496c523d814d52261cc4777f51
Analyze and fix the following issue in the Linux kernel code: ARM: mini2440_defconfig: Fix build error
Problem Details: This is needed to fix mini2440_defconfig after the platform files have been moved around. arm-none-linux-gnueabi-ld: no machine record defined arm-none-linux-gnueabi-ld: no machine record defined arm-none-linux-gnueabi-ld: no machine record defined make: *** [.tmp_vmlinux1] Error 1 Signed-off-by: Arn...
```diff diff --git a/arch/arm/configs/mini2440_defconfig b/arch/arm/configs/mini2440_defconfig index 42da9183acc8..082175c54e7c 100644 --- a/arch/arm/configs/mini2440_defconfig +++ b/arch/arm/configs/mini2440_defconfig @@ -14,6 +14,8 @@ CONFIG_MODULE_FORCE_UNLOAD=y # CONFIG_BLK_DEV_BSG is not set CONFIG_BLK_DEV_INTEG...
dc890df0a77cafe5f4a3d81c0dade637c27f1934
Analyze and fix the following issue in the Linux kernel code: staging: octeon-ethernet: fix build errors by including interrupt.h
Problem Details: This patch fixes the following build failures: drivers/staging/octeon/ethernet.c: In function 'cvm_oct_cleanup_module': drivers/staging/octeon/ethernet.c:799:2: error: implicit declaration of function 'free_irq' drivers/staging/octeon/ethernet-rx.c: In function 'cvm_oct_no_more_work': drivers/staging/...
```diff diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c index 400df8cbee53..d91751f9ffe8 100644 --- a/drivers/staging/octeon/ethernet-rx.c +++ b/drivers/staging/octeon/ethernet-rx.c @@ -36,6 +36,7 @@ #include <linux/prefetch.h> #include <linux/ratelimit.h> #include <linux/smp...
349ae79c0a3db1632ac4db955c53db05fc017bde
Analyze and fix the following issue in the Linux kernel code: staging: zcache: fix Kconfig crypto dependency
Problem Details: ZCACHE is a boolean in the Kconfig. When selected, it should require that CRYPTO be builtin (=y). Currently, ZCACHE=y and CRYPTO=m is a valid configuration when it should not be. This patch changes the zcache Kconfig to enforce this dependency. Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm....
```diff diff --git a/drivers/staging/zcache/Kconfig b/drivers/staging/zcache/Kconfig index 3ed2c8f656a5..7048e01f0817 100644 --- a/drivers/staging/zcache/Kconfig +++ b/drivers/staging/zcache/Kconfig @@ -2,7 +2,7 @@ config ZCACHE bool "Dynamic compression of swap pages and clean pagecache pages" # X86 dependency is ...
ad12886091cbc955dafd6cb91de2411b3ff36b39
Analyze and fix the following issue in the Linux kernel code: ath9k: Fix IDLE Powersave
Problem Details: * PS_WAIT_FOR_TX_ACK is used in network-sleep mode and checking it for handling IDLE transitions is incorrect. Fix this. * RX PCU/DMA engines have to be stopped before setting the chip into full-sleep mode - otherwise the chip becomes mute. * Make things a bit clear by checking explicitly for net...
```diff diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 1fc6e331589a..f4b7334cd27c 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -113,21 +113,25 @@ void ath9k_ps_restore(struct ath_softc *sc) struct ath_common *common...
7e3ed02c6e65a0cb4c9259c0d34740305d9aa5e7
Analyze and fix the following issue in the Linux kernel code: mac80211: fix num_mcast_sta counting issues
Problem Details: Moving a STA to an AP VLAN prevents num_mcast_sta from being decremented once the STA leaves, because sta->sdata changes. Fix this by checking for AP VLANs as well. Also exclude 4-addr VLAN stations from num_mcast_sta - remote 4-addr stations ignore 3-address multicast frames anyway. In a typical brid...
```diff diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 510a745c3108..70b2af2315a6 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -1005,6 +1005,9 @@ static int ieee80211_change_station(struct wiphy *wiphy, } if (params->vlan && params->vlan != sta->sdata->dev) { + bool prev_4addr = false;...
19f798ad009a1c9aebe6c248173e4a7ec694c680
Analyze and fix the following issue in the Linux kernel code: staging: wlan-ng: Release struct returned by cfg80211_inform_bss to avoid potential memory leak.
Problem Details: Function cfg80211_inform_bss returns a pointer to a referenced struct cfg80211_bss but no information is needed from this struct in function prism2_scan and therefore we release it by calling cfg80211_put_bss. Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com> Signed-off-by: Greg Kro...
```diff diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c index 4cd3ba5d5646..8bc562b8c4d9 100644 --- a/drivers/staging/wlan-ng/cfg80211.c +++ b/drivers/staging/wlan-ng/cfg80211.c @@ -332,6 +332,7 @@ int prism2_scan(struct wiphy *wiphy, struct net_device *dev, wlandevice_t *wlandev ...
bb75f7dc948eb92b1d0612b4ddba23d2ecd553c5
Analyze and fix the following issue in the Linux kernel code: staging, sep: Fix typo in sep
Problem Details: Correct spelling typos in staging/sep. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/sep/sep_driver_config.h b/drivers/staging/sep/sep_driver_config.h index fa7c0d09bfa5..9d9fc7c94a6e 100644 --- a/drivers/staging/sep/sep_driver_config.h +++ b/drivers/staging/sep/sep_driver_config.h @@ -68,11 +68,11 @@ #define SEP_DRIVER_MIN_DATA_SIZE_PER_TABLE 16 /* flag that s...
cd01712397ad428f443c05add5d7435e899c0ef1
Analyze and fix the following issue in the Linux kernel code: staging: rtl8192e: Fix typos.
Problem Details: Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> ACKed-by: Larry Finger <Larry.finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtl8192e/r819xE_phyreg.h b/drivers/staging/rtl8192e/rtl8192e/r819xE_phyreg.h index d5de279f6644..970298b07af7 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r819xE_phyreg.h +++ b/drivers/staging/rtl8192e/rtl8192e/r819xE_phyreg.h @@ -306,7 +306,7 @@ #define bRFStart ...
07a5e9d4fd0218e9243875c87f85287a2a3b38c0
Analyze and fix the following issue in the Linux kernel code: ALSA: snd-usb: fix some typos in endpoint.c documentation
Problem Details: Also be more specific about some details while at it. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c index 83a36d0d2a2d..e6906901debb 100644 --- a/sound/usb/endpoint.c +++ b/sound/usb/endpoint.c @@ -40,25 +40,26 @@ * USB endpoint and its streaming. * * There are functions to activate and deactivate the streaming URBs and - * optinal callbacks to le...
5ef4acd58ab2abd0dd0c8e3cacd61a0dc5d73646
Analyze and fix the following issue in the Linux kernel code: iwlwifi: fix hardware queue programming
Problem Details: Newer devices have 20 (5000 series) or 30 (6000 series) hardware queues, rather than the 16 that 4965 had. This was added to the driver a long time ago, but improperly: the queue registers for the higher queues aren't just continuations of the registers for the first 16 queues, they are in other places...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-fh.h b/drivers/net/wireless/iwlwifi/iwl-fh.h index 90208094b8eb..74bce97a8600 100644 --- a/drivers/net/wireless/iwlwifi/iwl-fh.h +++ b/drivers/net/wireless/iwlwifi/iwl-fh.h @@ -104,15 +104,29 @@ * (see struct iwl_tfd_frame). These 16 pointer registers are offset ...
610202ddc6951453034475fdcf5c9caf14f050de
Analyze and fix the following issue in the Linux kernel code: staging: iio: light: of: Fix vendor prefix of isl29018/isl29028
Problem Details: ISL29018/ISL29028 is from Intersil Corporation and making the vendor prefix for this part as "isil" for OF compatibity. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/iio/light/isl29018.c b/drivers/staging/iio/light/isl29018.c index 073e899e1754..1ec2dacb2ee5 100644 --- a/drivers/staging/iio/light/isl29018.c +++ b/drivers/staging/iio/light/isl29018.c @@ -596,7 +596,7 @@ static const struct i2c_device_id isl29018_id[] = { MODULE_DEVICE_TABLE(i2c,...
78aee0fc9a2ee913ef8c524c380a72ee693dd6cb
Analyze and fix the following issue in the Linux kernel code: staging: android: binder: fix sparse warnings
Problem Details: Fix sparse warnings by adding __user annotation to stucts. This patch fixes the the following sparse warnings: drivers/staging/android/binder.c:1343:76: warning: incorrect type in argument 2 (different address spaces) drivers/staging/android/binder.c:1343:76: expected void [noderef] <asn:1>*ptr d...
```diff diff --git a/drivers/staging/android/binder.h b/drivers/staging/android/binder.h index 6602474f41ed..2f7d195d8b15 100644 --- a/drivers/staging/android/binder.h +++ b/drivers/staging/android/binder.h @@ -53,12 +53,12 @@ struct flat_binder_object { /* 8 bytes of data. */ union { - void *binder; /* local o...
144a4c2ff75552e2aabb9256ca0ec5e277097153
Analyze and fix the following issue in the Linux kernel code: GFS2: Log code fixes
Problem Details: This patch removes a log lock from around atomic operation where it is not needed, removes an unused variable, and also changes a void pointer used incorrectly to a struct page pointer. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
```diff diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index 2307218de6e4..db9cb187b6a2 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c @@ -643,10 +643,8 @@ void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl) if (sdp->sd_log_head != sdp->sd_log_flush_head) { log_write_header(sdp, 0); } else if (sdp->sd_l...
886b1416752d7b00fd04468a7c3f036699bddc31
Analyze and fix the following issue in the Linux kernel code: GFS2: Fix function parameter comments in rgrp.c
Problem Details: This patch just fixes a bunch of function parameter comments. Slowly, over the years, the comments have gotten out of date (mostly my fault, as I haven't been good at keeping them up to date). This patch rectifies some of that. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Steven Wh...
```diff diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 55dd010b565c..5968eae9cf8f 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c @@ -119,6 +119,7 @@ static inline void gfs2_setbit(struct gfs2_rgrpd *rgd, unsigned char *buf1, /** * gfs2_testbit - test a bit in the bitmaps + * @rgd: the resource group descript...
fdb76a4228303491b1b9b8923310f2cbcec8dc9f
Analyze and fix the following issue in the Linux kernel code: GFS2: Drop "pull" argument from log_write_header()
Problem Details: The "pull" argument to log_write_header() is only used for debug purposes and it is not really needed any more. There are other tests for this particular problem, so I think we can dispose of it in order to simplify the code. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
```diff diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index 4752eadc7f6e..d886a17f671a 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c @@ -32,8 +32,6 @@ #include "dir.h" #include "trace_gfs2.h" -#define PULL 1 - /** * gfs2_struct2blk - compute stuff * @sdp: the filesystem @@ -580,7 +578,7 @@ static void gfs2_order...
985140369be1e886754d8ac0375dd64e4f727311
Analyze and fix the following issue in the Linux kernel code: Add Foxconn / Hon Hai IDs for btusb module
Problem Details: This change adds 0x0489:0xe033 to the btusb module. This bluetooth usb device is integrated in the Acer TimelineX AS4830TG-6808 notebook. Output from /sys/kernel/debug/usb/devices: T: Bus=01 Lev=02 Prnt=02 Port=05 Cnt=02 Dev#= 4 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #...
```diff diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 93cc828298c4..9217121362e1 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -108,6 +108,9 @@ static struct usb_device_id btusb_table[] = { { USB_DEVICE(0x0a5c, 0x21f3) }, { USB_DEVICE(0x413c, 0x8197) }, + /* ...
16cde9931bcd8d8ca968ef1cded02684ea040374
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix missing break in hci_cmd_complete_evt
Problem Details: Command complete event for HCI_OP_USER_PASSKEY_NEG_REPLY would result in calling handler function also for HCI_OP_LE_SET_SCAN_PARAM. This could result in undefined behaviour. Signed-off-by: Szymon Janc <szymon.janc@tieto.com> Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
```diff diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 6a72eaea70ee..7f87a70b8618 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -2314,6 +2314,7 @@ static inline void hci_cmd_complete_evt(struct hci_dev *hdev, struct sk_buff *sk case HCI_OP_USER_PASSKEY_NEG_REPLY...
38e8a2ddc9ada5dd1f2def95bebb733bf619bbef
Analyze and fix the following issue in the Linux kernel code: KVM: x86 emulator: fix asm constraint in flush_pending_x87_faults
Problem Details: 'bool' wants 8-bit registers. Reported-by: Takuya Yoshikawa <takuya.yoshikawa@gmail.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index d5729a91d08d..0d151e232480 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -4123,7 +4123,7 @@ static int flush_pending_x87_faults(struct x86_emulate_ctxt *ctxt) "jmp 2b \n\t" ".popsection \n\t" _ASM_EX...
15f70e1b9a1a6351c252cb8892272cc4601818c7
Analyze and fix the following issue in the Linux kernel code: pinctrl: fix signed vs unsigned conditionals inside pinmux_map_to_setting
Problem Details: pinmux_map_to_setting() uses setting->data.mux.func/group to store the return code of pinmux_func_name_to_selector/pinctrl_get_group_selector(). However, struct pinctrl_setting_mux defines these elements as unsigned, resulting in all error codes getting lost. The conditionals following the assignments ...
```diff diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c index fa0357bd88ff..7cd0c7d0f2cf 100644 --- a/drivers/pinctrl/pinmux.c +++ b/drivers/pinctrl/pinmux.c @@ -329,10 +329,10 @@ int pinmux_map_to_setting(struct pinctrl_map const *map, return -EINVAL; } - setting->data.mux.func = - pinmux_func...
aac63a4ac861476858d24a5a8b09098b1ef9c54d
Analyze and fix the following issue in the Linux kernel code: fb: exynos: Fix MIPI/DSI front/back porch settings
Problem Details: The exynos_mipi_dsi_set_main_disp_[hv]porch() functions take front and back porch arguments in that order. This maps to the fb_videomode right/lower_margin and left/upper_margin respectively. Fix the caller accordingly. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Dong...
```diff diff --git a/drivers/video/exynos/exynos_mipi_dsi_common.c b/drivers/video/exynos/exynos_mipi_dsi_common.c index 14909c1d3832..99f645183759 100644 --- a/drivers/video/exynos/exynos_mipi_dsi_common.c +++ b/drivers/video/exynos/exynos_mipi_dsi_common.c @@ -738,11 +738,11 @@ int exynos_mipi_dsi_set_display_mode(st...
51249dca627d9d0e6b41531e716cbc308554a62c
Analyze and fix the following issue in the Linux kernel code: usb: dwc3: core: split host address space
Problem Details: This fix prevents a problem with dwc3 and host mode where we were requesting the entire memory region in dwc3/core.c, thus preventing xhci-plat from ever ioremapping its own address space. Signed-off-by: Ido Shayevitz <idos@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
```diff diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 7bd815a507e8..b2b417223694 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -410,7 +410,6 @@ static int __devinit dwc3_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; int ret = -ENOMEM; - int ...
1b23170a8e14ef62ad1daa957aa528212a8d0aef
Analyze and fix the following issue in the Linux kernel code: vga: fix build when fbdev is a module
Problem Details: This fixes the build breakage reported by Stephen in -next when merging the drm-next tree. Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/vga/vgaarb.c b/drivers/gpu/vga/vgaarb.c index e223b96fa6a0..3df8fc0ec01a 100644 --- a/drivers/gpu/vga/vgaarb.c +++ b/drivers/gpu/vga/vgaarb.c @@ -137,6 +137,8 @@ struct pci_dev *vga_default_device(void) return vga_default; } +EXPORT_SYMBOL_GPL(vga_default_device); + void vga_set_d...
f1ae126cdf1d1514da6e89a248232a7f7d315fe0
Analyze and fix the following issue in the Linux kernel code: drm: Unify and fix idr error handling
Problem Details: The error handling code w.r.t. idr usage looks inconsistent. In the case of drm_mode_object_get() and drm_ctxbitmap_next() the error handling is also incomplete. Unify the code to follow the same pattern always. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie ...
```diff diff --git a/drivers/gpu/drm/drm_context.c b/drivers/gpu/drm/drm_context.c index 325365f6d355..affa629589ac 100644 --- a/drivers/gpu/drm/drm_context.c +++ b/drivers/gpu/drm/drm_context.c @@ -85,11 +85,12 @@ again: mutex_lock(&dev->struct_mutex); ret = idr_get_new_above(&dev->ctx_idr, NULL, DRM_RESERVED...
b4aa0163056b6c70029b6e8619ce07c274351f42
Analyze and fix the following issue in the Linux kernel code: efifb: Implement vga_default_device() (v2)
Problem Details: EFI doesn't typically make use of the legacy VGA ROM, but it may still be configured to pass that through to a given video device. This may lead to an inaccurate choice of default video device. Add support to efifb to pick out the correct active video device. v2: fix if->ifdef Signed-off-by: Matthew ...
```diff diff --git a/arch/x86/include/asm/vga.h b/arch/x86/include/asm/vga.h index c4b9dc2f67c5..44282fbf7bf9 100644 --- a/arch/x86/include/asm/vga.h +++ b/arch/x86/include/asm/vga.h @@ -17,4 +17,10 @@ #define vga_readb(x) (*(x)) #define vga_writeb(x, y) (*(y) = (x)) +#ifdef CONFIG_FB_EFI +#define __ARCH_HAS_VGA_DE...
1a39b310e920bb7098067d96411b31e459ae8f32
Analyze and fix the following issue in the Linux kernel code: vgaarb: Add support for setting the default video device (v2)
Problem Details: The default VGA device is a somewhat fluid concept on platforms with multiple GPUs. Add support for setting it so switching code can update things appropriately, and make sure that the sysfs code returns the right device if it's changed. v2: Updated to fix builds when __ARCH_HAS_VGA_DEFAULT_DEVICE is ...
```diff diff --git a/drivers/gpu/vga/vgaarb.c b/drivers/gpu/vga/vgaarb.c index 111d956d8e7d..e223b96fa6a0 100644 --- a/drivers/gpu/vga/vgaarb.c +++ b/drivers/gpu/vga/vgaarb.c @@ -136,6 +136,11 @@ struct pci_dev *vga_default_device(void) { return vga_default; } + +void vga_set_default_device(struct pci_dev *pdev) +{...
2a5809499e35b53a6044fd34e72b242688b7a862
Analyze and fix the following issue in the Linux kernel code: asix: Fix tx transfer padding for full-speed USB
Problem Details: The asix.c USB Ethernet driver avoids ending a tx transfer with a zero- length packet by appending a four-byte padding to transfers whose length is a multiple of maxpacket. However, the hard-coded 512 byte maxpacket length is valid for high-speed USB only; full-speed USB uses 64 byte packets. Signed-o...
```diff diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c index 5ee032cafade..42b5151aa78a 100644 --- a/drivers/net/usb/asix.c +++ b/drivers/net/usb/asix.c @@ -355,7 +355,7 @@ static struct sk_buff *asix_tx_fixup(struct usbnet *dev, struct sk_buff *skb, u32 packet_len; u32 padbytes = 0xffff0000; - padl...
34604086bea11f1f4d7ff124c84dab9b89956837
Analyze and fix the following issue in the Linux kernel code: Input: lpc32xx_ts - fix device tree compatible string
Problem Details: During the device tree integration of the various LPC32xx drivers, we agreed on using non-wildcard "compatible" strings. This change switches lpc32xx_ts touchscreen driver to use "nxp,lpc3220-tsc". Signed-off-by: Roland Stigge <stigge@antcom.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/Documentation/devicetree/bindings/input/touchscreen/lpc32xx-tsc.txt b/Documentation/devicetree/bindings/input/touchscreen/lpc32xx-tsc.txt index d0c68e33de3a..41cbf4b7a670 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/lpc32xx-tsc.txt +++ b/Documentation/devicetree/bindings/input/t...
f57fe78ee48f7aa1f859e7e9c4d6987276a72ecc
Analyze and fix the following issue in the Linux kernel code: Input: atkbd - fix language in a printed message
Problem Details: I believe that "trying to access hardware" is more correct English than "trying access hardware". Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index e05a2e7073c6..add5ffd9fe26 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c @@ -433,7 +433,7 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data, if (printk_ratelimit()...
1ab8be4a14409c55050db69271631afebac29b5a
Analyze and fix the following issue in the Linux kernel code: net/davinci_emac: fix failing PHY connect attempts
Problem Details: PHY connect attempts fail if no PHY id is specified in the emac platform data and another mdio bus has been registered before 'davinci_mdio' bus. In this case when configuring the interface, there will be an attempt to connect to already attached PHY on the previously registered mdio bus: net eth1: PH...
```diff diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c index 174a3348f676..08aff1a2087c 100644 --- a/drivers/net/ethernet/ti/davinci_emac.c +++ b/drivers/net/ethernet/ti/davinci_emac.c @@ -1511,7 +1511,7 @@ static int emac_devioctl(struct net_device *ndev, struct ifreq *ifr...
c2f1244b86492b6cc89202f3f9ed43c88fb3e79d
Analyze and fix the following issue in the Linux kernel code: ehea: only register irq after setting up ports
Problem Details: If we receive an interrupt too early before we set up ports in the probe function, there won't be any port ready to handle it. Only registering the irq after the ports are setup fixes the problem, and works fine without losing any interrupts. This causes crashes in some situations: [c000000f7ff7fd60...
```diff diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c index 3516e17a399d..acf34b671547 100644 --- a/drivers/net/ethernet/ibm/ehea/ehea_main.c +++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c @@ -3261,6 +3261,7 @@ static int __devinit ehea_probe_adapter(struct platform...
9bbf56609d304e8aae2076610d938206453035de
Analyze and fix the following issue in the Linux kernel code: net: usb: smsc95xx: fix mtu
Problem Details: Make smsc95xx recalculate the hard_mtu after adjusting the hard_header_len. Without this, usbnet adjusts the MTU down to 1488 bytes, and the host is unable to receive standard 1500-byte frames from the device. Inspired by same fix on cdc_eem 78fb72f7936c01d5b426c03a691eca082b03f2b9. Tested on ARM/Be...
```diff diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index 5f19f84d3494..53a1ba5e0c2c 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -1017,6 +1017,7 @@ static int smsc95xx_bind(struct usbnet *dev, struct usb_interface *intf) dev->net->ethtool_ops = &smsc95xx_ethtoo...
b98985073bc5403ef1320866e4ef8bbc5d587ceb
Analyze and fix the following issue in the Linux kernel code: net ax25: Fix the build when sysctl support is disabled.
Problem Details: Randy Dunlap <rdunlap@xenotime.net> reported: > On 04/23/2012 12:07 AM, Stephen Rothwell wrote: > >> Hi all, >> >> Changes since 20120420: > > > include/net/ax25.h:447:75: error: expected ';' before '}' token > > static inline int ax25_register_dev_sysctl(ax25_dev *ax25_dev) { return 0 }; > static inl...
```diff diff --git a/include/net/ax25.h b/include/net/ax25.h index 8a7a1220e678..5d2352154cf6 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h @@ -444,8 +444,8 @@ extern void ax25_uid_free(void); extern int ax25_register_dev_sysctl(ax25_dev *ax25_dev); extern void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev...
99aa78466777083255b876293e9e83dec7cd809a
Analyze and fix the following issue in the Linux kernel code: jbd2: use GFP_NOFS for blkdev_issue_flush
Problem Details: flush request is issued in transaction commit code path, so looks using GFP_KERNEL to allocate memory for flush request bio falls into the classic deadlock issue. I saw btrfs and dm get it right, but ext4, xfs and md are using GFP. Signed-off-by: Shaohua Li <shli@fusionio.com> Signed-off-by: Theodore...
```diff diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c index 806525a7269c..840f70f50792 100644 --- a/fs/jbd2/commit.c +++ b/fs/jbd2/commit.c @@ -723,7 +723,7 @@ start_journal_io: if (commit_transaction->t_need_data_flush && (journal->j_fs_dev != journal->j_dev) && (journal->j_flags & JBD2_BARRIER)) - b...
aca50bd3b4c4bb5528a1878158ba7abce41de534
Analyze and fix the following issue in the Linux kernel code: mm: fix s390 BUG by __set_page_dirty_no_writeback on swap
Problem Details: Mel reports a BUG_ON(slot == NULL) in radix_tree_tag_set() on s390 3.0.13: called from __set_page_dirty_nobuffers() when page_remove_rmap() tries to transfer dirty flag from s390 storage key to struct page and radix_tree. That would be because of reclaim's shrink_page_list() calling add_to_swap() on t...
```diff diff --git a/mm/swap_state.c b/mm/swap_state.c index 9d3dd3763cf7..4c5ff7f284d9 100644 --- a/mm/swap_state.c +++ b/mm/swap_state.c @@ -26,7 +26,7 @@ */ static const struct address_space_operations swap_aops = { .writepage = swap_writepage, - .set_page_dirty = __set_page_dirty_nobuffers, + .set_page_dirty =...
5a26c8f0cf1e95106858bb4e23ca6dd14c9b842f
Analyze and fix the following issue in the Linux kernel code: tracing: Remove an unneeded check in trace_seq_buffer()
Problem Details: memcpy() returns a pointer to "bug". Hopefully, it's not NULL here or we would already have Oopsed. Link: http://lkml.kernel.org/r/20120420063145.GA22649@elgon.mountain Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro> Signed-off-by: Dan Carpent...
```diff diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 1ab8e35d069b..bbcde546f9f7 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -629,7 +629,6 @@ ssize_t trace_seq_to_user(struct trace_seq *s, char __user *ubuf, size_t cnt) static ssize_t trace_seq_to_buffer(struct trace_seq *s, void *...
89b8835ec865dddd6673a8dd7003581bf2377176
Analyze and fix the following issue in the Linux kernel code: x32, siginfo: Provide proper overrides for x32 siginfo_t
Problem Details: Provide the proper override macros for x32 siginfo_t. The combination of a special type here and an overall alignment constraint actually ends up with all the types being properly aligned, but the hack is needed to keep the substructures inside siginfo_t from adding padding. Note: use __attribute__((...
```diff diff --git a/arch/x86/include/asm/siginfo.h b/arch/x86/include/asm/siginfo.h index fc1aa5535646..34c47b3341c0 100644 --- a/arch/x86/include/asm/siginfo.h +++ b/arch/x86/include/asm/siginfo.h @@ -2,7 +2,13 @@ #define _ASM_X86_SIGINFO_H #ifdef __x86_64__ -# define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) +# ...
30b8aa9172dfeaac6d77897c67ee9f9fc574cdbb
Analyze and fix the following issue in the Linux kernel code: md: fix possible corruption of array metadata on shutdown.
Problem Details: commit c744a65c1e2d59acc54333ce8 md: don't set md arrays to readonly on shutdown. removed the possibility of a 'BUG' when data is written to an array that has just been switched to read-only, but also introduced the possibility that the array metadata could be corrupted. If, when md_notify_reboot g...
```diff diff --git a/drivers/md/md.c b/drivers/md/md.c index 8beb19c3bb44..477eb2e180c0 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -8140,7 +8140,8 @@ static int md_notify_reboot(struct notifier_block *this, for_each_mddev(mddev, tmp) { if (mddev_trylock(mddev)) { - __md_stop_writes(mddev); + if (m...
ed209584c38fb74b7eecc03e5b1bfe674e591bd8
Analyze and fix the following issue in the Linux kernel code: md: don't call ->add_disk unless there is good reason.
Problem Details: Commit 7bfec5f35c68121e7b18 md/raid5: If there is a spare and a want_replacement device, start replacement. cause md_check_recovery to call ->add_disk much more often. Instead of only when the array is degraded, it is now called whenever md_check_recovery finds anything useful to do, which include...
```diff diff --git a/drivers/md/md.c b/drivers/md/md.c index b572e1e386ce..8beb19c3bb44 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -7560,14 +7560,14 @@ void md_check_recovery(struct mddev *mddev) * any transients in the value of "sync_action". */ set_bit(MD_RECOVERY_RUNNING, &mddev->recovery); - ...
a9ad8526bb1af0741a5c0e01155dac08e7bdde60
Analyze and fix the following issue in the Linux kernel code: DM RAID: Use safe version of rdev_for_each
Problem Details: Fix segfault caused by using rdev_for_each instead of rdev_for_each_safe Commit dafb20fa34320a472deb7442f25a0c086e0feb33 mistakenly replaced a safe iterator with an unsafe one when making some macro changes. Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de...
```diff diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c index b0ba52459ed7..68965e663248 100644 --- a/drivers/md/dm-raid.c +++ b/drivers/md/dm-raid.c @@ -859,7 +859,7 @@ static int analyse_superblocks(struct dm_target *ti, struct raid_set *rs) int ret; unsigned redundancy = 0; struct raid_dev *dev; - str...
2b7b9a7d6c676691cd746a654e2c3b06a6feb9ba
Analyze and fix the following issue in the Linux kernel code: ARM: msm: Fix gic irqdomain support
Problem Details: As of commit 75294957be1dee7d22dd7d90bd31334ba410e836 Author: Grant Likely <grant.likely@secretlab.ca> Date: Tue Feb 14 14:06:57 2012 -0700 irq_domain: Remove 'new' irq_domain in favour of the ppc one the ARM gic controller uses proper irq domains. Fix the MSM gic initializati...
```diff diff --git a/arch/arm/boot/dts/msm8660-surf.dts b/arch/arm/boot/dts/msm8660-surf.dts index 15ded0deaa79..45bc4bb04e57 100644 --- a/arch/arm/boot/dts/msm8660-surf.dts +++ b/arch/arm/boot/dts/msm8660-surf.dts @@ -10,7 +10,7 @@ intc: interrupt-controller@02080000 { compatible = "qcom,msm-8660-qgic"; interr...
eb4887b6c6ddfe401b2668da9c1bf5f154522ace
Analyze and fix the following issue in the Linux kernel code: iwlwifi: revert workaround to restore 1000 rx throughput
Problem Details: A workaround in commit c0486b7ccc5 resulted in a 40% drop in receive throughput in order to fix a transmit problem. The transmit problem no longer occurs, so restore the receive throughput. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c index c1aa5f2ed5ee..8c7a0cd13854 100644 --- a/drivers/net/wireless/iwlwifi/iwl-1000.c +++ b/drivers/net/wireless/iwlwifi/iwl-1000.c @@ -71,7 +71,6 @@ static const struct iwl_base_params iwl1000_base_params = { static...
42f11cf20cc5b76766fd1f0e591eda26283a38ec
Analyze and fix the following issue in the Linux kernel code: be2net: fix ethtool get settings
Problem Details: ethtool get settings was not displaying all the settings correctly. use the get_phy_info to get more information about the PHY to fix this. Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h index 9576ac002c23..ad69cf89491c 100644 --- a/drivers/net/ethernet/emulex/benet/be.h +++ b/drivers/net/ethernet/emulex/benet/be.h @@ -313,6 +313,23 @@ struct be_vf_cfg { #define BE_UC_PMAC_COUNT 30 #define BE_VF_UC_P...
0e9f6aca344f457ac5c1b747e171d7db72e773fd
Analyze and fix the following issue in the Linux kernel code: iwlwifi: move debugfs registration function declarations
Problem Details: They clearly belong into iwl-agn.h as they have no relation to the (generic) debug logging framework. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h index bd467c0c519f..1db6bdec3cb6 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.h +++ b/drivers/net/wireless/iwlwifi/iwl-agn.h @@ -474,6 +474,19 @@ static inline void iwl_dvm_set_pmi(struct iwl_priv *priv, bool state...
9543c5f3d6f8a1eaf770ab097d3f1c13f96ca544
Analyze and fix the following issue in the Linux kernel code: iwlwifi: properly set basic rates
Problem Details: This fixes a long-standing bug: iwlwifi always assumes that the CCK ACK rates are 1 and 2 MBps and the OFDM ACK rates are 6, 12 and 24 MBps. Fix this problem by using the basic rates the AP (or in AP case hostapd) told us to use and add the necessary mandatory rates to the mix. Signed-off-by: Johannes...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.h b/drivers/net/wireless/iwlwifi/iwl-agn-rs.h index 203b1c13c491..351717a77ad9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.h +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.h @@ -174,32 +174,6 @@ enum { IWL_RATE_11M_IEEE = 22, }; -#define IWL_CCK_...
44afb3a04391a74309d16180d1e4f8386fdfa745
Analyze and fix the following issue in the Linux kernel code: drm/i915: fix integer overflow in i915_gem_do_execbuffer()
Problem Details: On 32-bit systems, a large args->num_cliprects from userspace via ioctl may overflow the allocation size, leading to out-of-bounds access. This vulnerability was introduced in commit 432e58ed ("drm/i915: Avoid allocation for execbuffer object list"). Signed-off-by: Xi Wang <xi.wang@gmail.com> Reviewe...
```diff diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index 7c50e58175c0..de431942ded4 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c @@ -1133,6 +1133,11 @@ i915_gem_do_execbuffer(struct drm_device *dev, voi...
ed8cd3b2cd61004cab85380c52b1817aca1ca49b
Analyze and fix the following issue in the Linux kernel code: drm/i915: fix integer overflow in i915_gem_execbuffer2()
Problem Details: On 32-bit systems, a large args->buffer_count from userspace via ioctl may overflow the allocation size, leading to out-of-bounds access. This vulnerability was introduced in commit 8408c282 ("drm/i915: First try a normal large kmalloc for the temporary exec buffers"). Signed-off-by: Xi Wang <xi.wang...
```diff diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index f51a696486cb..7c50e58175c0 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c @@ -1404,7 +1404,8 @@ i915_gem_execbuffer2(struct drm_device *dev, void *...
9169c01236ab29ce55c93aaf22ec6ecc65c46d1a
Analyze and fix the following issue in the Linux kernel code: drivers/base/core.c: Fix a typo in comment
Problem Details: Signed-off-by: YanHong <clouds.yan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/base/core.c b/drivers/base/core.c index 6cb25f1511df..33461ec35d8f 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -65,7 +65,7 @@ static inline int device_is_not_partition(struct device *dev) * @dev: struct device to get the name of * * Will return the device's driver's ...
2a5783b817c90ce6fb82a21e103335d1ecbac430
Analyze and fix the following issue in the Linux kernel code: ath9k: don't strip mic on non-encrypted frames in tkip
Problem Details: Fix the following bug: in tkip mode, qos-null ps on/off packets are dropped due to incorrect packet length so that ath9k softap can't handle powersave state transition of peer STA correctly. Signed-off-by: Michael Liang <mliang@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 12b09798864a..544e5490ca2e 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c @@ -812,6 +812,7 @@ static bool ath9k_rx_accept(struct ath_common *common, is_valid_tkip = ...
7c5adc8d83c344dbad251091879baf1244007564
Analyze and fix the following issue in the Linux kernel code: ath9k_hw: fix and clean up PHY activation delay
Problem Details: The delay calculation is the same for all chips, however some parts of the code missed the extra delay factor for half/quarter. Clean up the code and move the delay calculation to a common place. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c index de30cb34b8f3..f554bff87e62 100644 --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c @@ -618,19 +618,10 @@ static void ar5008_hw_init_bb(struct ath_hw *ah...
aee286c2cf94929f90d4d1f64ee9b316007ba284
Analyze and fix the following issue in the Linux kernel code: mac80211: fix STA channel width field
Problem Details: According to IEEE 802.11 8.4.2.59, set the "STA channel width" bit to 0 if transmitting STA is using a 20mhz channel. Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 89c1e5b9ba94..577942bfc024 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -1684,7 +1684,9 @@ u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap, ht_oper->ht_param = IEEE80211_HT_PARAM_CHA_SEC_NONE; break; ...
e76781e48f969e044d318485274b9574f1ccc3dd
Analyze and fix the following issue in the Linux kernel code: mac80211: don't set mesh peer ht caps if ht disabled
Problem Details: Blindly setting ht caps on a mesh peer's station entry would result in MCS rates being used by the rate control algorithm even if no ht had been configured. Fix this by checking the channel type before assigning ht capabilites. Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W....
```diff diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index c2af7b3d03cd..1ff2a5c63e43 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c @@ -295,7 +295,8 @@ static struct sta_info *mesh_peer_init(struct ieee80211_sub_if_data *sdata, spin_lock_bh(&sta->lock); sta->last_rx = ...
54ab1ffb6cd94e5c013d61c192e78e30fdf25f8a
Analyze and fix the following issue in the Linux kernel code: mac80211: refactor mesh peer initialization
Problem Details: This patch unifies the previous two paths toward mesh peer creation a bit. It also fixes a bug where a peer's changing rates or HT mode wouldn't register on leaving and then returning to the mesh with a sta entry still present. Also clean up locking and clear possibly stale ht cap. Signed-off-by: Tho...
```diff diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index 9c836e774fbd..c3a0b0a4f97f 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c @@ -82,20 +82,14 @@ static inline void mesh_plink_fsm_restart(struct sta_info *sta) } /* - * NOTE: This is just an alias for sta_info_all...
75acd5a82afda30fb615335ff6c8e5f3a1ca5e83
Analyze and fix the following issue in the Linux kernel code: ath9k: fix TX power reporting on AR9003 chips
Problem Details: The current code unconditionally reads the target power values for all modes from the EEPROM. However In 'ar9003_hw_set_power_per_rate_table' the regulatory caps are applied only on a mode specific subset of the power values. The reported TX power level is calculated from the maximum of the power valu...
```diff diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c index 1188db205e32..ac53d901801d 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c @@ -4281,18 +4281,10 @@ static int ar9003_hw_tx_power_reg...
990e08a0f6115ce93b480325a575b535c92513ee
Analyze and fix the following issue in the Linux kernel code: ath9k: Fix compile warnings when DEBUGFS is disabled.
Problem Details: This fixes two compile warnings, and removes a useless cast when assigning the 'sc' variable. Reported-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index dd4b8f4097c8..8c827a183fc0 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h @@ -959,7 +959,8 @@ bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode); #ifdef CO...
44eb65cfd8da4b9c231238998729e858e963a980
Analyze and fix the following issue in the Linux kernel code: rtlwifi: Fix oops on unload
Problem Details: Under some circumstances, a PCI-based driver reports the following OOPs: Mar 19 08:14:35 kvothe kernel: [ 6584.626011] Oops: 0000 [#1] SMP --snip-- Mar 19 08:14:35 kvothe kernel: [ 6584.626011] Pid: 19627, comm: rmmod Not tainted 3.2.9-2.fc16.x86_64 #1 LENOVO 05962RU/05962RU Mar 19 08:14:35 kvothe ker...
```diff diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index 288b035a3579..cc15fdb36060 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c @@ -1941,6 +1941,7 @@ void rtl_pci_disconnect(struct pci_dev *pdev) rtl_deinit_deferred_work(hw); r...
dd447319895d0c0af423e483d9b63f84f3f8869a
Analyze and fix the following issue in the Linux kernel code: ipw2200: Fix race condition in the command completion acknowledge
Problem Details: Driver incorrectly validates command completion: instead of waiting for a command to be acknowledged it continues execution. Most of the time driver gets acknowledge of the command completion in a tasklet before it executes the next one. But sometimes it sends the next command before it gets acknowled...
```diff diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c index 2b022571a859..1779db3aa2b0 100644 --- a/drivers/net/wireless/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/ipw2x00/ipw2200.c @@ -2191,6 +2191,7 @@ static int __ipw_send_cmd(struct ipw_priv *priv, struct host_cmd *c...
83722bd4aede80714f75bedc3cce9b6ea9baea7b
Analyze and fix the following issue in the Linux kernel code: ath9k: fix tx power settings for AR9287
Problem Details: The 'ath9k_hw_update_regulatory_maxpower' helper function has been introduced by commit a55f858852e4345d0a31af593c46738ca8614bff (ath9k_hw: Cleanup TX power calculation for AR9287). Updating of the max_power_level value has been moved into the helper function in that change, however the removed code f...
```diff diff --git a/drivers/net/wireless/ath/ath9k/eeprom_9287.c b/drivers/net/wireless/ath/ath9k/eeprom_9287.c index f272236d8053..b34e8b2990b1 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c @@ -824,6 +824,8 @@ static void ath9k_hw_ar9287_set_txpower(struc...
715525057423eeb6308d2c605ae9ec8325e43858
Analyze and fix the following issue in the Linux kernel code: [SCSI] aacraid: add an iounmap call to aac_src_ioremap
Problem Details: The patch 116046127d1a3bad2853d02781ad9fee33f05e5a "[SCSI] aacraid: Added Sync.mode to support series 7/8/9 controllers" removed an iounmap call from aac_src_ioremap. Before that, the iounmap has been called twice with the same value (dev->base and dev->regs.src.bar0) and the iounmap complained about i...
```diff diff --git a/drivers/scsi/aacraid/src.c b/drivers/scsi/aacraid/src.c index 2bee51506a91..762820636304 100644 --- a/drivers/scsi/aacraid/src.c +++ b/drivers/scsi/aacraid/src.c @@ -424,6 +424,8 @@ static int aac_src_deliver_message(struct fib *fib) static int aac_src_ioremap(struct aac_dev *dev, u32 size) { i...
e42fafc25fa86c61824e8d4c5e7582316415d24f
Analyze and fix the following issue in the Linux kernel code: [SCSI] mpt2sas: Fix for panic happening because of improper memory allocation
Problem Details: The ioc->pfacts member in the IOC structure is getting set to zero following a call to _base_get_ioc_facts due to the memset in that routine. So if the ioc->pfacts was read after a host reset, there would be a NULL pointer dereference. The routine _base_get_ioc_facts is called from context of host rese...
```diff diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index 702faf67710a..6102ef2cb2d8 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c @@ -3350,7 +3350,7 @@ _base_get_port_facts(struct MPT2SAS_ADAPTER *ioc, int port, int sleep_flag) }...
39af7a98946a73f2e4bfb35cfbca2114366d0c82
Analyze and fix the following issue in the Linux kernel code: [SCSI] mpt2sas: Fix for hard drive going OFFLINE when hard reset issued and simultaneously another hard drive is hot unplugged
Problem Details: Following the host reset, the firmware discovery is reassigning another hard drive in the topology to the same device handle as that device is getting hot removed. Until the driver device removal routine is called, there will be two hard drive with the matching device handle in the internal device link...
```diff diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c index d901d4bffeaa..f612d1dc7baf 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c @@ -2915,7 +2915,7 @@ _scsih_ublock_io_all_device(struct MPT2SAS_ADAPTER *ioc) * During device ...
43d6ddfa7aba2439d5bd22973046bdcb0faa78fb
Analyze and fix the following issue in the Linux kernel code: [SCSI] mpt2sas : While enabling phy, read the current port number from sas iounit page 0 instead of page 1
Problem Details: The port number is changing after disabling/enabling phys using the SysFS interface This is because the firmware behavour changed where it would read the the port number then set it to some different value even though Auto Port Config is turned on. With this change of behavour in FW, it is possible th...
```diff diff --git a/drivers/scsi/mpt2sas/mpt2sas_transport.c b/drivers/scsi/mpt2sas/mpt2sas_transport.c index fed8b163afef..865deb9a5e5a 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_transport.c +++ b/drivers/scsi/mpt2sas/mpt2sas_transport.c @@ -1639,11 +1639,13 @@ _transport_phy_enable(struct sas_phy *phy, int enable) {...
d838c36cb7d9642b9b42dd18c511ba28c592b694
Analyze and fix the following issue in the Linux kernel code: [SCSI] mpt2sas: Fix linux driver sparse errors
Problem Details: Fix several endian issues found by runing sparse. Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
```diff diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index f162db3a0c05..702faf67710a 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c @@ -4160,7 +4160,8 @@ _base_make_ioc_operational(struct MPT2SAS_ADAPTER *ioc, int sleep_flag) if (i...
298c794def0631763ec861e641a448c7decf73bb
Analyze and fix the following issue in the Linux kernel code: [SCSI] mpt2sas: Fix security scan issues reported by source code analysis tool
Problem Details: Modified the source code as per the findings reported by the source code analysis tool. Source code for the following functionalities has been touched. None of the driver functionalities has changed. - SMP Passthrough IOCTL - Debug messages for MPT Replies (i.e. bit 9 of Logging Level) - Task Manageme...
```diff diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index 30d540a05ad8..f162db3a0c05 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c @@ -699,6 +699,11 @@ _base_display_reply_info(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index, ...
c1529fa25e20f4c5d92d82165a8ff5fe27eae974
Analyze and fix the following issue in the Linux kernel code: [SCSI] megaraid_sas: Add fpRead/WriteCapable, fpRead/WriteAcrossStripe checks
Problem Details: The following patch for megaraid_sas fixes the fastpath code decision logic to use fpRead/WriteCapable, fpRead/WriteAcrossStripe flags instead of the old logic. This fixes a bug where fastpath writes could be sent to a read only LD. Signed-off-by: Adam Radford <aradford@gmail.com> Signed-off-by: Jame...
```diff diff --git a/drivers/scsi/megaraid/megaraid_sas_fp.c b/drivers/scsi/megaraid/megaraid_sas_fp.c index 294abb0defa6..e3d251a2e26a 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fp.c +++ b/drivers/scsi/megaraid/megaraid_sas_fp.c @@ -362,15 +362,20 @@ MR_BuildRaidContext(struct megasas_instance *instance, /* ass...
fd00f7c1034391efa55bf87235a933fd76975af9
Analyze and fix the following issue in the Linux kernel code: [SCSI] pm8001: fix endian issue with code optimization.
Problem Details: Data type of the 'tag' field of 'fw_flash_Update_resp' should be __le32. Data type of 'pHeader' should be __le32. Remove 2nd cast to 'piomb'. Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com> Acked-by: Jack Wang <jack_wang@usish.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com...
```diff diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c index 9d82ee5c10de..2da0accf1a51 100644 --- a/drivers/scsi/pm8001/pm8001_hwi.c +++ b/drivers/scsi/pm8001/pm8001_hwi.c @@ -3357,7 +3357,7 @@ mpi_fw_flash_update_resp(struct pm8001_hba_info *pm8001_ha, void *piomb) struct fw_contro...
0976dfc1d0cd80a4e9dfaf87bd8744612bde475a
Analyze and fix the following issue in the Linux kernel code: workqueue: Catch more locking problems with flush_work()
Problem Details: If a workqueue is flushed with flush_work() lockdep checking can be circumvented. For example: static DEFINE_MUTEX(mutex); static void my_work(struct work_struct *w) { mutex_lock(&mutex); mutex_unlock(&mutex); } static DECLARE_WORK(work, my_work); static int __init start_tes...
```diff diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 66ec08de6dac..211eadb23323 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -2509,6 +2509,9 @@ bool flush_work(struct work_struct *work) { struct wq_barrier barr; + lock_map_acquire(&work->lockdep_map); + lock_map_release(&work->lockdep_...
53ad1c980d4fb450722a575ca17c188808939340
Analyze and fix the following issue in the Linux kernel code: dlm: fix QUECVT when convert queue is empty
Problem Details: The QUECVT flag should not prevent conversions from being granted immediately when the convert queue is empty. Signed-off-by: David Teigland <teigland@redhat.com>
```diff diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index fa5c07d51dcc..4c58d4a3adc4 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c @@ -1736,6 +1736,18 @@ static int _can_be_granted(struct dlm_rsb *r, struct dlm_lkb *lkb, int now) if (now && conv && !(lkb->lkb_exflags & DLM_LKF_QUECVT)) return 1; + /* + * Even i...
9f3045eca89a2e6fdd1901aafb9e28231d3f31fb
Analyze and fix the following issue in the Linux kernel code: irq: hide debug macros so they don't collide with others.
Problem Details: The file kernel/irq/debug.h temporarily defines P, PS, PD and then undefines them. However these names aren't really "internal" enough, and collide with other more legit users such as the ones in the xtensa arch, causing: In file included from kernel/irq/internals.h:58:0, from kernel...
```diff diff --git a/kernel/irq/debug.h b/kernel/irq/debug.h index 97a8bfadc88a..e75e29e4434a 100644 --- a/kernel/irq/debug.h +++ b/kernel/irq/debug.h @@ -4,10 +4,10 @@ #include <linux/kallsyms.h> -#define P(f) if (desc->status_use_accessors & f) printk("%14s set\n", #f) -#define PS(f) if (desc->istate & f) printk...
bfae8ee8d28e6a4ac1d63e8077cb09928d8a557a
Analyze and fix the following issue in the Linux kernel code: xtensa: fix build error in xtensa/include/asm/io.h
Problem Details: Caused by commit 6c03438edeb5c359af35f060ea016ca65671c269 kernel.h: doesn't explicitly use bug.h, so don't include it. This header uses bug.h so explicitly include it now that the implicit presence was removed by 6c03438ed. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
```diff diff --git a/arch/xtensa/include/asm/io.h b/arch/xtensa/include/asm/io.h index d04cd3a625fa..4beb43c087d3 100644 --- a/arch/xtensa/include/asm/io.h +++ b/arch/xtensa/include/asm/io.h @@ -14,6 +14,7 @@ #ifdef __KERNEL__ #include <asm/byteorder.h> #include <asm/page.h> +#include <linux/bug.h> #include <linux/...
9112a6b2fa4201c284c62a389710bd32b48c5f63
Analyze and fix the following issue in the Linux kernel code: xtensa: fix build failure in xtensa/kernel/signal.c
Problem Details: Caused by commit 3785006ac3c8941feb63097c416de92114a6bc39 "xtensa: don't mask signals if we fail to setup signal stack" It assigns a return value to "ret", but there is no such variable anywhere in scope. Create one. Cc: Oleg Nesterov <oleg@redhat.com> Cc: Chris Zankel <chris@zankel.net> Acked-...
```diff diff --git a/arch/xtensa/kernel/signal.c b/arch/xtensa/kernel/signal.c index b69b000349fc..d78869a00b11 100644 --- a/arch/xtensa/kernel/signal.c +++ b/arch/xtensa/kernel/signal.c @@ -496,6 +496,7 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset) signr = get_signal_to_deliver(&info, &ka, regs, NULL); ...