id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
e27d75d71c0dbbab83768c6e327d13f445d0214f
Analyze and fix the following issue in the Linux kernel code: staging:iio:core add in kernel interface mapping and getting IIO channels.
Problem Details: Lifted from proposal for in kernel interface built on the out of staging branch. Two elements here: * Map as defined in "inkern.h" * Matching code to actually get the iio_dev and channel that we want from the global list of IIO devices. V4: Everything now built if iio is built (rather than being optio...
```diff diff --git a/drivers/staging/iio/Makefile b/drivers/staging/iio/Makefile index 657710b266b0..ff059d448c2e 100644 --- a/drivers/staging/iio/Makefile +++ b/drivers/staging/iio/Makefile @@ -3,7 +3,7 @@ # obj-$(CONFIG_IIO) += industrialio.o -industrialio-y := industrialio-core.o industrialio-event.o +industrial...
08cd9ef4eca0b53cdae190b718e4945408c7d3b8
Analyze and fix the following issue in the Linux kernel code: staging: tidspbridge: detect wdt3 feature at runtime
Problem Details: In order to detect WDT feature on the dsp code, we need to find the symbol used to enable it inside the baseimage. This should fix the warning comming from L3 driver: WARNING: at arch/arm/mach-omap2/omap_l3_smx.c:161 omap3_l3_app_irq... In-band Error seen by IVA_SS at address 0 ... That...
```diff diff --git a/drivers/staging/tidspbridge/core/tiomap3430.c b/drivers/staging/tidspbridge/core/tiomap3430.c index 670de0aae928..7862513cc295 100644 --- a/drivers/staging/tidspbridge/core/tiomap3430.c +++ b/drivers/staging/tidspbridge/core/tiomap3430.c @@ -383,6 +383,7 @@ static int bridge_brd_start(struct bridge...
18db4fe09886691a781f3d1e4589ede0239d8ee2
Analyze and fix the following issue in the Linux kernel code: staging: tidspbridge: always compile dsp wdt code
Problem Details: In order to detect it at runtime, we need the code handling wdt clock available at runtime to decide whether to enable or disable based on the baseimage symbols. Default timeout has been set to 5 seconds. Downside is that we will lose the option to set a custom timeout for overflow, but than can be ad...
```diff diff --git a/drivers/staging/tidspbridge/Kconfig b/drivers/staging/tidspbridge/Kconfig index d660891303b6..0dd479f5638d 100644 --- a/drivers/staging/tidspbridge/Kconfig +++ b/drivers/staging/tidspbridge/Kconfig @@ -52,22 +52,6 @@ config TIDSPBRIDGE_CACHE_LINE_CHECK This can lead to heap corruption. Say Y, t...
81a149561ed56a23ee84a783da0aec53f1077b8d
Analyze and fix the following issue in the Linux kernel code: staging: Fix typo in unioxx5.c
Problem Details: Correct spelling "erorr" to "error" in drivers/stating/comedi/drivers/unioxx5.c Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/comedi/drivers/unioxx5.c b/drivers/staging/comedi/drivers/unioxx5.c index 89e62aa134b0..f45824f0d86b 100644 --- a/drivers/staging/comedi/drivers/unioxx5.c +++ b/drivers/staging/comedi/drivers/unioxx5.c @@ -306,7 +306,7 @@ static int __unioxx5_subdev_init(struct comedi_subdevice *sub...
3e495b2104f782ae36830ea875bfe1a12aa7b2f1
Analyze and fix the following issue in the Linux kernel code: staging: Fix typo in bssdb.c
Problem Details: Correct spelling "scaning" to "scanning" in drivers/staging/vt6656/bssdb.c drivers/staging/vt6655/bssdb.c Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/vt6655/bssdb.c b/drivers/staging/vt6655/bssdb.c index 577599ed70ad..1368e8cc9add 100644 --- a/drivers/staging/vt6655/bssdb.c +++ b/drivers/staging/vt6655/bssdb.c @@ -1327,13 +1327,13 @@ start: } if (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) { - // if adhoc started w...
b5c19ca8014aa5151712274d5e70c3666a8918c1
Analyze and fix the following issue in the Linux kernel code: staging/octeon: Fix PHY binding in octeon-ethernet driver.
Problem Details: Commit d6c25be (mdio-octeon: use an unique MDIO bus name.) changed the names used to refer to MDIO buses. The ethernet driver must be changed to match, so that the PHY drivers can be attached. Signed-off-by: David Daney <david.daney@cavium.com> Acked-by: Florian Fainelli <florian@openwrt.org> Cc: sta...
```diff diff --git a/drivers/staging/octeon/ethernet-mdio.c b/drivers/staging/octeon/ethernet-mdio.c index 63800ba71d06..e31949c9c87e 100644 --- a/drivers/staging/octeon/ethernet-mdio.c +++ b/drivers/staging/octeon/ethernet-mdio.c @@ -164,9 +164,9 @@ int cvm_oct_phy_setup_device(struct net_device *dev) int phy_addr...
1ca1a92cc6d337a149d1e37d4ab0db8ad45b0fde
Analyze and fix the following issue in the Linux kernel code: Staging: wlan-ng: memsetting the wrong amount of data
Problem Details: p80211item_pstr6_t is the size of "msg1.bssid" (16 bytes) but msg1.bssid.data is type p80211pstr6_t and it is smaller (7 bytes). We had just set that memory to zeroes earlier and now we're writing over it with 0xff because we're writing past the end of the struct. I don't know if this actually causes...
```diff diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c index fb466f4c92e0..d518b315b368 100644 --- a/drivers/staging/wlan-ng/cfg80211.c +++ b/drivers/staging/wlan-ng/cfg80211.c @@ -356,7 +356,7 @@ int prism2_scan(struct wiphy *wiphy, struct net_device *dev, msg1.msgcode = DIDmsg_...
72a474b8cdac7e316f5299b0edf2d82f86d92829
Analyze and fix the following issue in the Linux kernel code: Staging: frontier: Fix checkpatch.pl issue.
Problem Details: This is a patch to the alphatrack.c and tranzport.c that fixes up an error found by checkpatch.pl tool. Signed-off-by: Hitoshi Nakamori <hitoshi.nakamori@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/frontier/alphatrack.c b/drivers/staging/frontier/alphatrack.c index d8efed657440..3bf0f40e97fd 100644 --- a/drivers/staging/frontier/alphatrack.c +++ b/drivers/staging/frontier/alphatrack.c @@ -450,7 +450,7 @@ exit: /** * usb_alphatrack_poll */ -static unsigned int usb_alphatra...
ac399bc0f40a9d578bc31e0e5e31814dd1083e68
Analyze and fix the following issue in the Linux kernel code: drivers:staging:et131x Fix some typo's in staging et131x.
Problem Details: The below patch fixes some comments with typos in the them and makes a comment make more sense. Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index b4167adacbf4..fafc9fb42a07 100644 --- a/drivers/staging/et131x/et131x.c +++ b/drivers/staging/et131x/et131x.c @@ -802,7 +802,7 @@ static int et131x_init_eeprom(struct et131x_adapter *adapter) /* THIS IS A WORKAROUND: * I n...
cfbc6a92212e74b07aa76c9e2f20c542e36077fb
Analyze and fix the following issue in the Linux kernel code: staging: zcache: avoid AB-BA deadlock condition
Problem Details: Commit 9256a47 fixed a deadlock condition, being sure that the buddy list spinlock is always taken before the page spinlock. However in zbud_free_and_delist() locking order is the opposite (page lock -> list lock). Possible unsafe locking scenario (reported by lockdep): CPU0 ...
```diff diff --git a/drivers/staging/zcache/zcache-main.c b/drivers/staging/zcache/zcache-main.c index d7020b774039..238d82095ab1 100644 --- a/drivers/staging/zcache/zcache-main.c +++ b/drivers/staging/zcache/zcache-main.c @@ -333,10 +333,12 @@ static void zbud_free_and_delist(struct zbud_hdr *zh) struct zbud_page *z...
cb532e4b2bb2f156e9a6c2c4535334db764f603c
Analyze and fix the following issue in the Linux kernel code: staging: ramster: build ramster properly when CONFIG_OCFS2=m|y
Problem Details: Due to some conflicting debug vars, kernel build will warn when CONFIG_RAMSTER=y and CONFIG_OCFS2=m and will fail when CONFIG_RAMSTER=y and CONFIG_OCFS2=y (rare). Rename ramster mlog vars to avoid the name conflict. Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Greg Kroah...
```diff diff --git a/drivers/staging/ramster/cluster/masklog.c b/drivers/staging/ramster/cluster/masklog.c index c2af3c7de979..1261d8579aae 100644 --- a/drivers/staging/ramster/cluster/masklog.c +++ b/drivers/staging/ramster/cluster/masklog.c @@ -28,18 +28,18 @@ #include "masklog.h" -struct mlog_bits mlog_and_bits...
4b00706cd9499652051918305e70c7152d0cfd0e
Analyze and fix the following issue in the Linux kernel code: staging/mei: fix hbm_host_version_response structure
Problem Details: Looks during cleanup we converted type of host_version_supported member from UINT8 into int instead of u8. Since we've queried only for boolean value of this variable the bug wasn't really visible. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfo...
```diff diff --git a/drivers/staging/mei/hw.h b/drivers/staging/mei/hw.h index b08c90193f73..f86a213c372d 100644 --- a/drivers/staging/mei/hw.h +++ b/drivers/staging/mei/hw.h @@ -237,7 +237,7 @@ struct hbm_host_version_request { struct hbm_host_version_response { struct hbm_cmd cmd; - int host_version_supported; +...
adc4a3a4b0b78a2ab910685d138e0e598fc0edc7
Analyze and fix the following issue in the Linux kernel code: Staging: bcm: fix possible NULL dereference of psfLocalSet in CmHost.c
Problem Details: Variable psfLocalSet may not follow the correct path in the code, and therefore may not be set properly. As such, causing a null dereference. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 522d0052e839..e332f1e7c11e 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -1839,7 +1839,13 @@ BOOLEAN CmControlResponseMessage(PMINI_ADAPTER Adapter, /* <Pointer to the Adap Adapter->PackInfo[ui...
d80e731ecab420ddcb79ee9d0ac427acbc187b4b
Analyze and fix the following issue in the Linux kernel code: epoll: introduce POLLFREE to flush ->signalfd_wqh before kfree()
Problem Details: This patch is intentionally incomplete to simplify the review. It ignores ep_unregister_pollwait() which plays with the same wqh. See the next change. epoll assumes that the EPOLL_CTL_ADD'ed file controls everything f_op->poll() needs. In particular it assumes that the wait queue can't go away until e...
```diff diff --git a/fs/eventpoll.c b/fs/eventpoll.c index aabdfc38cf24..34bbfc6dd8dc 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -842,6 +842,10 @@ static int ep_poll_callback(wait_queue_t *wait, unsigned mode, int sync, void *k struct epitem *epi = ep_item_from_wait(wait); struct eventpoll *ep = epi->ep; ...
626109130267713cac020515504ec341e47c96f9
Analyze and fix the following issue in the Linux kernel code: x86-64: Fix CFI annotations for NMI nesting code
Problem Details: The saving and restoring of %rdx wasn't annotated at all, and the jumping over sections where state gets partly restored wasn't handled either. Further, by folding the pushing of the previous frame in repeat_nmi into that which so far was immediately preceding restart_nmi (after moving the restore of ...
```diff diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index 1333d9851778..e0eca007dc0d 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S @@ -1530,6 +1530,7 @@ ENTRY(nmi) /* Use %rdx as out temp variable throughout */ pushq_cfi %rdx + CFI_REL_OFFSET rdx, 0 /* * ...
b893485db994b17402524d3d700b950294cb6c97
Analyze and fix the following issue in the Linux kernel code: bitops: Add missing parentheses to new get_order macro
Problem Details: The new get_order macro introcuded in commit d66acc39c7cee323733c8503b9de1821a56dff7e does not use parentheses around all uses of the parameter n. This causes new compile warnings, for example in the amd_iommu_init.c function: drivers/iommu/amd_iommu_init.c:561:6: warning: suggest parentheses aroun...
```diff diff --git a/include/asm-generic/getorder.h b/include/asm-generic/getorder.h index e0fb4bf9f160..65e4468ac53d 100644 --- a/include/asm-generic/getorder.h +++ b/include/asm-generic/getorder.h @@ -49,8 +49,8 @@ int __get_order(unsigned long size) #define get_order(n) \ ( \ __builtin_constant_p(n) ...
acea7c7b81e8f67513aebade8cb99c7789c44d8c
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP2+: Limit omap_read/write usage to legacy USB drivers
Problem Details: Drivers should no longer use omap_read/write functions but instead use ioremap + read/write functions. As some USB legacy code is still shared between omap1 and omap2420, let's limit the omap_read/write to plat/usb.h. Note that the long term fix is to update the drivers to use ioremap and read/write ...
```diff diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index 09ca9e9cc176..f78ec4e6a5c7 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h @@ -242,15 +242,5 @@ struct omap_sdrc_params; extern void omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0, struct om...
645c56a75882830c0ba6e7461f07d099a9c87e69
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP2xxx: PM: remove obsolete timer disable code in the suspend path
Problem Details: Remove omap_{read,write}l() from the 24xx PM code. The clocksource code should now handle what this was supposed to do. Tested on N800 -- but it's hard to say whether this fixes anything. OMAP24xx static suspend path is currently broken, and this patch doesn't change that. Signed-off-by: Paul Walmsl...
```diff diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c index b8822f8b2891..6d63973c7f15 100644 --- a/arch/arm/mach-omap2/pm24xx.c +++ b/arch/arm/mach-omap2/pm24xx.c @@ -260,26 +260,6 @@ static int omap2_pm_begin(suspend_state_t state) return 0; } -static int omap2_pm_suspend(void) -{ - u3...
5b4cedaa14bd1fe3ca1d59c684203a6ae7747faa
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix double locking in LE and conless chan
Problem Details: Remove socket lock since chan->ops->recv locks socket itself. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Reviewed-by: Ulisses Furquim <ulisses@profusion.mobi> Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
```diff diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 5f4cfea33915..db04c9e4e1d9 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -4369,18 +4369,13 @@ done: static inline int l2cap_conless_channel(struct l2cap_conn *conn, __le16 psm, struct sk_buff *skb) { - s...
aed3f09db39596e539f90b11a5016aea4d8442e1
Analyze and fix the following issue in the Linux kernel code: drm/i915: Prevent a machine hang by checking crtc->active before loading lut
Problem Details: Before loading the lut (gamma), check the active state of intel_crtc, otherwise at least on gen2 hang ensue. This is reproducible in Xorg via: xset dpms force off then xgamma -rgamma 2.0 # freeze. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44505 Signed-off-by: Alban Browaeys <prahal@y...
```diff diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 4871ba0dcc14..f851db7be2cc 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -6184,7 +6184,7 @@ void intel_crtc_load_lut(struct drm_crtc *crtc) int i; /* The clocks ...
c0e2ee1bc0cf82eec89e26b7afe7e4db0561b7d9
Analyze and fix the following issue in the Linux kernel code: drm/i915: fix operator precedence when enabling RC6p
Problem Details: As noticed by Torsten Kaiser, the operator precedence can play tricks with us here. CC: Dave Airlie <airlied@redhat.com> Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
```diff diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index e654f32de197..4871ba0dcc14 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -8194,7 +8194,7 @@ void gen6_enable_rps(struct drm_i915_private *dev_priv) if (intel_enabl...
066b2229410f2f58fa91baedd22b4dcf048e28dd
Analyze and fix the following issue in the Linux kernel code: staging: ozwpan: Added debug support
Problem Details: Added tracing facilities and also memory allocation and URB tracking. This is for debugging purposes and is all optional and can be switched out at compile time. Signed-off-by: Chris Kelly <ckelly@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/ozwpan/ozalloc.c b/drivers/staging/ozwpan/ozalloc.c new file mode 100644 index 000000000000..fe3cd406e4fa --- /dev/null +++ b/drivers/staging/ozwpan/ozalloc.c @@ -0,0 +1,107 @@ +/* ----------------------------------------------------------------------------- + * Copyright (c) 2011 O...
892365ab4d29ed861709ee8611b53587ca2bb75f
Analyze and fix the following issue in the Linux kernel code: [S390] memory hotplug: prevent memory zone interleave
Problem Details: This fixes a kernel oops with CONFIG_DEBUG_VM triggered by a VM_BUG_ON(bad_range()): kernel BUG at mm/page_alloc.c:748. With memory hotplug on System z, it is possible that the memory online/offline state is preserved over a system restart, e.g. there may be offline memory blocks in ZONE_DMA or ZONE_N...
```diff diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index 5d633019d8f3..50236610de83 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c @@ -223,16 +223,38 @@ void free_initrd_mem(unsigned long start, unsigned long end) #ifdef CONFIG_MEMORY_HOTPLUG int arch_add_memory(int nid, u64 start, u64 size) ...
371528caec553785c37f73fa3926ea0de84f986f
Analyze and fix the following issue in the Linux kernel code: mm: memcg: Correct unregistring of events attached to the same eventfd
Problem Details: There is an issue when memcg unregisters events that were attached to the same eventfd: - On the first call mem_cgroup_usage_unregister_event() removes all events attached to a given eventfd, and if there were no events left, thresholds->primary would become NULL; - Since there were several event...
```diff diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 6728a7ae6f2d..228d6461c12a 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -4414,6 +4414,9 @@ static void mem_cgroup_usage_unregister_event(struct cgroup *cgrp, */ BUG_ON(!thresholds); + if (!thresholds->primary) + goto unlock; + usage = mem_c...
0c5be0cb0edfe3b5c4b62eac68aa2aa15ec681af
Analyze and fix the following issue in the Linux kernel code: PCI: Retry on IORESOURCE_IO type allocations
Problem Details: When enabling pci reallocation for a pci bridge, we clear the small size in in bridge and re-assign with requested + optional size for first several tries, but Ram mention could have problem with one case: https://bugzilla.kernel.org/show_bug.cgi?id=15960 After checking the booting log in https://lk...
```diff diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 2991a8975064..162edfb356b6 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -1292,7 +1292,6 @@ pci_assign_unassigned_resources(void) struct pci_dev_resource *fail_res; unsigned long type_mask = IORESOURCE_IO | IORESOUR...
149f1d5c8d2fd6879cdf93ca70f1cb745e698a1e
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP2+: Fix devexit for smartreflex when CONFIG_HOTPLUG is not set
Problem Details: Otherwise we get: `omap_sr_remove' referenced in section `.data' of arch/arm/mach-omap2/built-in.o: defined in discarded section `.devexit.text' of arch/arm/mach-omap2/built-in.o Signed-off-by: Tony Lindgren <tony@atomide.com>
```diff diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index 7e755bb0ffc4..47c77a1d932a 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c @@ -1012,7 +1012,7 @@ static int __devexit omap_sr_remove(struct platform_device *pdev) } static struct p...
c295fb633e321a7df3b8846c4eaddc5da3e0aaed
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP2+: Fix multiple randconfig errors with SOC_OMAP and SOC_OMAP_NOOP
Problem Details: If we don't have ARCH_OMAP2, 3 or 4 selected randconfig will always fail with multiple errors as the CPU and MACHINE are not set. Fix this by changing arch/arm/Makefile to build mach-omap2 based on ARCH_OMAP2PLUS. And let's introduce SOC_OMAP and SOC_OMAP_NOOP that allow randconfig to generate buildab...
```diff diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 1683bfb9166f..ea69448be0ed 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -164,9 +164,7 @@ machine-$(CONFIG_ARCH_MXS) := mxs machine-$(CONFIG_ARCH_NETX) := netx machine-$(CONFIG_ARCH_NOMADIK) := nomadik machine-$(CONFIG_ARCH_OMAP1) := om...
3e2e613f5f1c5d8b30e6ce49954143bdfaa03dd5
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP: Fix devexit for dma when CONFIG_HOTPLUG is not set
Problem Details: Otherwise we get: `omap_system_dma_remove' referenced in section `.data' of arch/arm/plat-omap/built-in.o: defined in discarded section `.devexit.text' of arch/arm/plat-omap/built-in.o Signed-off-by: Tony Lindgren <tony@atomide.com>
```diff diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 002fb4d96bbc..cb856fe0434a 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -2125,7 +2125,7 @@ static int __devexit omap_system_dma_remove(struct platform_device *pdev) static struct platform_driver omap_system_dma_...
dc91ad8e84593eb49c65cca70537088782b21e08
Analyze and fix the following issue in the Linux kernel code: hwmon: (max34440) Fix resetting temperature history
Problem Details: Temperature history is reset by writing 0x8000 into the peak temperature register, not 0xffff. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
```diff diff --git a/drivers/hwmon/pmbus/max34440.c b/drivers/hwmon/pmbus/max34440.c index beaf5a8d9c45..9b97a5b3cf3d 100644 --- a/drivers/hwmon/pmbus/max34440.c +++ b/drivers/hwmon/pmbus/max34440.c @@ -82,7 +82,7 @@ static int max34440_write_word_data(struct i2c_client *client, int page, case PMBUS_VIRT_RESET_TEMP_H...
e77266e4c4be6f9dc91bf688bce015a8babd5fe0
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix compiler warnings on 32 bit systems
Problem Details: The enospc tracing code added some interesting uses of u64 pointer casts. Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c index b669a7d8e499..d986824bb2b4 100644 --- a/fs/btrfs/check-integrity.c +++ b/fs/btrfs/check-integrity.c @@ -644,7 +644,7 @@ static struct btrfsic_dev_state *btrfsic_dev_state_hashtable_lookup( static int btrfsic_process_superblock(struct bt...
3380643b0eaa7ecf99c4f095bdfcb6e5df471616
Analyze and fix the following issue in the Linux kernel code: regulator: fix the ldo configure according to 88pm860x spec
Problem Details: Signed-off-by: Jett.Zhou <jtzhou@marvell.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
```diff diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c index df33530cec4a..28b81ae4cf7f 100644 --- a/drivers/regulator/88pm8607.c +++ b/drivers/regulator/88pm8607.c @@ -196,7 +196,7 @@ static const unsigned int LDO12_suspend_table[] = { }; static const unsigned int LDO13_table[] = { - 1300...
b1dd5897f53647390a7622795541bc89f8a84fe2
Analyze and fix the following issue in the Linux kernel code: ASoC: core: Don't overwrite .poweroff in snd_soc_pm_ops
Problem Details: SET_SYSTEM_SLEEP_PM_OPS writes .poweroff = *_resume once. Then we overwrite it again explicitly as .poweroff = snd_soc_poweroff. Even though it works, as the second one overwrites the first one, this is not the correct way. Fix this by expanding SET_SYSTEM_SLEEP_PM_OPS in our structure. Signed-off-by:...
```diff diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index fc0fd3485e7d..1bdc67e0bd16 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1718,8 +1718,12 @@ int snd_soc_poweroff(struct device *dev) EXPORT_SYMBOL_GPL(snd_soc_poweroff); const struct dev_pm_ops snd_soc_pm_ops = { - SET_SYSTEM_...
87997aaa1bad1fc37e4ff7eb27850172017017a0
Analyze and fix the following issue in the Linux kernel code: iommu/omap: fix NULL pointer dereference
Problem Details: Fix this: root@omap4430-panda:~# cat /debug/iommu/ducati/mem [ 62.725708] Unable to handle kernel NULL pointer dereference at virtual addre ss 0000001c [ 62.725708] pgd = e6240000 [ 62.737091] [0000001c] *pgd=a7168831, *pte=00000000, *ppte=00000000 [ 62.743682] Internal error: Oops: 17 [#1] SM...
```diff diff --git a/drivers/iommu/omap-iommu-debug.c b/drivers/iommu/omap-iommu-debug.c index bad9f9da990d..103dbd92e256 100644 --- a/drivers/iommu/omap-iommu-debug.c +++ b/drivers/iommu/omap-iommu-debug.c @@ -274,7 +274,7 @@ static ssize_t debug_read_mem(struct file *file, char __user *userbuf, mutex_lock(&iommu_de...
46451d6229723ce1428c69e5b4f3308a775473fd
Analyze and fix the following issue in the Linux kernel code: iommu/omap: fix erroneous omap-iommu-debug API calls
Problem Details: Adapt omap-iommu-debug to the latest omap-iommu API changes, which were introduced by commit fabdbca "iommu/omap: eliminate the public omap_find_iommu_device() method". In a nutshell, iommu users are not expected to provide the omap_iommu handle anymore - instead, iommus are attached using their user'...
```diff diff --git a/drivers/iommu/omap-iommu-debug.c b/drivers/iommu/omap-iommu-debug.c index 288da5c1499d..bad9f9da990d 100644 --- a/drivers/iommu/omap-iommu-debug.c +++ b/drivers/iommu/omap-iommu-debug.c @@ -44,7 +44,8 @@ static ssize_t debug_read_ver(struct file *file, char __user *userbuf, static ssize_t debug_re...
189017c25c8497760c89646c06297c37d6cde072
Analyze and fix the following issue in the Linux kernel code: fs: Remove missed ->fds_bits from cessation use of fd_set structs internally
Problem Details: Stephen Rothwell reported that the following commit broke the linux-next build: 1fd36adcd98c: Replace the fd_sets in struct fdtable with an array of unsigned longs Fix places where ->fds_bits needed to be removed as the core kernel no longer uses fd_set internally for file descriptor table manageme...
```diff diff --git a/arch/mips/kernel/kspd.c b/arch/mips/kernel/kspd.c index 29811f043399..84d0639e4580 100644 --- a/arch/mips/kernel/kspd.c +++ b/arch/mips/kernel/kspd.c @@ -326,7 +326,7 @@ static void sp_cleanup(void) i = j * __NFDBITS; if (i >= fdt->max_fds) break; - set = fdt->open_fds->fds_bits[j++]; + ...
28b8df77449faa03b573638e089a855f8d25e0ed
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix init request completion with AMP controllers
Problem Details: Mark request status as done for Read Local Version HCI command. In AMP initialization this HCI command is the last and needs to be completed. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
```diff diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 3e817fed7706..e920cd520a82 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -620,7 +620,7 @@ static void hci_cc_read_local_version(struct hci_dev *hdev, struct sk_buff *skb) BT_DBG("%s status 0x%x", hdev->name, r...
3159d3843aa628b0ee9e8ef4b4fe8c935500c03f
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix init request completion with old controllers
Problem Details: With Bluetooth 1.1 controllers the last command in the HCI init sequence will be a write_local_name, however there was no callback to indicate init request completion in this case. This patch fixes the issue by adding the necessary callback to the write_local_name_complete handler. Signed-off-by: Joha...
```diff diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index fb6543b60dec..3e817fed7706 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -217,6 +217,8 @@ static void hci_cc_write_local_name(struct hci_dev *hdev, struct sk_buff *skb) memcpy(hdev->dev_name, sent, HCI_MAX_NA...
7d367e06688dc7a2cc98c2ace04e1296e1d987e2
Analyze and fix the following issue in the Linux kernel code: netfilter: ctnetlink: fix soft lockup when netlink adds new entries (v2)
Problem Details: Marcell Zambo and Janos Farago noticed and reported that when new conntrack entries are added via netlink and the conntrack table gets full, soft lockup happens. This is because the nf_conntrack_lock is held while nf_conntrack_alloc is called, which is in turn wants to lock nf_conntrack_lock while evic...
```diff diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h index 8a2b0ae7dbd2..ab86036bbf0c 100644 --- a/include/net/netfilter/nf_conntrack.h +++ b/include/net/netfilter/nf_conntrack.h @@ -209,7 +209,7 @@ extern struct nf_conntrack_tuple_hash * __nf_conntrack_find(struct net *net,...
279072882dc0149e5740dace075e1a49f087046d
Analyze and fix the following issue in the Linux kernel code: Revert "netfilter: ctnetlink: fix soft lockup when netlink adds new entries"
Problem Details: This reverts commit af14cca162ddcdea017b648c21b9b091e4bf1fa4. This patch contains a race condition between packets and ctnetlink in the conntrack addition. A new patch to fix this issue follows up. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
```diff diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index cc705175765c..9307b033c0c9 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c @@ -1367,12 +1367,15 @@ ctnetlink_create_conntrack(struct net *net, u16 zone, nf_ct_pr...
c5cc5ed86667d4ae74fe40ee4ed893f4b46aba05
Analyze and fix the following issue in the Linux kernel code: usb: fsl_udc_core: Fix scheduling while atomic dump message
Problem Details: When loading g_ether gadget, there is below message: Backtrace: [<80012248>] (dump_backtrace+0x0/0x10c) from [<803cb42c>] (dump_stack+0x18/0x1c) r7:00000000 r6:80512000 r5:8052bef8 r4:80513f30 [<803cb414>] (dump_stack+0x0/0x1c) from [<8000feb4>] (show_regs+0x44/0x50) [<8000fe70>] (show_regs+0x0/0x50) ...
```diff diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c index b54357350422..8db5a666e2ab 100644 --- a/drivers/usb/gadget/fsl_udc_core.c +++ b/drivers/usb/gadget/fsl_udc_core.c @@ -769,7 +769,7 @@ static void fsl_queue_td(struct fsl_ep *ep, struct fsl_req *req) * @is_last: return fla...
3b2a2e47174cd978258bbb0fdf2e2b1b5ec2144c
Analyze and fix the following issue in the Linux kernel code: usb: renesas_usbhs: bugfix: add .release function to gpriv->gadget.dev
Problem Details: This patch fixup below warning on device_unregister() renesas_usbhs renesas_usbhs.1: host probed renesas_usbhs renesas_usbhs.1: gadget probed renesas_usbhs renesas_usbhs.1: irq request err ------------[ cut here ]------------ WARNING: at ${LINUX}/drivers/base/core.c:1) Device 'gadget' does not have a ...
```diff diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c index 528691d5f3e2..f37b20c82c80 100644 --- a/drivers/usb/renesas_usbhs/mod_gadget.c +++ b/drivers/usb/renesas_usbhs/mod_gadget.c @@ -941,6 +941,11 @@ static int usbhsg_stop(struct usbhs_priv *priv) return usbhsg_try_...
f9c56cdd3905c96c600456203637bd7ec8ec6383
Analyze and fix the following issue in the Linux kernel code: usb: gadget: Clear usb_endpoint_descriptor inside the struct usb_ep on disable
Problem Details: This fix a bug in f_serial, which expect the ep->desc to be NULL after disabling an endpoint. Cc: stable@vger.kernel.org Signed-off-by: Ido Shayevitz <idos@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
```diff diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index a696bde53222..a1a04d00a9e4 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -440,6 +440,7 @@ static int __dwc3_gadget_ep_disable(struct dwc3_ep *dep) dep->stream_capable = false; dep->desc = NULL; + dep->endp...
5e0c03c8cd40e5c3b7ba624b8ba9a343de79ade1
Analyze and fix the following issue in the Linux kernel code: net: Support RX-ALL feature flag.
Problem Details: This flag requests that network devices pass all received frames up the stack, even ones with errors such as invalid FCS (frame check sum). This will allow sniffers to see bad packets and perhaps give the user some idea how to fix the problem. Signed-off-by: Ben Greear <greearb@candelatech.com> Teste...
```diff diff --git a/Documentation/networking/netdev-features.txt b/Documentation/networking/netdev-features.txt index 7d2781230d30..4164f5c02e4b 100644 --- a/Documentation/networking/netdev-features.txt +++ b/Documentation/networking/netdev-features.txt @@ -158,3 +158,10 @@ VLANs. This may be not useful, though.] Thi...
97387e3baaf3c35ad560f8878e943c720a77da1b
Analyze and fix the following issue in the Linux kernel code: LDM: Fix reassembly of extended VBLKs.
Problem Details: From: Ben Hutchings <ben@decadent.org.uk> Extended VBLKs (those larger than the preset VBLK size) are divided into fragments, each with its own VBLK header. Our LDM implementation generally assumes that each VBLK is contiguous in memory, so these fragments must be assembled before further processing....
```diff diff --git a/block/partitions/ldm.c b/block/partitions/ldm.c index bd8ae788f689..e507cfbd044e 100644 --- a/block/partitions/ldm.c +++ b/block/partitions/ldm.c @@ -2,7 +2,7 @@ * ldm - Support for Windows Logical Disk Manager (Dynamic Disks) * * Copyright (C) 2001,2002 Richard Russon <ldm@flatcap.org> - * C...
02dfc496800dfaf17b650256642f3df86653fe97
Analyze and fix the following issue in the Linux kernel code: Input: evdev - fix variable initialisation
Problem Details: Commit 509f87c5f564 (evdev - do not block waiting for an event if fd is nonblock) created a code path were it was possible to use retval uninitialized. This could lead to the xorg evdev input driver getting corrupt data and refusing to work with log messages like AUO-Pixcir touchscreen: Read error: S...
```diff diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index afc166fcc3d9..7df5bfef2624 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c @@ -332,7 +332,7 @@ static ssize_t evdev_write(struct file *file, const char __user *buffer, struct evdev_client *client = file->private_data; struct evd...
99c90ab31fad855b9da9dee3a5aa6c27f263e9d6
Analyze and fix the following issue in the Linux kernel code: Input: ALPS - fix touchpad detection when buttons are pressed
Problem Details: ALPS touchpad detection fails if some buttons of ALPS are pressed. The reason is that the "E6" query response byte is different from what is expected. This was tested on a Toshiba Portege R500. Cc: stable <stable@vger.kernel.org> Signed-off-by: Akio Idehara <zbe64533@gmail.com> Tested-by: Seth Forshe...
```diff diff --git a/Documentation/input/alps.txt b/Documentation/input/alps.txt index f274c28b5103..2f95308251d4 100644 --- a/Documentation/input/alps.txt +++ b/Documentation/input/alps.txt @@ -13,7 +13,8 @@ Detection All ALPS touchpads should respond to the "E6 report" command sequence: E8-E6-E6-E6-E9. An ALPS to...
5d69703263d588dbb03f4e57091afd8942d96e6d
Analyze and fix the following issue in the Linux kernel code: davinci_emac: Do not free all rx dma descriptors during init
Problem Details: This patch fixes a regression that was introduced by commit 0a5f38467765ee15478db90d81e40c269c8dda20 davinci_emac: Add Carrier Link OK check in Davinci RX Handler Said commit adds a check whether the carrier link is ok. If the link is not ok, the skb is freed and no new dma descriptor added to the rx...
```diff diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c index 4fa0bcb25dfc..4b2f54565f64 100644 --- a/drivers/net/ethernet/ti/davinci_emac.c +++ b/drivers/net/ethernet/ti/davinci_emac.c @@ -1009,7 +1009,7 @@ static void emac_rx_handler(void *token, int len, int status) int...
b4ad0428139491355ea8742294c77942c312c5bb
Analyze and fix the following issue in the Linux kernel code: davinci_cpdma: Fix channel number written to teardown registers
Problem Details: chan->chan_num is 0..CPDMA_MAX_CHANNELS-1 for tx channels and CPDMA_MAX_CHANNELS..2*CPDMA_MAX_CHANNELS-1 for rx channels. However, the rx and tx teardown registers expect zero based channel numbering. Since the upper bits of the registers are reserved, the teardown also worked before, this patch is cl...
```diff diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c index c97d2f590855..34558766cbf0 100644 --- a/drivers/net/ethernet/ti/davinci_cpdma.c +++ b/drivers/net/ethernet/ti/davinci_cpdma.c @@ -822,7 +822,7 @@ int cpdma_chan_stop(struct cpdma_chan *chan) dma_reg_write(ctlr...
0ae57bb3df562e57ac89ad7bc524b6f2e83235f9
Analyze and fix the following issue in the Linux kernel code: be2net: fix tx completion cleanup
Problem Details: As a part of be_close(), instead of waiting for a max of 200ms for each TXQ, wait for a total of 200ms for completions from all TXQs to arrive. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index 68408d5bb0d7..36ad9a7ef4ba 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -1563,51 +1563,62 @@ static void be_rx_cq_clean(struct be_rx_obj *...
74eb436ec057e31e35addda35f9b94ee813cb633
Analyze and fix the following issue in the Linux kernel code: ARM: mach-shmobile: r8a7779 PFC IPSR4 fix
Problem Details: Fix the bit field width information for the IPSR4 register in the r8a7779 pin function controller (PFC). Without this fix the Marzen board fails to receive data over the serial console due to misconfigured pin function for the RX pin. Signed-off-by: Magnus Damm <damm@opensource.se> Tested-by: Kuninor...
```diff diff --git a/arch/arm/mach-shmobile/pfc-r8a7779.c b/arch/arm/mach-shmobile/pfc-r8a7779.c index 963532f2b2c4..d14c9b048077 100644 --- a/arch/arm/mach-shmobile/pfc-r8a7779.c +++ b/arch/arm/mach-shmobile/pfc-r8a7779.c @@ -2120,7 +2120,7 @@ static struct pinmux_cfg_reg pinmux_config_regs[] = { FN_AUDATA3, 0, ...
689189fb014203965ed89833d8d5566424540c9d
Analyze and fix the following issue in the Linux kernel code: ARM: mach-shmobile: sh73a0 PSTR 32-bit access fix
Problem Details: Convert the sh73a0 SMP code to use 32-bit PSTR access. This fixes wakeup from deep sleep for sh73a0 secondary CPUs. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c index 0d159d64a345..2d0d4212be41 100644 --- a/arch/arm/mach-shmobile/smp-sh73a0.c +++ b/arch/arm/mach-shmobile/smp-sh73a0.c @@ -80,7 +80,7 @@ int __cpuinit sh73a0_boot_secondary(unsigned int cpu) /* enable cache coherency *...
1ae911cba414f7e805b2cb3798fa402b36a21601
Analyze and fix the following issue in the Linux kernel code: sh: Fix sh2a build error for CONFIG_CACHE_WRITETHROUGH
Problem Details: Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/mm/cache-sh2a.c b/arch/sh/mm/cache-sh2a.c index ae08cbbfa569..949e2d3138a0 100644 --- a/arch/sh/mm/cache-sh2a.c +++ b/arch/sh/mm/cache-sh2a.c @@ -23,6 +23,7 @@ #define MAX_OCACHE_PAGES 32 #define MAX_ICACHE_PAGES 32 +#ifdef CONFIG_CACHE_WRITEBACK static void sh2a_flush_oc_line(unsigned...
ecfb68c673dc71579b53a46fa22168e7a11f2f19
Analyze and fix the following issue in the Linux kernel code: sh: Fix typo in pci-sh7780.c
Problem Details: Correct spelling "erorr" to "error" in arch/sh/drivers/pci/pci-sh7780.c Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/drivers/pci/pci-sh7780.c b/arch/sh/drivers/pci/pci-sh7780.c index fa7b978cc727..fb8f14990743 100644 --- a/arch/sh/drivers/pci/pci-sh7780.c +++ b/arch/sh/drivers/pci/pci-sh7780.c @@ -74,7 +74,7 @@ struct pci_errors { { SH4_PCIINT_MLCK, "master lock error" }, { SH4_PCIINT_TABT, "target-ta...
5bfa14ed9f3ca21fcecbcfbf4a848c002b740c41
Analyze and fix the following issue in the Linux kernel code: PCI: convert bus addresses to resource when reading BARs
Problem Details: Some PCI host bridges translate CPU addresses to PCI bus addresses. Previously, we initialized pci_dev resources with PCI bus addresses, then converted them to CPU addresses later in arch-specific code (pcibios_fixup_resources()), which leaves a window of time where the pci_dev resources are incorrect....
```diff diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 3f07cb6bae32..3539171d8a98 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -61,6 +61,63 @@ static struct pci_host_bridge *pci_host_bridge(struct pci_dev *dev) return NULL; } +static bool resource_contains(struct resource *res1, stru...
3c13be017abe041e495862d50dbd83093e09cd6a
Analyze and fix the following issue in the Linux kernel code: powerpc/PCI: make pci_probe_only default to 0
Problem Details: pci_probe_only is set on ppc64 to prevent resource re-allocation by the core. It's meant to be used in very specific circumstances such as when operating under a hypervisor that may prevent such re-allocation. Instead of default to 1, we make it default to 0 and explicitly set it in the few cases wher...
```diff diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 3318d39b7d4c..f627eb7be9e2 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c @@ -33,7 +33,7 @@ #include <asm/machdep.h> #include <asm/ppc-pci.h> -unsigned long pci_probe_only = 1; +unsigned long pci_pro...
1adbfa3511ee1c1118e16a9a0246870f12fef4e6
Analyze and fix the following issue in the Linux kernel code: x86, efi: Allow basic init with mixed 32/64-bit efi/kernel
Problem Details: Traditionally the kernel has refused to setup EFI at all if there's been a mismatch in 32/64-bit mode between EFI and the kernel. On some platforms that boot natively through EFI (Chrome OS being one), we still need to get at least some of the static data such as memory configuration out of EFI. Runti...
```diff diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h index 844f735fd63a..c9dcc181d4d1 100644 --- a/arch/x86/include/asm/efi.h +++ b/arch/x86/include/asm/efi.h @@ -95,7 +95,7 @@ extern void __iomem *efi_ioremap(unsigned long addr, unsigned long size, extern int add_efi_memmap; extern void efi...
f044db4cb4bf16893812d35b5fbeaaf3e30c9215
Analyze and fix the following issue in the Linux kernel code: fs: Fix close_on_exec pointer in alloc_fdtable
Problem Details: alloc_fdtable allocates space for the open_fds and close_on_exec bitfields together, as 2 * nr / BITS_PER_BYTE. close_on_exec needs to point to open_fds + nr / BITS_PER_BYTE, not open_fds + nr / BITS_PER_LONG, as introducted in 1fd36adc: Replace the fd_sets in struct fdtable with an array of unsigned ...
```diff diff --git a/fs/file.c b/fs/file.c index 2d479dd8484e..171f6b41b4cd 100644 --- a/fs/file.c +++ b/fs/file.c @@ -179,7 +179,7 @@ static struct fdtable * alloc_fdtable(unsigned int nr) if (!data) goto out_arr; fdt->open_fds = data; - data += nr / BITS_PER_LONG; + data += nr / BITS_PER_BYTE; fdt->close_on_...
640ba2444fa95261f23a2b86e69aabe723332bed
Analyze and fix the following issue in the Linux kernel code: drivers/video/pxa168fb.c: use devm_ functions
Problem Details: The various devm_ functions allocate memory that is released when a driver detaches. This patch uses these functions for data that is allocated in the probe function of a platform device and is only freed in the remove function. By using devm_ioremap, it also removes a potential memory leak, because ...
```diff diff --git a/drivers/video/pxa168fb.c b/drivers/video/pxa168fb.c index 8384b941f6ba..f146089261f4 100644 --- a/drivers/video/pxa168fb.c +++ b/drivers/video/pxa168fb.c @@ -21,6 +21,7 @@ #include <linux/fb.h> #include <linux/delay.h> #include <linux/init.h> +#include <linux/io.h> #include <linux/ioport.h> #i...
38232f7bd112bba6dd65309a218f21d3171c84fd
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP2+: Fix zoom LCD backlight if TWL_CORE is not selected
Problem Details: Otherwise we get: arch/arm/mach-omap2/board-zoom-display.c:64: undefined reference to `twl_i2c_read_u8' arch/arm/mach-omap2/board-zoom-display.c:65: undefined reference to `twl_i2c_read_u8' arch/arm/mach-omap2/board-zoom-display.c:84: undefined reference to `twl_i2c_write_u8' arch/arm/mach-omap2/board...
```diff diff --git a/arch/arm/mach-omap2/board-zoom-display.c b/arch/arm/mach-omap2/board-zoom-display.c index d4683ba5f721..2a13b9f6c61c 100644 --- a/arch/arm/mach-omap2/board-zoom-display.c +++ b/arch/arm/mach-omap2/board-zoom-display.c @@ -55,6 +55,7 @@ static void zoom_panel_disable_lcd(struct omap_dss_device *dssd...
cc4915d8a0bbe6825eb9fc2c687a0151441af7db
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP2+: Fix board_mux section type conflict when OMAP_MUX is not set
Problem Details: Otherwise we can get: arch/arm/mach-omap2/mux.h:249:31: error: board_mux causes a section type conflict Signed-off-by: Tony Lindgren <tony@atomide.com>
```diff diff --git a/arch/arm/mach-omap2/mux.h b/arch/arm/mach-omap2/mux.h index 2132308ad1e4..69fe060a0b75 100644 --- a/arch/arm/mach-omap2/mux.h +++ b/arch/arm/mach-omap2/mux.h @@ -246,7 +246,7 @@ static inline void omap_hwmod_mux(struct omap_hwmod_mux_info *hmux, u8 state) { } -static struct omap_board_mux *boar...
e3a98fe11b296b833ac540fbc19f407c790fdc05
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP2+: Fix OMAP_HDQ_BASE build error
Problem Details: If CONFIG_SOC_OMAP3430 is not set and CONFIG_HDQ_MASTER_OMAP is selected for w1 driver we get the following error: arch/arm/mach-omap2/devices.c:662:13: error: 'OMAP_HDQ_BASE' undeclared here (not in a function) Looks like OMAP_HDQ_BASE is valid for all omaps except 2420, so we can remove the ifdef a...
```diff diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 283d11eae693..3ffefe275ea0 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -654,9 +654,7 @@ void __init omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data) /*------------------------------...
b2a5124e596e51619e4fbf72fde5baf84538285d
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP2+: Fix Kconfig dependencies for USB_ARCH_HAS_EHCI
Problem Details: Otherwise we get: warning: (ARCH_OMAP3 && ARCH_OMAP4) selects USB_ARCH_HAS_EHCI which has unmet direct dependencies (USB_SUPPORT) Signed-off-by: Tony Lindgren <tony@atomide.com>
```diff diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index d965da45160e..337f98dd8148 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -32,7 +32,7 @@ config ARCH_OMAP3 depends on ARCH_OMAP2PLUS default y select CPU_V7 - select USB_ARCH_HAS_EHCI + select USB_A...
ed8dfd22ea2533a1b169881c3de94be8daa0e297
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP2+: I2C: always compile I2C reset code, even if I2C driver is not built
Problem Details: During kernel init, we reset all IP blocks on the OMAP that we can, even if there is no driver compiled for that IP block. Unlike most IP blocks, the I2C block requires some extra programming for this to work. This reset code is incorrectly omitted when the I2C driver is deselected. In this circumst...
```diff diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index bd76394ccaf8..56a6e98652cc 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -4,7 +4,7 @@ # Common support obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer.o pm.o \ - common.o gpio...
e29206381a1436e0f47c0f5b9a23159a03c57715
Analyze and fix the following issue in the Linux kernel code: viafb: fix IGA1 modesetting on VX900
Problem Details: Even if the documentation calls this bit "Reserved" it has to be set to 0 for correct modesetting on IGA1. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: stable@vger.kernel.org
```diff diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c index 8bdf80e270e2..8497727d66de 100644 --- a/drivers/video/via/hw.c +++ b/drivers/video/via/hw.c @@ -1810,6 +1810,9 @@ static void hw_init(void) break; } + /* magic required on VX900 for correct modesetting on IGA1 */ + via_write_reg_mask(VIAC...
050f0e02c8dc38b2b4f2df345ac760d22ca5c7ba
Analyze and fix the following issue in the Linux kernel code: viafb: select HW scaling on VX900 for IGA2
Problem Details: VX900 can do hardware scaling for both IGAs in contrast to previous hardware which could do it only for IGA2. This patch ensures that we set the parameter for IGA2 and not for IGA1. This fixes hardware scaling on VX900 until we have the infrastructure to support it for both IGAs. Signed-off-by: Floria...
```diff diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c index d5aaca9cfa7e..8bdf80e270e2 100644 --- a/drivers/video/via/hw.c +++ b/drivers/video/via/hw.c @@ -1811,6 +1811,7 @@ static void hw_init(void) } /* probably this should go to the scaling code one day */ + via_write_reg_mask(VIACR, 0xFD, 0, 0x...
dc38d82676d87a21a0f924cb1728f869412749a9
Analyze and fix the following issue in the Linux kernel code: ARM: 7344/1: pxa: mainstone: add missing include for IRQ_BOARD_START
Problem Details: As part of mach/irqs.h include removal from sparse, mainstone.h was missed. This fixes the compile of the pcmcia driver. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-pxa/include/mach/mainstone.h b/arch/arm/mach-pxa/include/mach/mainstone.h index 4c2d11cd824d..1bfc4e822a41 100644 --- a/arch/arm/mach-pxa/include/mach/mainstone.h +++ b/arch/arm/mach-pxa/include/mach/mainstone.h @@ -13,6 +13,8 @@ #ifndef ASM_ARCH_MAINSTONE_H #define ASM_ARCH_MAINSTO...
24b78d0f49b94f658e8bae707c158962535053dd
Analyze and fix the following issue in the Linux kernel code: Bluetooth: mgmt: Fix clear_uuids response
Problem Details: Since the clear_uuids operation doesn't send an immediate HCI command but just sets off a timer to wait for subsequent add_uuid calls it doesn't make sense to wait until the timer fires off to send the response. Instead send the response immediately. Signed-off-by: Johan Hedberg <johan.hedberg@intel.c...
```diff diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 7a906d6e0236..07e31f73f703 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -1394,6 +1394,20 @@ failed: return err; } +static bool enable_service_cache(struct hci_dev *hdev) +{ + if (!hdev_is_powered(hdev)) + return false; + + i...
90e704543d6702971ecfe3fe2325829d89b76f6b
Analyze and fix the following issue in the Linux kernel code: Bluetooth: mgmt: Fix dev_class related command response timing
Problem Details: All mgmt commands that may fire off a hci_write_class_of_device command should wait for the completion of the HCI command before sending a response to user space. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 9f912dc71bae..7a906d6e0236 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -1332,6 +1332,7 @@ failed: static int add_uuid(struct sock *sk, u16 index, void *data, u16 len) { struct mgmt_cp_add_uuid *cp = data; + struct pending_cmd...
b8e3995af4c7da7707b1710332a31f66e06b74dc
Analyze and fix the following issue in the Linux kernel code: netdev/phy/icplus: Correct broken phy_init code
Problem Details: The code for ip1001_config_init() was totally broken if you were not using RGMII. Instead of returning an error code or zero it actually returned the value in the IP1001_SPEC_CTRL_STATUS_2 register. It was also trying to set the IP1001_APS_ON bit , but never actually wrote back the register. The error...
```diff diff --git a/drivers/net/phy/icplus.c b/drivers/net/phy/icplus.c index c81f136ae670..7ee4f5822bb9 100644 --- a/drivers/net/phy/icplus.c +++ b/drivers/net/phy/icplus.c @@ -98,20 +98,24 @@ static int ip175c_config_init(struct phy_device *phydev) static int ip1xx_reset(struct phy_device *phydev) { - int err, b...
7e55d0527e4925a49464a5b26fdabae1f7a91a77
Analyze and fix the following issue in the Linux kernel code: ARM: 7339/1: amba/serial.h: Include types.h for resolving dependency of type bool
Problem Details: serial.h uses bool, but its definition is missing, as it doesn't include types.h. Fix this by including types.h Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/include/linux/amba/serial.h b/include/linux/amba/serial.h index 514ed45c462e..d117b29d1062 100644 --- a/include/linux/amba/serial.h +++ b/include/linux/amba/serial.h @@ -23,6 +23,8 @@ #ifndef ASM_ARM_HARDWARE_SERIAL_AMBA_H #define ASM_ARM_HARDWARE_SERIAL_AMBA_H +#include <linux/types.h> + /* -...
03606895cd98c0a628b17324fd7b5ff15db7e3cd
Analyze and fix the following issue in the Linux kernel code: ipsec: be careful of non existing mac headers
Problem Details: Niccolo Belli reported ipsec crashes in case we handle a frame without mac header (atm in his case) Before copying mac header, better make sure it is present. Bugzilla reference: https://bugzilla.kernel.org/show_bug.cgi?id=42809 Reported-by: Niccolò Belli <darkbasic@linuxsystems.it> Tested-by: Nicc...
```diff diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 50db9b04a552..ae86adee3746 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -1465,6 +1465,16 @@ static inline void skb_set_mac_header(struct sk_buff *skb, const int offset) } #endif /* NET_SKBUFF_DATA_USES_OFFSET */ +stati...
85091fc0a75653e239dc8379658515e577544927
Analyze and fix the following issue in the Linux kernel code: brcm80211: smac: fix endless retry of A-MPDU transmissions
Problem Details: The A-MPDU code checked against a retry limit, but it was using the wrong variable to do so. This patch fixes this to assure proper retry mechanism. This problem had a side-effect causing the mac80211 flush callback to remain waiting forever as well. That side effect has been fixed by commit by Stanis...
```diff diff --git a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c index 90911eec0cf5..92652264f205 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c @@ -1051,17 +1051,13 @@ brcms_c_ampdu_dotxstatus_comp...
f796841e49fe086176e27ed0e1f3f7a1123a4a6b
Analyze and fix the following issue in the Linux kernel code: PCI: fix memleak for pci dev removing during hotplug
Problem Details: unreferenced object 0xffff880276d17700 (size 64): comm "swapper/0", pid 1, jiffies 4294897182 (age 3976.028s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 18 f9 de 76 02 88 ff ff ...........v.... 10 00 00 00 0e 00 00 00 0f 28 40 00 00 00 00 00 .........(@..... backtrace: [<fff...
```diff diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 9c89447e7b21..e7dfcd447571 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -1916,6 +1916,15 @@ void pci_allocate_cap_save_buffers(struct pci_dev *dev) "unable to preallocate PCI-X save buffer\n"); } +void pci_free_cap_save_buffers(struct ...
2dd8ba921d570fcd016f8038c63fa9668892d16b
Analyze and fix the following issue in the Linux kernel code: PCI: Fix device class print out
Problem Details: Found debug print of class is shifted. | pci 0000:f8:15.2: [8086:2b56] type 0 class 0x000600 Code is trying to print class with 6 digits, but use shifted class with 4 digits valid value as variable. Change to original dev->class directly. Also remove not needed calculating of local variable class, ...
```diff diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 9f2ff8c5dc2f..aa9b1dec0d3e 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -926,12 +926,10 @@ int pci_setup_device(struct pci_dev *dev) pci_read_config_dword(dev, PCI_CLASS_REVISION, &class); dev->revision = class & 0xff; - class >...
9246a8693e74b3480913cf6e0c2d472267169990
Analyze and fix the following issue in the Linux kernel code: Bluetooth: mgmt: Fix clear UUIDs response
Problem Details: We also need to send a proper response when clearing UUIDs. This patch adds fixes the missing response for this use case. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 30a30b7b301c..93f2c1348add 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -1401,7 +1401,7 @@ static int remove_uuid(struct sock *sk, u16 index, void *data, u16 len) schedule_delayed_work(&hdev->service_cache, msecs_to_jiff...
1cc1c96c1658bfaf85d06d764bd7ac00640ae90f
Analyze and fix the following issue in the Linux kernel code: PCI: fix memleak when ACPI _CRS is not used.
Problem Details: warning: unreferenced object 0xffff8801f6914200 (size 512): comm "swapper/0", pid 1, jiffies 4294893643 (age 2664.644s) hex dump (first 32 bytes): 00 00 c0 fe 00 00 00 00 ff ff ff ff 00 00 00 00 ................ 60 58 2f f6 03 88 ff ff 00 02 00 00 00 00 00 00 `X/............. backtrace:...
```diff diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index a312e76063a7..c33e0970ee9f 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c @@ -282,9 +282,6 @@ static void add_resources(struct pci_root_info *info) int i; struct resource *res, *root, *conflict; - if (!pci_use_crs) - return; - coa...
1184893439b1a7532b579a85a354db12bbf1b277
Analyze and fix the following issue in the Linux kernel code: PCI: Fix "cardbus bridge resources as optional" size handling
Problem Details: We should not set the requested size to -2; that will confuse the resource list sorting with align when SIZEALIGN is used. Change to STARTALIGN and pass align from start; we are safe to do that just as we do that regular pci bridge. In the long run, we should just treat cardbus like a regular pci br...
```diff diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index d5897c32f669..3b3932a6465f 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -898,21 +898,30 @@ static void pci_bus_size_cardbus(struct pci_bus *bus, { struct pci_dev *bridge = bus->self; struct resource *b_res = &brid...
dcef0d06b34a80071da4496556e85f9bf3b3c0bf
Analyze and fix the following issue in the Linux kernel code: PCI: Disable cardbus bridge MEM1 prefetchable bit
Problem Details: Some BIOSes enable prefetch on both MEM0 and MEM1. But the cardbus code assumes MEM1 is non-pref... Discussion could be found at: https://lkml.org/lkml/2012/1/12/1 https://bugzilla.kernel.org/show_bug.cgi?id=41622#c23 Signed-off-by: Yinghai Lu <yinghai@kernel.org> Tested-by: Dominik Brodowski <lin...
```diff diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 090217afb4e1..d5897c32f669 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -914,6 +914,14 @@ static void pci_bus_size_cardbus(struct pci_bus *bus, if (realloc_head) add_to_list(realloc_head, bridge, b_res+1, pci_card...
655850ed7e3e90dcb5ae88ae63f75acbf5465213
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP2: fix mailbox init code
Problem Details: Fix this: arch/arm/mach-omap2/mailbox.c: In function 'omap2_mbox_probe': arch/arm/mach-omap2/mailbox.c:354: error: 'omap2_mboxes' undeclared (first use in this function) arch/arm/mach-omap2/mailbox.c:354: error: (Each undeclared identifier is reported only once arch/arm/mach-omap2/mailbox.c:354: error...
```diff diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c index 609ea2ded7e3..415a6f1cf419 100644 --- a/arch/arm/mach-omap2/mailbox.c +++ b/arch/arm/mach-omap2/mailbox.c @@ -281,8 +281,16 @@ static struct omap_mbox mbox_iva_info = { .ops = &omap2_mbox_ops, .priv = &omap2_mbox_iva_priv, }; ...
e4b0b2cbbbaa085103229c03820755f20a64e581
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP2+: gpmc-smsc911x: add required smsc911x regulators
Problem Details: This fixes smsc911x support on platforms using gpmc_smsc911x_init(). Commit c7e963f6888816 (net/smsc911x: Add regulator support) added the requirement that platforms provide vdd33a and vddvario supplies. Signed-off-by: Matt Porter <mporter@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
```diff diff --git a/arch/arm/mach-omap2/gpmc-smsc911x.c b/arch/arm/mach-omap2/gpmc-smsc911x.c index 997033129d26..bbb870c04a5e 100644 --- a/arch/arm/mach-omap2/gpmc-smsc911x.c +++ b/arch/arm/mach-omap2/gpmc-smsc911x.c @@ -19,6 +19,8 @@ #include <linux/interrupt.h> #include <linux/io.h> #include <linux/smsc911x.h> +...
5ed80a75b248bfaf840ea6b38f941edcf6ee7dc7
Analyze and fix the following issue in the Linux kernel code: ASoC: i.MX SSI: Fix DSP_A format.
Problem Details: According to i.MX27 Reference Manual (p 1593) TXBIT0 bit selects whether the most significant or the less significant part of the data word written to the FIFO is transmitted. As DSP_A is the same as DSP_B with a data offset of 1 bit, it doesn't make any sense to remove TXBIT0 bit here. Signed-off-by...
```diff diff --git a/sound/soc/imx/imx-ssi.c b/sound/soc/imx/imx-ssi.c index 01d1f749cf02..b6adbed6e506 100644 --- a/sound/soc/imx/imx-ssi.c +++ b/sound/soc/imx/imx-ssi.c @@ -112,7 +112,7 @@ static int imx_ssi_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt) break; case SND_SOC_DAIFMT_DSP_A: /* data o...
8a236f3f1a0e65de526c5e169eb8d7a758ffde9e
Analyze and fix the following issue in the Linux kernel code: ALSA: ctxfi: Fix typo in ctvmem.c
Problem Details: Correct spelling "virtural" to "virtual" in sound/pci/ctxfi/ctvmem.c Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/ctxfi/ctvmem.c b/sound/pci/ctxfi/ctvmem.c index b78f3fc3c33c..6109490b83e8 100644 --- a/sound/pci/ctxfi/ctvmem.c +++ b/sound/pci/ctxfi/ctvmem.c @@ -36,7 +36,7 @@ get_vm_block(struct ct_vm *vm, unsigned int size) size = CT_PAGE_ALIGN(size); if (size > vm->size) { - printk(KERN_ERR "...
4e9bb47bd29e02f2daaa7bdb2a8ddf977bf76f06
Analyze and fix the following issue in the Linux kernel code: drm/i915: fix a sprite watermark computation to avoid divide by zero if xpos<0
Problem Details: When setting overlay position with x<0, it will divide 0 and make drm driver crash. Signed-off-by: Hai Lan <hai.lan@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
```diff diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index f3afec2854d8..e654f32de197 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -4680,8 +4680,17 @@ sandybridge_compute_sprite_srwm(struct drm_device *dev, int plane, crt...
81b5482c32769abb6dfb979560dab2f952ba86fa
Analyze and fix the following issue in the Linux kernel code: mfd: Fix ACPI conflict check
Problem Details: The code is currently always checking the first resource of every device only (several times.) This has been broken since the ACPI check was added in February 2010 in commit 91fedede0338eb6203cdd618d8ece873fdb7c22c. Fix the check to run on each resource individually, once. Signed-off-by: Jean Delvare...
```diff diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c index 0f5922812bff..411f523d4878 100644 --- a/drivers/mfd/mfd-core.c +++ b/drivers/mfd/mfd-core.c @@ -123,7 +123,7 @@ static int mfd_add_device(struct device *parent, int id, } if (!cell->ignore_resource_conflicts) { - ret = acpi_check_resou...
5ca0c34ae28344b6b4ca3036bc82f89c8db16a59
Analyze and fix the following issue in the Linux kernel code: drm/i915: fix mode set on load pipe. (v2)
Problem Details: Booted my i965 machine and it started printing the unsupported pixel format of 0 message (once I added content to it). Oh looksie here, we pass 0. fix. v2: compile it. Buzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45966 Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Chris ...
```diff diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index f425b23e3803..f3afec2854d8 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -6561,7 +6561,7 @@ intel_framebuffer_create_for_mode(struct drm_device *dev, mode_cmd.height...
d690516c6dcef11b87c35ce294ae1fcf9797276f
Analyze and fix the following issue in the Linux kernel code: ASoC: wm8962: Remove mistakenly committed debug logging
Problem Details: Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index 2dd710f58b85..dc5f19e1065f 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c @@ -3720,8 +3720,6 @@ static int wm8962_runtime_resume(struct device *dev) regmap_update_bits(wm8962->regmap, WM8962_PWR_MGMT_1, WM8...
506531905296d6aee84480c879b25ea98c3f9db6
Analyze and fix the following issue in the Linux kernel code: Btrfs: clear the extent uptodate bits during parent transid failures
Problem Details: If btrfs reads a block and finds a parent transid mismatch, it clears the uptodate flags on the extent buffer, and the pages inside it. But we only clear the uptodate bits in the state tree if the block straddles more than one page. This is from an old optimization from to reduce contention on the ex...
```diff diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 45ca8f9b0d61..a55fbe6252de 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -3871,10 +3871,9 @@ int clear_extent_buffer_uptodate(struct extent_io_tree *tree, num_pages = num_extent_pages(eb->start, eb->len); clear_bit(EXTENT_BUFFE...
9997a5332320dbaaee64b5c0581ccaa6589a15c9
Analyze and fix the following issue in the Linux kernel code: Bluetooth: mgmt: Fix return value of add/remove_uuid
Problem Details: The Add/Remove UUID commands should return the device class instead of an empty parameter list. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> Acked-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 4e4889490635..000abc07bc1e 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -1367,7 +1367,7 @@ static int add_uuid(struct sock *sk, u16 index, void *data, u16 len) if (err < 0) goto failed; - err = cmd_complete(sk, index, MGMT_...
504c8dcd6b0ec3cd36ab221695c5516e88cf3d79
Analyze and fix the following issue in the Linux kernel code: Bluetooth: mgmt: Fix update_eir/class with HCI_AUTO_OFF flag set
Problem Details: If we're powered but still have the HCI_AUTO_OFF flag set the update_eir and update_class functions should not do anything. Additionally these functions need to be called when the flag is finally cleared through set_powered or when powering on for real. Signed-off-by: Johan Hedberg <johan.hedberg@inte...
```diff diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 7fdba8fb9808..4e4889490635 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -532,7 +532,7 @@ static int update_eir(struct hci_dev *hdev) { struct hci_cp_write_eir cp; - if (!test_bit(HCI_UP, &hdev->flags)) + if (!hdev_is_powered(...
c1c1a3d012fe5e82a9a025fb4b5a4f8ee67a53f6
Analyze and fix the following issue in the Linux kernel code: hwmon: (f75375s) Fix register write order when setting fans to full speed
Problem Details: By hwmon sysfs interface convention, setting pwm_enable to zero sets a fan to full speed. In the f75375s driver, this need be done by enabling manual fan control, plus duty mode for the F875387 chip, and then setting the maximum duty cycle. Fix a bug where the two necessary register writes were swapp...
```diff diff --git a/drivers/hwmon/f75375s.c b/drivers/hwmon/f75375s.c index f609b5727ba9..6bab2001ef3b 100644 --- a/drivers/hwmon/f75375s.c +++ b/drivers/hwmon/f75375s.c @@ -340,8 +340,6 @@ static int set_pwm_enable_direct(struct i2c_client *client, int nr, int val) fanmode |= (1 << F75387_FAN_MANU_MODE(nr)); ...
363434b5dc352464ac7601547891e5fc9105f124
Analyze and fix the following issue in the Linux kernel code: hwmon: (ads1015) Fix file leak in probe function
Problem Details: An error while creating sysfs attribute files in the driver's probe function results in an error abort, but already created files are not removed. This patch fixes the problem. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Cc: stable@vger.kernel.org # 3.0+ Cc: Dirk Eibach <eibach@gdsys.de>...
```diff diff --git a/drivers/hwmon/ads1015.c b/drivers/hwmon/ads1015.c index eedca3cf9968..dd87ae96c262 100644 --- a/drivers/hwmon/ads1015.c +++ b/drivers/hwmon/ads1015.c @@ -271,7 +271,7 @@ static int ads1015_probe(struct i2c_client *client, continue; err = device_create_file(&client->dev, &ads1015_in[k].dev_at...
60fc5fb66efa0bcbe028637206ed59df8cd4ac19
Analyze and fix the following issue in the Linux kernel code: Bluetooth: mgmt: Fix count parameter in get_connections reply
Problem Details: This patch fixes the count parameter in the Get Connections reply message. We cannot know the right number until iterating through all connections so set the parameter value only after the loop. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 42d665bdc01f..7fdba8fb9808 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -1725,8 +1725,8 @@ static int get_connections(struct sock *sk, u16 index) struct hci_dev *hdev; struct hci_conn *c; size_t rp_len; - u16 count; - int i,...
9a395a80dc6a2004787539dcc0c7d167ba87e89a
Analyze and fix the following issue in the Linux kernel code: Bluetooth: mgmt: Fix device_found parameters
Problem Details: According to the latest mgmt API there's a flags field instead of a separate confirm_name paramter. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h index 495668c77fb6..09646f5ef36a 100644 --- a/include/net/bluetooth/mgmt.h +++ b/include/net/bluetooth/mgmt.h @@ -393,11 +393,14 @@ struct mgmt_ev_auth_failed { __u8 status; } __packed; +#define MGMT_DEV_FOUND_CONFIRM_NAME 0x01 +#d...
86a8cfc6d0428f32d702ec59c1b3ef38541a6821
Analyze and fix the following issue in the Linux kernel code: Bluetooth: mgmt: Fix unpair_device responses
Problem Details: This patch adds an error return when not powered and cleans up/simpifies the function logic in the same go. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 7c7bc2a21393..36bebfb2d840 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -1561,7 +1561,6 @@ static int unpair_device(struct sock *sk, u16 index, void *data, u16 len) struct hci_cp_disconnect dc; struct pending_cmd *cmd; struc...
8ec37034ef36b89cfb060bd9273db24e6acb1b3a
Analyze and fix the following issue in the Linux kernel code: Bluetooth: mgmt: Fix return value for set_class
Problem Details: The return parameters for Set Device Class should consist of the new class value. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 6850a8b46c62..23421f05abf2 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -1470,7 +1470,7 @@ static int set_dev_class(struct sock *sk, u16 index, void *data, u16 len) if (err == 0) err = cmd_complete(sk, index, MGMT_OP_SET_DE...
09b3c3fbbee9aef8ac5d9148ae61aae35766b2a6
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix clearing of dev_class when powering down
Problem Details: We should assume a value of 0 for the device class when powered off. The appropriate place to do this is in hci_dev_do_close(). Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 2d75ffb42f7d..2ab78bfc108e 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -795,6 +795,7 @@ static int hci_dev_do_close(struct hci_dev *hdev) hdev->flags = 0; memset(hdev->eir, 0, sizeof(hdev->eir)); + memset(hd...
27fcc362297b8e838a929c947b82eabb3f4b7591
Analyze and fix the following issue in the Linux kernel code: Bluetooth: mgmt: Fix missing short_name in read_info
Problem Details: The short name is part of the Read Controller Info response and should be appropriately filled in based on the value of hdev->short_name. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index ee57edbb13ec..6850a8b46c62 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -648,6 +648,7 @@ static int read_controller_info(struct sock *sk, u16 index) memcpy(rp.dev_class, hdev->dev_class, 3); memcpy(rp.name, hdev->dev_name, s...
7bdaae4a4bc075cf73ab9c3a531b7229caa1f49e
Analyze and fix the following issue in the Linux kernel code: Bluetooth: mgmt: Fix name_changed event for short name changes
Problem Details: Since we can't reliably track the short name changes just assume that we had a change whenever there's a pending mgmt command. In the worst case we just get one unnecessary name_changed signal. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 9c1f7714794d..ee57edbb13ec 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -3586,6 +3586,10 @@ int mgmt_set_local_name_complete(struct hci_dev *hdev, u8 *name, u8 status) if (!cmd) goto send_event; + /* Always assume that eith...
db99b5fc77e6cec47d80703b471f1efe04527d2f
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix read_name updating when HCI_SETUP is not set
Problem Details: The local name should only be updated as a consequence of a hci_read_local_name if we are in the HCI_SETUP state. In all other scenarios it should only be updated through hci_write_local_name. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index c79ffb955554..9917fe3d1d18 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -227,7 +227,8 @@ static void hci_cc_read_local_name(struct hci_dev *hdev, struct sk_buff *skb) if (rp->status) return; - memcpy(hde...
955638ecec9431788e291fc99f34c42124071abe
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix handling of discoverable setting with timeout
Problem Details: The current handling of the discoverable timeout was missing the proper handling of the timeout when the mode was already set. Now the command can be used to expire or retrigger the timeout. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
```diff diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 6df4af6e99cc..f7e111f30434 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -900,6 +900,17 @@ static int set_discoverable(struct sock *sk, u16 index, void *data, u16 len) } if (!!cp->val == test_bit(HCI_DISCOVERABLE, &hdev->dev_...