id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
c04a4ff71b6a59cb5c8deec961b9196226e89573
Analyze and fix the following issue in the Linux kernel code: cfg80211: fix kernel-doc
Problem Details: I forgot to update the kernel-doc in my patch to redesign AP mode APIs, fix that now. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index b4e015c90885..d640a39d9513 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -1357,12 +1357,10 @@ struct cfg80211_gtk_rekey_data { * * @set_rekey_data: give the data necessary for GTK rekeying to the driver * - * @add_bea...
186834b5de69a89ba6cc846e7259451ced689b64
Analyze and fix the following issue in the Linux kernel code: RDMA/ucma: Fix AB-BA deadlock
Problem Details: When we destroy a cm_id, we must purge associated events from the event queue. If the cm_id is for a listen request, we also purge corresponding pending connect requests. This requires destroying the cm_id's associated with the connect requests by calling rdma_destroy_id(). rdma_destroy_id() blocks ...
```diff diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c index 5034a87cc72d..5861cdb22b7c 100644 --- a/drivers/infiniband/core/ucma.c +++ b/drivers/infiniband/core/ucma.c @@ -449,24 +449,6 @@ static void ucma_cleanup_multicast(struct ucma_context *ctx) mutex_unlock(&mut); } -static void...
7e03b7cc0736eefe7471782c344112ad6eba951e
Analyze and fix the following issue in the Linux kernel code: NFS: Fix a compile issue when !CONFIG_NFS_V4_1
Problem Details: The attempt to display the implementation ID needs to be conditional on whether or not CONFIG_NFS_V4_1 is defined Reported-by: Bryan Schumaker <Bryan.Schumaker@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 3935a371f5a0..aac403085be5 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -775,7 +775,6 @@ static void show_sessions(struct seq_file *m, struct nfs_server *server) {} #endif #endif -#ifdef CONFIG_NFS_V4 #ifdef CONFIG_NFS_V4_1 static void show_pnfs(st...
380aeef8941c6b8a3e8de86b5ca000ca986e3b17
Analyze and fix the following issue in the Linux kernel code: mwifiex: endian bug in mwifiex_drv_change_adhoc_chan()
Problem Details: In mwifiex_drv_change_adhoc_chan() we pass channel to mwifiex_bss_ioctl_ibss_channel() which sets the high 16 bits. This works on little endian systems but not on big endian ones. I've changed mwifiex_drv_change_adhoc_chan() to use a 16 bit variable. This matches the other functions in the file. I ...
```diff diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h index a0bd4ebd262a..6dc116647411 100644 --- a/drivers/net/wireless/mwifiex/main.h +++ b/drivers/net/wireless/mwifiex/main.h @@ -909,10 +909,9 @@ int mwifiex_request_scan(struct mwifiex_private *priv, struct cfg80211_ssid...
f808e4ad05704d4ba0082fbb27640294c6fa4eae
Analyze and fix the following issue in the Linux kernel code: rndis_wlan: fix le16/le32_to_cpu mix up with config.beacon_period
Problem Details: 'beacon_period' in 'struct ndis_80211_conf' is __le32 instead of __le16 so le32_to_cpu must be used instead of le16_to_cpu. Also correct 'beacon_interval' variables used for passing this value forward from u16 to u32 and rename those variables 'beacon_period' This is to avoid confusion because 'beacon...
```diff diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index ce138d846193..c831c1f2bd07 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c @@ -1350,7 +1350,7 @@ static int set_channel(struct usbnet *usbdev, int channel) } static struct ieee8021...
e4e02da2ef01deb36aa80fce6ee0bc3e9725ffe8
Analyze and fix the following issue in the Linux kernel code: rndis_wlan: prevent integer overflow in indication()
Problem Details: If we pick a high value for "offset" then it could lead to an integer overflow and we would get past the check for: if (offset + len > buflen) { ... Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@t...
```diff diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index 454f2f182342..ce138d846193 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c @@ -3043,7 +3043,7 @@ static void rndis_wlan_media_specific_indication(struct usbnet *usbdev, struct rndi...
41eedf39dfb145fb8fa04cd5b799f7bdc7679696
Analyze and fix the following issue in the Linux kernel code: rndis_wlan: integer overflows in rndis_wlan_do_link_up_work()
Problem Details: If "offset" is negative then we can get past this check: if (offset > CONTROL_BUFFER_SIZE) Or if we pick a very high "req_ie_len" then we can get around the check: if (offset + req_ie_len > CONTROL_BUFFER_SIZE) I made "resp_ie_len" and "req_ie_len" unsigned. I don't know if it was intentional that ...
```diff diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index a330c69583d6..dde45effef14 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c @@ -2755,9 +2755,10 @@ static void rndis_wlan_do_link_up_work(struct usbnet *usbdev) struct rndis_wlan_priv...
5809802180b2b638762465cbad3f51a9ac8ff0b3
Analyze and fix the following issue in the Linux kernel code: b43: prevent firmware on bcm5354 from taking over wrong GPIO pins
Problem Details: When using the bcm5354 (Soc with integrated LP-PHY Wifi) with a recent firmware >= 478.104 it runs out of memory after a very short time in OpenWrt after doing an active scan or any thing else where packages are send. This was cased by a gpio misconfiguration, the firmware triggered the GPIO pins used ...
```diff diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 5189cf38123a..1d633f3b3274 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c @@ -2706,6 +2706,8 @@ static int b43_gpio_init(struct b43_wldev *dev) mask |= 0x0060; set |= 0x0060; } + if (...
3d045a54488b69b0024309b18da5024c036c3152
Analyze and fix the following issue in the Linux kernel code: mac80211: Fix the generation of PREQs in proactive RANN mechanism of HWMP
Problem Details: According to Section Y.7.4 Actions on receipt of proactive RANN, an individually addressed PREQ should be generated towards the neighbor peer mesh STA indicated in the RANN Sender Address field in the forwarding information. Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Signed-off-by: Javier ...
```diff diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h index c7e5c49471e5..8d53b71378e3 100644 --- a/net/mac80211/mesh.h +++ b/net/mac80211/mesh.h @@ -85,6 +85,8 @@ enum mesh_deferred_task_flags { * @state_lock: mesh path state lock used to protect changes to the * mpath itself. No need to take this lock w...
be0b281e8f7afd56d2250a568b85dafc850bc9ae
Analyze and fix the following issue in the Linux kernel code: mwifiex: fix bug in wildcard scan handling
Problem Details: Currently if valid SSID list is provided in scan request, driver performs specific SSID scan otherwise wildcard scan is chosen. When wpa_supplicant provides valid SSID list followed by zero-length SSID for wildcard scan, only specific SSID scan is performed by driver. Actually driver is expected to do...
```diff diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index 6a91c2fa89fe..b4890a01ba92 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c @@ -1106,12 +1106,10 @@ mwifiex_cfg80211_scan(struct wiphy *wiphy, struct net_device ...
ac78838b65f6e843bc04cd7772ce7c85b607a404
Analyze and fix the following issue in the Linux kernel code: MIPS: BCM47XX: fix signature of nvram_parse_macaddr
Problem Details: Explicitly enforce an char array of 6 bytes for the mac address. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/arch/mips/include/asm/mach-bcm47xx/nvram.h b/arch/mips/include/asm/mach-bcm47xx/nvram.h index 184d5ecb5f51..69ef3efe06e7 100644 --- a/arch/mips/include/asm/mach-bcm47xx/nvram.h +++ b/arch/mips/include/asm/mach-bcm47xx/nvram.h @@ -37,7 +37,7 @@ struct nvram_header { extern int nvram_getenv(char *...
3b64e6f9050ff87a746c8e07dc04d97c7f26c5e2
Analyze and fix the following issue in the Linux kernel code: ssb: fix per path sprom vars
Problem Details: On sprom version 4 and 5 there are 4 values for pa_2g, pa_5gl, pa_5g and pa_5gh, for sprom version 8 and 9 there are only 3. Make the per path sprom store also work for older sprom versions. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h index 1de56757e949..49284192521b 100644 --- a/include/linux/ssb/ssb.h +++ b/include/linux/ssb/ssb.h @@ -19,7 +19,7 @@ struct ssb_driver; struct ssb_sprom_core_pwr_info { u8 itssi_2g, itssi_5g; u8 maxpwr_2g, maxpwr_5gl, maxpwr_5g, maxpwr_5gh; - ...
edd8d90b624e97105d26615d1655da22a3605fff
Analyze and fix the following issue in the Linux kernel code: ssb: sprom fix some sizes / signedness
Problem Details: Some parts of the sprom struct are bigger than needed. The leddc and maxpwr values are just 8 bit long and not 16. rxpo2g and rxpo5g are signed I got these information for the open source part of the Broadcom SDK covering sprom version 1 to 9. rxpo2g contained a negative number on my bcm5354 based dev...
```diff diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h index bbc2612cb64a..f1696213e3b5 100644 --- a/include/linux/ssb/ssb.h +++ b/include/linux/ssb/ssb.h @@ -33,8 +33,8 @@ struct ssb_sprom { u8 et1mdcport; /* MDIO for enet1 */ u16 board_rev; /* Board revision number from SPROM. */ u8 country_co...
4e0ad2591adde7bec878a4b37a073427aec3e19c
Analyze and fix the following issue in the Linux kernel code: ath9k: fix drv_tx_last_beacon on AR9003 by processing beacon tx status
Problem Details: 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/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c index 6d1e46577db0..43882f9e25c4 100644 --- a/drivers/net/wireless/ath/ath9k/beacon.c +++ b/drivers/net/wireless/ath/ath9k/beacon.c @@ -91,7 +91,7 @@ static void ath_beacon_setup(struct ath_softc *sc, struct ath_vif *...
627e67a656bbb1d616c1ca2d056138a164111a52
Analyze and fix the following issue in the Linux kernel code: ath9k_hw: enable interrupts for beacon tx completion events
Problem Details: Not doing so could cause the tx status queue to overflow during longer periods of time without non-beacon tx. These events are also required for proper drv_tx_last_beacon handling. 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/mac.c b/drivers/net/wireless/ath/ath9k/mac.c index e196aba77acf..5f4ae6c9a93c 100644 --- a/drivers/net/wireless/ath/ath9k/mac.c +++ b/drivers/net/wireless/ath/ath9k/mac.c @@ -745,7 +745,11 @@ int ath9k_hw_beaconq_setup(struct ath_hw *ah) qi.tqi_aifs = 1; qi.tqi_cw...
d6157bf78015e53371e806e0f8fd44ef6a1bfc5d
Analyze and fix the following issue in the Linux kernel code: Revert "ath9k_hw: Fix false tx hung detection in AR9003 chips"
Problem Details: The approach of this change is flawed, as it triggers tx status processing from more callsites, yet the chips only have one global tx status queue. Subsequent patches will properly fix the issue that this one tried to address. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linvi...
```diff diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mac.c b/drivers/net/wireless/ath/ath9k/ar9003_mac.c index 8d1bca03bc0e..01d5c1a4d746 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c @@ -326,7 +326,6 @@ static bool ar9003_hw_get_isr(struct ath_hw *ah, ...
182ada1c712a4ebe14d6a023cfab3559b2527d69
Analyze and fix the following issue in the Linux kernel code: iwlwifi: fix wowlan suspend
Problem Details: This was broken by the commit 023ca58f1 "iwlwifi: Move the core suspend function to iwl-agn-lib" where for some reason the code changed while moving, from .len[0] = sizeof(*key_data.rsc_tsc), to .len[0] = sizeof(key_data.rsc_tsc), Cc: stable@kernel.org Signed-off-by: Johannes Berg <johannes.berg@int...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c index 64cf439035c3..ca78e91de86c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c @@ -1240,7 +1240,7 @@ int iwlagn_suspend(struct iwl_priv *priv, .fla...
63371faf9198302c7ebd41e7fbe78eb6b57bba86
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP3+: SmartReflex: fix error handling
Problem Details: Fix the code to correctly use IS_ERR and PTR_ERR on the return values pointers Reported-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jean Pihet <j-pihet@ti.com> Reviewed-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
```diff diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index f6b8f455685b..008fbd7b9352 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c @@ -421,7 +421,7 @@ int sr_configure_errgen(struct voltagedomain *voltdm) if (IS_ERR(sr)) { pr_warning("...
54b28cdfcd8ffc491733f97378ba5816385803fc
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP3+: SmartReflex: fix the use of debugfs_create_* API
Problem Details: The debugfs_create_* API returns a return code or NULL in the return ptr in case of problem. Fix the smartreflex code to take this into account. Signed-off-by: Jean Pihet <j-pihet@ti.com> Reviewed-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
```diff diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index daf8053741f7..f6b8f455685b 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c @@ -989,7 +989,7 @@ static int __init omap_sr_probe(struct platform_device *pdev) dev_info(&pdev->dev, "%s:...
ade6ec056fd4acdf4826178eeb305ed263844532
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP3+: SmartReflex: Fix status masking in ERRCONFIG register
Problem Details: ERRCONFIG register has status bits that were intended not to be destroyed by bad modification. We cleanup and simplify the handling the status in the modify path. Reported-by: Vincent Bour <v-bour@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Jean Pihet <j-pihet@ti.com> Reviewed-by:...
```diff diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index 24ba80b70bd3..f2f2f2af7ba2 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c @@ -74,10 +74,6 @@ static inline void sr_modify_reg(struct omap_sr *sr, unsigned offset, u32 mask, u32 ...
1f55bc1852e42f0d06d9eb66b3d3c15b01b62abe
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP3+: SmartReflex: Add a shutdown hook
Problem Details: SmartReflex fix for erratum ID i724. Since OMAP's VP and PRM modules do not get reset by warm reset, we should ensure that proper shutdown procedure is followed prior to allowing the kernel to reboot back up. Without this, Smartreflex module might be left active or system might be caught in an indete...
```diff diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index 4b39c6489f6b..24ba80b70bd3 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c @@ -1055,8 +1055,32 @@ static int __devexit omap_sr_remove(struct platform_device *pdev) return 0; } +st...
ad54c3ddb472410f05083dbcf03fcec67ab7b2a5
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP3+: SmartReflex Class3: disable errorgen before disable VP
Problem Details: SmartReflex AVS Errorgen module supplies signals to Voltage Processor. It is suggested that by disabling Errorgen module before we disable VP, we might be able to ensure lesser chances of race condition to occur in the system. Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Jean Pihet <j-pihe...
```diff diff --git a/arch/arm/mach-omap2/smartreflex-class3.c b/arch/arm/mach-omap2/smartreflex-class3.c index 53d9d0a5b39d..955566eefac4 100644 --- a/arch/arm/mach-omap2/smartreflex-class3.c +++ b/arch/arm/mach-omap2/smartreflex-class3.c @@ -29,6 +29,7 @@ static int sr_class3_enable(struct voltagedomain *voltdm) st...
74754cc5e047184588f35b3f9689a9c3e0599483
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP3+: SmartReflex: fix err interrupt disable sequence
Problem Details: sr_modify_mask takes mask, value as parameters, the usage currently is value, mask which is wrong, as a result vpboundint_st which was supposed to have been disabled, does not get disabled. Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Jean Pihet <j-pihet@ti.com> Reviewed-by: Kevin Hilman <...
```diff diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index 47c77a1d932a..eaf0d6e2f2e0 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c @@ -447,8 +447,8 @@ int sr_configure_errgen(struct voltagedomain *voltdm) sr_errconfig); /* Enabling t...
bd50f8924c684f84416fb58c11eb24619b041f25
Analyze and fix the following issue in the Linux kernel code: IB/ehca: Fix ilog2() compile failure
Problem Details: I'm getting compile failures building this driver, which I narrowed down to the ilog2 call in ehca_get_max_hwpage_size... ERROR: ".____ilog2_NaN" [drivers/infiniband/hw/ehca/ib_ehca.ko] undefined! make[1]: *** [__modpost] Error 1 make: *** [modules] Error 2 The use of shca->hca_cap_mr...
```diff diff --git a/drivers/infiniband/hw/ehca/ehca_mrmw.c b/drivers/infiniband/hw/ehca/ehca_mrmw.c index 43cae84005f0..b781b2cb0624 100644 --- a/drivers/infiniband/hw/ehca/ehca_mrmw.c +++ b/drivers/infiniband/hw/ehca/ehca_mrmw.c @@ -112,7 +112,7 @@ static u32 ehca_encode_hwpage_size(u32 pgsize) static u64 ehca_get...
89e984e2c2cd14f77ccb26c47726ac7f13b70ae8
Analyze and fix the following issue in the Linux kernel code: IB/iser: Post initial receive buffers before sending the final login request
Problem Details: An iser target may send iscsi NO-OP PDUs as soon as it marks the iSER iSCSI session as fully operative. This means that there is window where there are no posted receive buffers on the initiator side, so it's possible for the iSER RC connection to break because of RNR NAK / retry errors. To fix this,...
```diff diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c index 9a43cb07f294..db43b3117168 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.c +++ b/drivers/infiniband/ulp/iser/iscsi_iser.c @@ -364,6 +364,9 @@ iscsi_iser_conn_bind(struct iscsi_cls_session *cls_session, ...
491caa43639abcffaa645fbab372a7ef4ce2975c
Analyze and fix the following issue in the Linux kernel code: ext4: fix race between sync and completed io work
Problem Details: The following command line will leave the aio-stress process unkillable on an ext4 file system (in my case, mounted on /mnt/test): aio-stress -t 20 -s 10 -O -S -o 2 -I 1000 /mnt/test/aiostress.3561.4 /mnt/test/aiostress.3561.4.20 /mnt/test/aiostress.3561.4.19 /mnt/test/aiostress.3561.4.18 /mnt/test/ai...
```diff diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 6481e3ca3528..37e7d8b66c99 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -185,6 +185,7 @@ struct mpage_da_data { #define EXT4_IO_END_ERROR 0x0002 #define EXT4_IO_END_QUEUED 0x0004 #define EXT4_IO_END_DIRECT 0x0008 +#define EXT4_IO_END_IN_FSYNC 0x0010 ...
e7cc3aca0f6a36b018934264ee20bee45dc13e29
Analyze and fix the following issue in the Linux kernel code: dt: fix twl4030 for non-dt compile on x86
Problem Details: twl4030 still doesn't build correctly for x86 allmodconfig. This fix solves the missing symbol errors. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Benoit Cousson <b-cousson@ti.com>
```diff diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index 4970d43952db..54727ef005d6 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c @@ -38,6 +38,7 @@ #include <linux/of.h> #include <linux/of_irq.h> #include <linux/of_platform.h> +#include <linux/irq.h> #include <linux/irqdomain.h>...
ac45d61357e86b9a0cf14e45e8e09dfb626970ef
Analyze and fix the following issue in the Linux kernel code: fuse: fix nlink after unlink
Problem Details: Anand Avati reports that the following sequence of system calls fail on a fuse filesystem: create("filename") => 0 link("filename", "linkname") => 0 unlink("filename") => 0 link("linkname", "filename") => -ENOENT ### BUG ### vfs_link() fails with ENOENT if i_nlink is zero, this is done to pr...
```diff diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 206632887bb4..da379070fab5 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -644,13 +644,12 @@ static int fuse_unlink(struct inode *dir, struct dentry *entry) fuse_put_request(fc, req); if (!err) { struct inode *inode = entry->d_inode; + struct fuse_inod...
134d12fae0bb8f3d60dc7440a9e1950bb5427167
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP: fix iommu, not mailbox
Problem Details: For some weird (freudian?) reason, commit 435792d "ARM: OMAP: make iommu subsys_initcall to fix builtin omap3isp" unintentionally changed the mailbox's initcall instead of the iommu's. Fix that. Reported-by: Fernando Guzman Lugo <fernando.lugo@ti.com> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> C...
```diff diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c index a6db1e4f7b6e..609ea2ded7e3 100644 --- a/arch/arm/mach-omap2/mailbox.c +++ b/arch/arm/mach-omap2/mailbox.c @@ -412,8 +412,7 @@ static void __exit omap2_mbox_exit(void) platform_driver_unregister(&omap2_mbox_driver); } -/* must ...
e21af48583380ed9b5ca07b6dd962dbcd3748e0a
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - fix broken automute/autoswitch for Realtek
Problem Details: The recent addition of volume-knob widget in the auto-parser broke automute/autoswitch for some Realtek devices. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 01179d53edcd..7e651682eece 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -686,7 +686,7 @@ static void alc_sku_unsol_event(struct hda_codec *codec, unsigned int res) else res >>= 26; action...
91982b58d35720b75b894c60e1e3133daa455b53
Analyze and fix the following issue in the Linux kernel code: drm/gma500: Fix Cedarview boot failures in 3.3-rc
Problem Details: Production GMA3600/3650 hardware turns out to be subtly different to the development platforms. This combined with a minor driver bug is causing the kernel to hang on these platforms. This patch does the following - turn down a couple of messages that were meant to be debug and are causing much con...
```diff diff --git a/drivers/gpu/drm/gma500/cdv_device.c b/drivers/gpu/drm/gma500/cdv_device.c index 4a5b099c3bc5..53404af2e748 100644 --- a/drivers/gpu/drm/gma500/cdv_device.c +++ b/drivers/gpu/drm/gma500/cdv_device.c @@ -321,6 +321,8 @@ static int cdv_chip_setup(struct drm_device *dev) cdv_get_core_freq(dev); gma...
60ce0fbd072695866cb27b729690ab59dce705a5
Analyze and fix the following issue in the Linux kernel code: perf/x86: Implement PERF_SAMPLE_BRANCH for Intel CPUs
Problem Details: This patch implements PERF_SAMPLE_BRANCH support for Intel x86processors. It connects PERF_SAMPLE_BRANCH to the actual LBR. The patch adds the hooks in the PMU irq handler to save the LBR on counter overflow for both regular and PEBS modes. Signed-off-by: Stephane Eranian <eranian@google.com> Signed-...
```diff diff --git a/arch/x86/kernel/cpu/perf_event.h b/arch/x86/kernel/cpu/perf_event.h index 4e948976aefb..ef7419cbd13d 100644 --- a/arch/x86/kernel/cpu/perf_event.h +++ b/arch/x86/kernel/cpu/perf_event.h @@ -541,6 +541,8 @@ void intel_pmu_lbr_init_atom(void); void intel_pmu_lbr_init_snb(void); +int intel_pmu_se...
8ccd16e6cb17a1e961617cc67798bbb222e4cd13
Analyze and fix the following issue in the Linux kernel code: wl12xx: print the tx packet len
Problem Details: Add the packet length to the tx debug print. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
```diff diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 3c966f2e00d0..95a76a5f9eeb 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c @@ -1459,7 +1459,8 @@ static void wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb) goto out;...
e9ba7152c1f5babd6ad9ad45619e0a10b4c08554
Analyze and fix the following issue in the Linux kernel code: wl12xx: avoid bug_on_recovery during fw switch
Problem Details: Add a flag to indicate we initiated a recovery work on purpose, in order to avoid triggering BUG() (when the bug_on_recovery module param was set). Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
```diff diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 89bf9eadc840..3c966f2e00d0 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c @@ -1154,7 +1154,8 @@ static void wl1271_recovery_work(struct work_struct *work) wl1271_info("Hardware ...
ff2a6617c2acd6a8dc468c90ab8708a6ad112bb0
Analyze and fix the following issue in the Linux kernel code: perf annotate: Add missing newline on error message
Problem Details: If perf.data couldn't find vmlinux image for the given build-id, it would print error message. However it lacked a newline at the end, so the output looked like below: $ perf annotate --stdio No vmlinux file with build id 63b554b2e90f14a4bced200008865e757d3e8b36 was found in the path. Please use:...
```diff diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 011ed2676604..e5a462f1d07c 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -315,7 +315,7 @@ fallback: "Please use:\n\n" " perf buildid-cache -av vmlinux\n\n" "or:\n\n" - ...
824ac0e9838aadf5a398850c80ec2a43b9d0ca49
Analyze and fix the following issue in the Linux kernel code: perf annotate: Fix help string on tui
Problem Details: Separate multiple binding using /, capitalize descriptions, add missing key binding. Cc: Ingo Molnar <mingo@elte.hu> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1329986784-4916-5-git-send-email-n...
```diff diff --git a/tools/perf/util/ui/browsers/annotate.c b/tools/perf/util/ui/browsers/annotate.c index e73357770d5d..57a4c6ef3fd2 100644 --- a/tools/perf/util/ui/browsers/annotate.c +++ b/tools/perf/util/ui/browsers/annotate.c @@ -233,9 +233,9 @@ static int annotate_browser__run(struct annotate_browser *self, int e...
142cfbd0a0353bbcf4ce62f1d4b4ffaa5fe228f9
Analyze and fix the following issue in the Linux kernel code: perf annotate: Restore title when came back to original symbol
Problem Details: On tui annotation, the title was set to name of the target symbol if user selects the target. However it remained after returning to original symbol from the target. Fix it. Cc: Ingo Molnar <mingo@elte.hu> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <...
```diff diff --git a/tools/perf/util/ui/browsers/annotate.c b/tools/perf/util/ui/browsers/annotate.c index 374d3bc570b2..e73357770d5d 100644 --- a/tools/perf/util/ui/browsers/annotate.c +++ b/tools/perf/util/ui/browsers/annotate.c @@ -343,6 +343,7 @@ static int annotate_browser__run(struct annotate_browser *self, int e...
67cbbd7f1838cc8f6900f39d860d6c2e1f86cf61
Analyze and fix the following issue in the Linux kernel code: perf tools: Add descriptions of missing Makefile arguments
Problem Details: There are some variable arguments can be specified on make invocation, but some of them are missing descriptions so that user cannot be informed easily. Fix it. Cc: Ingo Molnar <mingo@elte.hu> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.or...
```diff diff --git a/tools/perf/Makefile b/tools/perf/Makefile index e011b5060f92..fa043404479e 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -15,6 +15,16 @@ endif # Define V to have a more verbose compile. # +# Define O to save output files in a separate directory. +# +# Define ARCH as name of targ...
4e70daaf05a181b6968e29e72e9f1c16a183e92c
Analyze and fix the following issue in the Linux kernel code: tpm_tis: fix tis_lock with respect to RCU
Problem Details: cleanup_tis() -> tpm_remove_hardware() -> syncrhonize_rcu() is being called in an atomic context (tis_lock spinlock held), which is not allowed. Convert tis_lock to mutex. Signed-off-by: Jiri Kosina <jkosina@suse.cz> Tested-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Acked-by: Rajiv Andrade <srajiv...
```diff diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index a1748621111b..70fac9abb0e2 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c @@ -76,7 +76,7 @@ enum tis_defaults { #define TPM_RID(l) (0x0F04 | ((l) << 12)) static LIST_HEAD(tis_chips); -static DEFINE_SPINLOC...
df156f90a0f90649dd38b7667901ef85478f3d2b
Analyze and fix the following issue in the Linux kernel code: x86: Introduce x86_cpuinit.early_percpu_clock_init hook
Problem Details: When kvm guest uses kvmclock, it may hang on vcpu hot-plug. This is caused by an overflow in pvclock_get_nsec_offset, u64 delta = tsc - shadow->tsc_timestamp; which in turn is caused by an undefined values from percpu hv_clock that hasn't been initialized yet. Uninitialized clock on being booted ...
```diff diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h index 517d4767ffdd..5d0afac2962c 100644 --- a/arch/x86/include/asm/x86_init.h +++ b/arch/x86/include/asm/x86_init.h @@ -145,9 +145,11 @@ struct x86_init_ops { /** * struct x86_cpuinit_ops - platform specific cpu hotplug setups *...
b93a35532767a2cf78bdbc88730d5c28aa66b941
Analyze and fix the following issue in the Linux kernel code: KVM: fix error handling for out of range irq
Problem Details: find_index_from_host_irq returns 0 on error but callers assume < 0 on error. This should not matter much: an out of range irq should never happen since irq handler was registered with this irq #, and even if it does we get a spurious msix irq in guest and typically nothing terrible happens. Still, bet...
```diff diff --git a/virt/kvm/assigned-dev.c b/virt/kvm/assigned-dev.c index 758e3b36d4cf..ece80612b594 100644 --- a/virt/kvm/assigned-dev.c +++ b/virt/kvm/assigned-dev.c @@ -49,10 +49,8 @@ static int find_index_from_host_irq(struct kvm_assigned_dev_kernel index = i; break; } - if (index < 0) { + if (index <...
31f3438eca2fc90dc892e0e9963ba4b93a2c8383
Analyze and fix the following issue in the Linux kernel code: KVM: PPC: Move kvm_vcpu_ioctl_[gs]et_one_reg down to platform-specific code
Problem Details: This moves the get/set_one_reg implementation down from powerpc.c into booke.c, book3s_pr.c and book3s_hv.c. This avoids #ifdefs in C code, but more importantly, it fixes a bug on Book3s HV where we were accessing beyond the end of the kvm_vcpu struct (via the to_book3s() macro) and corrupting memory,...
```diff diff --git a/arch/powerpc/include/asm/kvm_ppc.h b/arch/powerpc/include/asm/kvm_ppc.h index fb70414db90c..a61b5b5047d6 100644 --- a/arch/powerpc/include/asm/kvm_ppc.h +++ b/arch/powerpc/include/asm/kvm_ppc.h @@ -176,6 +176,9 @@ int kvmppc_core_set_sregs(struct kvm_vcpu *vcpu, struct kvm_sregs *sregs); void kvmp...
a92bce95f0f967dfa6205527d7143d276b0be6a7
Analyze and fix the following issue in the Linux kernel code: KVM: PPC: Book3S HV: Keep HPTE locked when invalidating
Problem Details: This reworks the implementations of the H_REMOVE and H_BULK_REMOVE hcalls to make sure that we keep the HPTE locked and in the reverse- mapping chain until we have finished invalidating it. Previously we would remove it from the chain and unlock it before invalidating it, leaving a tiny window when th...
```diff diff --git a/arch/powerpc/kvm/book3s_hv_rm_mmu.c b/arch/powerpc/kvm/book3s_hv_rm_mmu.c index d3e36fc77e2b..ba4a1376b331 100644 --- a/arch/powerpc/kvm/book3s_hv_rm_mmu.c +++ b/arch/powerpc/kvm/book3s_hv_rm_mmu.c @@ -140,6 +140,12 @@ static pte_t lookup_linux_pte(struct kvm_vcpu *vcpu, unsigned long hva, return...
03cdab5340b423ec88fc18eb158a62a8a7b94d7f
Analyze and fix the following issue in the Linux kernel code: KVM: PPC: Fix vcpu_create dereference before validity check.
Problem Details: Fix usage of vcpu struct before check that it's actually valid. Signed-off-by: Matt Evans <matt@ozlabs.org> Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 06e955b5837e..25171037a36c 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -289,9 +289,10 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id) { struct kvm_vcpu *vcpu; vcpu = kvmppc_...
4e72dbe13528394a413889d73e5025dbdf6cab70
Analyze and fix the following issue in the Linux kernel code: KVM: PPC: Make wakeups work again for Book3S HV guests
Problem Details: When commit f43fdc15fa ("KVM: PPC: booke: Improve timer register emulation") factored out some code in arch/powerpc/kvm/powerpc.c into a new helper function, kvm_vcpu_kick(), an error crept in which causes Book3s HV guest vcpus to stall. This fixes it. On POWER7 machines, guest vcpus are grouped toget...
```diff diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index e1ef4d6d972a..4f85ac32258a 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -562,7 +562,7 @@ void kvm_vcpu_kick(struct kvm_vcpu *vcpu) int cpu = vcpu->cpu; me = get_cpu(); - if (waitqueue_active(&vcpu->wq...
7b11dc993841f1643c0932cf0faf010406502572
Analyze and fix the following issue in the Linux kernel code: KVM: PPC: e500: Fix TLBnCFG in KVM_CONFIG_TLB
Problem Details: The associativity, not just total size, can differ from the host hardware. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c index 9cd124a11acd..507376890cf8 100644 --- a/arch/powerpc/kvm/e500_tlb.c +++ b/arch/powerpc/kvm/e500_tlb.c @@ -1227,12 +1227,14 @@ int kvm_vcpu_ioctl_config_tlb(struct kvm_vcpu *vcpu, vcpu_e500->gtlb_offset[0] = 0; vcpu_e500->gtlb_offse...
e371f713db6523d99d8ffae8f9da564055e6de17
Analyze and fix the following issue in the Linux kernel code: KVM: PPC: Book3S: PR: Fix signal check race
Problem Details: As Scott put it: > If we get a signal after the check, we want to be sure that we don't > receive the reschedule IPI until after we're in the guest, so that it > will cause another signal check. we need to have interrupts disabled from the point we do signal_check() all the way until we actually ente...
```diff diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c index 0c31507be908..2da670405727 100644 --- a/arch/powerpc/kvm/book3s_pr.c +++ b/arch/powerpc/kvm/book3s_pr.c @@ -51,6 +51,8 @@ static int kvmppc_handle_ext(struct kvm_vcpu *vcpu, unsigned int exit_nr, #define MSR_USER32 MSR_USER #define...
940b45ec18cf00046b8b28299d97066a2c43d559
Analyze and fix the following issue in the Linux kernel code: KVM: PPC: booke: Paravirtualize wrtee
Problem Details: Also fix wrteei 1 paravirt to check for a pending interrupt. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/powerpc/kernel/kvm.c b/arch/powerpc/kernel/kvm.c index 2985338d0e10..06b15ee997f7 100644 --- a/arch/powerpc/kernel/kvm.c +++ b/arch/powerpc/kernel/kvm.c @@ -1,5 +1,6 @@ /* * Copyright (C) 2010 SUSE Linux Products GmbH. All rights reserved. + * Copyright 2010-2011 Freescale Semiconductor, In...
29ac26efbdc651303643025c83009ce5766c1676
Analyze and fix the following issue in the Linux kernel code: KVM: PPC: booke: Fix int_pending calculation for MSR[EE] paravirt
Problem Details: int_pending was only being lowered if a bit in pending_exceptions was cleared during exception delivery -- but for interrupts, we clear it during IACK/TSR emulation. This caused paravirt for enabling MSR[EE] to be ineffective. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexand...
```diff diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 557f028a9ad4..8dfc59a8a715 100644 --- a/arch/powerpc/kvm/booke.c +++ b/arch/powerpc/kvm/booke.c @@ -285,7 +285,6 @@ static int kvmppc_booke_irqprio_deliver(struct kvm_vcpu *vcpu, static void kvmppc_core_check_exceptions(struct kvm_vcpu *vcp...
25051b5a5aff0bb71435421b4b80279b789fa0dc
Analyze and fix the following issue in the Linux kernel code: KVM: PPC: Move prepare_to_enter call site into subarch code
Problem Details: This function should be called with interrupts disabled, to avoid a race where an exception is delivered after we check, but the resched kick is received before we disable interrupts (and thus doesn't actually trigger the exit code that would recheck exceptions). booke already does this properly in th...
```diff diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 536adee59c07..b1e3b9c1326a 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -836,6 +836,8 @@ int kvmppc_vcpu_run(struct kvm_run *run, struct kvm_vcpu *vcpu) return -EINVAL; } + kvmppc_core_prepar...
dc2babfea592e633cf3890294af6545609b466be
Analyze and fix the following issue in the Linux kernel code: KVM: PPC: Fix DEC truncation for greater than 0xffff_ffff/1000
Problem Details: kvmppc_emulate_dec() uses dec_nsec of type unsigned long and does below calculation: dec_nsec = vcpu->arch.dec; dec_nsec *= 1000; This will truncate if DEC value "vcpu->arch.dec" is greater than 0xffff_ffff/1000. For example : For tb_ticks_per_usec = 4a, we can not set decrementer more...
```diff diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c index 141dce3c6810..4337f99fa0fa 100644 --- a/arch/powerpc/kvm/emulate.c +++ b/arch/powerpc/kvm/emulate.c @@ -84,6 +84,7 @@ static int kvmppc_dec_enabled(struct kvm_vcpu *vcpu) void kvmppc_emulate_dec(struct kvm_vcpu *vcpu) { unsigned long...
f9208427f72e6cb52c71767af3bf8c14c43c27ac
Analyze and fix the following issue in the Linux kernel code: PPC: Fix race in mtmsr paravirt implementation
Problem Details: The current implementation of mtmsr and mtmsrd are racy in that it does: * check (int_pending == 0) ---> host sets int_pending = 1 <--- * write shared page * done while instead we should check for int_pending after the shared page is written. Signed-off-by: Bharat Bhushan <bharat.bhushan@fre...
```diff diff --git a/arch/powerpc/kernel/kvm_emul.S b/arch/powerpc/kernel/kvm_emul.S index f2b1b2523e61..3d64c5704fd5 100644 --- a/arch/powerpc/kernel/kvm_emul.S +++ b/arch/powerpc/kernel/kvm_emul.S @@ -167,6 +167,9 @@ maybe_stay_in_guest: kvm_emulate_mtmsr_reg2: ori r30, r0, 0 + /* Put MSR into magic page because...
303b7c97e369ec3d7ab7ba0551030160ce3f838a
Analyze and fix the following issue in the Linux kernel code: KVM: PPC: e500: tlbsx: fix tlb0 esel
Problem Details: It should contain the way, not the absolute TLB0 index. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c index f19ae2f61521..ec17148392b4 100644 --- a/arch/powerpc/kvm/e500_tlb.c +++ b/arch/powerpc/kvm/e500_tlb.c @@ -853,6 +853,8 @@ int kvmppc_e500_emul_tlbsx(struct kvm_vcpu *vcpu, int rb) } if (gtlbe) { + esel &= vcpu_e500->gtlb_params[...
60b413c9248495ea400e80e08e4d1e28ed7ee05e
Analyze and fix the following issue in the Linux kernel code: KVM: s390: provide the prefix register via kvm_run
Problem Details: Add the prefix register to the synced register field in kvm_run. While we need the prefix register most of the time read-only, this patch also adds handling for guest dirtying of the prefix register. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Marcelo Tosatti <mtosatti...
```diff diff --git a/arch/s390/include/asm/kvm.h b/arch/s390/include/asm/kvm.h index 325560afb77e..9fc328c26159 100644 --- a/arch/s390/include/asm/kvm.h +++ b/arch/s390/include/asm/kvm.h @@ -41,7 +41,9 @@ struct kvm_debug_exit_arch { struct kvm_guest_debug_arch { }; +#define KVM_SYNC_PREFIX (1UL << 0) /* definitio...
8d26cf7b40b1648c39e77a113dac07ad31363120
Analyze and fix the following issue in the Linux kernel code: KVM: s390: rework code that sets the prefix
Problem Details: There are several places in the kvm module, which set the prefix register. Since we need to flush the cpu, lets combine this operation into a helper function. This helper will also explicitely mask out the unused bits. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Marcel...
```diff diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index 278ee009ce65..c6366cfb3bf0 100644 --- a/arch/s390/kvm/interrupt.c +++ b/arch/s390/kvm/interrupt.c @@ -236,8 +236,7 @@ static void __do_deliver_interrupt(struct kvm_vcpu *vcpu, VCPU_EVENT(vcpu, 4, "interrupt: set prefix to %x", in...
3e6afcf1d8ce6bca6bfa62a49c1d70d2f16162eb
Analyze and fix the following issue in the Linux kernel code: KVM: s390: Fix return code for unknown ioctl numbers
Problem Details: This patch fixes the return code of kvm_arch_vcpu_ioctl in case of an unkown ioctl number. Signed-off-by: Carsten Otte <cotte@de.ibm.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index a1061b361c43..a33b44487540 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -781,7 +781,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp, break; } default: - r = -EINVAL; + r = -ENOTTY; } return r; } ```
3777594d5a75b704312544a59094beecd820e12b
Analyze and fix the following issue in the Linux kernel code: KVM: s390: fix assumption for KVM_MAX_VCPUS
Problem Details: This patch fixes definition of the idle_mask and the local_int array in kvm_s390_float_interrupt. Previous definition had 64 cpus max hardcoded instead of using KVM_MAX_VCPUS. Signed-off-by: Carsten Otte <cotte@de.ibm.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity ...
```diff diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h index b0c235cb6ad5..e34fb2ba76c1 100644 --- a/arch/s390/include/asm/kvm_host.h +++ b/arch/s390/include/asm/kvm_host.h @@ -220,8 +220,9 @@ struct kvm_s390_float_interrupt { struct list_head list; atomic_t active; int next_rr_c...
4adf9beda58364497889c06c1badf129a71d48be
Analyze and fix the following issue in the Linux kernel code: regulator: Fix mask parameter in da9052_reg_update calls
Problem Details: If the mask parameter is 0, info->activate_bit bit won't be set by calling da9052_reg_update. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/drivers/regulator/da9052-regulator.c b/drivers/regulator/da9052-regulator.c index 3767364452fd..ea4d8f575ac6 100644 --- a/drivers/regulator/da9052-regulator.c +++ b/drivers/regulator/da9052-regulator.c @@ -260,8 +260,8 @@ static int da9052_set_ldo5_6_voltage(struct regulator_dev *rdev, * the LDO...
57b676f9c1b7cd84397fe5a86c9bd2788ac4bd32
Analyze and fix the following issue in the Linux kernel code: pinctrl: fix and simplify locking
Problem Details: There are many problems with the current pinctrl locking: struct pinctrl_dev's gpio_ranges_lock isn't effective; pinctrl_match_gpio_range() only holds this lock while searching for a gpio range, but the found range is return and manipulated after releading the lock. This could allow pinctrl_remove_gpi...
```diff diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 6af6d8d117df..aefc3394db91 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -18,11 +18,8 @@ #include <linux/init.h> #include <linux/device.h> #include <linux/slab.h> -#include <linux/radix-tree.h> #include <linux/err.h> #...
883e0e366209067e690356e58e19bb2e6693b839
Analyze and fix the following issue in the Linux kernel code: HID: hid-input: allow array fields out of range
Problem Details: Allow array field values out of range as per HID 1.11 specification, section 6.2.25: Rather than returning a single bit for each button in the group, an array returns an index in each field that corresponds to the pressed button (like keyboard scan codes). An out-of range value in and array field ...
```diff diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 9333d692a786..627850a54d34 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -986,8 +986,13 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct return; } - /* Ignore out-of-range values...
d474186f19d7ac1c7fbb293fdcfa46103e45e2ca
Analyze and fix the following issue in the Linux kernel code: IB/iser: Free IB connection resources in the proper place
Problem Details: We allocate the login dma buffers in iser_verbs.c as part of alloc_ib_conn_resources(), however we are freeing them in iser_initiator.c as part of iser_free_rx_descriptors(). This is needlessly confusing. We have an alloc_rx_descriptors() and it doesn't alloc something that the free_rx_descriptors() ...
```diff diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c index a607542fc796..622e9857c869 100644 --- a/drivers/infiniband/ulp/iser/iser_initiator.c +++ b/drivers/infiniband/ulp/iser/iser_initiator.c @@ -220,18 +220,6 @@ void iser_free_rx_descriptors(struct iser_co...
a4b64fbe482c7766f7925f03067fc637716bfa3f
Analyze and fix the following issue in the Linux kernel code: rtnetlink: fix rtnl_calcit() and rtnl_dump_ifinfo()
Problem Details: nlmsg_parse() might return an error, so test its return value before potential random memory accesses. Errors introduced in commit 115c9b81928 (rtnetlink: Fix problem with buffer allocation) Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: D...
```diff diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 606a6e8f3671..f965dce6f20f 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -1060,11 +1060,12 @@ static int rtnl_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb) rcu_read_lock(); cb->seq = net->dev_base_seq; - nlmsg...
4c1dc80a74384829e467ba078260094d1ffdd963
Analyze and fix the following issue in the Linux kernel code: vmxnet3: Fix log messages and corrects some typos
Problem Details: Fix log messages and corrects some typos Change logging of failure to enable MSI/MSI-X to display device's PCI address instead of eth%d. Rectify a typo. Signed-off-by: Shreyas N Bhatewara <sbhatewara@vmware.com> Reviewed-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemlof...
```diff diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index adf527e27583..a9684a53af19 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c @@ -2704,8 +2704,8 @@ vmxnet3_acquire_msix_vectors(struct vmxnet3_adapter *adapter, adapter->intr.num_int...
2fae5e3670a666039e6f2fd63e1a5d320c71b913
Analyze and fix the following issue in the Linux kernel code: tg3: Fix poor tx performance on 57766 after MTU change
Problem Details: GRC reset causes the read DMA engine to go into a mode that breaks up requests into 256 bytes. A PHY reset is required to bring it back to the normal mode. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index 0da93dbbd0c8..a8490a473a1c 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c @@ -12267,7 +12267,7 @@ static inline void tg3_set_mtu(struct net_device *dev, struct tg3 *tp, stati...
c441b456767357322dbc14b55bdc7da0051d0d98
Analyze and fix the following issue in the Linux kernel code: tg3: Fix jumbo loopback test on 5719
Problem Details: Loopback on 9K packet fails because the chip has a DMA limit of 4K. The loopback test logic uses a single BD for simplicity. Fix it by reducing the jumbo packet size to the DMA limit. Signed-off-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Reviewed-by: Matt Car...
```diff diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index 76f33d5c7272..4b3243b2bdf1 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c @@ -11727,6 +11727,10 @@ static int tg3_run_loopback(struct tg3 *tp, u32 pktsz, bool tso_loopback) ...
6c03438edeb5c359af35f060ea016ca65671c269
Analyze and fix the following issue in the Linux kernel code: kernel.h: doesn't explicitly use bug.h, so don't include it.
Problem Details: This header isn't using bug.h infrastructure, but due to historical reasons, it was including it. Removing it revealed several implicit dependencies (since kernel.h is everywhere) so we've fixed those 1st before deploying this change. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
```diff diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 5dba983b8d65..bef5480396d0 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -20,7 +20,6 @@ #include <linux/printk.h> #include <linux/dynamic_debug.h> #include <asm/byteorder.h> -#include <asm/bug.h> #define USHRT_MAX ((u...
35edd9103c84f2b37f63227d12765c38f30495c5
Analyze and fix the following issue in the Linux kernel code: bug: consolidate BUILD_BUG_ON with other bug code
Problem Details: The support for BUILD_BUG in linux/kernel.h predates the addition of linux/bug.h -- with this chunk off separate, you can run into situations where a person gets a compile fail even when they've included linux/bug.h, like this: CC lib/string.o lib/string.c: In function 'strlcat': lib/stri...
```diff diff --git a/include/linux/bug.h b/include/linux/bug.h index d276b5510c83..72961c39576a 100644 --- a/include/linux/bug.h +++ b/include/linux/bug.h @@ -11,6 +11,67 @@ enum bug_trap_type { struct pt_regs; +#ifdef __CHECKER__ +#define BUILD_BUG_ON_NOT_POWER_OF_2(n) +#define BUILD_BUG_ON_ZERO(e) (0) +#define B...
187f1882b5b0748b3c4c22274663fdb372ac0452
Analyze and fix the following issue in the Linux kernel code: BUG: headers with BUG/BUG_ON etc. need linux/bug.h
Problem Details: If a header file is making use of BUG, BUG_ON, BUILD_BUG_ON, or any other BUG variant in a static inline (i.e. not in a #define) then that header really should be including <linux/bug.h> and not just expecting it to be implicitly present. We can make this change risk-free, since if the files using the...
```diff diff --git a/arch/avr32/include/asm/io.h b/arch/avr32/include/asm/io.h index 22c97ef92201..cf60d0a9f176 100644 --- a/arch/avr32/include/asm/io.h +++ b/arch/avr32/include/asm/io.h @@ -1,6 +1,7 @@ #ifndef __ASM_AVR32_IO_H #define __ASM_AVR32_IO_H +#include <linux/bug.h> #include <linux/kernel.h> #include <l...
b642631d38c28fefd1232a6b96713eb54b60130d
Analyze and fix the following issue in the Linux kernel code: PM / Domains: Fix include for PM_GENERIC_DOMAINS=n case
Problem Details: Fix pm_genpd_init() arguments and make sure dev_gpd_data() and simple_qos_governor exist regardless of CONFIG_PM_GENERIC_DOMAINS setting. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
```diff diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index e76cc9ae8233..5c2bbc248c11 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h @@ -155,6 +155,10 @@ extern bool default_stop_ok(struct device *dev); extern struct dev_power_governor pm_domain_always_on_gov; #else +st...
05b4877f6a4f1ba4952d1222213d262bf8c132b7
Analyze and fix the following issue in the Linux kernel code: PM / Hibernate: Enable usermodehelpers in hibernate() error path
Problem Details: If create_basic_memory_bitmaps() fails, usermodehelpers are not re-enabled before returning. Fix this. And while at it, reword the goto labels so that they look more meaningful. Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Cc: stable@vger.kernel.org Signed-off-by: Rafael J. Wysoc...
```diff diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c index 72baaf011fb7..0a186cfde788 100644 --- a/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c @@ -618,7 +618,7 @@ int hibernate(void) /* Allocate memory management structures */ error = create_basic_memory_bitmaps(); if (error) - go...
4782e1654bdbd30cf307da090b3c4f70157477cb
Analyze and fix the following issue in the Linux kernel code: PM / Sleep: Make __pm_stay_awake() delete wakeup source timers
Problem Details: If __pm_stay_awake() is called after __pm_wakeup_event() for the same wakep source object before its timer expires, it won't cancel the timer, so the wakeup source will be deactivated from the timer function as scheduled by __pm_wakeup_event(). In that case __pm_stay_awake() doesn't have any effect be...
```diff diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index b38bb9afb719..7c5ab70b9ef3 100644 --- a/drivers/base/power/wakeup.c +++ b/drivers/base/power/wakeup.c @@ -344,7 +344,6 @@ static void wakeup_source_activate(struct wakeup_source *ws) { ws->active = true; ws->active_count++; - ws->...
da863cddd831b0f4bf2d067f8b75254f1be94590
Analyze and fix the following issue in the Linux kernel code: PM / Sleep: Fix race conditions related to wakeup source timer function
Problem Details: If __pm_wakeup_event() has been used (with a nonzero timeout) to report a wakeup event and then __pm_relax() immediately followed by __pm_stay_awake() is called or __pm_wakeup_event() is called once again for the same wakeup source object before its timer expires, the timer function pm_wakeup_timer_fn(...
```diff diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index d279f462d624..b38bb9afb719 100644 --- a/drivers/base/power/wakeup.c +++ b/drivers/base/power/wakeup.c @@ -433,6 +433,7 @@ static void wakeup_source_deactivate(struct wakeup_source *ws) ws->max_time = duration; del_timer(&ws->tim...
d94aff87826ee6aa43032f4c0263482913f4e2c8
Analyze and fix the following issue in the Linux kernel code: PM / Sleep: Fix possible infinite loop during wakeup source destruction
Problem Details: If wakeup_source_destroy() is called for an active wakeup source that is never deactivated, it will spin forever. To prevent that from happening, make wakeup_source_destroy() call __pm_relax() for the wakeup source object it is about to free instead of waiting until it will be deactivated by someone e...
```diff diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index 6e591a8a49da..d279f462d624 100644 --- a/drivers/base/power/wakeup.c +++ b/drivers/base/power/wakeup.c @@ -74,22 +74,17 @@ EXPORT_SYMBOL_GPL(wakeup_source_create); /** * wakeup_source_destroy - Destroy a struct wakeup_source object. ...
aaa60fa7ac66ede814f7ad37a2b3a07b4f784756
Analyze and fix the following issue in the Linux kernel code: Input: cyttsp - remove useless checks in cyttsp_probe()
Problem Details: This fixes reference-before-check problem; there is no reason to check if caller passed NULL dev or bus_ops as it is done only by bus-specific drivers which already do the right thing. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/touchscreen/cyttsp_core.c b/drivers/input/touchscreen/cyttsp_core.c index 8be22479b41c..f030d9ec795d 100644 --- a/drivers/input/touchscreen/cyttsp_core.c +++ b/drivers/input/touchscreen/cyttsp_core.c @@ -523,7 +523,7 @@ struct cyttsp *cyttsp_probe(const struct cyttsp_bus_ops *bus_ops,...
8c690fdf465be9d97229f6bb0e6346624d6753a9
Analyze and fix the following issue in the Linux kernel code: ARM: dt: Explicitly configure all serial ports on Tegra Cardhu
Problem Details: The ports are used as follows: UART1/A: Routed to debug dongle UART2/B: GPS UART3/C: Bluetooth UART4/D: Routed to debug dongle UART5/E: Not connected The debug dongle has jumpers to connect either UART1/A or UART4/D to the DB-9 connector. UART1/A is typically used on Cardhu, and is the option we assum...
```diff diff --git a/arch/arm/boot/dts/tegra-cardhu.dts b/arch/arm/boot/dts/tegra-cardhu.dts index 70c41fc897d7..0419690c8784 100644 --- a/arch/arm/boot/dts/tegra-cardhu.dts +++ b/arch/arm/boot/dts/tegra-cardhu.dts @@ -14,6 +14,22 @@ clock-frequency = < 408000000 >; }; + serial@70006040 { + status = "disable"; ...
adb795062f89b8d67d295ee25e04034bccce6779
Analyze and fix the following issue in the Linux kernel code: percpu: fix __this_cpu_{sub,inc,dec}_return() definition
Problem Details: This patch adds missed "__" prefixes, otherwise these functions works as irq/preemption safe. Reported-by: Torsten Kaiser <just.for.lkml@googlemail.com> Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org> Signed-off-by: Tejun Heo <tj@kernel.org>
```diff diff --git a/include/linux/percpu.h b/include/linux/percpu.h index 594c0040fdd8..21638ae14e07 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h @@ -722,9 +722,9 @@ do { \ __pcpu_size_call_return2(__this_cpu_add_return_, pcp, val) #endif -#define __this_cpu_sub_return(pcp, val) this_c...
8f7f6b7e46117edb83d12a508fffa0f013457677
Analyze and fix the following issue in the Linux kernel code: mmc: mmci: reduce max_blk_count to avoid overflowing max_req_size
Problem Details: On a system with large pages (64k in my case), the following BUG is triggered in MMC core: [ 2.338023] BUG: failure at drivers/mmc/core/core.c:221/mmc_start_request()! [ 2.338102] Kernel panic - not syncing: BUG! [ 2.338155] Call trace: [ 2.338228] [<ffffffc00008635c>] dump_backtrace+0x0/0...
```diff diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 0d955ffaf44e..11e589cd8233 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -1271,12 +1271,13 @@ static int __devinit mmci_probe(struct amba_device *dev, /* * Block size can be up to 2048 bytes, but must be a power of...
5b6b0ad6e572b32a641116aaa5f897ffebe31e44
Analyze and fix the following issue in the Linux kernel code: mmc: sdhci-esdhc-imx: fix for mmc cards on i.MX5
Problem Details: On i.MX53 we have to write a special SDHCI_CMD_ABORTCMD to the SDHCI_TRANSFER_MODE register during a MMC_STOP_TRANSMISSION command. This works for SD cards. However, with MMC cards the MMC_SET_BLOCK_COUNT command is used instead, but this needs the same handling. Fix MMC cards by testing for the MMC_SE...
```diff diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index d601e41af282..0be4e2013632 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -269,8 +269,9 @@ static void esdhc_writew_le(struct sdhci_host *host, u16 val, int reg) imx_data->s...
c84f15aed29d89995fd50ef37e19c7b88019d78f
Analyze and fix the following issue in the Linux kernel code: mmc: core: fix regression: set default clock gating delay to 0
Problem Details: A recent commit "mmc: core: Use delayed work in clock gating framework" (597dd9d79cfbbb1) introduced a default 200ms delay before clock gating actually takes place. This means that every time an MMC interface becomes idle it first stays on for 200ms before gating its clock. This leads to increased pow...
```diff diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 30055f2b0d44..c3704e293a7b 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -238,10 +238,10 @@ static inline void mmc_host_clk_init(struct mmc_host *host) /* Hold MCI clock for 8 cycles by default */ host->clk_delay = ...
ad20ff920c1fd217578e2c637dd50c1878a21c06
Analyze and fix the following issue in the Linux kernel code: ASoC: wm8753: fix initialization
Problem Details: Without that fix the wm8753 SPI initialization fails, and then produces a kernel panic during boot with the following call trace: Unable to handle kernel paging request at virtual address 37386d9b [<c01ccafc>] (regmap_get_val_bytes+0x0/0x14) from [<c0243dfc>] (snd_soc_codec_set_cache_io+0x9c/...
```diff diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c index 59c28dbc5fc9..e27e7b62b365 100644 --- a/sound/soc/codecs/wm8753.c +++ b/sound/soc/codecs/wm8753.c @@ -1578,6 +1578,9 @@ static int __devinit wm8753_spi_probe(struct spi_device *spi) dev_err(&spi->dev, "Failed to register CODEC: %d\n", r...
b2ccf065f7b23147ed135a41b01d05a332ca6b7e
Analyze and fix the following issue in the Linux kernel code: ASoC: neo1973: fix neo1973 wm8753 initialization
Problem Details: The neo1973 driver had wrong codec name which prevented the "sound card" from appearing. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
```diff diff --git a/sound/soc/samsung/neo1973_wm8753.c b/sound/soc/samsung/neo1973_wm8753.c index c6012ff5bd3e..d23b19a59d83 100644 --- a/sound/soc/samsung/neo1973_wm8753.c +++ b/sound/soc/samsung/neo1973_wm8753.c @@ -367,7 +367,7 @@ static struct snd_soc_dai_link neo1973_dai[] = { .platform_name = "samsung-audio", ...
9d8ae5c22b73852e9b23ba4e520a64c29bbfc939
Analyze and fix the following issue in the Linux kernel code: rpmsg: fix build warning when dma_addr_t is 64-bit
Problem Details: dev_dbg() in rpmsg_probe() made use of the %x formatting that expects an 'unsigned int' which dma_addr_t is not in cases where dma_addr_t is 64-bit (CONFIG_ARCH_DMA_ADDR_T_64BIT). Casting to a 'unsigned long long' and using %llx will avoid this. Signed-off-by: Mark Asselstine <mark.asselstine@windrive...
```diff diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c index f93ca3b8fd42..75506ec2840e 100644 --- a/drivers/rpmsg/virtio_rpmsg_bus.c +++ b/drivers/rpmsg/virtio_rpmsg_bus.c @@ -916,8 +916,8 @@ static int rpmsg_probe(struct virtio_device *vdev) if (!bufs_va) goto vqs_del; - dev_d...
e37aade31601cdb9f078f6663cbf887f391bb110
Analyze and fix the following issue in the Linux kernel code: x86, memblock: Move mem_hole_size() to .init
Problem Details: mem_hole_size() is being called only from __init-marked functions, and as such should be moved to .init section as well. Fixes this warning: WARNING: vmlinux.o(.text+0x35511): Section mismatch in reference from the function mem_hole_size() to the function .init.text:absent_pages_in_range() Signed-off...
```diff diff --git a/arch/x86/mm/numa_emulation.c b/arch/x86/mm/numa_emulation.c index 46db56845f18..2fff6518e302 100644 --- a/arch/x86/mm/numa_emulation.c +++ b/arch/x86/mm/numa_emulation.c @@ -28,7 +28,7 @@ static int __init emu_find_memblk_by_nid(int nid, const struct numa_meminfo *mi) return -ENOENT; } -static...
2556cd8603cd1f39205aaf61f054a76133359ae6
Analyze and fix the following issue in the Linux kernel code: mdio.h: Include linux/types.h
Problem Details: Fixes: /home/davem/src/GIT/net-next/usr/include/linux/mdio.h:271: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/linux/mdio.h b/include/linux/mdio.h index ec90da7232cc..dfb947959ec9 100644 --- a/include/linux/mdio.h +++ b/include/linux/mdio.h @@ -10,6 +10,7 @@ #ifndef __LINUX_MDIO_H__ #define __LINUX_MDIO_H__ +#include <linux/types.h> #include <linux/mii.h> /* MDIO Manageable Devices (MMDs). *...
c0638c247f559e1a16ee79e54df14bca2cb679ea
Analyze and fix the following issue in the Linux kernel code: tcp: don't fragment SACKed skbs in tcp_mark_head_lost()
Problem Details: In tcp_mark_head_lost() we should not attempt to fragment a SACKed skb to mark the first portion as lost. This is for two primary reasons: (1) tcp_shifted_skb() coalesces adjacent regions of SACKed skbs. When doing this, it preserves the sum of their packet counts in order to reflect the real-world dy...
```diff diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index ee42d42b2f45..d9b83d198c3d 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -2569,6 +2569,7 @@ static void tcp_mark_head_lost(struct sock *sk, int packets, int mark_head) if (cnt > packets) { if ((tcp_is_sack(tp) && !tcp_is_f...
ea5f4db8ece896c2ab9eafa0924148a2596c52e4
Analyze and fix the following issue in the Linux kernel code: block, sx8: fix pointer math issue getting fw version
Problem Details: "mem" is type u8. We need parenthesis here or it screws up the pointer math probably leading to an oops. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: stable@kernel.org Acked-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
```diff diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c index e7472f567c9d..3fb6ab4c8b4e 100644 --- a/drivers/block/sx8.c +++ b/drivers/block/sx8.c @@ -1120,7 +1120,7 @@ static inline void carm_handle_resp(struct carm_host *host, break; case MISC_GET_FW_VER: { struct carm_fw_ver *ver = (struct carm_fw...
f541fb7e20c848f947ca65fbf169efe69400c942
Analyze and fix the following issue in the Linux kernel code: dccp: fix bug in sequence number validation during connection setup
Problem Details: This fixes a bug in the sequence number validation during the initial handshake. The code did not treat the initial sequence numbers ISS and ISR as read-only and did not keep state for GSR and GSS as required by the specification. This causes problems with retransmissions during the initial handshake,...
```diff diff --git a/include/linux/dccp.h b/include/linux/dccp.h index 710c04302a15..eaf95a023af4 100644 --- a/include/linux/dccp.h +++ b/include/linux/dccp.h @@ -376,8 +376,10 @@ static inline unsigned int dccp_hdr_len(const struct sk_buff *skb) /** * struct dccp_request_sock - represent DCCP-specific connection ...
80af9e6d7ae633309cc5bca96aee6a45117e7c98
Analyze and fix the following issue in the Linux kernel code: pcmcia at91_cf: fix raw gpio number usage
Problem Details: This patches fixes two things: * Use gpio_valid function to check gpio before usage This must be done after 63b4c29678500 which uses -EINVAL for unused pin's * Use gpio_to_irq to convert gpio's to irq The driver assumed a 1:1 mapping between gpio and irq numbers. This is no longer true after d0fb...
```diff diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c index 4902206f53d9..4127441015db 100644 --- a/drivers/pcmcia/at91_cf.c +++ b/drivers/pcmcia/at91_cf.c @@ -16,13 +16,13 @@ #include <linux/init.h> #include <linux/interrupt.h> #include <linux/slab.h> +#include <linux/gpio.h> #include <pcmcia/...
f24fa8affe020c57a25bbb73ed31a6e4eb5c00c2
Analyze and fix the following issue in the Linux kernel code: ARM: pxa: fix error handling in pxa2xx_drv_pcmcia_probe
Problem Details: If pxa2xx_drv_pcmcia_add_one fails, it will go to err1 error path. Add a missing clk_put in the error path. Checking the ret value after the for loop is redundant, it is always false. Thus remove the redundant checking. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Eric Miao <eric.y.miao@gma...
```diff diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c index a87e2728b2c3..64d433ec4fc6 100644 --- a/drivers/pcmcia/pxa2xx_base.c +++ b/drivers/pcmcia/pxa2xx_base.c @@ -328,21 +328,15 @@ static int pxa2xx_drv_pcmcia_probe(struct platform_device *dev) goto err1; } - if (ret) { - while ...
f16603386b38c28979f4df1cafdc2fe73fa87d37
Analyze and fix the following issue in the Linux kernel code: cpupower tools: add install target to the debug tools' makefiles
Problem Details: Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
```diff diff --git a/tools/power/cpupower/debug/i386/Makefile b/tools/power/cpupower/debug/i386/Makefile index 626478b8a554..3ba158f0e287 100644 --- a/tools/power/cpupower/debug/i386/Makefile +++ b/tools/power/cpupower/debug/i386/Makefile @@ -3,6 +3,11 @@ ifeq ("$(origin O)", "command line") OUTPUT := $(O)/ endif ...
7490ca1ea5af18bd0ceb3b96ddb2f10b09e08b5d
Analyze and fix the following issue in the Linux kernel code: cpupower tools: allow to build debug tools in a separate directory too
Problem Details: Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
```diff diff --git a/tools/power/cpupower/debug/i386/Makefile b/tools/power/cpupower/debug/i386/Makefile index d08cc1ead9bc..626478b8a554 100644 --- a/tools/power/cpupower/debug/i386/Makefile +++ b/tools/power/cpupower/debug/i386/Makefile @@ -1,20 +1,26 @@ +OUTPUT=./ +ifeq ("$(origin O)", "command line") + OUTPUT := $(...
62d5a67d65d69d1c8ba6d2638193bc2864c14fdf
Analyze and fix the following issue in the Linux kernel code: cpupower: Fix broken mask values
Problem Details: Signed-off-by: Thomas Renninger <trenn@suse.de> Tested-by: Dave Jones <davej@redhat.com> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
```diff diff --git a/tools/power/cpupower/utils/helpers/helpers.h b/tools/power/cpupower/utils/helpers/helpers.h index 6280daa4e24f..2eb584cf2f55 100644 --- a/tools/power/cpupower/utils/helpers/helpers.h +++ b/tools/power/cpupower/utils/helpers/helpers.h @@ -66,8 +66,8 @@ enum cpupower_cpu_vendor {X86_VENDOR_UNKNOWN = ...
68bb2c3a145c9ccac9e695baffefde0c3b303cba
Analyze and fix the following issue in the Linux kernel code: cpupower tool: allow to build in a separate directory
Problem Details: This patch allows cpupower tool to generate its output files in a seperate directory. This is now possible by passing the 'O=<path>' to the command line. This can be usefull for a normal user if the kernel source code is located in a read only location. This is patch stole some bits of the perf makef...
```diff diff --git a/tools/power/cpupower/Makefile b/tools/power/cpupower/Makefile index 19526054d721..a93e06cfcc2a 100644 --- a/tools/power/cpupower/Makefile +++ b/tools/power/cpupower/Makefile @@ -19,6 +19,16 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite...
f2a00bb31cef363199c0f5870e9cd386ea3f5919
Analyze and fix the following issue in the Linux kernel code: cpupower: Fix linking with --as-needed
Problem Details: Fix linking order to avoid undefined reference errors when using --as-needed linker flag. Signed-off-by: Ozan Çağlayan <ozan@pardus.org.tr> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
```diff diff --git a/tools/power/cpupower/Makefile b/tools/power/cpupower/Makefile index e8a03aceceb1..f01b3f5e3126 100644 --- a/tools/power/cpupower/Makefile +++ b/tools/power/cpupower/Makefile @@ -193,7 +193,7 @@ $(UTIL_OBJS): $(UTIL_HEADERS) cpupower: $(UTIL_OBJS) libcpupower.so.$(LIB_MAJ) $(ECHO) " CC " ...
e0c6082daeb982df70f00bbb122fed66f7f57c3e
Analyze and fix the following issue in the Linux kernel code: cpupower: Remove unneeded code and by that fix a memleak
Problem Details: Looks like some not needed debug code slipped in. Also this code: tmp = sysfs_get_idlestate_name(cpu, idlestates - 1); performs a strdup and the mem was not freed again. -> delete it. Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
```diff diff --git a/tools/power/cpupower/utils/cpuidle-info.c b/tools/power/cpupower/utils/cpuidle-info.c index e076bebde1c4..8145af5f93a6 100644 --- a/tools/power/cpupower/utils/cpuidle-info.c +++ b/tools/power/cpupower/utils/cpuidle-info.c @@ -35,13 +35,6 @@ static void cpuidle_cpu_output(unsigned int cpu, int verbo...
0b37ee65e5d5e626b50852718ed72979160f7be0
Analyze and fix the following issue in the Linux kernel code: cpupower: Fix number of idle states
Problem Details: The number of idle states was wrong. The POLL idle state (on X86) was missed out: Number of idle states: 4 Available idle states: C1-NHM C3-NHM C6-NHM While the POLL is not a real idle state, its statistics should still be shown. It's now also explained in a detailed manpage. This should fix a bug of ...
```diff diff --git a/tools/power/cpupower/utils/cpuidle-info.c b/tools/power/cpupower/utils/cpuidle-info.c index b028267c1376..e076bebde1c4 100644 --- a/tools/power/cpupower/utils/cpuidle-info.c +++ b/tools/power/cpupower/utils/cpuidle-info.c @@ -43,9 +43,8 @@ static void cpuidle_cpu_output(unsigned int cpu, int verbos...
a175423c831ea582c06784d1e172d2ce1d79923a
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix casting error in scrub reada code
Problem Details: The reada code from scrub was casting down a u64 to an unsigned long so it could insert it into a radix tree. What it really wanted to do was cast down the result of a shift, instead of casting down the u64. The bug resulted in trying to insert our reada struct into the wrong place, which caused soft...
```diff diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c index 2373b39a132b..22db04550f6a 100644 --- a/fs/btrfs/reada.c +++ b/fs/btrfs/reada.c @@ -305,7 +305,7 @@ again: spin_lock(&fs_info->reada_lock); ret = radix_tree_insert(&dev->reada_zones, - (unsigned long)zone->end >> PAGE_CACHE_SHIFT, + (unsigned lo...
d3b010640e5c59b98d3b11229ba4cc2838dc7cbf
Analyze and fix the following issue in the Linux kernel code: btrfs: fix locking issues in find_parent_nodes()
Problem Details: - We might unlock head->mutex while it was not locked - We might leave the function without unlocking delayed_refs->lock Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index 98f6bf10bbd4..0436c12da8c2 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c @@ -583,7 +583,7 @@ static int find_parent_nodes(struct btrfs_trans_handle *trans, struct btrfs_path *path; struct btrfs_key info_key = { 0 }; struct btrfs_delayed...
2b88f2de30510c0f4e623d3cd5fcd85cdb70b51f
Analyze and fix the following issue in the Linux kernel code: net: dcb: getnumtcs()/setnumtcs() should return an int
Problem Details: {g|s}etnumtcs() today returns a u8 that is only used by the DCB code to verify no error occurred. Today the driver implementations return negative error codes which end up being non-zero so the logic works out but triggers some sparse warnings. To fix the sparse warnings convert the return value to an...
```diff diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c index 9a9bd3ab4793..9a4ed05bb30a 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c @@ -2142,7 +2142,7 @@ static u8 bnx2x_dcbnl_get_cap(s...
89d27a3c0ad7d5f2ce9ece055b3c7c619dc42f6c
Analyze and fix the following issue in the Linux kernel code: ixgbe: dcb: check setup_tc return codes
Problem Details: dcb netlink code calls setup_tc to init hardware traffic classes to use for DCB. At some call sites the return values are not checked for errors and in one case may return -EINVAL back to the net/dcbnl.c caller which is expecting a u8. This fixes some smatch hits and although failures are never seen i...
```diff diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c index 79a92fe987b9..95e5d11bb555 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c @@ -111,7 +111,7 @@ static u8 ixgbe_dcbnl_get_state(s...