id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
0b836ddde177bdd5790ade83772860940bd481ea
Analyze and fix the following issue in the Linux kernel code: ixp4xx_hss: fix build failure due to missing linux/module.h inclusion
Problem Details: Commit 36a1211970193ce215de50ed1e4e1272bc814df1 (netprio_cgroup.h: dont include module.h from other includes) made the following build error on ixp4xx_hss pop up: CC [M] drivers/net/wan/ixp4xx_hss.o drivers/net/wan/ixp4xx_hss.c:1412:20: error: expected ';', ',' or ')' before string constant driv...
```diff diff --git a/drivers/net/wan/ixp4xx_hss.c b/drivers/net/wan/ixp4xx_hss.c index aaaca9aa2293..3f575afd8cfc 100644 --- a/drivers/net/wan/ixp4xx_hss.c +++ b/drivers/net/wan/ixp4xx_hss.c @@ -10,6 +10,7 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/bitops.h> #includ...
3a22b872e923954853cabd5a18f41da1846bccdb
Analyze and fix the following issue in the Linux kernel code: usb: Fail a get config when the port is powered off.
Problem Details: Alan Stern pointed out that a USB port could potentially get powered off when the attached USB device is in the middle of enumerating, due to race conditions: http://marc.info/?l=linux-usb&m=134130616707548&w=2 If that happens, we need to ensure the enumeration fails. If a call to usb_get_descriptor...
```diff diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c index f4bdd0ce8d56..7199adccf444 100644 --- a/drivers/usb/core/config.c +++ b/drivers/usb/core/config.c @@ -702,6 +702,8 @@ int usb_get_configuration(struct usb_device *dev) if (result < 0) { dev_err(ddev, "unable to read config index %d ...
974a3b0f9f05b748fe11f1afc31efc32aa5160cb
Analyze and fix the following issue in the Linux kernel code: drm/i915: set the right gen3 flip_done mode also at resume
Problem Details: Currently we've only frobbed this bit at irq_init time, but did not restore it at resume time. Move it to the gen3 clock gating function to fix this. Notice while reading through code. Cc: stable@vger.kernel.org (for 3.5 only) Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel...
```diff diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 8a3828528b9d..5249640cce13 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -2700,9 +2700,6 @@ void intel_irq_init(struct drm_device *dev) dev->driver->irq_handler = i8xx_irq_handler; ...
2120c52da6fe741454a60644018ad2a6abd957ac
Analyze and fix the following issue in the Linux kernel code: sierra_net: Endianess bug fix.
Problem Details: I discovered I couldn't get sierra_net to work on a powerpc. Turns out the firmware attribute check assumes the system is little endian and hence fails because the attributes is a 16 bit value. Signed-off-by: Len Sorensen <lsorense@csclub.uwaterloo.ca> Signed-off-by: David S. Miller <davem@davemloft....
```diff diff --git a/drivers/net/usb/sierra_net.c b/drivers/net/usb/sierra_net.c index 7be49ea60b6d..8e22417fa6c1 100644 --- a/drivers/net/usb/sierra_net.c +++ b/drivers/net/usb/sierra_net.c @@ -656,7 +656,7 @@ static int sierra_net_get_fw_attr(struct usbnet *dev, u16 *datap) return -EIO; } - *datap = *attrdata;...
5e40b1c1cc5ae9b949f96d40356afd2a31477365
Analyze and fix the following issue in the Linux kernel code: gpio/omap: fix possible memory leak in omap2_gpio_dev_init()
Problem Details: pdata and pdata->regs have been allocated in this function and should be freed before leaving it, and in the other error handling cases too. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Ke...
```diff diff --git a/arch/arm/mach-omap2/gpio.c b/arch/arm/mach-omap2/gpio.c index 9ad7d489b0de..fe626e903dea 100644 --- a/arch/arm/mach-omap2/gpio.c +++ b/arch/arm/mach-omap2/gpio.c @@ -60,6 +60,7 @@ static int __init omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused) pdata->regs = kzalloc(sizeof(struct omap_g...
4abd044af91057f7ea661a0f10c00a9673beef6b
Analyze and fix the following issue in the Linux kernel code: brcm80211: fix missing allocation failure check
Problem Details: Check for oobirq_entry allocation failure to avoid NULL pointer dereferencing. Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c index 49765d34b4e0..7c4ee72f9d56 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c @@ -638,6 +638,8 @@ stati...
74673db99ca3c09d34ea479f684522ceedb65eb9
Analyze and fix the following issue in the Linux kernel code: ath9k: make PA linearization optional, disabled by default and fix checks
Problem Details: Some checks for PA linearization support checked ATH9K_HW_CAP_PAPRD and some used the EEPROM ops, leading to issues in tx power handling, since those two can be out of sync. Disable the feature by default, since it has been reported that it can cause damage to the rx path under some circumstances. It ...
```diff diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c index 2588848f4a82..d066f2516e47 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c @@ -2982,6 +2982,10 @@ static u32 ath9k_hw_ar9300_get_eep...
8a0961482698290713d14d7755d9280397804487
Analyze and fix the following issue in the Linux kernel code: brcmsmac: fix mismatch in number of custom regulatory rules
Problem Details: The driver provides the cfg80211 regulatory framework with a set of custom rules. However, there was a mismatch in number of rules and the actual rules provided. This resulted in setting an invalid power level: ieee80211 phy0: brcms_ops_config: change channel 13 ieee80211 phy0: brcms_ops_config: Error...
```diff diff --git a/drivers/net/wireless/brcm80211/brcmsmac/channel.c b/drivers/net/wireless/brcm80211/brcmsmac/channel.c index 7ed7d7577024..64a48f06d68b 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/channel.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/channel.c @@ -77,7 +77,7 @@ NL80211_RRF_NO_IBSS)...
d4d2dbcaedb9334d0c462129099346d617f61768
Analyze and fix the following issue in the Linux kernel code: Staging: panel: fix spinlock trylock failure on UP
Problem Details: Use spin_lock_irq() to quiet warning: [ 8.232324] BUG: spinlock trylock failure on UP on CPU#0, reboot/85 [ 8.234138] lock: c161c760, .magic: dead4ead, .owner: reboot/85, .owner_cpu: 0 [ 8.236132] Pid: 85, comm: reboot Not tainted 3.4.0-rc7-00656-g82163ed #5 ...
```diff diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c index d9fec5b3faac..f7426b44ee08 100644 --- a/drivers/staging/panel/panel.c +++ b/drivers/staging/panel/panel.c @@ -757,38 +757,38 @@ static void lcd_backlight(int on) return; /* The backlight is activated by setting the AUTOFEED ...
6935118817d40683bfac39837d0823d87dfc1678
Analyze and fix the following issue in the Linux kernel code: staging: fix ccg build when NET is not enabled
Problem Details: Fix build errors in ccg when CONFIG_NET is not enabled by adding "depends on NET": ERROR: "netif_carrier_on" [drivers/staging/ccg/g_ccg.ko] undefined! ERROR: "netif_carrier_off" [drivers/staging/ccg/g_ccg.ko] undefined! ERROR: "skb_realloc_headroom" [drivers/staging/ccg/g_ccg.ko] undefined! ERROR: "sk...
```diff diff --git a/drivers/staging/ccg/Kconfig b/drivers/staging/ccg/Kconfig index 1f00d701da25..8598111eb0b1 100644 --- a/drivers/staging/ccg/Kconfig +++ b/drivers/staging/ccg/Kconfig @@ -2,7 +2,7 @@ if USB_GADGET config USB_G_CCG tristate "Configurable Composite Gadget (STAGING)" - depends on STAGING && BLOCK ...
0837e7e5270bd5547ba5763f11611dc43f677b3d
Analyze and fix the following issue in the Linux kernel code: usbfs: Add a new disconnect-and-claim ioctl (v2)
Problem Details: Apps which deal with devices which also have a kernel driver, need to do the following: 1) Check which driver is attached, so as to not detach the wrong driver (ie detaching usbfs while another instance of the app is using the device) 2) Detach the kernel driver 3) Claim the interface Where moving ...
```diff diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index ebb8a9de8b5f..e0356cb859b5 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c @@ -1928,6 +1928,38 @@ static int proc_get_capabilities(struct dev_state *ps, void __user *arg) return 0; } +static int proc_disconnect_clai...
358a46d47eefadd5be67495682426bd743ce455c
Analyze and fix the following issue in the Linux kernel code: iwlwifi: some clean up in transport layer
Problem Details: Remove outdated iwlagn prefix to a few functions and fix comments that were not accurate. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
```diff diff --git a/drivers/net/wireless/iwlwifi/pcie/internal.h b/drivers/net/wireless/iwlwifi/pcie/internal.h index 3ef8d5adc991..fa102b8a125f 100644 --- a/drivers/net/wireless/iwlwifi/pcie/internal.h +++ b/drivers/net/wireless/iwlwifi/pcie/internal.h @@ -311,7 +311,7 @@ void iwl_trans_pcie_free(struct iwl_trans *tr...
2d1c0044ddc708885146af1d6790436a613cac5b
Analyze and fix the following issue in the Linux kernel code: iwlwifi: fix indentation in iwl_load_given_ucode
Problem Details: There's a block of code that's indented too far, move it out to where it should be. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
```diff diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c index 7da075f5bffa..3f11b17e14ce 100644 --- a/drivers/net/wireless/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c @@ -979,17 +979,16 @@ static int iwl_load_section(struct iwl_trans *trans, u8...
ee378aa49b594da9bda6a2c768cc5b2ad585f911
Analyze and fix the following issue in the Linux kernel code: workqueue: fix possible idle worker depletion across CPU hotplug
Problem Details: To simplify both normal and CPU hotplug paths, worker management is prevented while CPU hoplug is in progress. This is achieved by CPU hotplug holding the same exclusion mechanism used by workers to ensure there's only one manager per pool. If someone else seems to be performing the manager role, wor...
```diff diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 383548ed0b54..1e1373bcb3e3 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -1825,10 +1825,45 @@ static bool manage_workers(struct worker *worker) struct worker_pool *pool = worker->pool; bool ret = false; - if (!mutex_trylock(&pool->ma...
552a37e9360a293cd20e7f8ff1fb326a244c5f1e
Analyze and fix the following issue in the Linux kernel code: workqueue: restore POOL_MANAGING_WORKERS
Problem Details: This patch restores POOL_MANAGING_WORKERS which was replaced by pool->manager_mutex by 6037315269 "workqueue: use mutex for global_cwq manager exclusion". There's a subtle idle worker depletion bug across CPU hotplug events and we need to distinguish an actual manager and CPU hotplug preventing manage...
```diff diff --git a/kernel/workqueue.c b/kernel/workqueue.c index dc7b8458e275..383548ed0b54 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -66,6 +66,7 @@ enum { /* pool flags */ POOL_MANAGE_WORKERS = 1 << 0, /* need to manage workers */ + POOL_MANAGING_WORKERS = 1 << 1, /* managing workers ...
363366cf61c544ea476f3d220f43a95cb03014f5
Analyze and fix the following issue in the Linux kernel code: usb: otg: mxs-phy: Fix mx23 operation
Problem Details: Currently mx23 fails to enumerate a USB device: [ 1.300000] hub 1-0:1.0: unable to enumerate USB device on port 1 [ 1.520000] hub 1-0:1.0: unable to enumerate USB device on port 1 [ 1.740000] hub 1-0:1.0: unable to enumerate USB device on port 1 [ 1.960000] hub 1-0:1.0: unable to enumerate USB device ...
```diff diff --git a/drivers/usb/otg/mxs-phy.c b/drivers/usb/otg/mxs-phy.c index c1a67cb8e244..88db976647cf 100644 --- a/drivers/usb/otg/mxs-phy.c +++ b/drivers/usb/otg/mxs-phy.c @@ -20,6 +20,7 @@ #include <linux/delay.h> #include <linux/err.h> #include <linux/io.h> +#include <linux/workqueue.h> #define DRIVER_NA...
308b135e4fcc00c80c07e0e04e7afa8edf78583c
Analyze and fix the following issue in the Linux kernel code: hpwdt: Fix kdump issue in hpwdt
Problem Details: kdump can be interrupted by watchdog timer when the timer is left activated on the crash kernel. Changed the hpwdt driver to disable watchdog timer at boot-time. This assures that watchdog timer is disabled until /dev/watchdog is opened, and prevents watchdog timer to be left running on the crash kerne...
```diff diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c index 1eff743ec497..ae60406ea8a1 100644 --- a/drivers/watchdog/hpwdt.c +++ b/drivers/watchdog/hpwdt.c @@ -814,6 +814,9 @@ static int __devinit hpwdt_init_one(struct pci_dev *dev, hpwdt_timer_reg = pci_mem_addr + 0x70; hpwdt_timer_con = pci_mem...
01b2d4536f0215c6d97d77e157afee04300ffc90
Analyze and fix the following issue in the Linux kernel code: pwm: pwm-tiehrpwm: Fix conflicting channel period setting
Problem Details: EHRPWM hardware supports 2 independent PWM channels. However the device uses only one register to handle period setting for both channels. So both channels should be configured for same period (in nsec). Fix the same by returning error for conflicting period values. However, allow 1. Configuration of...
```diff diff --git a/drivers/pwm/pwm-tiehrpwm.c b/drivers/pwm/pwm-tiehrpwm.c index c3756d1be194..b1996bcd5b78 100644 --- a/drivers/pwm/pwm-tiehrpwm.c +++ b/drivers/pwm/pwm-tiehrpwm.c @@ -104,6 +104,7 @@ struct ehrpwm_pwm_chip { struct pwm_chip chip; unsigned int clk_rate; void __iomem *mmio_base; + unsigned long ...
c06fad9d28c95b024ea10455cf1397432b12848d
Analyze and fix the following issue in the Linux kernel code: pwm: pwm-tiecap: Disable APWM mode after configure
Problem Details: APWM mode is enabled while configuring PWM device. This was done to handle shadow & immediate mode update of period and compare registers. However, leaving it enabled after configuring will cause APWM output on PWM pin even before enabling PWM device. Fix the same by disabling APWM mode after configuri...
```diff diff --git a/drivers/pwm/pwm-tiecap.c b/drivers/pwm/pwm-tiecap.c index 0b66d0f25922..4b6688909fee 100644 --- a/drivers/pwm/pwm-tiecap.c +++ b/drivers/pwm/pwm-tiecap.c @@ -100,6 +100,13 @@ static int ecap_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, writel(period_cycles, pc->mmio_base + CAP3); ...
cf9182e90b2af04245ac4fae497fe73fc71285b4
Analyze and fix the following issue in the Linux kernel code: nfsd4: fix nfs4 stateid leak
Problem Details: Processes that open and close multiple files may end up setting this oo_last_closed_stid without freeing what was previously pointed to. This can result in a major leak, visible for example by watching the nfsd4_stateids line of /proc/slabinfo. Reported-by: Cyril B. <cbay@excellency.fr> Tested-by: Cyr...
```diff diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 5f1a91a9cd35..6686e747223f 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -3766,6 +3766,7 @@ nfsd4_close(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, memcpy(&close->cl_stateid, &stp->st_stid.sc_stateid, sizeof(stateid_...
4b83a7a75375f9d5edd1fb0067986a0f23695ddd
Analyze and fix the following issue in the Linux kernel code: [media] cx23885: fix pointer to structure for CAM
Problem Details: Fixes problem with CAM, when after re-iinitialization CAM used old pointer to structure. Signed-off-by: Anton Nurkin <ptqa@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/pci/cx23885/altera-ci.c b/drivers/media/pci/cx23885/altera-ci.c index 1fa8927f0d36..aee7f0dacff1 100644 --- a/drivers/media/pci/cx23885/altera-ci.c +++ b/drivers/media/pci/cx23885/altera-ci.c @@ -724,6 +724,7 @@ int altera_ci_init(struct altera_ci_config *config, int ci_nr) if (temp...
2b75bc9121e54e22537207b47b71373bcb0be41c
Analyze and fix the following issue in the Linux kernel code: dlm: check the maximum size of a request from user
Problem Details: device_write only checks whether the request size is big enough, but it doesn't check if the size is too big. At that point, it also tries to allocate as much memory as the user has requested even if it's too much. This can lead to OOM killer kicking in, or memory corruption if (count + 1) overflows. ...
```diff diff --git a/fs/dlm/user.c b/fs/dlm/user.c index eb4ed9ba3098..7ff49852b0cb 100644 --- a/fs/dlm/user.c +++ b/fs/dlm/user.c @@ -503,6 +503,13 @@ static ssize_t device_write(struct file *file, const char __user *buf, #endif return -EINVAL; +#ifdef CONFIG_COMPAT + if (count > sizeof(struct dlm_write_request3...
f3d87524975f01b885fc3d009c6ab6afd0d00746
Analyze and fix the following issue in the Linux kernel code: arm: mm: fix DMA pool affiliation check
Problem Details: The __free_from_pool() function was changed in e9da6e9905e639b0f842a244bc770b48ad0523e9. Unfortunately, the test that checks whether the provided (start,size) is within the DMA pool has been improperly modified. It used to be: if (start < coherent_head.vm_start || end > coherent_head.vm_end) Where ...
```diff diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 051204fc4617..e59c4ab71bcb 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -489,7 +489,7 @@ static bool __in_atomic_pool(void *start, size_t size) void *pool_start = pool->vaddr; void *pool_end = pool->vaddr +...
ed9cbda63d45638b69ce62412e3a3c7b00644835
Analyze and fix the following issue in the Linux kernel code: usb: gadget: remove usb_gadget_controller_number()
Problem Details: The bcdDevice field is defined as |Device release number in binary-coded decimal in the USB 2.0 specification. We use this field to distinguish the UDCs from each other. In theory this could be used on the host side to apply certain quirks if the "special" UDC in combination with this gadget is used. T...
```diff diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile index 5c4a1330b498..307be5fa824c 100644 --- a/drivers/usb/gadget/Makefile +++ b/drivers/usb/gadget/Makefile @@ -6,7 +6,7 @@ ccflags-$(CONFIG_USB_GADGET_DEBUG) := -DDEBUG obj-$(CONFIG_USB_GADGET) += udc-core.o obj-$(CONFIG_USB_LIBCOMPOSITE)...
9c6d196d5aa35e07482f23c3e37755e7a82140e0
Analyze and fix the following issue in the Linux kernel code: usb: gadget: at91_udc: fix dt support
Problem Details: Don't fail the initialization check for the platform_data if there is avaiable an associated device tree node. Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
```diff diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c index d95f6b079345..af931282843d 100644 --- a/drivers/usb/gadget/at91_udc.c +++ b/drivers/usb/gadget/at91_udc.c @@ -1704,7 +1704,7 @@ static int __devinit at91udc_probe(struct platform_device *pdev) int retval; struct resource *res;...
4001a7a163d8e49eb9baf294527ad2ed50202e22
Analyze and fix the following issue in the Linux kernel code: usb: gadget: pxa25x: make it compile with debug again
Problem Details: |drivers/usb/gadget/pxa25x_udc.h: In function 'dump_state': |drivers/usb/gadget/pxa25x_udc.h:228:20: error: invalid type argument of '->' (have 'struct usb_ep') Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi ...
```diff diff --git a/drivers/usb/gadget/pxa25x_udc.h b/drivers/usb/gadget/pxa25x_udc.h index 861f4df6ea22..2eca1e71fecd 100644 --- a/drivers/usb/gadget/pxa25x_udc.h +++ b/drivers/usb/gadget/pxa25x_udc.h @@ -225,7 +225,7 @@ dump_state(struct pxa25x_udc *dev) dev->stats.read.bytes, dev->stats.read.ops); for (i = 1...
93952956c7078eb41058c5ccc5b34ae6cf59bb64
Analyze and fix the following issue in the Linux kernel code: usb: gadget: move bind() callback back to struct usb_gadget_driver
Problem Details: This partly reverts 07a18bd7 ("usb gadget: don't save bind callback in struct usb_composite_driver") and fixes new drivers. The section missmatch problems was solved by whitelisting bind callback in modpost. Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bige...
```diff diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 071d15c44116..2a345f28b9ae 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -1585,6 +1585,7 @@ composite_resume(struct usb_gadget *gadget) /*----------------------------------------------------...
03e42bd5937c4c24e411690ab165627e93c258b5
Analyze and fix the following issue in the Linux kernel code: usb: gadget: move bind() callback back to struct usb_composite_driver
Problem Details: This partly reverts 07a18bd7 ("usb gadget: don't save bind callback in struct usb_composite_driver") and fixes new drivers. The section missmatch problems was solved by whitelisting structs in question via __ref. Cc: devel@driverdev.osuosl.org Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off...
```diff diff --git a/drivers/staging/ccg/ccg.c b/drivers/staging/ccg/ccg.c index 6a7aab8d9bf5..eadda5574b2a 100644 --- a/drivers/staging/ccg/ccg.c +++ b/drivers/staging/ccg/ccg.c @@ -1162,6 +1162,7 @@ static int ccg_usb_unbind(struct usb_composite_dev *cdev) static struct usb_composite_driver ccg_usb_driver = { .nam...
1e1a27c3258c769ea175780bb28d0c8fead79ff8
Analyze and fix the following issue in the Linux kernel code: usb: gadget: remove __devexit in f_uac2
Problem Details: avoids the following section missmatch |WARNING: drivers/usb/gadget/g_audio.o(.init.text+0x2e7): Section |mismatch in reference from the function afunc_bind() to the function |.devexit.text:snd_uac2_remove() |The function __init afunc_bind() references |a function __devexit snd_uac2_remove(). |This is ...
```diff diff --git a/drivers/usb/gadget/f_uac2.c b/drivers/usb/gadget/f_uac2.c index e7cc4de93e33..d3c6cffccb72 100644 --- a/drivers/usb/gadget/f_uac2.c +++ b/drivers/usb/gadget/f_uac2.c @@ -463,7 +463,7 @@ snd_fail: return err; } -static int __devexit snd_uac2_remove(struct platform_device *pdev) +static int snd_...
c35e005f3115cd27d85625805645b90ba961f16f
Analyze and fix the following issue in the Linux kernel code: ASoC: fsi: fixup pm_runtime_disable() timing on fsi_probe()
Problem Details: pm_runtime_disable() error handling timing on fsi_probe() was wrong. This patch fixes it up. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 0540408a9fa9..8534989836aa 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -1730,12 +1730,12 @@ exit_snd_soc: exit_free_irq: free_irq(irq, master); exit_fsib: + pm_runtime_disable(&pdev->dev); fsi_stream_remove(&master->fsib); exit_fs...
aff041af948f5cdf51e2115f267957a89f28ac0f
Analyze and fix the following issue in the Linux kernel code: ASoC: sta32x: Move regulator acquisition to I2C probe
Problem Details: This is better style as it ensures we don't try to do the ASoC probe without required resources. Also convert to devm_ while we're at it, saving a bit of code, and fix a leak of enable on error. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Johannes Stezenbach <js@sig21.net...
```diff diff --git a/sound/soc/codecs/sta32x.c b/sound/soc/codecs/sta32x.c index 51b7313a4c14..039597e66987 100644 --- a/sound/soc/codecs/sta32x.c +++ b/sound/soc/codecs/sta32x.c @@ -825,22 +825,11 @@ static int sta32x_probe(struct snd_soc_codec *codec) sta32x->codec = codec; sta32x->pdata = dev_get_platdata(codec-...
4484141a94f4a5afea6ebc0b2abba0aa1b0ae9d1
Analyze and fix the following issue in the Linux kernel code: KVM: fix error paths for failed gfn_to_page() calls
Problem Details: This bug was triggered: [ 4220.198458] BUG: unable to handle kernel paging request at fffffffffffffffe [ 4220.203907] IP: [<ffffffff81104d85>] put_page+0xf/0x34 ...... [ 4220.237326] Call Trace: [ 4220.237361] [<ffffffffa03830d0>] kvm_arch_destroy_vm+0xf9/0x101 [kvm] [ 4220.237382] [<ffffffffa036fe53...
```diff diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 002b4a566e2d..b1eb202ee76a 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -3619,6 +3619,7 @@ static void seg_setup(int seg) static int alloc_apic_access_page(struct kvm *kvm) { + struct page *page; struct kvm_userspace_memory_region k...
07dc59f0988cb54fd87bd373b3b27eb2401dd811
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix Oops at codec reset/reconfig
Problem Details: snd_hda_codec_reset() calls restore_pincfgs() where the codec is powered up again, which eventually tries to resume and initialize via the callbacks of the codec. However, it's the place just after codec free callback, thus no codec callbacks should be called after that. On a codec like CS4206, it res...
```diff diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index f25c24c743f9..1c65cc5e3a31 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -2353,6 +2353,7 @@ int snd_hda_codec_reset(struct hda_codec *codec) } if (codec->patch_ops.free) codec->patch_ops.free(codec); + me...
390946b17260797635cd9e65496b5a17b2db0a5d
Analyze and fix the following issue in the Linux kernel code: i2c-core: Fix for lockdep validator
Problem Details: If kernel is compiled with CONFIG_PROVE_LOCKING the validator raises an error when a multiplexer is removed via sysfs and sub-clients are connected to it. This is a false positive. Documentation/lockdep-design.txt recommends to handle this via calls to mutex_lock_nested(). Based on an earlier fix from...
```diff diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 2efa56c5ff2c..2091ae8f539a 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -636,6 +636,22 @@ static void i2c_adapter_dev_release(struct device *dev) complete(&adap->dev_released); } +/* + * This function is only needed f...
e68bb91baa0bb9817567bd45d560919e8e26373b
Analyze and fix the following issue in the Linux kernel code: i2c-designware: Fix build error if CONFIG_I2C_DESIGNWARE_PLATFORM=y && CONFIG_I2C_DESIGNWARE_PCI=y
Problem Details: This patch adds config I2C_DESIGNWARE_CORE in Kconfig, and let I2C_DESIGNWARE_PLATFORM and I2C_DESIGNWARE_PCI select I2C_DESIGNWARE_CORE. Because both I2C_DESIGNWARE_PLATFORM and I2C_DESIGNWARE_PCI can be built as built-in or module, we also need to export the functions in i2c-designware-core. This f...
```diff diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index af8bc83fd857..970a1612e795 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -355,9 +355,13 @@ config I2C_DAVINCI devices such as DaVinci NIC. For details please see http://www.ti.com/davinci +config I...
9df53b154ac712c87db1170057aa6df05eb7bdbd
Analyze and fix the following issue in the Linux kernel code: slub: Zero initial memory segment for kmem_cache and kmem_cache_node
Problem Details: Tony Luck reported the following problem on IA-64: Worked fine yesterday on next-20120905, crashes today. First sign of trouble was an unaligned access, then a NULL dereference. SL*B related bits of my config: CONFIG_SLUB_DEBUG=y # CONFIG_SLAB is not set CONFIG_SLUB=y CONFIG_SLABINFO=y ...
```diff diff --git a/mm/slub.c b/mm/slub.c index dafd465f7a3f..2258ed82880a 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -3707,7 +3707,7 @@ void __init kmem_cache_init(void) /* Allocate two kmem_caches from the page allocator */ kmalloc_size = ALIGN(kmem_size, cache_line_size()); order = get_order(2 * kmalloc_size);...
3ab96a02e829131c19db8ed99239289acdb4e3dc
Analyze and fix the following issue in the Linux kernel code: powerpc/eeh: Cleanup on EEH PCI address cache
Problem Details: The patch does cleanup on EEH PCI address cache based on the fact EEH core is the only user of the component. * Cleanup on function names so that they all have prefix "eeh" and looks more short. * Function printk() has been replaced with pr_debug() or pr_warning() a...
```diff diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h index ebfdb7c9d023..58c5ee61e700 100644 --- a/arch/powerpc/include/asm/eeh.h +++ b/arch/powerpc/include/asm/eeh.h @@ -197,7 +197,7 @@ int __exit eeh_ops_unregister(const char *name); unsigned long eeh_check_failure(const volatile void...
f594065faf4f9067c2283a34619fc0714e79a98d
Analyze and fix the following issue in the Linux kernel code: ACPI: Add fixups for AMD P-state figures
Problem Details: Some AMD systems may round the frequencies in ACPI tables to 100MHz boundaries. We can obtain the real frequencies from MSRs, so add a quirk to fix these frequencies up on AMD systems. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Andre Przywara <andre.przywara@amd.com> Signed-off-by:...
```diff diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h index 1e1f3eb58638..fbee9714d9ab 100644 --- a/arch/x86/include/asm/msr-index.h +++ b/arch/x86/include/asm/msr-index.h @@ -248,6 +248,7 @@ #define MSR_IA32_PERF_STATUS 0x00000198 #define MSR_IA32_PERF_CTL 0x00000199 +#define M...
fca826460e55d4e8f2deceb09f22f9340a0db24c
Analyze and fix the following issue in the Linux kernel code: powerpc: 512x: Fix mpc5121_clk_get()
Problem Details: If try_module_get() fails, mpc5121_clk_get() might return a wrong clock. Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Anatolij Gustschin <agust@denx.de>
```diff diff --git a/arch/powerpc/platforms/512x/clock.c b/arch/powerpc/platforms/512x/clock.c index 1d8700ff60b0..9f771e05457c 100644 --- a/arch/powerpc/platforms/512x/clock.c +++ b/arch/powerpc/platforms/512x/clock.c @@ -54,14 +54,16 @@ static DEFINE_MUTEX(clocks_mutex); static struct clk *mpc5121_clk_get(struct dev...
5693d68df6883f039d24a4ce8b23ac48f94a73e5
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_nat: fix out-of-bounds access in address selection
Problem Details: include/linux/jhash.h:138:16: warning: array subscript is above array bounds [jhash2() expects the number of u32 in the key] Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
```diff diff --git a/net/netfilter/nf_nat_core.c b/net/netfilter/nf_nat_core.c index 29d445235199..1816ad381485 100644 --- a/net/netfilter/nf_nat_core.c +++ b/net/netfilter/nf_nat_core.c @@ -255,7 +255,7 @@ find_best_ips_proto(u16 zone, struct nf_conntrack_tuple *tuple, * client coming from the same IP (some Interne...
b1f3b64d76cf88cc250e5cdd1de783ba9737078e
Analyze and fix the following issue in the Linux kernel code: block: reject invalid queue attribute values
Problem Details: Instead of using simple_strtoul which "converts" invalid numbers to 0, use strict_strtoul and perform error checking to ensure that userspace passes us a valid unsigned long. This addresses problems with functions such as writev, which might want to write a trailing newline -- the newline should rightf...
```diff diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 9628b291f960..ea51d827a0bb 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c @@ -26,9 +26,15 @@ queue_var_show(unsigned long var, char *page) static ssize_t queue_var_store(unsigned long *var, const char *page, size_t count) { - char *p = (char *)...
3f86a82aeb03e6100f7ab39f4702e033a5e38166
Analyze and fix the following issue in the Linux kernel code: block: Consolidate bio_alloc_bioset(), bio_kmalloc()
Problem Details: Previously, bio_kmalloc() and bio_alloc_bioset() behaved slightly different because there was some almost-duplicated code - this fixes some of that. The important change is that previously bio_kmalloc() always set bi_io_vec = bi_inline_vecs, even if nr_iovecs == 0 - unlike bio_alloc_bioset(). This wou...
```diff diff --git a/fs/bio.c b/fs/bio.c index 736ef12f5191..191b9b86c272 100644 --- a/fs/bio.c +++ b/fs/bio.c @@ -55,6 +55,7 @@ static struct biovec_slab bvec_slabs[BIOVEC_NR_POOLS] __read_mostly = { * IO code that does not need private memory pools. */ struct bio_set *fs_bio_set; +EXPORT_SYMBOL(fs_bio_set); /...
94818742316e27d01506240cf8b07d69844d31af
Analyze and fix the following issue in the Linux kernel code: dm: Use bioset's front_pad for dm_rq_clone_bio_info
Problem Details: Previously, dm_rq_clone_bio_info needed to be freed by the bio's destructor to avoid a memory leak in the blk_rq_prep_clone() error path. This gets rid of a memory allocation and means we can kill dm_rq_bio_destructor. The _rq_bio_info_cache kmem cache is unused now and needs to be deleted, but due to...
```diff diff --git a/drivers/md/dm.c b/drivers/md/dm.c index f43aaf689bd0..33470f01ea5e 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -86,12 +86,17 @@ struct dm_rq_target_io { }; /* - * For request-based dm. - * One of these is allocated per bio. + * For request-based dm - the bio clones we allocate are emb...
6862234238e84648c305526af2edd98badcad1e0
Analyze and fix the following issue in the Linux kernel code: net: small bug on rxhash calculation
Problem Details: In the current rxhash calculation function, while the sorting of the ports/addrs is coherent (you get the same rxhash for packets sharing the same 4-tuple, in both directions), ports and addrs are sorted independently. This implies packets from a connection between the same addresses but crossed ports ...
```diff diff --git a/net/core/dev.c b/net/core/dev.c index 83988362805e..d7fe32c946c1 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2647,15 +2647,16 @@ void __skb_get_rxhash(struct sk_buff *skb) if (!skb_flow_dissect(skb, &keys)) return; - if (keys.ports) { - if ((__force u16)keys.port16[1] < (__force u1...
376261ae3627b03574994496f70f95d5538795d5
Analyze and fix the following issue in the Linux kernel code: Bluetooth: debug: Print refcnt for hci_dev
Problem Details: Add debug output for HCI kref. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
```diff diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 4704ca4b8767..6a3337e9c42c 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h @@ -603,11 +603,17 @@ static inline void hci_conn_put(struct hci_conn *conn) /* ----- HCI Devices ----- */ stat...
02d9be1aa6e93f4819f230a1d570e2ff415fa294
Analyze and fix the following issue in the Linux kernel code: HID: picoLCD: fix a NULL test in picolcd_raw_cir()
Problem Details: Smatch complains that the NULL checking in this function is not consistent and could lead to a NULL dereference. The comments say that we should return here if rc_dev is NULL so I've changed the test to match the comment. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Bruno Prém...
```diff diff --git a/drivers/hid/hid-picolcd_cir.c b/drivers/hid/hid-picolcd_cir.c index 14c5ce0e71bc..13ca9191b630 100644 --- a/drivers/hid/hid-picolcd_cir.c +++ b/drivers/hid/hid-picolcd_cir.c @@ -51,7 +51,7 @@ int picolcd_raw_cir(struct picolcd_data *data, /* ignore if rc_dev is NULL or status is shunned */ sp...
9ffad987ff565999d91fc2783dd77f08094a743b
Analyze and fix the following issue in the Linux kernel code: perf hists: Handle field separator properly
Problem Details: When a field separator is given, the output format doesn't need to be fancy like aligning to column length, coloring the percent value and so on. And since there's a slight difference to normal format, fix it not to break backward compatibility. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: I...
```diff diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c index 8ccd1f2330d1..009adf206c81 100644 --- a/tools/perf/ui/hist.c +++ b/tools/perf/ui/hist.c @@ -8,10 +8,9 @@ /* hist period print (hpp) functions */ static int hpp__header_overhead(struct perf_hpp *hpp) { - if (hpp->ptr) - return scnprintf(hpp->buf,...
8bf98b89688c3d7ec071bf26d49761e38d846b47
Analyze and fix the following issue in the Linux kernel code: perf bench: fix assert when NDEBUG is defined
Problem Details: When NDEBUG is defined, the assert macro will be expanded to nothing. Some assert calls used in perf are also including some functionality (e.g. system calls), not only validity checks. Therefore, if NDEBUG is defined, this functionality will be removed along with the assert. Perf also defines BUG_ON ...
```diff diff --git a/tools/perf/bench/sched-pipe.c b/tools/perf/bench/sched-pipe.c index 0c7454f8b8a9..15911e9c587a 100644 --- a/tools/perf/bench/sched-pipe.c +++ b/tools/perf/bench/sched-pipe.c @@ -56,13 +56,13 @@ int bench_sched_pipe(int argc, const char **argv, * causes error in building environment for perf *...
502eb5369f51539aaee6ec173165be28d916a3ca
Analyze and fix the following issue in the Linux kernel code: staging: vt6655: fix coding style problem at assigning netdev_ops
Problem Details: we are using spaces at the beginning of the line, we should use tabs instead Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index bb0b0cf2be9b..493866acd92c 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -893,18 +893,15 @@ static bool device_release_WPADEV(PSDevice pDevice) return true; } ...
bf76ebd9cfd0018be820657da781201e2f74cf5d
Analyze and fix the following issue in the Linux kernel code: staging: vt6655: fix coding style issues in device_get_options
Problem Details: a) put the device_get_options functions' opening brace below b) replace spaces with tabs Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Acked-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index e0a9c0804261..bb0b0cf2be9b 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -398,31 +398,29 @@ device_set_bool_opt(unsigned int *opt, int val,bool def,u32 flag, char* nam...
3ac9e0fd2a7fcd4eccbb79909b421b4284ed9520
Analyze and fix the following issue in the Linux kernel code: staging: vt6655: fix coding style warnings
Problem Details: a) replace spaces with tabs b) put the opening brace of get_chip_name below it Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Acked-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 697617fdb57b..e0a9c0804261 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -347,21 +347,22 @@ static int Config_FileGetParameter(unsigned char *string, -static cha...
7892e560d463a556664f82188602ab3425533049
Analyze and fix the following issue in the Linux kernel code: staging: ramster: fix build warnings
Problem Details: Fix build warnings resulting from in-progress work that was not entirely ifdef'd out. Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/ramster/zcache-main.c b/drivers/staging/ramster/zcache-main.c index 86e19d6d3b89..a09dd5cc1cea 100644 --- a/drivers/staging/ramster/zcache-main.c +++ b/drivers/staging/ramster/zcache-main.c @@ -449,16 +449,18 @@ static struct page *zcache_alloc_page(void) return page; } +#ifdef...
20659455402fca01a92de7a70a45f43785804fa7
Analyze and fix the following issue in the Linux kernel code: staging: tpci200: fix section mismatch warning
Problem Details: PCI probe routines have to be named _probe to avoid section mismatch warning. Found when doing 'make allmodconfig' Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/ipack/bridges/tpci200.c b/drivers/staging/ipack/bridges/tpci200.c index b81a8c9a2fa9..0d61090819fe 100644 --- a/drivers/staging/ipack/bridges/tpci200.c +++ b/drivers/staging/ipack/bridges/tpci200.c @@ -560,8 +560,8 @@ static int tpci200_install(struct tpci200_board *tpci200) retur...
83eef17c7845d08eb40e5792ed40b387eb555bdd
Analyze and fix the following issue in the Linux kernel code: staging: comedi: me4000: cleanup me4000_cnt_insn_config()
Problem Details: Absorb the cnt_reset and cnt_config helper functions. They are now both just single line routines. Remove the printk noise about "Invalid instruction length". Fix the return value, the value should be the number of data values used to perform the instruction. The GPCT_RESET instruction only has one p...
```diff diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers/staging/comedi/drivers/me4000.c index 27535cc95a5c..4ba0835b137f 100644 --- a/drivers/staging/comedi/drivers/me4000.c +++ b/drivers/staging/comedi/drivers/me4000.c @@ -1510,69 +1510,38 @@ static int me4000_dio_insn_config(struct comedi_device *dev, ...
b179748d21562decdf323f2d686920b836b3f272
Analyze and fix the following issue in the Linux kernel code: staging: comedi: me4000: fix the interrupt request/free
Problem Details: Only set the dev->irq when the request_irq is successful. Use the dev->board_name for the name passed to request_irq. Change the printk messages into dev_warn(). Make sure free_irq is called in the detach. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.u...
```diff diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers/staging/comedi/drivers/me4000.c index 219ad6c5a174..7d22aead2257 100644 --- a/drivers/staging/comedi/drivers/me4000.c +++ b/drivers/staging/comedi/drivers/me4000.c @@ -1781,8 +1781,6 @@ static int me4000_attach_pci(struct comedi_device *dev, if (!...
b155a09015135cf59ada8d48109ccbd9891c1b42
Analyze and fix the following issue in the Linux kernel code: perf tools: Fix build for another rbtree.c change
Problem Details: Fixes: ../../lib/rbtree.c: In function 'rb_insert_color': ../../lib/rbtree.c:95:9: error: 'true' undeclared (first use in this function) ../../lib/rbtree.c:95:9: note: each undeclared identifier is reported only once for each function it appears in ../../lib/rbtree.c: In function '__rb_erase_color': ....
```diff diff --git a/tools/perf/util/include/linux/rbtree.h b/tools/perf/util/include/linux/rbtree.h index 7a243a143037..2a030c5af3aa 100644 --- a/tools/perf/util/include/linux/rbtree.h +++ b/tools/perf/util/include/linux/rbtree.h @@ -1 +1,2 @@ +#include <stdbool.h> #include "../../../../include/linux/rbtree.h" ```
57ec0a942d6855cd7a5711fcf4adb57c51259659
Analyze and fix the following issue in the Linux kernel code: perf tools: fix missing winsize definition
Problem Details: In Android, struct winsize is not defined in the headers already included in help.c. This leads to a compile error. Including termios.h fixes the compilation error since it defines struct winsize. Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar...
```diff diff --git a/tools/perf/util/help.c b/tools/perf/util/help.c index 6f2975a00358..4fa764d8f7d7 100644 --- a/tools/perf/util/help.c +++ b/tools/perf/util/help.c @@ -3,6 +3,7 @@ #include "exec_cmd.h" #include "levenshtein.h" #include "help.h" +#include <termios.h> void add_cmdname(struct cmdnames *cmds, cons...
e04190e0ecb236c51af181c18c545ea076fb9cca
Analyze and fix the following issue in the Linux kernel code: drm/fb helper: don't call drm_helper_connector_dpms directly
Problem Details: Yet again a case where the fb helper is too intimate with the crtc helper and calls a crtc helepr function directly instead of going through the interface vtable. This fixes console blanking in drm/i915 with the new i915-specific modeset code. Reported-by: Jesse Barnes <jbarnes@virtuousgeek.org> Test...
```diff diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index eb79515797d9..b5d05f58c15a 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -330,7 +330,7 @@ static void drm_fb_helper_dpms(struct fb_info *info, int dpms_mode) /* Walk the connectors & e...
16fa9e1d104e6f2c18005a4ac7ea60e4c7fc1286
Analyze and fix the following issue in the Linux kernel code: netdev/phy: mdio-mux-mmioreg.c should include of_address.h
Problem Details: mdio-mux-mmioreg.c uses function of_address_to_resource(), which is defined in linux/of_address.h. This fixes a compilation error: drivers/net/phy/mdio-mux-mmioreg.c: In function 'mdio_mux_mmioreg_probe': drivers/net/phy/mdio-mux-mmioreg.c:83:2: error: implicit declaration of function 'of_address_to...
```diff diff --git a/drivers/net/phy/mdio-mux-mmioreg.c b/drivers/net/phy/mdio-mux-mmioreg.c index 098239a98b19..9061ba622ac4 100644 --- a/drivers/net/phy/mdio-mux-mmioreg.c +++ b/drivers/net/phy/mdio-mux-mmioreg.c @@ -12,6 +12,7 @@ #include <linux/platform_device.h> #include <linux/device.h> +#include <linux/of_ad...
62194bdab89b30f451d210247d09e1c146e6d0ad
Analyze and fix the following issue in the Linux kernel code: ARM: 7521/1: Fix semihosting Kconfig text
Problem Details: It seems we were missing some text in the title for the semihosting DEBUG_LL option. Add in the "/O" and fix up some minor typos in the help text. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org...
```diff diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index f15f82bf3a50..e968a52e4881 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -356,15 +356,15 @@ choice is nothing connected to read from the DCC. config DEBUG_SEMIHOSTING - bool "Kernel low-level debug output via semi...
b4ad51559c2f12c34a0340b26ffb02e4b285bc51
Analyze and fix the following issue in the Linux kernel code: ARM: 7512/1: Fix XIP build due to PHYS_OFFSET definition moving
Problem Details: During the p2v changes, the PHYS_OFFSET #define moved into a !__ASSEMBLY__ section. This causes a XIP build to fail with arch/arm/kernel/head.o: In function 'stext': arch/arm/kernel/head.S:146: undefined reference to 'PHYS_OFFSET' Momentarily leave the #ifndef __ASSEMBLY__ section so we can define ...
```diff diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index e965f1b560f1..5f6ddcc56452 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h @@ -187,6 +187,7 @@ static inline unsigned long __phys_to_virt(unsigned long x) #define __phys_to_virt(x) ((x) - PHYS_OFFSET...
c6a57bfffea5b673e5b4f9aeff85a00607e59077
Analyze and fix the following issue in the Linux kernel code: PM / QoS: Add return code to pm_qos_get_value function.
Problem Details: pm_qos_get_value don't return a return code in all cases. It's sure that anything interesting happend after BUG() but this prevent any compilation warning. [rjw: Chaneged the new return value to PM_QOS_DEFAULT_VALUE.] Signed-off-by: Luis Gonzalez Fernandez <luisgf@gmail.com> Signed-off-by: Rafael J. ...
```diff diff --git a/kernel/power/qos.c b/kernel/power/qos.c index 6a031e684026..846bd42c7ed1 100644 --- a/kernel/power/qos.c +++ b/kernel/power/qos.c @@ -139,6 +139,7 @@ static inline int pm_qos_get_value(struct pm_qos_constraints *c) default: /* runtime check for not using enum */ BUG(); + return PM_QOS_DEFA...
229bd9df49cf772b0540ea13d64e8ca1bfcc6b48
Analyze and fix the following issue in the Linux kernel code: rtlwifi: rtl8192c: rtl8192de: Fix typo in cursta_connectctate
Problem Details: Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c index a45afda8259c..2fd3b4950404 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c +++ b/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c @@ -167,7 +167,7 @@ static void rtl92c_dm_dig...
908fe11314be4744fb303179a1c46b22dcdc5b87
Analyze and fix the following issue in the Linux kernel code: mwifiex: store mwifiex_ds_misc_subsc_evt in mwifiex_private
Problem Details: Since mwifiex_ds_misc_subsc_evt is used in an asynchronous case, store the structure in the long-lived mwifiex_private instead of on the calling stack. This fixes a problem where the response of the asynchronous operation would corrupt a stack frame potentially in use by a different thread. Signed-of...
```diff diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h index ede0c65dcb96..bb753903259e 100644 --- a/drivers/net/wireless/mwifiex/main.h +++ b/drivers/net/wireless/mwifiex/main.h @@ -484,6 +484,7 @@ struct mwifiex_private { s32 cqm_rssi_thold; u32 cqm_rssi_hyst; u8 subsc_ev...
a77f57475465b1958f167c78dc94288ea0ba1b9c
Analyze and fix the following issue in the Linux kernel code: brcmfmac: prevent possible race condition on usb rx control.
Problem Details: brcmf_usb_tx_ctlpkt sends message using brcmf_usb_send_ctl then clears boolean and waits for boolean to be set (by another thread). This can result in situation where flag gets cleared while result was already received. First clearing the flag and then sending the data will prevent this. Reviewed-by: ...
```diff diff --git a/drivers/net/wireless/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/brcm80211/brcmfmac/usb.c index a299d42da8e7..ac1ed1fdff94 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c @@ -366,13 +366,13 @@ static int brcmf_usb_tx_ctlpkt(struct d...
adfbda62248258a402253744e4eed6b87fb43169
Analyze and fix the following issue in the Linux kernel code: ath9k: Fix TX filter usage
Problem Details: The TX filter bit for a station would be set by the HW when a frame is not acked. A frame would be completed with ATH9K_TXERR_FILT status only when the corresponding filter bit for the destination station is already set. Currently, un-acknowledged packets are added to the pending queue and retried, b...
```diff diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index ef91f6cc2d79..b074c3a2cde1 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c @@ -568,7 +568,7 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *tx...
42c63330f2b05aa6077c1bfc2798c04afe54f6b2
Analyze and fix the following issue in the Linux kernel code: ima: add ima_inode_setxattr/removexattr function and calls
Problem Details: Based on xattr_permission comments, the restriction to modify 'security' xattr is left up to the underlying fs or lsm. Ensure that not just anyone can modify or remove 'security.ima'. Changelog v1: - Unless IMA-APPRAISE is configured, use stub ima_inode_removexattr()/setxattr() functions. (Moved im...
```diff diff --git a/include/linux/ima.h b/include/linux/ima.h index e2bfbb1e9af6..2c7223d7e73b 100644 --- a/include/linux/ima.h +++ b/include/linux/ima.h @@ -44,10 +44,27 @@ static inline int ima_file_mmap(struct file *file, unsigned long prot) #ifdef CONFIG_IMA_APPRAISE extern void ima_inode_post_setattr(struct d...
07f6a79415d7d502ee0c7d02ace6594a7be7429a
Analyze and fix the following issue in the Linux kernel code: ima: add appraise action keywords and default rules
Problem Details: Unlike the IMA measurement policy, the appraise policy can not be dependent on runtime process information, such as the task uid, as the 'security.ima' xattr is written on file close and must be updated each time the file changes, regardless of the current task uid. This patch extends the policy langu...
```diff diff --git a/Documentation/ABI/testing/ima_policy b/Documentation/ABI/testing/ima_policy index 6cd6daefaaed..dcff82205477 100644 --- a/Documentation/ABI/testing/ima_policy +++ b/Documentation/ABI/testing/ima_policy @@ -12,11 +12,14 @@ Description: then closing the file. The new policy takes effect after ...
2fe5d6def1672ae6635dd71867bf36dcfaa7434b
Analyze and fix the following issue in the Linux kernel code: ima: integrity appraisal extension
Problem Details: IMA currently maintains an integrity measurement list used to assert the integrity of the running system to a third party. The IMA-appraisal extension adds local integrity validation and enforcement of the measurement against a "good" value stored as an extended attribute 'security.ima'. The initial ...
```diff diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index ad7e2e5088c1..fa09e64d9877 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -1051,6 +1051,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. ihash...
6abbdf38363f064c8a50150c9b709682764483b3
Analyze and fix the following issue in the Linux kernel code: target: go through normal processing for zero-length REQUEST_SENSE
Problem Details: Now that spc_emulate_request_sense has been taught to process zero-length REQUEST SENSE correctly, drop the special handling of unit attention conditions from transport_generic_new_cmd. However, for now REQUEST SENSE will be the only command that goes through emulation for zero lengths. (nab: Fix up ...
```diff diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 4403477882b3..269f54488397 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -2306,20 +2306,13 @@ int transport_generic_new_cmd(struct se_cmd *cmd) * away. *...
b4949ab269a20e9af9a0c40729bac56e8f8a43a2
Analyze and fix the following issue in the Linux kernel code: ipv6: fix handling of throw routes
Problem Details: It's the same problem that previous fix about blackhole and prohibit routes. When adding a throw route, it was handled like a classic route. Moreover, it was only possible to add this kind of routes by specifying an interface. Before the patch: $ ip route add throw 2001::2/128 RTNETLINK answers: ...
```diff diff --git a/net/ipv6/route.c b/net/ipv6/route.c index fa264447a751..339d921cf3b6 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -1471,6 +1471,9 @@ int ip6_route_add(struct fib6_config *cfg) case RTN_PROHIBIT: rt->dst.error = -EACCES; break; + case RTN_THROW: + rt->dst.error = -EAGAIN; + ...
306c11b28d7bb85a7adda741798a2b6b60dd305a
Analyze and fix the following issue in the Linux kernel code: target: go through normal processing for zero-length PSCSI commands
Problem Details: Right now, commands with a zero-size payload are skipped completely. This is wrong; such commands should be passed down to the device and processed normally. For physical backends, this ignores completely things such as START STOP UNIT. For virtual backends, we have a hack in place to clear a unit at...
```diff diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c index 5f7151d90344..9d7ce3daa262 100644 --- a/drivers/target/target_core_pscsi.c +++ b/drivers/target/target_core_pscsi.c @@ -688,11 +688,11 @@ static void pscsi_transport_complete(struct se_cmd *cmd, struct scatterlist *sg, ...
48420dbcf2168004f8a5ed9f1ecd2d877dc798da
Analyze and fix the following issue in the Linux kernel code: ARM: dts: OMAP4: Add reg and interrupts for every nodes
Problem Details: Thanks to Vaibhav <hvaibhav@ti.com> omap_device fix (ARM: OMAP: omap_device: Fix up resource names when booted with devicetre), we can now specify reg and interrupts using standard device tree attributes. Update the OMAP4 dtsi file with missing reg and interrupts attributes. Signed-off-by: Benoit Cou...
```diff diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi index 9f851dfe7507..75095e306d77 100644 --- a/arch/arm/boot/dts/omap4.dtsi +++ b/arch/arm/boot/dts/omap4.dtsi @@ -97,6 +97,8 @@ gpio1: gpio@4a310000 { compatible = "ti,omap4-gpio"; + reg = <0x4a310000 0x200>; + interrupts = <0...
f74ce8fb849e9f9c54a494cff5fc30d53ca4e963
Analyze and fix the following issue in the Linux kernel code: gpio/twl4030: get platform data from device tree
Problem Details: Adds a number of missing device tree properties for twl4030/gpio, and update bindings: - "ti,use-leds" -> .use_leds - "ti,debounce" -> .debounce - "ti,mmc-cd" -> .mmc_cd - "ti,pullups" -> .pullups - "ti,pulldowns" -> .pulldowns Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch> Acked-by...
```diff diff --git a/Documentation/devicetree/bindings/gpio/gpio-twl4030.txt b/Documentation/devicetree/bindings/gpio/gpio-twl4030.txt index 16695d9cf1e8..66788fda1db3 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-twl4030.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-twl4030.txt @@ -11,6 +11,11 @@ Re...
5449fbc27b27317526391409b7bcacd2104a6a2f
Analyze and fix the following issue in the Linux kernel code: ARM: dts: omap5-evm: Add keypad data
Problem Details: Add keypad data node in omap5 device tree file. Also fill the device tree binding parameters with the required value in "omap5-evm" dts file. Signed-off-by: Sourav Poddar <sourav.poddar@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> [b-cousson@ti.c...
```diff diff --git a/arch/arm/boot/dts/omap5-evm.dts b/arch/arm/boot/dts/omap5-evm.dts index 1790f41ca23e..457d1ec7ed93 100644 --- a/arch/arm/boot/dts/omap5-evm.dts +++ b/arch/arm/boot/dts/omap5-evm.dts @@ -24,6 +24,7 @@ regulator-min-microvolt = <3000000>; regulator-max-microvolt = <3000000>; }; + }; &mmc1...
b82b04e8eb27abe0cfe9cd7bf4fee8bb1bb9b013
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP: omap_device: Do not overwrite resources allocated by OF layer
Problem Details: With the new devices (like, AM33XX and OMAP5) we now only support DT boot mode of operation and now it is the time to start killing slowly the dependency on hwmod, so with this patch, we are starting with device resources. The idea here is implemented considering to both boot modes - - DT boot mode ...
```diff diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 6ca8e519968d..7768804457e3 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -3157,6 +3157,33 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res) return r; } ...
b2f5976c109350977104f27211a7029ec67cd488
Analyze and fix the following issue in the Linux kernel code: OMAPDSS: fix dss_ovl_unset_manager
Problem Details: When we removed fifomerge support, we also changed dss_ovl_disable so that it doesn't wait for the hardware to be finished with the overlay. This may cause a problem when changing the overlay's manager, as changing the manager is an immediate change. Thus if the overlay is still being used by the HW wh...
```diff diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c index 4a58d80a6315..6354bb842856 100644 --- a/drivers/video/omap2/dss/apply.c +++ b/drivers/video/omap2/dss/apply.c @@ -1330,6 +1330,13 @@ int dss_ovl_unset_manager(struct omap_overlay *ovl) goto err; } + spin_unlock_irqrestor...
b82fe7f025183897880771dd7cdf725ecc148ff2
Analyze and fix the following issue in the Linux kernel code: OMAPDSS: fix set_timings
Problem Details: set_timings function of DSS's output drivers are not consistent. Some of them disable the output, set the timings, and re-enable the output. Some set the timings on the fly, while the output is enabled. And some just store the given timings, so that they will be taken into use next time the output is e...
```diff diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c index 5bd957e85505..5f09d503d619 100644 --- a/drivers/video/omap2/dss/display.c +++ b/drivers/video/omap2/dss/display.c @@ -142,7 +142,11 @@ static ssize_t display_timings_store(struct device *dev, if (r) return r; + dssde...
ab585254ba6b0f2931c0f77bd99e46f017fe685c
Analyze and fix the following issue in the Linux kernel code: OMAPDSS: fix use of dssdev->caps
Problem Details: Recent commit dca2b1522ccab28d03fb79f6e70e70ea78033d52 (OMAPDSS: DSI: Maintain copy of operation mode in driver data) broke DSI for video mode displays. The commit changed the way dssdev->caps are initialized, and the result was that every DSI display is initialized with manual-update and tear-elim cap...
```diff diff --git a/drivers/video/omap2/displays/panel-n8x0.c b/drivers/video/omap2/displays/panel-n8x0.c index 17ae85e0033f..3fc5ad081a21 100644 --- a/drivers/video/omap2/displays/panel-n8x0.c +++ b/drivers/video/omap2/displays/panel-n8x0.c @@ -489,6 +489,7 @@ static int n8x0_panel_probe(struct omap_dss_device *dssde...
60d31c1475f20b6966f7efbd646b1123d0fba5b1
Analyze and fix the following issue in the Linux kernel code: net/mlx4_core: Looking for promiscuous entries on the correct port
Problem Details: The search for promisc entries was always done on the first port, While the addition is done on the correct port. This lead to resource leackage of promisc entries on the second port and brought to a state where we could no longer enter to promiscuous mode after enough iterations of "ifconfig promisc" ...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx4/mcg.c b/drivers/net/ethernet/mellanox/mlx4/mcg.c index 2673f3ba935f..e151c21baf2b 100644 --- a/drivers/net/ethernet/mellanox/mlx4/mcg.c +++ b/drivers/net/ethernet/mellanox/mlx4/mcg.c @@ -137,11 +137,11 @@ static int mlx4_GID_HASH(struct mlx4_dev *dev, struct mlx4_...
f39c1bfb5a03e2d255451bff05be0d7255298fa4
Analyze and fix the following issue in the Linux kernel code: SUNRPC: Fix a UDP transport regression
Problem Details: Commit 43cedbf0e8dfb9c5610eb7985d5f21263e313802 (SUNRPC: Ensure that we grab the XPRT_LOCK before calling xprt_alloc_slot) is causing hangs in the case of NFS over UDP mounts. Since neither the UDP or the RDMA transport mechanism use dynamic slot allocation, we can skip grabbing the socket lock for th...
```diff diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index cff40aa7db62..bf8c49ff7530 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h @@ -114,6 +114,7 @@ struct rpc_xprt_ops { void (*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize); int (...
e36851d0fa94b0f7802b3cc80406dbd3ef4f2f16
Analyze and fix the following issue in the Linux kernel code: serial: omap: fix compile breakage
Problem Details: when rebasing patches on top of Greg's tty-next, it looks like automerge broke a few things which I didn't catch (for whatever reason I didn't have OMAP Serial enabled on .config) so I ended up breaking the build on Greg's tty-next branch. Fix the breakage by re-adding the three missing members on str...
```diff diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h index 3c9fd3e4263f..a531149823bb 100644 --- a/arch/arm/plat-omap/include/plat/omap-serial.h +++ b/arch/arm/plat-omap/include/plat/omap-serial.h @@ -105,8 +105,4 @@ struct uart_omap_dma { unsigned int rx...
5948ae27fb4f0e87ce8543ca1934599b83929a3e
Analyze and fix the following issue in the Linux kernel code: staging/ipack: Fix bug introduced by IPack device matching
Problem Details: ~0 can not be casted to u8. Instead of using the IPACK_ANY_ID for the format field we introduce a new IPACK_ANY_FORMAT specifically for that field and defined as 0xff. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Acked-by: Samuel Igle...
```diff diff --git a/drivers/staging/ipack/ipack.c b/drivers/staging/ipack/ipack.c index b3736c0a1086..659aadcac04d 100644 --- a/drivers/staging/ipack/ipack.c +++ b/drivers/staging/ipack/ipack.c @@ -31,7 +31,8 @@ static inline const struct ipack_device_id * ipack_match_one_device(const struct ipack_device_id *id, ...
fa67ccb61d10fbd55d1c3b5b6b537e4d74da1e4b
Analyze and fix the following issue in the Linux kernel code: ARM: tegra: Fix data type for io address
Problem Details: Warnings were generated because following commit changed data type for address pointer 195bbca ARM: 7500/1: io: avoid writeback addressing modes for __raw_ accessors arch/arm/mach-tegra/tegra30_clocks.c: In function 'clk_measure_input_freq': arch/arm/mach-tegra/tegra30_clocks.c:418:2: warning: passin...
```diff diff --git a/arch/arm/mach-tegra/tegra30_clocks.c b/arch/arm/mach-tegra/tegra30_clocks.c index 3129c2f21d81..63615dadfbb2 100644 --- a/arch/arm/mach-tegra/tegra30_clocks.c +++ b/arch/arm/mach-tegra/tegra30_clocks.c @@ -365,19 +365,19 @@ static void __iomem *misc_gp_hidrev_base = IO_ADDRESS(TEGRA_APB_MISC_BASE);...
d4c9dbc61fe0ca042b835c6f234af12fa5f18310
Analyze and fix the following issue in the Linux kernel code: x86/mm: Fix range check in tlbflush debugfs interface
Problem Details: Since the shift count settable there is used for shifting values of type "unsigned long", its value must not match or exceed BITS_PER_LONG (otherwise the shift operations are undefined). Similarly, the value must not be negative (but -1 must be permitted, as that's the value used to distinguish the ca...
```diff diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c index 613cd83e8c0c..a085c560b4a5 100644 --- a/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c @@ -320,7 +320,7 @@ static ssize_t tlbflush_write_file(struct file *file, if (kstrtos8(buf, 0, &shift)) return -EINVAL; - if (shift > 64) + if (shift < -1 || shift >=...
c081705623468e6242a6703902dbe8bc2696095b
Analyze and fix the following issue in the Linux kernel code: ARM: ep93xx: Fix build error due to 'SZ_32M' undeclared
Problem Details: Include linux/sizes.h to fix below build errors: CC arch/arm/mach-ep93xx/adssphere.o arch/arm/mach-ep93xx/adssphere.c: In function 'adssphere_init_machine': arch/arm/mach-ep93xx/adssphere.c:32:49: error: 'SZ_32M' undeclared (first use in this function) arch/arm/mach-ep93xx/adssphere.c:32:49: no...
```diff diff --git a/arch/arm/mach-ep93xx/adssphere.c b/arch/arm/mach-ep93xx/adssphere.c index a472777e9eba..41383bf03d4b 100644 --- a/arch/arm/mach-ep93xx/adssphere.c +++ b/arch/arm/mach-ep93xx/adssphere.c @@ -13,6 +13,7 @@ #include <linux/kernel.h> #include <linux/init.h> #include <linux/platform_device.h> +#inclu...
a32826e4aefa905b392d2d862d51365d50d4829b
Analyze and fix the following issue in the Linux kernel code: ASoC: tegra: fix maxburst settings in dmaengine code
Problem Details: The I2S controllers are programmed with an "attention" level of 4 DWORDs. This must match the configuration passed to the DMA driver, so that when they burst in data, they don't overflow the available FIFO space. Also, the burst size is relevant to the destination for playback, and source for capture, ...
```diff diff --git a/sound/soc/tegra/tegra_pcm.c b/sound/soc/tegra/tegra_pcm.c index 5658bcec1931..8d6900c1ee47 100644 --- a/sound/soc/tegra/tegra_pcm.c +++ b/sound/soc/tegra/tegra_pcm.c @@ -334,11 +334,11 @@ static int tegra_pcm_hw_params(struct snd_pcm_substream *substream, if (substream->stream == SNDRV_PCM_STREAM...
a84fcd46870113e92523e1ebb9a0ec75f66e03a2
Analyze and fix the following issue in the Linux kernel code: powerpc: Change memory_limit from phys_addr_t to unsigned long long
Problem Details: There are some device-tree nodes, whose values are of type phys_addr_t. The phys_addr_t is variable sized based on the CONFIG_PHSY_T_64BIT. Change these to a fixed unsigned long long for consistency. This patch does the change only for memory_limit. The following is a list of such variables which ne...
```diff diff --git a/arch/powerpc/include/asm/setup.h b/arch/powerpc/include/asm/setup.h index d084ce195fc3..8b9a306260b2 100644 --- a/arch/powerpc/include/asm/setup.h +++ b/arch/powerpc/include/asm/setup.h @@ -9,7 +9,7 @@ extern void ppc_printk_progress(char *s, unsigned short hex); extern unsigned int rtas_data; ex...
0090e02b947c5de1cf978f52ac12c7b532e61154
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix build dependencies for c files requiring libfdt.h
Problem Details: Several files in obj-plat depend on libfdt header file. Sometimes when building one can see the following issue. This patch adds libfdt as dependency to those object files | In file included from arch/powerpc/boot/treeboot-iss4xx.c:33:0: | arch/powerpc/boot/libfdt.h:854:1: error: unterminated comment ...
```diff diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index b7d833382be4..6a15c968d214 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -107,6 +107,7 @@ src-boot := $(addprefix $(obj)/, $(src-boot)) obj-boot := $(addsuffix .o, $(basename $(src-boot))) obj-wlib := $(ad...
adbf115d66649b3a52e6875f93c9f131ba690cce
Analyze and fix the following issue in the Linux kernel code: powerpc/oprofile: Fix marked events support on Power7+ not set.
Problem Details: Starting with Power 7+ we need to check for marked events if the SIAR register is valid, i.e. it contains the correct address of the instruction at the time the performance counter overflowed. The mmcra register on Power 7+, contains a new bit to indicate that the contents of the SIAR is valid. If the...
```diff diff --git a/arch/powerpc/oprofile/op_model_power4.c b/arch/powerpc/oprofile/op_model_power4.c index caffffa5b8f2..315f9495e9b2 100644 --- a/arch/powerpc/oprofile/op_model_power4.c +++ b/arch/powerpc/oprofile/op_model_power4.c @@ -21,6 +21,13 @@ #include <asm/reg.h> #define dbg(args...) +#define OPROFILE_PM...
ac2cb30b4792340d932545f41a8335da2632027d
Analyze and fix the following issue in the Linux kernel code: spi/gpio: Fix stub for spi_gpio_probe_dt()
Problem Details: The gpio_ was missing from the name. Add a name for the parameter while we're at it since GCC warns. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/drivers/spi/spi-gpio.c b/drivers/spi/spi-gpio.c index aed161595840..a2b50c516b31 100644 --- a/drivers/spi/spi-gpio.c +++ b/drivers/spi/spi-gpio.c @@ -386,7 +386,7 @@ error_free: return ret; } #else -static inline int spi_probe_dt(struct platform_device *) +static inline int spi_gpio_probe_dt(st...
28e1e58fb668e262648fb8ee8a24154633f40507
Analyze and fix the following issue in the Linux kernel code: powerpc/kprobes: Rename opcode_t in probes.h to ppc_opcode_t
Problem Details: commit: 8b7b80b9ebb46dd88fbb94e918297295cf312b59 [24/29] powerpc: Uprobes port to powerpc Caused a clash with the fore200e driver: In file included from drivers/atm/fore200e.c:70:0: drivers/atm/fore200e.h:263:3: error: redefinition of typedef 'opcode_t' with different type arch/powerpc/include/asm/pr...
```diff diff --git a/arch/powerpc/include/asm/kprobes.h b/arch/powerpc/include/asm/kprobes.h index dc581976c6dc..7b6feab6fd26 100644 --- a/arch/powerpc/include/asm/kprobes.h +++ b/arch/powerpc/include/asm/kprobes.h @@ -36,7 +36,7 @@ struct pt_regs; struct kprobe; -typedef opcode_t kprobe_opcode_t; +typedef ppc_opco...
ef40bb1bd01738670bd567e3dce8e862f2b91bf3
Analyze and fix the following issue in the Linux kernel code: firmware loader: fix firmware -ENOENT situations
Problem Details: If the requested firmware image doesn't exist, firmware->priv should be set for the later concurrent requests, otherwise warning and oops will be triggered inside firmware_free_data(). Signed-off-by: Ming Lei <ming.lei@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index ed0510a912c8..edc88bc68b3d 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c @@ -718,6 +718,7 @@ _request_firmware_prepare(const struct firmware **firmware_p, const char *name, mutex_lock(&fw_lock); ...
1daae517b3a903177f79269c694c9a8fb4ddb0bb
Analyze and fix the following issue in the Linux kernel code: [media] move i2c files into drivers/media/i2c
Problem Details: Based on a patch from Sylvester Nawrocki This fixes regression introduced with commmit cb7a01ac324bf2ee2, "[media] move i2c files into drivers/media/i2c". The linked order affect what drivers will be initialized first, when they're built-in at Kernel. While there are macros that allow changing the in...
```diff diff --git a/drivers/media/Makefile b/drivers/media/Makefile index b0b0193cd69d..620f275a45c9 100644 --- a/drivers/media/Makefile +++ b/drivers/media/Makefile @@ -4,12 +4,30 @@ media-objs := media-device.o media-devnode.o media-entity.o +# +# I2C drivers should come before other drivers, otherwise they'll ...
98025c8c754391f5ea962fad788a6f2af02cb886
Analyze and fix the following issue in the Linux kernel code: gpio: samsung: Update documentation
Problem Details: Update Samsung GPIO API documentation to reflect removal of the s3c24xx specific gpio API. While at it, fix some typos. The notes on conversion from s3c2410_* functions to the gpiolib API are left here just in case there is any out of tree code that still needs to be converted. Signed-off-by: Sylwest...
```diff diff --git a/Documentation/arm/Samsung-S3C24XX/GPIO.txt b/Documentation/arm/Samsung-S3C24XX/GPIO.txt index 816d6071669e..8b46c79679c4 100644 --- a/Documentation/arm/Samsung-S3C24XX/GPIO.txt +++ b/Documentation/arm/Samsung-S3C24XX/GPIO.txt @@ -1,4 +1,4 @@ - S3C2410 GPIO Control + S3C24XX GPIO Control ===...
4955070974ecfa0b1ae9d2506f529460fd3a4b0b
Analyze and fix the following issue in the Linux kernel code: PM / wakeup: Use irqsave/irqrestore for events_lock
Problem Details: Jon Medhurst (Tixy) recently noticed a problem with the events_lock usage. One of the Android patches that uses wakeup_sources calls wakeup_source_add() with irqs disabled. However, the event_lock usage in wakeup_source_add() uses spin_lock_irq()/spin_unlock_irq(), which reenables interrupts. This resu...
```diff diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index 8a0a9ca6ad65..e6ee5e80e546 100644 --- a/drivers/base/power/wakeup.c +++ b/drivers/base/power/wakeup.c @@ -127,6 +127,8 @@ EXPORT_SYMBOL_GPL(wakeup_source_destroy); */ void wakeup_source_add(struct wakeup_source *ws) { + unsigned lo...
b3d3b9fb6016e6eacd3ae49fb786806d00c43e7b
Analyze and fix the following issue in the Linux kernel code: PM / Domains: Fix compilation warning related to genpd_start_dev_no_timing()
Problem Details: Function genpd_start_dev_no_timing was accessed inside CONFIG_PM_RUNTIME macro but defined outside it. When the above macro was not defined the compiler gave the following warning: drivers/base/power/domain.c:96:12: warning: ‘genpd_start_dev_no_timing’ defined but not used [-Wunused-function] Signed-...
```diff diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 12ad070c244f..c22b869245d9 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -93,12 +93,6 @@ static int genpd_start_dev(struct generic_pm_domain *genpd, struct device *dev) start_latency_ns, "start"); ...
f38bc926d022ebd67baad6ac7fc22c95fbc6238c
Analyze and fix the following issue in the Linux kernel code: staging:iio:sysfs-trigger: Use irq_work to properly active trigger
Problem Details: Since iio_trigger_poll() calls generic_handle_irq() it need to be called from hardirq context. The sysfs trigger is kicked from userspace, so it is obviously not possible to fulfill this requirement by calling iio_trigger_poll directly. As a workaround commit 1f785681 ("staging:iio:trigger sysfs usersp...
```diff diff --git a/drivers/staging/iio/trigger/Kconfig b/drivers/staging/iio/trigger/Kconfig index b8abf5473ddc..7d3207559265 100644 --- a/drivers/staging/iio/trigger/Kconfig +++ b/drivers/staging/iio/trigger/Kconfig @@ -21,6 +21,8 @@ config IIO_GPIO_TRIGGER config IIO_SYSFS_TRIGGER tristate "SYSFS trigger" depe...
b49c32ba2ca3b51ddbb863ff139adca6b85b7543
Analyze and fix the following issue in the Linux kernel code: vme: vme_tsi148.c: fix to use list_for_each_safe() when delete list items
Problem Details: Since we will be removing items off the list using list_del() we need to use a safer version of the list_for_each() macro aptly named list_for_each_safe(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/vme/bridges/vme_tsi148.c b/drivers/vme/bridges/vme_tsi148.c index 880d9242e349..5fbd08ffb9c2 100644 --- a/drivers/vme/bridges/vme_tsi148.c +++ b/drivers/vme/bridges/vme_tsi148.c @@ -2350,7 +2350,7 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id) { int retv...
a9ccb7bd0a781bce85db3b182e4c0c03688553c1
Analyze and fix the following issue in the Linux kernel code: hwrng: mxc-rnga - Adapt clocks to new i.mx clock framework
Problem Details: Adapt clocks to the new i.mx clock framework and fix the following warning: ------------[ cut here ]------------ WARNING: at drivers/clk/clk.c:511 __clk_enable+0x9c/0xac() Modules linked in: Backtrace: [<800124c8>] (dump_backtrace+0x0/0x10c) from [<804172dc>] (dump_stack+0x18/0x1c) r7:00000009 r6:000...
```diff diff --git a/drivers/char/hw_random/mxc-rnga.c b/drivers/char/hw_random/mxc-rnga.c index 85074de5042e..62c7efe375ab 100644 --- a/drivers/char/hw_random/mxc-rnga.c +++ b/drivers/char/hw_random/mxc-rnga.c @@ -152,14 +152,14 @@ static int __init mxc_rnga_probe(struct platform_device *pdev) if (rng_dev) return...