id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
1f7aac6eb585f92756603341cb1d770c797c4867
Analyze and fix the following issue in the Linux kernel code: powerpc/via-pmu-led.c: Add of_node_put to avoid memory leak
Problem Details: Add a call to of_node_put in the error handling code following a call to of_find_node_by_path. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ local idexpression x; expression E,E1; statement S; @@ *x = (of_find_node_by_path |of_find_node_b...
```diff diff --git a/drivers/macintosh/via-pmu-led.c b/drivers/macintosh/via-pmu-led.c index d242976bcfe7..19c371809d77 100644 --- a/drivers/macintosh/via-pmu-led.c +++ b/drivers/macintosh/via-pmu-led.c @@ -92,8 +92,10 @@ static int __init via_pmu_led_init(void) if (dt == NULL) return -ENODEV; model = of_get_pro...
872e439a45ed4a4bd499bc55cb0dffa74027f749
Analyze and fix the following issue in the Linux kernel code: powerpc/pseries: Re-enable dispatch trace log userspace interface
Problem Details: Since the cpu accounting code uses the hypervisor dispatch trace log now when CONFIG_VIRT_CPU_ACCOUNTING = y, the previous commit disabled access to it via files in the /sys/kernel/debug/powerpc/dtl/ directory in that case. This restores those files. To do this, we now have a hook that the cpu accoun...
```diff diff --git a/arch/powerpc/include/asm/lppaca.h b/arch/powerpc/include/asm/lppaca.h index cfb85ec85750..7f5e0fefebb0 100644 --- a/arch/powerpc/include/asm/lppaca.h +++ b/arch/powerpc/include/asm/lppaca.h @@ -191,6 +191,14 @@ struct dtl_entry { #define DISPATCH_LOG_BYTES 4096 /* bytes per cpu */ #define N_DISPA...
cf9efce0ce3136fa076f53e53154e98455229514
Analyze and fix the following issue in the Linux kernel code: powerpc: Account time using timebase rather than PURR
Problem Details: Currently, when CONFIG_VIRT_CPU_ACCOUNTING is enabled, we use the PURR register for measuring the user and system time used by processes, as well as other related times such as hardirq and softirq times. This turns out to be quite confusing for users because it means that a program will often be measu...
```diff diff --git a/arch/powerpc/include/asm/exception-64s.h b/arch/powerpc/include/asm/exception-64s.h index 57c400071995..7778d6f0c878 100644 --- a/arch/powerpc/include/asm/exception-64s.h +++ b/arch/powerpc/include/asm/exception-64s.h @@ -137,7 +137,8 @@ li r10,0; \ ld r11,exception_marker@toc(r2); ...
ea39302b87b8d944d567ef29c0647c09da5743fa
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms/evergreen: work around bad data in some i2c tables
Problem Details: The 7th entry in a lot of evergreen i2c gpio tables is partially zeroed. Fix the entry. Should fix the missing ddc entry in: https://bugs.freedesktop.org/show_bug.cgi?id=29255 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index 61141981880d..ebae14c4b768 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c @@ -85,6 +85,19 @@ static inline struct radeon_i2c_bus_rec radeon_lookup_i2c_gpio...
409d568dc5f0dd179b5343630b65fdf082c14069
Analyze and fix the following issue in the Linux kernel code: Staging: mrst-touchscreen - fix channel allocation
Problem Details: The touch screen driver tries to find a range of free channels (which are an array of bytes), by scanning for the "end of used channel" marker. However it tries to be WAAAAY too smart and does 32 bit logic on 8 bit quantities, and in the process completely gets it wrong (repeatedly read the same regist...
```diff diff --git a/drivers/staging/mrst-touchscreen/intel-mid-touch.c b/drivers/staging/mrst-touchscreen/intel-mid-touch.c index 9333b9e09598..2b9a7864ee71 100644 --- a/drivers/staging/mrst-touchscreen/intel-mid-touch.c +++ b/drivers/staging/mrst-touchscreen/intel-mid-touch.c @@ -498,8 +498,8 @@ static int __devinit ...
aff4c343614f0c9980352810df70969821cba95f
Analyze and fix the following issue in the Linux kernel code: Staging: mrst_touchscreen - clean up input side
Problem Details: Fix most of the stuff that Dmitry pointed out. This leaves the mutex in IRQ and misuse of SPI to sort out. Also fix the build bits so it actually builds in staging - whoops. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile index 9fa25133874a..d071bac73acc 100644 --- a/drivers/staging/Makefile +++ b/drivers/staging/Makefile @@ -52,5 +52,5 @@ obj-$(CONFIG_CXT1E1) += cxt1e1/ obj-$(CONFIG_TI_ST) += ti-st/ obj-$(CONFIG_ADIS16255) += adis16255/ obj-$(CONFIG_FB_XGI) ...
3e502e63586920f219ed2590f69c1f5a8888cfa4
Analyze and fix the following issue in the Linux kernel code: starfire: Temporary kludge to fix powerpc build.
Problem Details: Add a dma_addr_t 64-bit case for powerpc with 64-bit phys addresses. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c index c3bf288aaf25..4adf12422787 100644 --- a/drivers/net/starfire.c +++ b/drivers/net/starfire.c @@ -148,7 +148,7 @@ static int full_duplex[MAX_UNITS] = {0, }; * This SUCKS. * We need a much better method to determine if dma_addr_t is 64-bit. *...
3d3be4333fdf6faa080947b331a6a19bce1a4f57
Analyze and fix the following issue in the Linux kernel code: gro: fix different skb headrooms
Problem Details: Packets entering GRO might have different headrooms, even for a given flow (because of implementation details in drivers, like copybreak). We cant force drivers to deliver packets with a fixed headroom. 1) fix skb_segment() skb_segment() makes the false assumption headrooms of fragments are same than...
```diff diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 3a2513f0d0c3..26396ff67cf9 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -2573,6 +2573,10 @@ struct sk_buff *skb_segment(struct sk_buff *skb, int features) __copy_skb_header(nskb, skb); nskb->mac_len = skb->mac_len; + /* nskb and skb ...
cf4c12f9a2289e3679722590e1226ae8deb14385
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix tv module parameter
Problem Details: The tv parameter was added to disable the tv-out connector, however, it caused a crash if it was set to 0 due to drm_connector_init not getting called. If tv=0, don't attempt to add the connector. Might fix: https://bugzilla.kernel.org/show_bug.cgi?id=17241 Signed-off-by: Alex Deucher <alexdeucher@g...
```diff diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index 1a5ee392e9c7..a9dd7847d96e 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c @@ -1051,10 +1051,16 @@ radeon_add_atom_connector(struct drm_device *dev,...
93f68f1ef787d97ab688f78a01f446e85bb9a496
Analyze and fix the following issue in the Linux kernel code: powerpc/pseries: Correct rtas_data_buf locking in dlpar code
Problem Details: The dlpar code can cause a deadlock to occur when making the RTAS configure-connector call. This occurs because we make kmalloc calls, which can block, while parsing the rtas_data_buf and holding the rtas_data_buf_lock. This an cause issues if someone else attempts to grab the rtas_data_bug_lock. Th...
```diff diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c index 227c1c3d585e..72d8054fa739 100644 --- a/arch/powerpc/platforms/pseries/dlpar.c +++ b/arch/powerpc/platforms/pseries/dlpar.c @@ -129,20 +129,35 @@ struct device_node *dlpar_configure_connector(u32 drc_index) stru...
a9d8fb4d09ec8823045f44ebcde53a563fce2feb
Analyze and fix the following issue in the Linux kernel code: [ARM] tegra: Add ZRELADDR default for ARCH_TEGRA
Problem Details: fixes the warning: .config:369:warning: symbol value '' invalid for ZRELADDR and the prompt for ZRELADDR on make Signed-off-by: Erik Gilling <konkers@android.com>
```diff diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index a7ed21f0136a..16bc8eb4901c 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1601,6 +1601,7 @@ config ZRELADDR ARCH_ORION5X ||\ ARCH_SPEAR3XX ||\ ARCH_SPEAR6XX ||\ + ARCH_TEGRA ||\ ARCH_U8500 ||\ ARCH_VERSATILE ||\ ARCH_W90X900 ```
750e9fad8c7f44e0005ffb7195f72dd76978c2cf
Analyze and fix the following issue in the Linux kernel code: ipv4: minor fix about RPF in help of Kconfig
Problem Details: Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig index 7c3a7d191249..571f8950ed06 100644 --- a/net/ipv4/Kconfig +++ b/net/ipv4/Kconfig @@ -46,7 +46,7 @@ config IP_ADVANCED_ROUTER rp_filter on use: echo 1 > /proc/sys/net/ipv4/conf/<device>/rp_filter - and + or echo 1 > /proc/sys/net/ipv4/conf...
3b2eb6131e2f6ff646abb0fc69648179b8b70216
Analyze and fix the following issue in the Linux kernel code: net/sched/sch_hfsc.c: initialize parent's cl_cfmin properly in init_vf()
Problem Details: This patch fixes init_vf() function, so on each new backlog period parent's cl_cfmin is properly updated (including further propgation towards the root), even if the activated leaf has no upperlimit curve defined. Signed-off-by: Michal Soltys <soltys@ziu.info> Signed-off-by: David S. Miller <davem@dav...
```diff diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c index abd904be4287..47496098d35c 100644 --- a/net/sched/sch_hfsc.c +++ b/net/sched/sch_hfsc.c @@ -761,8 +761,8 @@ init_vf(struct hfsc_class *cl, unsigned int len) if (f != cl->cl_f) { cl->cl_f = f; cftree_update(cl); - update_cfmin(cl->cl_par...
9c01ae58d4fee39e2af5b1379ee5431dd585cf62
Analyze and fix the following issue in the Linux kernel code: pxa168_eth: fix a mdiobus leak
Problem Details: mdiobus resources must be released on exit Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org> Acked-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/pxa168_eth.c b/drivers/net/pxa168_eth.c index 410ea0a61371..85eddda276bd 100644 --- a/drivers/net/pxa168_eth.c +++ b/drivers/net/pxa168_eth.c @@ -1606,6 +1606,8 @@ static int pxa168_eth_remove(struct platform_device *pdev) iounmap(pep->base); pep->base = NULL; + mdiobus_unregister...
0f04cfd098fb81fded74e78ea1a1b86cc6c6c31e
Analyze and fix the following issue in the Linux kernel code: net sched: fix kernel leak in act_police
Problem Details: While reviewing commit 1c40be12f7d8ca1d387510d39787b12e512a7ce8, I audited other users of tc_action_ops->dump for information leaks. That commit covered almost all of them but act_police still had a leak. opt.limit and opt.capab aren't zeroed out before the structure is passed out. This patch u...
```diff diff --git a/net/sched/act_police.c b/net/sched/act_police.c index 537a48732e9e..7ebf7439b478 100644 --- a/net/sched/act_police.c +++ b/net/sched/act_police.c @@ -350,22 +350,19 @@ tcf_act_police_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref) { unsigned char *b = skb_tail_pointer(skb); s...
269f45c25028c75fe10e6d9be86e7202ab461fbc
Analyze and fix the following issue in the Linux kernel code: oprofile, x86: fix init_sysfs() function stub
Problem Details: The use of the return value of init_sysfs() with commit 10f0412 oprofile, x86: fix init_sysfs error handling discovered the following build error for !CONFIG_PM: .../linux/arch/x86/oprofile/nmi_int.c: In function ‘op_nmi_init’: .../linux/arch/x86/oprofile/nmi_int.c:784: error: expected expression...
```diff diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c index 73a41d3c6c09..cfe4faabb0f6 100644 --- a/arch/x86/oprofile/nmi_int.c +++ b/arch/x86/oprofile/nmi_int.c @@ -585,8 +585,10 @@ static void exit_sysfs(void) } #else -#define init_sysfs() do { } while (0) -#define exit_sysfs() do { } whi...
aed5029ead26fe47527d9e9f2052cf56b72543f0
Analyze and fix the following issue in the Linux kernel code: drivers/net/can/mscan/mpc5xxx_can.c: Add of_node_put to avoid memory leak
Problem Details: Add a call to of_node_put in the error handling code following a call to of_find_matching_node. This patch also moves the existing call to of_node_put after the call to iounmap in the error handling code, to make it possible to jump to of_node_put without doing iounmap. These appear to be disjoint op...
```diff diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c index b1bdc909090f..312b9c8f4f3b 100644 --- a/drivers/net/can/mscan/mpc5xxx_can.c +++ b/drivers/net/can/mscan/mpc5xxx_can.c @@ -143,12 +143,12 @@ static u32 __devinit mpc512x_can_get_clock(struct platform_device *ofdev, np_...
eb80ce740a7e1deda5bedb9b5df876ce84ac5bc2
Analyze and fix the following issue in the Linux kernel code: bnx2x: Fix potential link issue In BCM8727 based boards
Problem Details: In BCM8727 based boards, setting default 10G link speed after link was set to 1G may lead to link down issue. The problem was setting the right value, but to the wrong registers Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David...
```diff diff --git a/drivers/net/bnx2x/bnx2x_link.c b/drivers/net/bnx2x/bnx2x_link.c index 9b4e7b3261aa..cbacf8a7c65f 100644 --- a/drivers/net/bnx2x/bnx2x_link.c +++ b/drivers/net/bnx2x/bnx2x_link.c @@ -4239,8 +4239,10 @@ static u8 bnx2x_ext_phy_init(struct link_params *params, struct link_vars *vars) } else if ((p...
8ca60a68a9fd61b4cf31b48d9c365b07e5588bbe
Analyze and fix the following issue in the Linux kernel code: bnx2x: Fix potential link issue of BCM8073/BCM8727
Problem Details: Fix potential link issue caused by insufficient delay time during SPIROM load of BCM8073/BCM8727 Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/bnx2x/bnx2x_link.c b/drivers/net/bnx2x/bnx2x_link.c index 0fa09913051d..9b4e7b3261aa 100644 --- a/drivers/net/bnx2x/bnx2x_link.c +++ b/drivers/net/bnx2x/bnx2x_link.c @@ -2549,8 +2549,8 @@ static void bnx2x_bcm8073_bcm8727_external_rom_boot(struct bnx2x *bp, u8 port, MDIO_PMA_R...
7373373d100e5aebe751af0b2609a9a01dad5ac1
Analyze and fix the following issue in the Linux kernel code: qlcnic: fix mac override capability
Problem Details: o Rename mac_learning to mac_override o Added check in set_mac to return error if mac override is disabled. o Disabling mac_override only supported for Non priviledged functions. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Sig...
```diff diff --git a/drivers/net/qlcnic/qlcnic.h b/drivers/net/qlcnic/qlcnic.h index 220370fac726..cd1a2e6f59d2 100644 --- a/drivers/net/qlcnic/qlcnic.h +++ b/drivers/net/qlcnic/qlcnic.h @@ -905,6 +905,7 @@ struct qlcnic_mac_req { #define QLCNIC_ADAPTER_INITIALIZED 0x80 #define QLCNIC_TAGGING_ENABLED 0x100 #define ...
dcb50afff747d15fc2ffff762c08c325e4c229e5
Analyze and fix the following issue in the Linux kernel code: qlcnic: fix panic while using eth_hdr
Problem Details: o skb->mac_header is not set, so machine panics while using function eth_hdr. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c index 9a3ebb8a8203..789fe817cfca 100644 --- a/drivers/net/qlcnic/qlcnic_main.c +++ b/drivers/net/qlcnic/qlcnic_main.c @@ -1991,6 +1991,7 @@ qlcnic_xmit_frame(struct sk_buff *skb, struct net_device *netdev) struct qlcnic_skb_frag ...
7613c87b2d805acf7c882935d47aa84d1947656f
Analyze and fix the following issue in the Linux kernel code: qlcnic: fix mac anti spoof policy
Problem Details: o Allow enabling/disabling mac anti spoof policy only for Non privilege functions. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c index e0c6811610ab..9a3ebb8a8203 100644 --- a/drivers/net/qlcnic/qlcnic_main.c +++ b/drivers/net/qlcnic/qlcnic_main.c @@ -741,9 +741,9 @@ qlcnic_set_eswitch_port_features(struct qlcnic_adapter *adapter, struct qlcnic_esw_func_cf...
174240a8efc441f01f2909ee167c0c15099c0212
Analyze and fix the following issue in the Linux kernel code: qlcnic: fix for setting default eswitch config
Problem Details: o Default eswitch config was set, even before eswitch capabilty get detected. As a result setting default config was getting fail. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net...
```diff diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c index 3f2f93b1a9fe..e0c6811610ab 100644 --- a/drivers/net/qlcnic/qlcnic_main.c +++ b/drivers/net/qlcnic/qlcnic_main.c @@ -667,7 +667,6 @@ qlcnic_check_options(struct qlcnic_adapter *adapter) { u32 fw_major, fw_minor, fw_build; ...
da48e6c362d24d324f36a780d8566109e5f5a1d7
Analyze and fix the following issue in the Linux kernel code: qlcnic: fix mac addr read
Problem Details: o Mac addr was read from flash for every fw reset for Non-priviledge function.It should be read only once. o Remove unnecessary get_mac_addr callback Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <...
```diff diff --git a/drivers/net/qlcnic/qlcnic.h b/drivers/net/qlcnic/qlcnic.h index 74eff18fc1ec..220370fac726 100644 --- a/drivers/net/qlcnic/qlcnic.h +++ b/drivers/net/qlcnic/qlcnic.h @@ -1259,7 +1259,6 @@ int qlcnic_config_bridged_mode(struct qlcnic_adapter *adapter, u32 enable); int qlcnic_send_lro_cleanup(struct...
4e70812b3dc32c76fa2fa3aa2c8221eaac87cd6f
Analyze and fix the following issue in the Linux kernel code: qlcnic: backout firmware initialization update
Problem Details: o Backing out "firmware initialization update" changes, commit-id "d4066833bb1b35fefb1dd45eb2b10659d46bf151". o fix heartbit spelling, it should be heartbeat Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller...
```diff diff --git a/drivers/net/qlcnic/qlcnic.h b/drivers/net/qlcnic/qlcnic.h index 1f5c10bc9376..74eff18fc1ec 100644 --- a/drivers/net/qlcnic/qlcnic.h +++ b/drivers/net/qlcnic/qlcnic.h @@ -978,7 +978,7 @@ struct qlcnic_adapter { u32 temp; u32 int_vec_bit; - u32 heartbit; + u32 heartbeat; u8 max_mac_filters;...
59482fe5959675f180469ae95e4fcd0a15920ced
Analyze and fix the following issue in the Linux kernel code: powerpc/512x: fix clk_get() return value
Problem Details: clk_get() should return an ERR_PTR value on error, not NULL. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
```diff diff --git a/arch/powerpc/platforms/512x/clock.c b/arch/powerpc/platforms/512x/clock.c index 5b243bd3eb3b..3dc2a8d262b8 100644 --- a/arch/powerpc/platforms/512x/clock.c +++ b/arch/powerpc/platforms/512x/clock.c @@ -57,7 +57,7 @@ static struct clk *mpc5121_clk_get(struct device *dev, const char *id) int id_mat...
3e073367a57d41e506f20aebb98e308387ce3090
Analyze and fix the following issue in the Linux kernel code: alpha: Fix printk format errors
Problem Details: When compiling alpha generic build get errors such as: arch/alpha/kernel/err_marvel.c: In function ‘marvel_print_err_cyc’: arch/alpha/kernel/err_marvel.c:119: error: format ‘%ld’ expects type ‘long int’, but argument 6 has type ‘u64’ Replaced a number of %ld format specifiers with %lld since u64 is un...
```diff diff --git a/arch/alpha/kernel/err_marvel.c b/arch/alpha/kernel/err_marvel.c index 52a79dfc13c6..5c905aaaeccd 100644 --- a/arch/alpha/kernel/err_marvel.c +++ b/arch/alpha/kernel/err_marvel.c @@ -109,7 +109,7 @@ marvel_print_err_cyc(u64 err_cyc) #define IO7__ERR_CYC__CYCLE__M (0x7) printk("%s Packet ...
34860089c9e8abcc77428d29743b37ff756197e7
Analyze and fix the following issue in the Linux kernel code: spi: free children in spi_unregister_master, not siblings
Problem Details: introduced by 49dce689 ("spi doesn't need class_device") and bad-fixed by 350d0076 ("spi: fix double-free on spi_unregister_master"), spi_unregister_master would previously device_unregister all of the spi master's siblings (instead of its children). hilarity ensues. fix it to unregister children. Si...
```diff diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index a9e5c79ae52a..0bcf4c1601a2 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -554,11 +554,9 @@ done: EXPORT_SYMBOL_GPL(spi_register_master); -static int __unregister(struct device *dev, void *master_dev) +static int __unregister(struct device...
4e4438b86527e8bf1f49503a30d487e401e64f9c
Analyze and fix the following issue in the Linux kernel code: gpiolib: Add 'struct gpio_chip' forward declaration for !GPIOLIB case
Problem Details: With CONFIG_GPIOLIB=n, the 'struct gpio_chip' is not declared, so the following pops up on PowerPC: cc1: warnings being treated as errors In file included from arch/powerpc/platforms/52xx/mpc52xx_common.c:19: include/linux/of_gpio.h:74: warning: 'struct gpio_chip' declared ...
```diff diff --git a/include/linux/gpio.h b/include/linux/gpio.h index 03f616b78cfa..e41f7dd1ae67 100644 --- a/include/linux/gpio.h +++ b/include/linux/gpio.h @@ -13,6 +13,7 @@ #include <linux/errno.h> struct device; +struct gpio_chip; /* * Some platforms don't support the GPIO programming interface. ```
9f1a1fca35066117353994bff80a5115cddad7a2
Analyze and fix the following issue in the Linux kernel code: of: Fix missing includes - ll_temac
Problem Details: It is the next patch which is fixing missing header which were removed from prom.h. Related patches: "of/address: Clean up function declarations" (sha1 id 22ae782f8) "of: Fix missing includes" (sha1 id f1ca09b2b) Signed-off-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Grant Likely <grant.likely...
```diff diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c index bdf2149e5296..87f0a93b165c 100644 --- a/drivers/net/ll_temac_main.c +++ b/drivers/net/ll_temac_main.c @@ -38,6 +38,7 @@ #include <linux/of_device.h> #include <linux/of_mdio.h> #include <linux/of_platform.h> +#include <linux/of_addre...
b9e5d11a7e70000ace3ba92100bf1e81ff607604
Analyze and fix the following issue in the Linux kernel code: regulator: isl6271a-regulator - fix regulator_desc parameter for regulator_register()
Problem Details: Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
```diff diff --git a/drivers/regulator/isl6271a-regulator.c b/drivers/regulator/isl6271a-regulator.c index e49d2bd393f2..d61ecb885a8c 100644 --- a/drivers/regulator/isl6271a-regulator.c +++ b/drivers/regulator/isl6271a-regulator.c @@ -165,7 +165,7 @@ static int __devinit isl6271a_probe(struct i2c_client *i2c, mutex_i...
58d463eec844f6381d63d04dc89d319ae3057ca9
Analyze and fix the following issue in the Linux kernel code: regulator: ad5398 - fix a memory leak
Problem Details: In current implementation, the address return from regulator_register() is different from the address for regulator_unregister(). Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Sonic Zhang <sonic.zhang@analog.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam G...
```diff diff --git a/drivers/regulator/ad5398.c b/drivers/regulator/ad5398.c index d59d2f2314af..df1fb53c09d2 100644 --- a/drivers/regulator/ad5398.c +++ b/drivers/regulator/ad5398.c @@ -25,7 +25,7 @@ struct ad5398_chip_info { unsigned int current_level; unsigned int current_mask; unsigned int current_offset; - s...
938b45927c240cf75a01ce29af3f173762e762f8
Analyze and fix the following issue in the Linux kernel code: regulator: tps6586x-regulator - fix bit_mask parameter for tps6586x_set_bits()
Problem Details: The third parameter of tps6586x_set_bits() is the bit_mask, thus we should use (1 << ri->go_bit) instead of ri->go_bit. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
```diff diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c index facd439d0f12..51237fbb1bbb 100644 --- a/drivers/regulator/tps6586x-regulator.c +++ b/drivers/regulator/tps6586x-regulator.c @@ -150,7 +150,7 @@ static int tps6586x_dvm_set_voltage(struct regulator_dev *rdev, if ...
327531bada36e5786b13bb6918ad8afc545adfa2
Analyze and fix the following issue in the Linux kernel code: regulator: tps6586x-regulator - fix value range checking for val
Problem Details: val is used as array index of ri->voltages. Thus the valid value range should be 0 .. ri->desc.n_voltages - 1. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
```diff diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c index 8cff1413a147..facd439d0f12 100644 --- a/drivers/regulator/tps6586x-regulator.c +++ b/drivers/regulator/tps6586x-regulator.c @@ -133,7 +133,7 @@ static int tps6586x_ldo_get_voltage(struct regulator_dev *rdev) mas...
11fa0d1d20c7cc432c77369bc8bbfbc21030e457
Analyze and fix the following issue in the Linux kernel code: regulator: max8998 - fix memory allocation size for max8998->rdev
Problem Details: We only use max8998->rdev[0] .. max8998->rdev[pdata->num_regulators-1], max8998->rdev[pdata->num_regulators] is not used. Thus fix the memory allocation size. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@sliml...
```diff diff --git a/drivers/regulator/max8998.c b/drivers/regulator/max8998.c index ab67298799f9..fbcb385034a9 100644 --- a/drivers/regulator/max8998.c +++ b/drivers/regulator/max8998.c @@ -549,7 +549,7 @@ static __devinit int max8998_pmic_probe(struct platform_device *pdev) if (!max8998) return -ENOMEM; - size...
d4876a3bc041e8e40af20b8addbec6d0a42e3842
Analyze and fix the following issue in the Linux kernel code: regulator: ab8500 - fix the logic to remove already registered regulators in error path
Problem Details: In current implementation, ab8500_regulator_info[0].regulator is not unregistered if the error happen at i > 0. This patch fixes the resource leak and also improves the readability. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Acked-by: Mark Brow...
```diff diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c index cc7cbafc5b94..3d09580dc883 100644 --- a/drivers/regulator/ab8500.c +++ b/drivers/regulator/ab8500.c @@ -369,11 +369,9 @@ static __devinit int ab8500_regulator_probe(struct platform_device *pdev) dev_err(&pdev->dev, "failed to registe...
b3fcf3e576749b911e984e752b6b390c326efb76
Analyze and fix the following issue in the Linux kernel code: regulator: ab3100 - fix the logic to remove already registered regulators in error path
Problem Details: In current implementation, ab3100_regulators[0].rdev is not unregistered if the error happen at i > 0. This patch fixes the resource leak and also improves the readability. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Acked-by: Mark Brown <brooni...
```diff diff --git a/drivers/regulator/ab3100.c b/drivers/regulator/ab3100.c index 11790990277a..b349266a43de 100644 --- a/drivers/regulator/ab3100.c +++ b/drivers/regulator/ab3100.c @@ -634,12 +634,9 @@ static int __devinit ab3100_regulators_probe(struct platform_device *pdev) "%s: failed to register regulator %s...
30311549c3e2a0d9d839ed6e40398a2c354ce5e2
Analyze and fix the following issue in the Linux kernel code: HID: waltop: fix Media Tablet 10.6 inch zooming
Problem Details: Fix zoom controls of older version of Waltop Media Tablet 10.6 inch, aka Genius G-Pen M609. This should make it supported on par with the newer version, aka Genius G-Pen M609X. The fix is extrapolated from the behavior of the newer version (Genius G-Pen M609X) and both older and newer versions of Medi...
```diff diff --git a/drivers/hid/hid-waltop.c b/drivers/hid/hid-waltop.c index 7d4b318c029f..246160a9fb89 100644 --- a/drivers/hid/hid-waltop.c +++ b/drivers/hid/hid-waltop.c @@ -487,10 +487,19 @@ static __u8 media_tablet_10_6_inch_rdesc_fixed[] = { 0x0A, 0x2D, 0x02, /* Usage (AC Zoom In), */ 0x0...
4b5b4575ce08a2597a21337b4f5404fa0a289403
Analyze and fix the following issue in the Linux kernel code: HID: waltop: fix Media Tablet 10.6 inch scrolling
Problem Details: Add support for horizontal scrolling with Waltop Media Tablet 10.6 inch by updating the fixed HID report descriptor. The horizontal/vertical scrolling is toggled by pressing the wheels' center buttons while in scroll mode, which wasn't discovered at the time the support for this tablet was added. Sig...
```diff diff --git a/drivers/hid/hid-waltop.c b/drivers/hid/hid-waltop.c index 81cb4edb6b6b..b9d49e4a392d 100644 --- a/drivers/hid/hid-waltop.c +++ b/drivers/hid/hid-waltop.c @@ -221,9 +221,10 @@ static __u8 slim_tablet_5_8_inch_rdesc_fixed[] = { * wheels' function button in the newer version. * * The wheel funct...
74af4c7df35e6811eb3c50e398abafa5b3cabb75
Analyze and fix the following issue in the Linux kernel code: stmmac: Fix another build warning.
Problem Details: drivers/net/stmmac/dwmac100_core.c: In function 'dwmac100_dump_mac_regs': drivers/net/stmmac/dwmac100_core.c:47: warning: cast from pointer to integer of different size Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/stmmac/dwmac100_core.c b/drivers/net/stmmac/dwmac100_core.c index 135a8082816e..db06c04ce480 100644 --- a/drivers/net/stmmac/dwmac100_core.c +++ b/drivers/net/stmmac/dwmac100_core.c @@ -45,9 +45,9 @@ static void dwmac100_core_init(void __iomem *ioaddr) static void dwmac100_dump_mac_reg...
59b25ed91400ace98d6cf0d59b1cb6928ad5cd37
Analyze and fix the following issue in the Linux kernel code: Fix call to replaced SuperIO functions
Problem Details: This patch fixes the failure to compile Alpha Generic because of previously overlooked calls to ns87312_enable_ide(). The function has been replaced by newer SuperIO code. Tested-by: Michael Cree <mcree@orcon.net.nz> Signed-off-by: Morten H. Larsen <m-larsen@post6.tele.dk> Signed-off-by: Matt Turner <...
```diff diff --git a/arch/alpha/kernel/proto.h b/arch/alpha/kernel/proto.h index 3d2627ec9860..d3e52d3fd592 100644 --- a/arch/alpha/kernel/proto.h +++ b/arch/alpha/kernel/proto.h @@ -156,9 +156,6 @@ extern void SMC669_Init(int); /* es1888.c */ extern void es1888_init(void); -/* ns87312.c */ -extern void ns87312_ena...
af045b86662f17bf130239a65995c61a34f00a6b
Analyze and fix the following issue in the Linux kernel code: Input: i8042 - fix device removal on unload
Problem Details: We need to call platform_device_unregister(i8042_platform_device) before calling platform_driver_unregister() because i8042_remove() resets i8042_platform_device to NULL. This leaves the platform device instance behind and prevents driver reload. Fixes https://bugzilla.kernel.org/show_bug.cgi?id=16613...
```diff diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 46e4ba0b9246..f58513160480 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c @@ -1485,8 +1485,8 @@ static int __init i8042_init(void) static void __exit i8042_exit(void) { - platform_driver_unregister(&i804...
950eaaca681c44aab87a46225c9e44f902c080aa
Analyze and fix the following issue in the Linux kernel code: pid: make setpgid() system call use RCU read-side critical section
Problem Details: [ 23.584719] [ 23.584720] =================================================== [ 23.585059] [ INFO: suspicious rcu_dereference_check() usage. ] [ 23.585176] --------------------------------------------------- [ 23.585176] kernel/pid.c:419 invoked rcu_dereference_check() without protection! [ ...
```diff diff --git a/kernel/sys.c b/kernel/sys.c index e9ad44489828..7f5a0cd296a9 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -931,6 +931,7 @@ SYSCALL_DEFINE2(setpgid, pid_t, pid, pid_t, pgid) pgid = pid; if (pgid < 0) return -EINVAL; + rcu_read_lock(); /* From this point forward we keep holding onto th...
15300c1df7e8c85cfbd5155a59cd6f767af70daa
Analyze and fix the following issue in the Linux kernel code: Staging: solo6x10: fixed assignments in if conditions in solo6010-core.c
Problem Details: This is a patch to the solo6010-core.c file that fixes the assignments in if condition style issues found by the checkpatch.pl tool. Signed-off-by: Prashant P. Shah <pshah.mumbai@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/solo6x10/solo6010-core.c b/drivers/staging/solo6x10/solo6010-core.c index 98c6739fc196..4a051cde55da 100644 --- a/drivers/staging/solo6x10/solo6010-core.c +++ b/drivers/staging/solo6x10/solo6010-core.c @@ -136,23 +136,26 @@ static int __devinit solo6010_pci_probe(struct pci_dev *pde...
9453ed9cc7913d9f829aed3371196837328c2cad
Analyze and fix the following issue in the Linux kernel code: Staging: mrst-touchscreen: Fix wrong Makefile config
Problem Details: The config name is wrong in drivers/staging/Makefile... The object name is wrong in drivers/staging/mrst-touchscreen/Makefile... Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile index 3645acf8da83..dd2c66fdf979 100644 --- a/drivers/staging/Makefile +++ b/drivers/staging/Makefile @@ -51,7 +51,7 @@ obj-$(CONFIG_CXT1E1) += cxt1e1/ obj-$(CONFIG_TI_ST) += ti-st/ obj-$(CONFIG_ADIS16255) += adis16255/ obj-$(CONFIG_FB_XGI) ...
e1eeeae2bf5ce32d6b0303e6f360c339410cd527
Analyze and fix the following issue in the Linux kernel code: Staging: mrst-touchscreen: fix channel allocation in the touch screen driver
Problem Details: the touch screen driver tries to find a range of free channels (which are an array of bytes), by scanning for the "end of used channel" marker. however it tries to be WAAAAY too smart and does 32 bit logic on 8 bit quantities, and in the process completely gets it wrong (repeatedly read the same regist...
```diff diff --git a/drivers/staging/mrst-touchscreen/intel-mid-touch.c b/drivers/staging/mrst-touchscreen/intel-mid-touch.c index abba22f921be..031b2f8f5558 100644 --- a/drivers/staging/mrst-touchscreen/intel-mid-touch.c +++ b/drivers/staging/mrst-touchscreen/intel-mid-touch.c @@ -157,8 +157,8 @@ static int mrstouch_p...
8cbf7a9e39e21d95c935e5e1a66050e769427569
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: fix brace coding style issue in dt2817.c
Problem Details: This is a patch to the dt2817.c file that fixes up all coding style issues found by the checkpatch.pl tool Signed-off-by: Sunny Aujla <sunnyfedora99@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/comedi/drivers/dt2817.c b/drivers/staging/comedi/drivers/dt2817.c index 651fe050d029..99c1584153d7 100644 --- a/drivers/staging/comedi/drivers/dt2817.c +++ b/drivers/staging/comedi/drivers/dt2817.c @@ -82,13 +82,13 @@ static int dt2817_dio_insn_config(struct comedi_device *dev, r...
39831861ffa8bff24c6c5e443e70ccc96a1a6947
Analyze and fix the following issue in the Linux kernel code: Staging: rtl81*: Fix spelling fuction -> function in comments
Problem Details: Obviously the wrong spelling was copied a lot of times. A similar patch for the non-staging part of linux is committed by Jiri Kosina. Cc: devel@driverdev.osuosl.org Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c index 1b838a266e0d..652d879509e6 100644 --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c @@ -454,7 +454,7 @@ v...
60ef9eb61c5f34cff03c0f3573c5a58d0a46eff1
Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192e: Cleanup style and whitespace
Problem Details: Replace C99-style comments with C89-style comments, fix some typos, and fix whitespace to use only tabs. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_module.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_module.c index 7edf5c897a68..08bfdb1a4c6e 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_module.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_module.c @@ -69,7 +69,7 @@ static inli...
bb59a4c539140592723e806e852ee171da0eb3eb
Analyze and fix the following issue in the Linux kernel code: Staging: cx25821: clenup warnings found by checkpatch.pl tool in cx25821-audio-upstream.c and cx25821-audio.h.
Problem Details: This is a patch to the cx25821-audio-upstream.c and cx25821-audio.h that fixes up a warnings found by checkpatch.pl tool. Signed-off-by: Ilya Gorskin <Revent82@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/cx25821/cx25821-audio-upstream.c b/drivers/staging/cx25821/cx25821-audio-upstream.c index cdff49f409f2..27087dbe5b7d 100644 --- a/drivers/staging/cx25821/cx25821-audio-upstream.c +++ b/drivers/staging/cx25821/cx25821-audio-upstream.c @@ -40,8 +40,7 @@ MODULE_AUTHOR("Hiep Huynh <hiep...
c7e62defd3c4a015b1f80a642bc320b9f9f3896c
Analyze and fix the following issue in the Linux kernel code: staging: adis16255: fix sysfs leak
Problem Details: Original code does not call sysfs_remove_group() on error. This can lead to NULL dereference. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/adis16255/adis16255.c b/drivers/staging/adis16255/adis16255.c index c3e6a4d5f334..8d4d7cbab979 100644 --- a/drivers/staging/adis16255/adis16255.c +++ b/drivers/staging/adis16255/adis16255.c @@ -406,12 +406,14 @@ static int __devinit spi_adis16255_probe(struct spi_device *spi) st...
cd6541c03d0777963615d00b22ff8a4c8ee8d601
Analyze and fix the following issue in the Linux kernel code: staging: tm6000: fix memory leak
Problem Details: Original code doesn't call kfree(chip) on error. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/tm6000/tm6000-alsa.c b/drivers/staging/tm6000/tm6000-alsa.c index 087137d9164d..6c09ef3c71ea 100644 --- a/drivers/staging/tm6000/tm6000-alsa.c +++ b/drivers/staging/tm6000/tm6000-alsa.c @@ -403,7 +403,7 @@ int tm6000_audio_init(struct tm6000_core *dev) rc = snd_pcm_new(card, "TM...
c2c6a66a51da4d7311aa4508c1cd56c2397cf708
Analyze and fix the following issue in the Linux kernel code: staging: usbip: fix memory leak
Problem Details: If stub_probe() failed then do not increase interf_count. In original code sdev was leaked as its interf_count never reaches 0. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/usbip/stub_dev.c b/drivers/staging/usbip/stub_dev.c index b6b753a49346..b186b5fed2b9 100644 --- a/drivers/staging/usbip/stub_dev.c +++ b/drivers/staging/usbip/stub_dev.c @@ -427,11 +427,11 @@ static int stub_probe(struct usb_interface *interface, if (busid_priv->status == STUB...
211673991ec168c293791a94ad7aa31998907768
Analyze and fix the following issue in the Linux kernel code: Staging: lirc: fix compiler warning
Problem Details: On Fri, Aug 13, 2010 at 03:38:40PM +0200, Dan Carpenter wrote: > Speak of left over stuff, it's weird that I didn't notice this before > but gcc complains about an unitialized variable in > imon_incoming_packet(). > > drivers/staging/lirc/lirc_imon.c: In function ‘imon_incoming_packet’: > drivers/stagi...
```diff diff --git a/drivers/staging/lirc/lirc_imon.c b/drivers/staging/lirc/lirc_imon.c index cb5699c5b885..818bec0bb912 100644 --- a/drivers/staging/lirc/lirc_imon.c +++ b/drivers/staging/lirc/lirc_imon.c @@ -596,7 +596,7 @@ static void imon_incoming_packet(struct imon_context *context, struct device *dev = context...
5aac4d73dc234fe7be91679b547af2436d7f8d1e
Analyze and fix the following issue in the Linux kernel code: arch/powerpc/sysdev/qe_lib/qe.c: Add of_node_put to avoid memory leak
Problem Details: Add a call to of_node_put in the error handling code following a call to of_find_compatible_node. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ local idexpression x; expression E,E1; statement S; @@ *x = (of_find_node_by_path |of_find_nod...
```diff diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c index 3da8014931c9..90020de4dcf2 100644 --- a/arch/powerpc/sysdev/qe_lib/qe.c +++ b/arch/powerpc/sysdev/qe_lib/qe.c @@ -640,6 +640,7 @@ unsigned int qe_get_num_of_snums(void) if ((num_of_snums < 28) || (num_of_snums > QE_NUM_OF_SN...
ff33f1821259d00d3fd85d86f59783e2ca3c9ee1
Analyze and fix the following issue in the Linux kernel code: fsl_rio: fix compile errors
Problem Details: Fixes the following compile problem on E500 platforms: arch/powerpc/sysdev/fsl_rio.c: In function 'fsl_rio_mcheck_exception': arch/powerpc/sysdev/fsl_rio.c:248: error: 'MCSR_MASK' undeclared (first use in this function) Also fixes the compile problem on non-E500 platforms. Signed-off-by: Li Yang <leo...
```diff diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c index 6425abe5b7db..3017532319c8 100644 --- a/arch/powerpc/sysdev/fsl_rio.c +++ b/arch/powerpc/sysdev/fsl_rio.c @@ -240,12 +240,13 @@ struct rio_priv { static void __iomem *rio_regs_win; +#ifdef CONFIG_E500 static int (*saved_mchec...
3aaba20f26f58843e8f20611e5c0b1c06954310f
Analyze and fix the following issue in the Linux kernel code: tracing: Fix a race in function profile
Problem Details: While we are reading trace_stat/functionX and someone just disabled function_profile at that time, we can trigger this: divide error: 0000 [#1] PREEMPT SMP ... EIP is at function_stat_show+0x90/0x230 ... This fix just takes the ftrace_profile_lock and checks if rec->counter is 0. If it's 0, we kn...
```diff diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 0d88ce9b9fb8..7cb1f45a1de1 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -381,12 +381,19 @@ static int function_stat_show(struct seq_file *m, void *v) { struct ftrace_profile *rec = v; char str[KSYM_SYMBOL_LEN]; + int ret ...
46b93b74fc022885ab69dfc8e2af0562dd626638
Analyze and fix the following issue in the Linux kernel code: tracing/lockdep: Fix dependency of TRACE_IRQFLAGS
Problem Details: When CONFIG_IRQSOFF_TRACER is set and CONFIG_PROVE_LOCKING is not, we get the following error: $ make oldconfig scripts/kconfig/conf --oldconfig arch/x86/Kconfig warning: (IRQSOFF_TRACER && TRACING_SUPPORT && FTRACE && TRACE_IRQFLAGS_SUPPORT && !ARCH_USES_GETTIMEOFFSET) selects TRACE_IRQFLAGS which h...
```diff diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 1b4afd2e6ca0..e85d549b6eac 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -482,6 +482,7 @@ config PROVE_LOCKING select DEBUG_SPINLOCK select DEBUG_MUTEXES select DEBUG_LOCK_ALLOC + select TRACE_IRQFLAGS default n help This feature ...
01b38606bded44bf8b7ca42e8fe5f2cad5d28121
Analyze and fix the following issue in the Linux kernel code: Phonet: do not set POLLOUT in case of send buffer overflow
Problem Details: Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/phonet/socket.c b/net/phonet/socket.c index 6e9848bf0370..7c91f739f138 100644 --- a/net/phonet/socket.c +++ b/net/phonet/socket.c @@ -281,7 +281,9 @@ static unsigned int pn_socket_poll(struct file *file, struct socket *sock, if (!mask && sk->sk_state == TCP_CLOSE_WAIT) return POLLHUP; - ...
bed49c69453641a2fd80d90f5a3b5204107eb459
Analyze and fix the following issue in the Linux kernel code: staging: otus: fix compile warning and some style issues
Problem Details: In today linux-next I got a compile warning in staging/otus driver. This patch solves the issue and also improves the coding style. Signed-off-by: Roberto Rodriguez Alcala <rralcala@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/otus/80211core/ratectrl.c b/drivers/staging/otus/80211core/ratectrl.c index a1abe2f4f342..283b2b52638c 100644 --- a/drivers/staging/otus/80211core/ratectrl.c +++ b/drivers/staging/otus/80211core/ratectrl.c @@ -422,23 +422,15 @@ u8_t zfRateCtrlRateDiff(struct zsRcCell* rcCell, u8_t r...
904879748d7439a6dabdc6be9aad983e216b027d
Analyze and fix the following issue in the Linux kernel code: ath9k_hw: fix parsing of HT40 5 GHz CTLs
Problem Details: The 5 GHz CTL indexes were not being read for all hardware devices due to the masking out through the CTL_MODE_M mask being one bit too short. Without this the calibrated regulatory maximum values were not being picked up when devices operate on 5 GHz in HT40 mode. The final output power used for Ather...
```diff diff --git a/drivers/net/wireless/ath/ath9k/eeprom.h b/drivers/net/wireless/ath/ath9k/eeprom.h index 7f48df1e2903..0b09db0f8e7d 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom.h +++ b/drivers/net/wireless/ath/ath9k/eeprom.h @@ -62,7 +62,7 @@ #define SD_NO_CTL 0xE0 #define NO_CTL ...
803288e61e346ba367373bc7d5eeb6e11c81a33c
Analyze and fix the following issue in the Linux kernel code: ath9k_hw: Fix EEPROM uncompress block reading on AR9003
Problem Details: The EEPROM is compressed on AR9003, upon decompression the wrong upper limit was being used for the block which prevented the 5 GHz CTL indexes from being used, which are stored towards the end of the EEPROM block. This fix allows the actual intended regulatory limits to be used on AR9003 hardware. Cc...
```diff diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c index b883b174385b..057fb69ddf7f 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c @@ -797,7 +797,7 @@ static bool ar9300_uncompress_block(s...
c3d34d5d9654ec9c2510f9341bfb1030b8f029d1
Analyze and fix the following issue in the Linux kernel code: wireless: register wiphy rfkill w/o holding cfg80211_mutex
Problem Details: Otherwise lockdep complains... https://bugzilla.kernel.org/show_bug.cgi?id=17311 [ INFO: possible circular locking dependency detected ] 2.6.36-rc2-git4 #12 ------------------------------------------------------- kworker/0:3/3630 is trying to acquire lock: (rtnl_mutex){+.+.+.}, at: [<ffffffff813396c...
```diff diff --git a/net/wireless/core.c b/net/wireless/core.c index 541e2fff5e9c..d6d046b9f6f2 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c @@ -475,12 +475,10 @@ int wiphy_register(struct wiphy *wiphy) mutex_lock(&cfg80211_mutex); res = device_add(&rdev->wiphy.dev); - if (res) - goto out_unlock; -...
213fd2270450f7b5f98803e58bc25063c249e032
Analyze and fix the following issue in the Linux kernel code: Staging: iio: signedness bug
Problem Details: i2c_smbus_read_byte_data() returns an s32 type. We need to change "rate" to signed for the error handling to work. Also I changed it to propogate the error code instead of just returning -EINVAL. Other error codes could be -EAGAIN for example. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-...
```diff diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c index ea5f749c5fe7..2b1828017076 100644 --- a/drivers/staging/iio/magnetometer/hmc5843.c +++ b/drivers/staging/iio/magnetometer/hmc5843.c @@ -389,11 +389,11 @@ static ssize_t show_sampling_frequency(struct devic...
315a1a20aa01138c6469fbdab4df097c35344353
Analyze and fix the following issue in the Linux kernel code: staging: tidspbridge: Remove cfg_get_exec_file()
Problem Details: As the services directory is going to be removed, the cfg_get_exec_file function has also to be removed. This patch also avoids a possible NULL pointer dereference in function cfg_get_exec_file(), when drv_datap is checked for NULL and then pass drv_datap->base_img as argument to strlen(). Signed-off...
```diff diff --git a/drivers/staging/tidspbridge/include/dspbridge/cfg.h b/drivers/staging/tidspbridge/include/dspbridge/cfg.h index 9a259a1dddf8..11f5bdebae70 100644 --- a/drivers/staging/tidspbridge/include/dspbridge/cfg.h +++ b/drivers/staging/tidspbridge/include/dspbridge/cfg.h @@ -40,28 +40,6 @@ */ extern int c...
e8184e6c2d32eb4418f6084155ac1ffb08c751e8
Analyze and fix the following issue in the Linux kernel code: staging: tidspbridge: Remove cfg_get_dev_object() and do a trivial cleanup
Problem Details: The cfg_get_dev_object function is only used in one place and because of its simplicity, it can be removed. The parameter *value can be left uninitialized if the strcmp() returns a nonzero value, so in the function dev_remove_device(), the hdev_obj could be used uninitialized and could be dereferenced...
```diff diff --git a/drivers/staging/tidspbridge/include/dspbridge/cfg.h b/drivers/staging/tidspbridge/include/dspbridge/cfg.h index eea90001bfff..9a259a1dddf8 100644 --- a/drivers/staging/tidspbridge/include/dspbridge/cfg.h +++ b/drivers/staging/tidspbridge/include/dspbridge/cfg.h @@ -40,27 +40,6 @@ */ extern int c...
cd35a3912188d006f251fff1028d84e1d1649ca2
Analyze and fix the following issue in the Linux kernel code: rt2x00: Cleanup rt2x00usb_watchdog_reset_tx
Problem Details: rt2x00usb_watchdog_reset_tx performs the same task as rt2x00usb_kill_tx_queue, with the only difference is that it waits for all entries to be returned to the driver and for all frames the status has been reported to mac80211. We can easily split this task by calling rt2x00usb_kill_tx_queue, sleep for...
```diff diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c index aec6440d364a..4c5ae3d45625 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.c +++ b/drivers/net/wireless/rt2x00/rt2x00usb.c @@ -208,8 +208,7 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb) struct ...
56363ddeeed3afc5277ca227209773bc1042cc7b
Analyze and fix the following issue in the Linux kernel code: ath9k: fix spurious MIC failure reports
Problem Details: According to the hardware documentation, the MIC failure bit is only valid if the frame was decrypted using a valid TKIP key and is not a fragment. In some setups I've seen hardware-reported MIC failures on an AP that was configured for CCMP only, so it's clear that additional checks are necessary. Si...
```diff diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h index d32f2828b098..a706202fa67c 100644 --- a/drivers/net/wireless/ath/ath.h +++ b/drivers/net/wireless/ath/ath.h @@ -119,6 +119,7 @@ struct ath_common { u32 keymax; DECLARE_BITMAP(keymap, ATH_KEYMAX); + DECLARE_BITMAP(tkip_keyma...
9df86e2e702c6d5547aced7f241addd2d698bb11
Analyze and fix the following issue in the Linux kernel code: wl1251: Fix queue stopping/waking for TX path
Problem Details: This patch was adapted from 06f7bc7db79fabe6b2ec16eff0f59e4acc21eb72 (from linus's linux-2.6 tree of kernel.org) here's the original message: The queue stopping/waking functionality was broken in a way that could cause huge latencies in TX transfers and even cause the TX to stall in the ri...
```diff diff --git a/drivers/net/wireless/wl12xx/wl1251.h b/drivers/net/wireless/wl12xx/wl1251.h index 9bc4fea3315a..e113d4c1fb35 100644 --- a/drivers/net/wireless/wl12xx/wl1251.h +++ b/drivers/net/wireless/wl12xx/wl1251.h @@ -272,6 +272,8 @@ struct wl1251 { int irq; bool use_eeprom; + spinlock_t wl_lock; + enu...
3ba06c6fbd651ed3377e584026d1c112b492cc8b
Analyze and fix the following issue in the Linux kernel code: mac80211: Fix signal strength average initialization for CQM events
Problem Details: The ave_beacon_signal value uses 1/16 dB unit and as such, must be initialized with the signal level of the first Beacon frame multiplied by 16. This fixes an issue where the initial CQM events are reported incorrectly with a burst of events while the running average approaches the correct value after ...
```diff diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index c8694478cde2..7915726d791e 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -1553,7 +1553,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata, ifmgd->last_beacon_signal = rx_status->signal; if (ifmgd->flags &...
ace9115712f64315d59a86146103f6f6fc32cde3
Analyze and fix the following issue in the Linux kernel code: staging: rt2860: rtmp: Fixed coding style issue in rtmp.h
Problem Details: This patch fixes a whitespace issue detected by checkpatch.pl Signed-off-by: Jacob Smith <tarinaky@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/rt2860/rtmp.h b/drivers/staging/rt2860/rtmp.h index 282935caba2c..f133c8cb6807 100644 --- a/drivers/staging/rt2860/rtmp.h +++ b/drivers/staging/rt2860/rtmp.h @@ -2239,15 +2239,15 @@ struct rt_tx_blk { unsigned long Priv; /* Hardware specific value saved in here. */ }; -#define...
2e04fc838a1dc0afab7e788a90f39110d1cf922d
Analyze and fix the following issue in the Linux kernel code: staging: r8712u: Fix potential crash issue
Problem Details: When the driver received the Addba request frame from AP, a crash could occur. Signed-off-by: Albert Wang <albert_wang@realtek.com.tw> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c index fb3508a012c9..98ba7602e250 100644 --- a/drivers/staging/rtl8712/rtl871x_mlme.c +++ b/drivers/staging/rtl8712/rtl871x_mlme.c @@ -1036,21 +1036,19 @@ void r8712_got_addbareq_event_callback(struct _adapter *adapter, ...
16e53729b799dce572557022952d63cc19f47a7b
Analyze and fix the following issue in the Linux kernel code: staging: r8712u: Fix sparse warnings
Problem Details: Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/rtl8712/hal_init.c b/drivers/staging/rtl8712/hal_init.c index 29bcbea0f7e2..a51850c092bb 100644 --- a/drivers/staging/rtl8712/hal_init.c +++ b/drivers/staging/rtl8712/hal_init.c @@ -32,6 +32,7 @@ #include "drv_types.h" #include "rtl871x_byteorder.h" #include "farray.h" +#include ...
dc1c41f450a5f201f1d8c19aef32319f3b84c273
Analyze and fix the following issue in the Linux kernel code: powerpc/85xx: Fix compile issue with p1022_ds due to lmb rename to memblock
Problem Details: arch/powerpc/platforms/85xx/p1022_ds.c:22:23: error: linux/lmb.h: No such file or directory arch/powerpc/platforms/85xx/p1022_ds.c: In function 'p1022_ds_setup_arch': arch/powerpc/platforms/85xx/p1022_ds.c:100: error: implicit declaration of function 'memblock_end_of_DRAM' arch/powerpc/platforms/85xx/p...
```diff diff --git a/arch/powerpc/platforms/85xx/p1022_ds.c b/arch/powerpc/platforms/85xx/p1022_ds.c index e1467c937450..34e00902ce86 100644 --- a/arch/powerpc/platforms/85xx/p1022_ds.c +++ b/arch/powerpc/platforms/85xx/p1022_ds.c @@ -19,7 +19,7 @@ #include <linux/pci.h> #include <linux/of_platform.h> -#include <li...
6d4f2fb0860c36e7ef16cc41126242a8b6542771
Analyze and fix the following issue in the Linux kernel code: powerpc/85xx: Fix compilation of mpc85xx_mds.c
Problem Details: Commit 99d8238f berobbed the for_each loop of its iterator! Let's be nice and give it back, so it compiles for us. CC: Anton Vorontsov <avorontsov@mvista.com> Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
```diff diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c index da64be19d099..aa34cac4eb5c 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c @@ -357,6 +357,7 @@ static void __init mpc85xx_mds_setup_arch(void) { #ifde...
c88e7b93a80bd46899c4cb09a9b2d52bb04d79bd
Analyze and fix the following issue in the Linux kernel code: ASoC: OpenRD Client : Fix naming breakage due to multicomponent support
Problem Details: multicomponent support added/changed some device name but added some typos, breaking existing OpenRD Client support. Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index 0f6ee32678ef..51ff23b72d3a 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c @@ -904,7 +904,7 @@ static struct platform_device kirkwood_i2s_device = { }; static struct platform_device kirkwo...
ada69e3c1c0be591aa2e6282fb252c668ccb9a1c
Analyze and fix the following issue in the Linux kernel code: ARM: S3C24XX: I2S multi-component-related fixes
Problem Details: Export s3c_device_pcm for all S3C24xx-devices, not only for S3C2440; Fix device name for s3c_device_iis; Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/arch/arm/plat-s3c24xx/devs.c b/arch/arm/plat-s3c24xx/devs.c index 9f8ee5e38615..2f91057a0c02 100644 --- a/arch/arm/plat-s3c24xx/devs.c +++ b/arch/arm/plat-s3c24xx/devs.c @@ -247,7 +247,7 @@ static struct resource s3c_iis_resource[] = { static u64 s3c_device_iis_dmamask = 0xffffffffUL; struct pl...
8614d310a2ba78cfc73ab12da112c3115801f94e
Analyze and fix the following issue in the Linux kernel code: ASoC: uda1380: make driver more powersave-friendly
Problem Details: Disable some codec modules in standby mode, completely disable codec in off mode to save some power. Fix suspend/resume: mark mixer regs as dirty on resume to restore mixer values, otherwise driver produces no sound (master is muted by default). Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Ac...
```diff diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c index 1a51c816e542..488f8010e405 100644 --- a/sound/soc/codecs/uda1380.c +++ b/sound/soc/codecs/uda1380.c @@ -39,6 +39,7 @@ struct uda1380_priv { u16 reg_cache[UDA1380_CACHEREGNUM]; unsigned int dac_clk; struct work_struct work; + void *...
ffc4fdbbe1b4be79e98340ebcd5a0ade6f5de318
Analyze and fix the following issue in the Linux kernel code: ASoC: fix au1x platform
Problem Details: This patch fixes up the au1x audio platform after the multi-component merge: - compile fixes and updates to get DB1200 platform audio working again, - removal of global variables in AC97/I2S/DMA(PCM) modules. The AC97 part is limited to one instance only for now due to issues with getting at driver da...
```diff diff --git a/arch/mips/alchemy/devboards/db1200/platform.c b/arch/mips/alchemy/devboards/db1200/platform.c index 3fa34c3abc04..fbb55935b99e 100644 --- a/arch/mips/alchemy/devboards/db1200/platform.c +++ b/arch/mips/alchemy/devboards/db1200/platform.c @@ -429,6 +429,11 @@ static struct platform_device db1200_aud...
c7fd239a647ead1c336a051012d6bb96465ea8c6
Analyze and fix the following issue in the Linux kernel code: ARM: oprofile: fix and simplify init/exit functions
Problem Details: Now that oprofile_arch_exit is only called when the OProfile module is unloaded, it can assume that init completed successfully and not have to worry about double frees or releasing NULL perf events. This patch ensures that oprofile_arch_init fails gracefully on ARM and simplifies the exit code based ...
```diff diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c index 0691176899ff..c3652f73fed4 100644 --- a/arch/arm/oprofile/common.c +++ b/arch/arm/oprofile/common.c @@ -275,7 +275,7 @@ out: return ret; } -static void exit_driverfs(void) +static void __exit exit_driverfs(void) { platform_devic...
9c37547ab62f88aac3e1e3c2065b611f811de9b5
Analyze and fix the following issue in the Linux kernel code: workqueue: use zalloc_cpumask_var() for gcwq->mayday_mask
Problem Details: alloc_mayday_mask() was using alloc_cpumask_var() making gcwq->mayday_mask contain garbage after initialization on CONFIG_CPUMASK_OFFSTACK=y configurations. This combined with the previously fixed GCWQ_DISASSOCIATED initialization bug could make rescuers fall into infinite loop trying to bind to an of...
```diff diff --git a/kernel/workqueue.c b/kernel/workqueue.c index c8183b235d16..785542976b00 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -196,7 +196,7 @@ typedef cpumask_var_t mayday_mask_t; cpumask_test_and_set_cpu((cpu), (mask)) #define mayday_clear_cpu(cpu, mask) cpumask_clear_cpu((cpu), (mask))...
477a3c33d1efa0342a74bd02da2e049191993e2c
Analyze and fix the following issue in the Linux kernel code: workqueue: fix GCWQ_DISASSOCIATED initialization
Problem Details: init_workqueues() incorrectly marks workqueues for all possible CPUs associated. Combined with mayday_mask initialization bug, this can make rescuers keep trying to bind to an offline gcwq indefinitely. Fix init_workqueues() such that only online CPUs have their gcwqs have GCWQ_DISASSOCIATED cleared. ...
```diff diff --git a/kernel/workqueue.c b/kernel/workqueue.c index a2dccfca03ba..c8183b235d16 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -3558,8 +3558,7 @@ static int __init init_workqueues(void) spin_lock_init(&gcwq->lock); INIT_LIST_HEAD(&gcwq->worklist); gcwq->cpu = cpu; - if (cpu == WORK_...
10f0412f57f2a76a90eff4376f59cbb0a39e4e18
Analyze and fix the following issue in the Linux kernel code: oprofile, x86: fix init_sysfs error handling
Problem Details: On failure init_sysfs() might not properly free resources. The error code of the function is not checked. And, when reinitializing the exit function might be called twice. This patch fixes all this. Cc: stable@kernel.org Signed-off-by: Robert Richter <robert.richter@amd.com>
```diff diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c index f6b48f6c5951..73a41d3c6c09 100644 --- a/arch/x86/oprofile/nmi_int.c +++ b/arch/x86/oprofile/nmi_int.c @@ -568,8 +568,13 @@ static int __init init_sysfs(void) int error; error = sysdev_class_register(&oprofile_sysclass); - if (!er...
ea24ea850bcd7dd5f0994de2cf99ace10c4484cc
Analyze and fix the following issue in the Linux kernel code: idr: fix kernel-doc warnings.
Problem Details: Fix the following kernel-doc warnings. % perl scripts/kernel-doc lib/idr.c > /dev/null Warning(lib/idr.c:300): No description found for parameter 'starting_id' Warning(lib/idr.c:300): Excess function parameter 'start_id' description in 'idr_get_new_above' Warning(lib/idr.c:485): No description found f...
```diff diff --git a/lib/idr.c b/lib/idr.c index 7f1a4f0acf50..fb86a675dcff 100644 --- a/lib/idr.c +++ b/lib/idr.c @@ -284,7 +284,7 @@ static int idr_get_new_above_int(struct idr *idp, void *ptr, int starting_id) * idr_get_new_above - allocate new idr entry above or equal to a start id * @idp: idr handle * @ptr: ...
7ac41ccf47d82569d26f34beab1dec92cc3b6347
Analyze and fix the following issue in the Linux kernel code: x86, iommu: Fix IOMMU_INIT alignment rules
Problem Details: This boot crash was observed: DMA-API: preallocated 32768 debug entries DMA-API: debugging enabled by kernel config BUG: unable to handle kernel paging request at 19da8955 IP: [<f4ffffff>] 0xf4ffffff *pde = 00000000 The crux of the failure was that even if we did not use any of the .iommu_table ...
```diff diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S index 3f07c370f761..38e2b67807e1 100644 --- a/arch/x86/kernel/vmlinux.lds.S +++ b/arch/x86/kernel/vmlinux.lds.S @@ -285,10 +285,9 @@ SECTIONS .iommu_table : AT(ADDR(.iommu_table) - LOAD_OFFSET) { __iommu_table = .; *(.iommu_table...
1f0f63885658889b3bcb8a08fbcb9532f8e536c9
Analyze and fix the following issue in the Linux kernel code: stmmac: Fix build warnings.
Problem Details: In file included from drivers/net/stmmac/stmmac_ethtool.c:30: drivers/net/stmmac/stmmac.h:111: warning: 'struct platform_device' declared inside parameter list drivers/net/stmmac/stmmac.h:111: warning: its scope is only this definition or declaration, which is probably not what you want drivers/net/stm...
```diff diff --git a/drivers/net/stmmac/dwmac1000_core.c b/drivers/net/stmmac/dwmac1000_core.c index 8bbfc0f48dea..f1f426146f40 100644 --- a/drivers/net/stmmac/dwmac1000_core.c +++ b/drivers/net/stmmac/dwmac1000_core.c @@ -53,7 +53,7 @@ static void dwmac1000_core_init(void __iomem *ioaddr) static void dwmac1000_dump_r...
628e300cccaa628d8fb92aa28cb7530a3d5f2257
Analyze and fix the following issue in the Linux kernel code: irda: Correctly clean up self->ias_obj on irda_bind() failure.
Problem Details: If irda_open_tsap() fails, the irda_bind() code tries to destroy the ->ias_obj object by hand, but does so wrongly. In particular, it fails to a) release the hashbin attached to the object and b) reset the self->ias_obj pointer to NULL. Fix both problems by using irias_delete_object() and explicitly ...
```diff diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index 79986a674f6e..fd55b5135de5 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c @@ -824,8 +824,8 @@ static int irda_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) err = irda_open_tsap(self, addr->sir_lsap_sel, addr->sir_name); ...
b0d278b7d3ae9115939ddcea93f516308cc367e2
Analyze and fix the following issue in the Linux kernel code: powerpc/perf_event: Reduce latency of calling perf_event_do_pending
Problem Details: Commit 0fe1ac48 ("powerpc/perf_event: Fix oops due to perf_event_do_pending call") moved the call to perf_event_do_pending in timer_interrupt() down so that it was after the irq_enter() call. Unfortunately this moved it after the code that checks whether it is time for the next decrementer clock event....
```diff diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index ce53dfa7130d..8533b3b83f5d 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c @@ -577,20 +577,11 @@ void timer_interrupt(struct pt_regs * regs) * some CPUs will continuue to take decrementer exceptions */ set_d...
b0b57633089ee4726aefe20760132c41bbd83fff
Analyze and fix the following issue in the Linux kernel code: Staging: westbridge: mark BROKEN as it doesn't currently build properly
Problem Details: Future patches should fix this up. Cc: David Cross <david.cross@cypress.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/westbridge/Kconfig b/drivers/staging/westbridge/Kconfig index f7377c2f39c0..57468125b391 100644 --- a/drivers/staging/westbridge/Kconfig +++ b/drivers/staging/westbridge/Kconfig @@ -4,7 +4,7 @@ menuconfig WESTBRIDGE tristate "West Bridge support" - depends on HAS_IOMEM + depend...
4886fcad6e12572afbd230dfab1b268eace20d6d
Analyze and fix the following issue in the Linux kernel code: dccp ccid-2: Share TCP's minimum RTO code
Problem Details: Using a fixed RTO_MIN of 0.2 seconds was found to cause problems for CCID-2 over 802.11g: at least once per session there was a spurious timeout. It helped to then increase the the value of RTO_MIN over this link. Since the problem is the same as in TCP, this patch makes the solution from commit "05bb...
```diff diff --git a/Documentation/networking/dccp.txt b/Documentation/networking/dccp.txt index a62fdf7a6bff..cdb64922ba10 100644 --- a/Documentation/networking/dccp.txt +++ b/Documentation/networking/dccp.txt @@ -1,18 +1,20 @@ DCCP protocol -============ +============= Contents ======== - - Introduction - Mi...
42da2f948d949efd0111309f5827bf0298bcc9a4
Analyze and fix the following issue in the Linux kernel code: wireless extensions: fix kernel heap content leak
Problem Details: Wireless extensions have an unfortunate, undocumented requirement which requires drivers to always fill iwp->length when returning a successful status. When a driver doesn't do this, it leads to a kernel heap content leak when userspace offers a larger buffer than would have been necessary. Arguably, ...
```diff diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c index bb5e0a5ecfa1..7e5c3a45f811 100644 --- a/net/wireless/wext-compat.c +++ b/net/wireless/wext-compat.c @@ -1420,6 +1420,9 @@ int cfg80211_wext_giwessid(struct net_device *dev, { struct wireless_dev *wdev = dev->ieee80211_ptr; + data->f...
071249b1d501b1f31a6b1af3fbcbe03158a84e5c
Analyze and fix the following issue in the Linux kernel code: mac80211: delete work timer
Problem Details: The new workqueue changes helped me find this bug that's been lingering since the changes to the work processing in mac80211 -- the work timer is never deleted properly. Do that to avoid having it fire after all data structures have been freed. It can't be re-armed because all it will do, if running, i...
```diff diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 798a91b100cc..ded5c3843e06 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -732,6 +732,12 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw) rtnl_unlock(); + /* + * Now all work items will be gone, but the + * timer might s...
f880c2050f30b23c9b6f80028c09f76e693bf309
Analyze and fix the following issue in the Linux kernel code: p54: fix tx feedback status flag check
Problem Details: Michael reported that p54* never really entered power save mode, even tough it was enabled. It turned out that upon a power save mode change the firmware will set a special flag onto the last outgoing frame tx status (which in this case is almost always the designated PSM nullfunc frame). This flag co...
```diff diff --git a/drivers/net/wireless/p54/txrx.c b/drivers/net/wireless/p54/txrx.c index 173aec3d6e7e..0e937dc0c9c4 100644 --- a/drivers/net/wireless/p54/txrx.c +++ b/drivers/net/wireless/p54/txrx.c @@ -446,7 +446,7 @@ static void p54_rx_frame_sent(struct p54_common *priv, struct sk_buff *skb) } if (!(info->f...
d8e1ba76d619dbc0be8fbeee4e6c683b5c812d3a
Analyze and fix the following issue in the Linux kernel code: ath5k: check return value of ieee80211_get_tx_rate
Problem Details: This avoids a NULL pointer dereference as reported here: https://bugzilla.redhat.com/show_bug.cgi?id=625889 When the WARN condition is hit in ieee80211_get_tx_rate, it will return NULL. So, we need to check the return value and avoid dereferencing it in that case. Signed-off-by: John W. Linville <...
```diff diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 373dcfec689c..d77ce9906b6c 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c @@ -1327,6 +1327,10 @@ ath5k_txbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf, PC...
28c2ce7c8b275a8e6950bacb2dbad70b36a2996b
Analyze and fix the following issue in the Linux kernel code: i7300_edac: Fix MTR x4/x8 detection logic
Problem Details: Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/edac/i7300_edac.c b/drivers/edac/i7300_edac.c index 218d463fb1a8..a4f47fda078d 100644 --- a/drivers/edac/i7300_edac.c +++ b/drivers/edac/i7300_edac.c @@ -583,14 +583,14 @@ static int decode_mtr(struct i7300_pvt *pvt, debugf2("\t\tECC code is 8-byte-over-32-byte SECDED+ code\n"); } else...
3b330f67581db4f5301438cc0d9499f13314542d
Analyze and fix the following issue in the Linux kernel code: i7300_edac: Make the debug messages coherent with the others
Problem Details: Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/edac/i7300_edac.c b/drivers/edac/i7300_edac.c index 3ae8fae74e5e..218d463fb1a8 100644 --- a/drivers/edac/i7300_edac.c +++ b/drivers/edac/i7300_edac.c @@ -580,9 +580,9 @@ static int decode_mtr(struct i7300_pvt *pvt, if (IS_SINGLE_MODE(pvt->mc_settings_a)) { p_csrow->edac_mode = EDAC_S...
1407a9e105d811632b3fd57741a1b3d72a26c9e6
Analyze and fix the following issue in the Linux kernel code: staging: r8712u: Fix rate setting when HT is not enabled
Problem Details: When operating in normal bg mode, the maximum rate was fixed at 48 Mb/s. Signed-off-by: Albert Wang <albert_wang@realtek.com.tw> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
```diff diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c index 862ac45c5287..1529239bac68 100644 --- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c +++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c @@ -1371,6 +1371,8 @@ static int r8711_wx_get_rate(struct net...
d3f6e6c666c0f68991d785177c4c62fcd1d651f2
Analyze and fix the following issue in the Linux kernel code: UBI: do not oops when erroneous PEB is scheduled for scrubbing
Problem Details: When an erroneous PEB is scheduling for scrubbing, we end up with the following oops: [<c0162404>] (prot_queue_del+0x0/0x50) from [<c01635b4>] (ubi_wl_scrub_peb+0xec/0x13c) [<c01634c8>] (ubi_wl_scrub_peb+0x0/0x13c) from [<c01603bc>] (ubi_eba_read_leb+0x200/0x428) [<c01601bc>] (ubi_eba_read_leb+0x0/0x4...
```diff diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c index ee7b1d8fbb92..97a435672eaf 100644 --- a/drivers/mtd/ubi/wl.c +++ b/drivers/mtd/ubi/wl.c @@ -1212,7 +1212,8 @@ int ubi_wl_scrub_peb(struct ubi_device *ubi, int pnum) retry: spin_lock(&ubi->wl_lock); e = ubi->lookuptbl[pnum]; - if (e == ubi->move...
1deacd7a1d4bb22f812908c34e3254de76e4faa8
Analyze and fix the following issue in the Linux kernel code: UBI: fix kconfig unmet dependency
Problem Details: warning: (OPTPROBES && KPROBES && HAVE_OPTPROBES && !PREEMPT && DEBUG_KERNEL || MTD_UBI_DEBUG && MTD && SYSFS && MTD_UBI || UBIFS_FS_DEBUG && MISC_FILESYSTEMS && UBIFS_FS || LOCKDEP && DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT || LATENCYTOP && HAVE_LATENCYTOP_SUPPO...
```diff diff --git a/drivers/mtd/ubi/Kconfig.debug b/drivers/mtd/ubi/Kconfig.debug index 2246f154e2f7..61f6e5e40458 100644 --- a/drivers/mtd/ubi/Kconfig.debug +++ b/drivers/mtd/ubi/Kconfig.debug @@ -6,7 +6,7 @@ config MTD_UBI_DEBUG depends on SYSFS depends on MTD_UBI select DEBUG_FS - select KALLSYMS_ALL + select...
fa66f07aa1f0950e1dc78b7ab39728b3f8aa77a1
Analyze and fix the following issue in the Linux kernel code: perf_events: Fix time tracking for events with pid != -1 and cpu != -1
Problem Details: Per-thread events with a cpu filter, i.e., cpu != -1, were not reporting correct timings when the thread never ran on the monitored cpu. The time enabled was reported as a negative value. This patch fixes the problem by updating tstamp_stopped, tstamp_running in event_sched_out() for events with filte...
```diff diff --git a/kernel/perf_event.c b/kernel/perf_event.c index 403d1804b198..657555a5f30f 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c @@ -402,11 +402,31 @@ static void perf_group_detach(struct perf_event *event) } } +static inline int +event_filter_match(struct perf_event *event) +{ + return e...