id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
3db7675506ef7460bf6220545bfc69abb7dbceab
Analyze and fix the following issue in the Linux kernel code: netxen: fix check for ip addr hashing support
Problem Details: Fix typo in checking dest ip has support before programming destip addresses. Signed-off-by: Amit Kumar Salecha <amit@netxen.com> Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 304618aa09dd..81c24a7effcf 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c @@ -2340,7 +2340,7 @@ netxen_config_indev_addr(struct net_device *dev, unsigned long event) str...
23bcf634c8bc0d84607a5b863333191d58baee4c
Analyze and fix the following issue in the Linux kernel code: net_sched: fix estimator lock selection for mq child qdiscs
Problem Details: When new child qdiscs are attached to the mq qdisc, they are actually attached as root qdiscs to the device queues. The lock selection for new estimators incorrectly picks the root lock of the existing and to be replaced qdisc, which results in a use-after-free once the old qdisc has been destroyed. M...
```diff diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 9c69585a1be8..88eb9de095de 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -46,6 +46,7 @@ struct Qdisc #define TCQ_F_THROTTLED 2 #define TCQ_F_INGRESS 4 #define TCQ_F_CAN_BYPASS 8 +#define TCQ_F_MQROOT 16 #...
2496afbf1e50c70f80992656bcb730c8583ddac3
Analyze and fix the following issue in the Linux kernel code: xen: use stronger barrier after unlocking lock
Problem Details: We need to have a stronger barrier between releasing the lock and checking for any waiting spinners. A compiler barrier is not sufficient because the CPU's ordering rules do not prevent the read xl->spinners from happening before the unlock assignment, as they are different memory locations. We need ...
```diff diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c index 2f91e5651926..36a5141108df 100644 --- a/arch/x86/xen/spinlock.c +++ b/arch/x86/xen/spinlock.c @@ -326,8 +326,13 @@ static void xen_spin_unlock(struct raw_spinlock *lock) smp_wmb(); /* make sure no writes get moved after unlock */ xl->lock...
4d576b57b50a92801e6493e76e5243d6cff193d2
Analyze and fix the following issue in the Linux kernel code: xen: only enable interrupts while actually blocking for spinlock
Problem Details: Where possible we enable interrupts while waiting for a spinlock to become free, in order to reduce big latency spikes in interrupt handling. However, at present if we manage to pick up the spinlock just before blocking, we'll end up holding the lock with interrupts enabled for a while. This will cau...
```diff diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c index 5601506f2dd9..2f91e5651926 100644 --- a/arch/x86/xen/spinlock.c +++ b/arch/x86/xen/spinlock.c @@ -187,7 +187,6 @@ static noinline int xen_spin_lock_slow(struct raw_spinlock *lock, bool irq_enabl struct xen_spinlock *prev; int irq = __get_c...
df8db91fc3b543d373afa61beef35b072eea1368
Analyze and fix the following issue in the Linux kernel code: PCI / ACPI PM: Rework some debug messages
Problem Details: Move a debug message from acpi_pci_sleep_wake() to acpi_pm_device_sleep_wake() and use the standard dev_*() macros in there. Reviewed-by: Matthew Garrett <mjg59@srcf.ucam.org> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
```diff diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 42159a28f433..ab889becd3f3 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c @@ -689,19 +689,25 @@ int acpi_pm_device_sleep_wake(struct device *dev, bool enable) { acpi_handle handle; struct acpi_device *adev; + int error; if (!d...
748df9a4c65625c386674c9b54dde73de6cc5af5
Analyze and fix the following issue in the Linux kernel code: x86/PCI: pci quirks, fix pci refcounting
Problem Details: Stanse found a pci reference leak in quirk_amd_nb_node. Instead of putting nb_ht, there is a put of dev passed as an argument. http://stanse.fi.muni.cz/ Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
```diff diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c index af71d06624bf..6c3b2c6fd772 100644 --- a/arch/x86/kernel/quirks.c +++ b/arch/x86/kernel/quirks.c @@ -508,7 +508,7 @@ static void __init quirk_amd_nb_node(struct pci_dev *dev) pci_read_config_dword(nb_ht, 0x60, &val); set_dev_node(&dev->...
0ba379ec0fb182a87b8891c5754abbcd9c035b4f
Analyze and fix the following issue in the Linux kernel code: PCI: Simplify hotplug mch quirk.
Problem Details: There is a very old quirk for the intel E7502 E7320 and E7525 memory controller hubs that disables usage of msi interrupts on pcie hotplug bridges of those devices, and disables changing the affinity of irqs. Today all we have to do to disable msi on a specific device is to set dev->no_msi, which is m...
```diff diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c index 8aab8edf123e..b97cb4c3e0fe 100644 --- a/drivers/pci/hotplug/pciehp_ctrl.c +++ b/drivers/pci/hotplug/pciehp_ctrl.c @@ -246,11 +246,6 @@ static int board_added(struct slot *p_slot) goto err_exit; } - /* - * Some PCI E...
fa526d0d641b5365676a1fb821ce359e217c9b85
Analyze and fix the following issue in the Linux kernel code: x86, pat: Fix cacheflush address in change_page_attr_set_clr()
Problem Details: Fix address passed to cpa_flush_range() when changing page attributes from WB to UC. The address (*addr) is modified by __change_page_attr_set_clr(). The result is that the pages being flushed start at the _end_ of the changed range instead of the beginning. This should be considered for 2.6.30-stable...
```diff diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index 7e600c1962db..e245775ec856 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c @@ -822,6 +822,7 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages, { struct cpa_data cpa; int ret, cache, checkalias; + unsi...
5d93b135fc051be3740cbe55729fc7b86a7069d7
Analyze and fix the following issue in the Linux kernel code: drm/radeon/r600: fix legacy blit code
Problem Details: ARRAY_SIZE is number of elements not bytes. Fix ring counts accordingly, also make a few functions static. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/r600_blit.c b/drivers/gpu/drm/radeon/r600_blit.c index c51402e92493..dde2ccbf1d15 100644 --- a/drivers/gpu/drm/radeon/r600_blit.c +++ b/drivers/gpu/drm/radeon/r600_blit.c @@ -126,7 +126,7 @@ set_shaders(struct drm_device *dev) { drm_radeon_private_t *dev_priv = dev->dev_pr...
0d465f23502e0810443c90a9cf1cf5686c4af4f2
Analyze and fix the following issue in the Linux kernel code: PCI: pcie, aer: fix report of multiple errors
Problem Details: The flag AER_MULTI_ERROR_VALID_FLAG in info->flag does mean that the root port receives multiple error messages. Error messages can be posted from different devices, so it does not mean that each reported device has multiple errors. If there are multiple error devices and the root port has valid erro...
```diff diff --git a/drivers/pci/pcie/aer/aerdrv_errprint.c b/drivers/pci/pcie/aer/aerdrv_errprint.c index 48f70fa7f684..a2a4b3903a7a 100644 --- a/drivers/pci/pcie/aer/aerdrv_errprint.c +++ b/drivers/pci/pcie/aer/aerdrv_errprint.c @@ -185,6 +185,7 @@ void aer_print_error(struct pci_dev *dev, struct aer_err_info *info) ...
b439b1d4e3ae3c36ed94ed233119ff0d145af257
Analyze and fix the following issue in the Linux kernel code: PCI: pci-stub: add pci_stub.ids parameter
Problem Details: Add ids module parameter which allows specifying initial IDs for the pci-stub driver. When built into the kernel, pci-stub is linked before any real pci drivers and by setting up IDs from initialization it can prevent built-in drivers from attaching to specific devices. While at it, make pci_stub_pro...
```diff diff --git a/drivers/pci/pci-stub.c b/drivers/pci/pci-stub.c index 74fbec0bf6cb..f7b68ca6cc98 100644 --- a/drivers/pci/pci-stub.c +++ b/drivers/pci/pci-stub.c @@ -19,8 +19,16 @@ #include <linux/module.h> #include <linux/pci.h> +static char ids[1024] __initdata; + +module_param_string(ids, ids, sizeof(ids), ...
6ed6a8dc83dc37d30c8a7ff2eae2ed054e34c91b
Analyze and fix the following issue in the Linux kernel code: PCI hotplug: fix typo in pcie link speed info
Problem Details: Fix typo in PCI-E link speed. Reviewed-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
```diff diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c index 5c5043f239cf..9d44669bf098 100644 --- a/drivers/pci/hotplug/pci_hotplug_core.c +++ b/drivers/pci/hotplug/pci_hotplug_core.c @@ -86,7 +86,7 @@ static char *pci_bus_speed_strings[] = { "66 MHz PCIX 533", /* 0x11 *...
fc87e919c0ce8e213edf2ffca17f384f059873d3
Analyze and fix the following issue in the Linux kernel code: PCI ASPM: fix possible null pointer dereference
Problem Details: Fix possible NULL dereference in pcie_aspm_exit_link_state(). This patch also cleanup some code. Acked-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
```diff diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c index 638881b00f6b..0800c5146826 100644 --- a/drivers/pci/pcie/aspm.c +++ b/drivers/pci/pcie/aspm.c @@ -665,16 +665,16 @@ out: void pcie_aspm_exit_link_state(struct pci_dev *pdev) { struct pci_dev *parent = pdev->bus->self; - struct pcie_link_st...
6ac3bd527007eeecb148b67ca47b21731fd8a503
Analyze and fix the following issue in the Linux kernel code: PCI/vgaarb: cleanup some warnings + cleanup some comments.
Problem Details: Fix some warnings reported in linux-next + also cleanup some comment errors noticed by Pekka Paalanen. Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
```diff diff --git a/drivers/gpu/vga/vgaarb.c b/drivers/gpu/vga/vgaarb.c index 199138f241e0..1ac0c93603c9 100644 --- a/drivers/gpu/vga/vgaarb.c +++ b/drivers/gpu/vga/vgaarb.c @@ -609,7 +609,6 @@ void vga_set_legacy_decoding(struct pci_dev *pdev, unsigned int decodes) } EXPORT_SYMBOL(vga_set_legacy_decoding); -/* re...
500559a92dd36af7cee95ed2f5b7722fb95a82e7
Analyze and fix the following issue in the Linux kernel code: PCI MSI: Style cleanups
Problem Details: Cleanups (nearly based on checkpatch). Before: total: 11 errors, 2 warnings, 0 checks, 842 lines checked After: total: 0 errors, 0 warnings, 0 checks, 842 lines checked v2: fix it's/its mistakes in comment Reviewed-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Hidetoshi Seto <seto.hide...
```diff diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 14159cf7d38e..f9cf3173b23d 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -16,9 +16,8 @@ #include <linux/proc_fs.h> #include <linux/msi.h> #include <linux/smp.h> - -#include <asm/errno.h> -#include <asm/io.h> +#include <linux/errno.h> +#incl...
6dab62ee5a3bf4f71b8320c09db2e6022a19f40e
Analyze and fix the following issue in the Linux kernel code: PCI: apply nv_msi_ht_cap_quirk on resume too
Problem Details: http://bugzilla.kernel.org/show_bug.cgi?id=12542 reports that with the quirk not applied on resume, msi stops working after resuming and mcp78s ahci fails due to IRQ mis-delivery. Apply it on resume too. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Peer Chen <pchen@nvidia.com> Cc: Tj <linux@tjworld.n...
```diff diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 8e22aefe3f33..28d592de09ff 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -2383,8 +2383,10 @@ static void __devinit nv_msi_ht_cap_quirk_leaf(struct pci_dev *dev) } DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, nv_msi...
2bba22c50b06abe9fd0d23933b1e64d35b419262
Analyze and fix the following issue in the Linux kernel code: sched: Turn off child_runs_first
Problem Details: Set child_runs_first default to off. It hurts 'optimal' make -j<NR_CPUS> workloads as make jobs get preempted by child tasks, reducing parallelism. Note, this patch might make existing races in user applications more prominent than before - so breakages might be bisected to this commit. Child-runs-f...
```diff diff --git a/include/linux/sched.h b/include/linux/sched.h index 3b7f43e3b736..3a50e8222498 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1820,8 +1820,8 @@ extern unsigned int sysctl_sched_min_granularity; extern unsigned int sysctl_sched_wakeup_granularity; extern unsigned int sysctl_sch...
4d8cd26849737e141ff0aa23fedacef4ea76ea4f
Analyze and fix the following issue in the Linux kernel code: wireless: mark prism54 as deprecated and mark for removal
Problem Details: The preferred module is p54pci which also supports FullMAC PCI / Cardbus devices. We schedule removal for 2.6.34. Reason to remove this is no one really is testing prism54 anymore, and while it works p54pci provides support for the same hardware. It should be noted I have been told some FullMAC devices...
```diff diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 09e031c55887..ad522e3d3d86 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt @@ -6,6 +6,35 @@ be removed from this file. --------------------------...
98a1e2a9260d30ad691fbd1ed778a05e38fe655b
Analyze and fix the following issue in the Linux kernel code: b44/b43/b43legacy: Fix switch warnings introduced by SSB-SDIO
Problem Details: This fixes some gcc warnings for switch statements. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/b44.c b/drivers/net/b44.c index 951735c9ec0b..0189dcd36f31 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c @@ -1303,10 +1303,13 @@ static void b44_chip_reset(struct b44 *bp, int reset_kind) & MDIO_CTRL_MAXF_MASK))); break; case SSB_BUSTYPE_PCI: - case SSB_BUSTYPE_PCM...
cde1b55b43b71cabb1a94278a809bca21b9df791
Analyze and fix the following issue in the Linux kernel code: b43: Fix sparse warning in hw-tkip code
Problem Details: This fixes a sparse warning in the hardware-TKIP code: drivers/net/wireless/b43/xmit.c:272:18: warning: incorrect type in assignment (different base types) drivers/net/wireless/b43/xmit.c:272:18: expected unsigned short [unsigned] [short] <noident> drivers/net/wireless/b43/xmit.c:272:18: got res...
```diff diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c index e7075d2c7757..14f541248b5c 100644 --- a/drivers/net/wireless/b43/xmit.c +++ b/drivers/net/wireless/b43/xmit.c @@ -267,11 +267,11 @@ int b43_generate_txhdr(struct b43_wldev *dev, */ ieee80211_get_tkip_key(info->control....
4789666e13fb0b2d45feb1b4a5119a1b997ec84c
Analyze and fix the following issue in the Linux kernel code: rt2x00: Hardcode TX ack timeout and consume time
Problem Details: The calculated values for the ACK timeout and ACK consume time are different then the values as used by the Legacy drivers. After testing from James Ledwith it appeared that the calculated values caused a high amount of TX failures, and the values from the Legacy drivers were the most optimal to preve...
```diff diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c index 164df9347a2f..798f625e38f7 100644 --- a/drivers/net/wireless/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/rt2x00/rt2400pci.c @@ -331,9 +331,8 @@ static void rt2400pci_config_erp(struct rt2x00_dev *rt2x00dev, ...
7135a71b19be1faf48b7148d77844d03bc0717d6
Analyze and fix the following issue in the Linux kernel code: aoe: allocate unused request_queue for sysfs
Problem Details: Andy Whitcroft reported an oops in aoe triggered by use of an incorrectly initialised request_queue object: [ 2645.959090] kobject '<NULL>' (ffff880059ca22c0): tried to add an uninitialized object, something is seriously wrong. [ 2645.959104] Pid: 6, comm: events/0 Not tainted 2.6.31-5-generic #...
```diff diff --git a/drivers/block/aoe/aoe.h b/drivers/block/aoe/aoe.h index 5e41e6dd657b..db195abad698 100644 --- a/drivers/block/aoe/aoe.h +++ b/drivers/block/aoe/aoe.h @@ -155,7 +155,7 @@ struct aoedev { u16 fw_ver; /* version of blade's firmware */ struct work_struct work;/* disk create work struct */ struct...
5d5d9c97ff807b643b6c2284dea7fe04ecc74355
Analyze and fix the following issue in the Linux kernel code: IPv6/addrconf: Fix minor addrlabel thinko
Problem Details: Fix apparent thinko related to RTM_DELADDRLABEL, introduced by commit 2a8cc6c89039e0530a3335954253b76ed0f9339a ("[IPV6] ADDRCONF: Support RFC3484 configurable address selection policy table."). Signed-off-by: Tushar Gohad <tgohad@mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index ba3254ecf7fb..adf2068d12b5 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h @@ -104,7 +104,7 @@ enum { RTM_NEWADDRLABEL = 72, #define RTM_NEWADDRLABEL RTM_NEWADDRLABEL RTM_DELADDRLABEL, -#define RTM_NEWADDRLABEL ...
c4845a4b2288a9e5d96a0558e474809028c8aff3
Analyze and fix the following issue in the Linux kernel code: sh: Fix up redundant cache flushing for PAGE_SIZE > 4k.
Problem Details: If PAGE_SIZE is presently over 4k we do a lot of extra flushing given that we purge the cache 4k at a time. Make it explicitly 4k per iteration, rather than iterating for PAGE_SIZE before looping over again. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/mm/cache-sh4.c b/arch/sh/mm/cache-sh4.c index e3fbd99b323c..8362d312ad94 100644 --- a/arch/sh/mm/cache-sh4.c +++ b/arch/sh/mm/cache-sh4.c @@ -357,7 +357,7 @@ static void __flush_cache_4096(unsigned long addr, unsigned long phys, * pointless nead-of-loop check for 0 iterations. */ do...
deaef20e9789d93c06d2d3b5ffc99939814802ca
Analyze and fix the following issue in the Linux kernel code: sh: Rework sh4_flush_cache_page() for coherent kmap mapping.
Problem Details: This builds on top of the MIPS r4k code that does roughly the same thing. This permits the use of kmap_coherent() for mapped pages with dirty dcache lines and falls back on kmap_atomic() otherwise. This also fixes up a problem with the alias check and defers to shm_align_mask directly. Signed-off-by:...
```diff diff --git a/arch/sh/mm/cache-sh4.c b/arch/sh/mm/cache-sh4.c index 92b7d947db94..e3fbd99b323c 100644 --- a/arch/sh/mm/cache-sh4.c +++ b/arch/sh/mm/cache-sh4.c @@ -2,7 +2,7 @@ * arch/sh/mm/cache-sh4.c * * Copyright (C) 1999, 2000, 2002 Niibe Yutaka - * Copyright (C) 2001 - 2007 Paul Mundt + * Copyright (...
38d8a95621b20ed7868e232a35a26ee61bdcae6f
Analyze and fix the following issue in the Linux kernel code: agp/intel: Add B43 chipset support
Problem Details: Signed-off-by: Fabian Henze <hoacha@quantentunnel.de> [Fix reversed HB & IG ids for B43] Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
```diff diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index c58557790585..c17291715031 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c @@ -36,6 +36,8 @@ #define PCI_DEVICE_ID_INTEL_Q35_IG 0x29B2 #define PCI_DEVICE_ID_INTEL_Q33_HB 0x29D0 #defin...
1043bf5c95cf065c9959c2733d6e868f9806eb66
Analyze and fix the following issue in the Linux kernel code: rtc: rtc-sh: Fix up oops in early periodic freq assignment.
Problem Details: With the reordered init order, the rtc device is not registered until later, while sh_rtc_irq_set_freq() was attempting to assign ->irq_freq directly, resulting in an oops. This is handled by the upper layers for us, so just kill off the problematic dereference completely. Reported-by: Guennadi Liakho...
```diff diff --git a/drivers/rtc/rtc-sh.c b/drivers/rtc/rtc-sh.c index 39a2fcd98c2d..e6ed5404bca0 100644 --- a/drivers/rtc/rtc-sh.c +++ b/drivers/rtc/rtc-sh.c @@ -283,10 +283,8 @@ static int sh_rtc_irq_set_freq(struct device *dev, int freq) ret = -ENOTSUPP; } - if (ret == 0) { + if (ret == 0) rtc->periodic_fr...
e3fe0913b8e732ae636cf23afca76cf2c30718e5
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix memory leak for ill-formed Package objects
Problem Details: Fixes a possible memory leak in the interpreter for package objects if the package initializer list is longer than the defined size of the package. This apparently can only happen if the BIOS changes the package size on the fly (seen in a _PSS object), as both iASL and the other compiler do not allow t...
```diff diff --git a/drivers/acpi/acpica/dsobject.c b/drivers/acpi/acpica/dsobject.c index 02e6caad4a76..507e1f0bbdfd 100644 --- a/drivers/acpi/acpica/dsobject.c +++ b/drivers/acpi/acpica/dsobject.c @@ -482,14 +482,27 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state, if (arg) { /* * num...
e678902ee899f6b0ab48166b410cdc9f1c27a350
Analyze and fix the following issue in the Linux kernel code: ACPICA: Remove error message for Store(Localx,Localx)
Problem Details: We silently ignore this construct for Windows compatibility ACPICA BZ 785. http://www.acpica.org/bugzilla/show_bug.cgi?id=785 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/acpica/dsmthdat.c b/drivers/acpi/acpica/dsmthdat.c index 22b1a3ce2c94..7d077bb2f525 100644 --- a/drivers/acpi/acpica/dsmthdat.c +++ b/drivers/acpi/acpica/dsmthdat.c @@ -433,10 +433,10 @@ acpi_ds_method_data_get_value(u8 type, case ACPI_REFCLASS_LOCAL: - ACPI_ERROR((AE_INFO, ...
307a042416dfc2216251a85b79e8578b65fdc0e7
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix extraneous warning if _DSM returns a package
Problem Details: _DSM can return any type of object, so validation on the return type cannot be performed. ACPICA BZ 802. http://www.acpica.org/bugzilla/show_bug.cgi?id=802 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/acpica/nspredef.c b/drivers/acpi/acpica/nspredef.c index 8314e6a9e726..f8427afeebdf 100644 --- a/drivers/acpi/acpica/nspredef.c +++ b/drivers/acpi/acpica/nspredef.c @@ -193,11 +193,15 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node, } /* - * We have a return v...
f90f613c3ed7381209de8aa36458442b5130170b
Analyze and fix the following issue in the Linux kernel code: sata_fsl: Defer non-ncq commands when ncq commands active
Problem Details: Fix for non-ncq & ncq commands causing timeouts when both are issued simultaneously to the same device. Signed-off-by: Ashish Kalra <Ashish.Kalra@freescale.com> [fixed to be actual compileable C code -jg] Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c index 94eaa432c40a..d344db42a002 100644 --- a/drivers/ata/sata_fsl.c +++ b/drivers/ata/sata_fsl.c @@ -1257,6 +1257,7 @@ static struct scsi_host_template sata_fsl_sht = { static struct ata_port_operations sata_fsl_ops = { .inherits = &sata_pmp_port...
ac8672ea922bde59acf50eaa1eaa1640a6395fd2
Analyze and fix the following issue in the Linux kernel code: libata: fix off-by-one error in ata_tf_read_block()
Problem Details: ata_tf_read_block() has off-by-one error when converting CHS address to LBA. The bug isn't very visible because ata_tf_read_block() is used only when generating sense data for a failed RW command and CHS addressing isn't used too often these days. This problem was spotted by Atsushi Nemoto. Signed-o...
```diff diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 98af50f16e0c..df31deac5c82 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -709,7 +709,13 @@ u64 ata_tf_read_block(struct ata_taskfile *tf, struct ata_device *dev) head = tf->device & 0xf; sect = tf->lbal; ...
1b549dcbf607e88f3016bc149109472a46fe7bbb
Analyze and fix the following issue in the Linux kernel code: ahci: Gigabyte GA-MA69VM-S2 can't do 64bit DMA
Problem Details: Gigabyte GA-MA69VM-S2 can't do 64bit DMA either. It's yet unknown whether recent BIOS fixes the problem. Blacklist regardless of BIOS revisions for now. Sandor Bodo-Merle reported and provided the initial patch for this issue. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Sandor Bodo-Merle ...
```diff diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index aa03b49a9af2..a4e4cf141c03 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -2668,6 +2668,22 @@ static bool ahci_sb600_32bit_only(struct pci_dev *pdev) }, .driver_data = "20071026", /* yyyymmdd */ }, + /* + * It's yet unknown wh...
02c24fa87724bb3af969463cd74dc3b3feb24740
Analyze and fix the following issue in the Linux kernel code: dmi: fix date handling in dmi_get_year()
Problem Details: Year parsing in dmi_get_year() had the following two bugs. * "00" is treated as invalid instead of 2000 because zero return from simple_strtoul() is treated as error. * "0N" where N >= 8 is treated as invalid of 200N because the leading 0 is considered to specify octal. Fix the above two bugs by...
```diff diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c index 24c84ae81527..531e621677ce 100644 --- a/drivers/firmware/dmi_scan.c +++ b/drivers/firmware/dmi_scan.c @@ -577,6 +577,7 @@ int dmi_get_year(int field) { int year; const char *s = dmi_get_system_info(field); + char *e; if (!s) ...
bd30add88cea831dfb854d564478f09ee66206b5
Analyze and fix the following issue in the Linux kernel code: libata: unbreak TPM filtering by reorganizing ata_scsi_pass_thru()
Problem Details: ata_scsi_pass_thru() was checking for input sanity and disallowed commands while initializaing qc from scmd. TPM filtering was added right after protocol check at which point tf wasn't initialized properly. This means that TPM filtering has never really worked. This patch fixes the bug by reorganizi...
```diff diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 5d7a1bd37e9a..b4ee28dec521 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -2759,28 +2759,6 @@ static unsigned int ata_scsi_pass_thru(struct ata_queued_cmd *qc) if ((tf->protocol = ata_scsi_map_proto(cdb[1])) ==...
72fee3823d2938fa98f2f3113301f46803f4c711
Analyze and fix the following issue in the Linux kernel code: sata_sis: convert to slave_link
Problem Details: During introduction of slave_link, sata_sis slipped through the crack and left with ad-hoc merged SCR access. As SCR status was shared for both the master and slave devices, when only one of the device is online, libata EH would think both are online but would only get valid device signature for the a...
```diff diff --git a/drivers/ata/sata_sis.c b/drivers/ata/sata_sis.c index 8f9833228619..f8a91bfd66a8 100644 --- a/drivers/ata/sata_sis.c +++ b/drivers/ata/sata_sis.c @@ -109,8 +109,9 @@ MODULE_LICENSE("GPL"); MODULE_DEVICE_TABLE(pci, sis_pci_tbl); MODULE_VERSION(DRV_VERSION); -static unsigned int get_scr_cfg_addr(...
f6ab95b55735fa03cad8d0f966647e5df206e207
Analyze and fix the following issue in the Linux kernel code: ioat: preserve chanctrl bits when re-arming interrupts
Problem Details: The register write in ioat_dma_cleanup_tasklet is unfortunate in two ways: 1/ It clears the extra 'enable' bits that we set at alloc_chan_resources time 2/ It gives the impression that it disables interrupts when it is in fact re-arming interrupts [ Impact: fix, persist the value of the chanctrl re...
```diff diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c index 5173ba97ba31..6dd0af194b8a 100644 --- a/drivers/dma/ioat/dma.c +++ b/drivers/dma/ioat/dma.c @@ -452,7 +452,6 @@ static int ioat1_dma_alloc_chan_resources(struct dma_chan *c) struct ioat_dma_chan *ioat = to_ioat_chan(c); struct ioat_chan_comm...
a6a39ca1badbeafc16941fcf2c1010c8c65c8ddc
Analyze and fix the following issue in the Linux kernel code: ioat: fix self test interrupts
Problem Details: If a callback is to be attached to a descriptor the channel needs to know at ->prep time so it can set the interrupt enable bit. This is in preparation for moving descriptor ioat2 descriptor preparation from ->submit to ->prep. Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com> Signed-off-b...
```diff diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c index c4333be07608..cc5c557ddc83 100644 --- a/drivers/dma/ioat/dma.c +++ b/drivers/dma/ioat/dma.c @@ -1313,7 +1313,8 @@ static int ioat_dma_self_test(struct ioatdma_device *device) dma_src = dma_map_single(dev, src, IOAT_TEST_SIZE, DMA_TO_DEVICE);...
a0587bcf3e64029a4da2a5666cad18df38db0d56
Analyze and fix the following issue in the Linux kernel code: ioat1: move descriptor allocation from submit to prep
Problem Details: The async_tx api assumes that after a successful ->prep a subsequent ->submit will not fail due to a lack of resources. This also fixes a bug in the allocation failure case. Previously the descriptors allocated prior to the allocation failure would not be returned to the free list. Signed-off-by: Ma...
```diff diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c index 4840d4805d8c..c4333be07608 100644 --- a/drivers/dma/ioat/dma.c +++ b/drivers/dma/ioat/dma.c @@ -420,95 +420,29 @@ static void ioat_dma_chan_watchdog(struct work_struct *work) static dma_cookie_t ioat1_tx_submit(struct dma_async_tx_descriptor *t...
77867fff033ea549096c49d863c564ad7d8be36f
Analyze and fix the following issue in the Linux kernel code: ioat: fix type mismatch for ->dmacount
Problem Details: ->dmacount tracks the sequence number of active descriptors. It is written to the DMACOUNT register to update the channel's view of pending descriptors in the chain. The register is 16-bits so ->dmacount should be unsigned and 16-bit as well. Also modify ->desccount to maintain alignment. This was ...
```diff diff --git a/drivers/dma/ioat/dma.h b/drivers/dma/ioat/dma.h index 1226e35f2709..9f0c853b6a77 100644 --- a/drivers/dma/ioat/dma.h +++ b/drivers/dma/ioat/dma.h @@ -102,8 +102,8 @@ struct ioat_dma_chan { struct delayed_work work; int pending; - int dmacount; - int desccount; + u16 dmacount; + u16 desccount;...
e6890f6f3dc2d9024a08b1a149d9bd5208eea350
Analyze and fix the following issue in the Linux kernel code: i915: disable interrupts before tearing down GEM state
Problem Details: Reinette Chatre reports a frozen system (with blinking keyboard LEDs) when switching from graphics mode to the text console, or when suspending (which does the same thing). With netconsole, the oops turned out to be BUG: unable to handle kernel NULL pointer dereference at 0000000000000084 IP: [<ffff...
```diff diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 7edb5b9d5792..80e5ba490dc2 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -4232,15 +4232,11 @@ int i915_gem_leavevt_ioctl(struct drm_device *dev, void *data, struct drm_file *fi...
cecc6b63a5de547a345c491bb4c18c01a15984a4
Analyze and fix the following issue in the Linux kernel code: drm/radeon/r600: use fence->timeout directly
Problem Details: Fixes fence timeouts on r6xx/r7xx. Noticed by taiu on IRC. Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c index 01a89633e265..3beb26d74719 100644 --- a/drivers/gpu/drm/radeon/radeon_fence.c +++ b/drivers/gpu/drm/radeon/radeon_fence.c @@ -171,17 +171,8 @@ bool radeon_fence_signaled(struct radeon_fence *fence) int r600_fence_w...
8813262ea79acf9daa0e03901bdfe93db4dc4ca5
Analyze and fix the following issue in the Linux kernel code: ath9k: Fix channelFlags for 2GHZ
Problem Details: CHANNEL_G has to be set for 2GHZ channels since IS_CHAN_G() checks for this in channelFlags and not in chanmode. To make things messier, ath9k_hw_process_ini() checks for CHANNEL_G in chanmode and not in channelFlags. The supreme, brain-searing fix is to set the flag in both cases. Signed-off-by: Suji...
```diff diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index b1d189c6be8a..a69fda8a9102 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -1879,7 +1879,7 @@ void ath9k_update_ichannel(struct ath_softc *sc, struct ieee80211_hw *h...
7ea310be65bfcbc6e2395844fd3498762dc2aea6
Analyze and fix the following issue in the Linux kernel code: ath9k: Fix RX Filter handling for BAR
Problem Details: BAR frames have to be sent to mac80211 only if the current channel is HT. Also, move the macro to enum ath9k_rx_filter. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 71f27f324cea..011b14f35e50 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c @@ -3967,7 +3967,8 @@ void ath9k_hw_setrxfilter(struct ath_hw *ah, u32 bits) { u32 phybits; - RE...
cdc65fbe18aef15e92d2ebb410a189fbf956fb06
Analyze and fix the following issue in the Linux kernel code: ASoC: au1x: PSC-AC97 bugfixes
Problem Details: This patch fixes the following bugs: - only reprogram bitdepth if it has changed since last call to hw_params. - add locking inside ac97_read/write functions: When reprogramming sample depth, the ac97 unit has to be disabled, which should not be done in the middle of codec register accesses. - re...
```diff diff --git a/sound/soc/au1x/psc-ac97.c b/sound/soc/au1x/psc-ac97.c index 479d7bdf1865..a521aa90ddee 100644 --- a/sound/soc/au1x/psc-ac97.c +++ b/sound/soc/au1x/psc-ac97.c @@ -1,8 +1,8 @@ /* * Au12x0/Au1550 PSC ALSA ASoC audio support. * - * (c) 2007-2008 MSC Vertriebsges.m.b.H., - * Manuel Lauss <mano@roar...
7c8460db30dfd085ef3837c8fb02ecf2e718b983
Analyze and fix the following issue in the Linux kernel code: drm/i915: fix mask bits setting
Problem Details: eDP is exclusive connector too, and add missing crtc_mask setting for TV. This fixes http://bugzilla.kernel.org/show_bug.cgi?id=14139 Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Reported-and-tested-by: Carlos R. Mafra <crmafra2@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-found...
```diff diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index f2afc4af4bc9..2b914d732076 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -1263,7 +1263,7 @@ intel_dp_init(struct drm_device *dev, int output_reg) if (IS_eDP(intel_output)) { intel_...
acf7e2444acfaf4c8540603b76d71010eea3fc24
Analyze and fix the following issue in the Linux kernel code: GFS2: Be extra careful about deallocating inodes
Problem Details: There is a potential race in the inode deallocation code if two nodes try to deallocate the same inode at the same time. Most of the issue is solved by the iopen locking. There is still a small window which is not covered by the iopen lock. This patches fixes that and also makes the deallocation code m...
```diff diff --git a/fs/gfs2/export.c b/fs/gfs2/export.c index 9200ef221716..d15876e9aa26 100644 --- a/fs/gfs2/export.c +++ b/fs/gfs2/export.c @@ -143,17 +143,14 @@ static struct dentry *gfs2_get_parent(struct dentry *child) } static struct dentry *gfs2_get_dentry(struct super_block *sb, - struct gfs2_inum_host *i...
7eb0d5e5be4e312d5368896744476cc705b3d7e7
Analyze and fix the following issue in the Linux kernel code: kmemleak: fix sparse warning for static declarations
Problem Details: This fixes these sparse warnings: mm/kmemleak.c:1179:6: warning: symbol 'start_scan_thread' was not declared. Should it be static? mm/kmemleak.c:1194:6: warning: symbol 'stop_scan_thread' was not declared. Should it be static? Acked-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Luis R. Rod...
```diff diff --git a/mm/kmemleak.c b/mm/kmemleak.c index ffd162abbe5e..39da954b5059 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c @@ -1287,7 +1287,7 @@ static int kmemleak_scan_thread(void *arg) * Start the automatic memory scanning thread. This function must be called * with the scan_mutex held. */ -void start_...
0580a1819c584eb8b98f8701157667037e11153a
Analyze and fix the following issue in the Linux kernel code: kmemleak: fix sparse warning over overshadowed flags
Problem Details: A secondary irq_save is not required as a locking before it was already disabling irqs. This fixes this sparse warning: mm/kmemleak.c:512:31: warning: symbol 'flags' shadows an earlier one mm/kmemleak.c:448:23: originally declared here Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Acked-b...
```diff diff --git a/mm/kmemleak.c b/mm/kmemleak.c index b18d9ca578b9..ffd162abbe5e 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c @@ -555,6 +555,7 @@ static struct kmemleak_object *create_object(unsigned long ptr, size_t size, object->tree_node.last = ptr + size - 1; write_lock_irqsave(&kmemleak_lock, flags); + ...
30b3710105be0ba6bbdb7d7d126af76246b02eba
Analyze and fix the following issue in the Linux kernel code: kmemleak: add clear command support
Problem Details: In an ideal world your kmemleak output will be small, when its not (usually during initial bootup) you can use the clear command to ingore previously reported and unreferenced kmemleak objects. We do this by painting all currently reported unreferenced objects grey. We paint them grey instead of black ...
```diff diff --git a/Documentation/kmemleak.txt b/Documentation/kmemleak.txt index c223785339b5..34f6638aa5ac 100644 --- a/Documentation/kmemleak.txt +++ b/Documentation/kmemleak.txt @@ -27,6 +27,13 @@ To trigger an intermediate memory scan: # echo scan > /sys/kernel/debug/kmemleak +To clear the list of all curr...
9b151fec139d32ab3acce5da5761d868e205fadd
Analyze and fix the following issue in the Linux kernel code: ALSA: dummy - Add debug proc file
Problem Details: Added the debug proc file to see or change the snd_pcm_hardware fields to emulate. The parameters can be changed by writing to a proc file like: # echo periods_min 4 > /proc/asound/card1/dummy_pcm Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c index 2ee6c8ebe25a..ccfbdfa75511 100644 --- a/sound/drivers/dummy.c +++ b/sound/drivers/dummy.c @@ -33,6 +33,7 @@ #include <sound/tlv.h> #include <sound/pcm.h> #include <sound/rawmidi.h> +#include <sound/info.h> #include <sound/initval.h> MODULE_...
4f7454a9970fa0f3e9f1a68201520e3df1bb5224
Analyze and fix the following issue in the Linux kernel code: ALSA: Add const prefix to proc helper functions
Problem Details: Add appropriate const prefix to char * arguments in proc helper functions. Also fixed the caller side to be proper const pointers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/include/sound/info.h b/include/sound/info.h index 7c2ee1a21b00..112e8949e1a7 100644 --- a/include/sound/info.h +++ b/include/sound/info.h @@ -110,13 +110,13 @@ void snd_card_info_read_oss(struct snd_info_buffer *buffer); static inline void snd_card_info_read_oss(struct snd_info_buffer *buffer) {} ...
80e42468d65475e92651e62175bb7807773321d0
Analyze and fix the following issue in the Linux kernel code: ext4: print more sysadmin-friendly message in check_block_validity()
Problem Details: Drop the WARN_ON(1), as he stack trace is not appropriate, since it is triggered by file system corruption, and it misleads users into thinking there is a kernel bug. In addition, change the message displayed by ext4_error() to make it clear that this is a file system corruption problem. Signed-off-b...
```diff diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 5c0d17066f4a..6253ecdac67f 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -1121,16 +1121,15 @@ static void ext4_da_update_reserve_space(struct inode *inode, int used) ext4_discard_preallocations(inode); } -static int check_block_validity(struct i...
33d78674586aeb6a623b1e612e6f92dd83015ed3
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Use auto model for HP laptops with ALC268 codec
Problem Details: The HP laptops with ALC268 codec seem working better with model=auto than model=toshiba; e.g. the auto model fixes missing digital outputs. Let's fix quirk entry to choose auto model explicitly. Tested-by: Jens Jorgensen <jbj1@ultraemail.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index e58d4c5d6c16..7ed47f66ddd1 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -12574,8 +12574,11 @@ static struct snd_pci_quirk alc268_cfg_tbl[] = { ALC268_ACER_ASPIRE_ONE), SND_PCI_QUIRK(0x1...
6148b130eb84edc76e4fa88da1877b27be6c2f06
Analyze and fix the following issue in the Linux kernel code: ALSA: cs46xx - Fix minimum period size
Problem Details: Fix minimum period size for cs46xx cards. This fixes a problem in the case where neither a period size nor a buffer size is passed to ALSA; this is the case in Audacious, OpenAL, and others. Signed-off-by: Sophie Hamilton <kernel@theblob.org> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@...
```diff diff --git a/sound/pci/cs46xx/cs46xx_lib.h b/sound/pci/cs46xx/cs46xx_lib.h index 4eb55aa33612..b5189495d58a 100644 --- a/sound/pci/cs46xx/cs46xx_lib.h +++ b/sound/pci/cs46xx/cs46xx_lib.h @@ -35,7 +35,7 @@ #ifdef CONFIG_SND_CS46XX_NEW_DSP -#define CS46XX_MIN_PERIOD_SIZE 1 +#define CS46XX_MIN_PERIOD_SIZE 64 ...
6e4154d4c2dd3d7e61d19ddd2527322ce34c2f5a
Analyze and fix the following issue in the Linux kernel code: sh: Use more aggressive dcache purging in kmap teardown.
Problem Details: This fixes up a number of outstanding issues observed with old mappings on the same colour hanging around. This requires some more optimal handling, but is a safe fallback until all of the corner cases have been handled. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/mm/cache.c b/arch/sh/mm/cache.c index 8e4a8d1ac4a9..35c37b7f717a 100644 --- a/arch/sh/mm/cache.c +++ b/arch/sh/mm/cache.c @@ -97,7 +97,7 @@ void copy_user_highpage(struct page *to, struct page *from, } if (pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK)) - __flush_wback_region(...
f1938cd6e900a85de64184e46d841efc9efd3484
Analyze and fix the following issue in the Linux kernel code: drm: include seq_file.h for debugfs builds.
Problem Details: Fixes a warning seen on powerpc. Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h index bc5a87e8aeea..62329f9a42cb 100644 --- a/include/drm/drm_mm.h +++ b/include/drm/drm_mm.h @@ -37,6 +37,9 @@ * Generic range manager structs */ #include <linux/list.h> +#ifdef CONFIG_DEBUG_FS +#include <linux/seq_file.h> +#endif struct drm_mm_n...
6fcefd56f5060ca99ab03c9f2ad1f17c3a543ca1
Analyze and fix the following issue in the Linux kernel code: drm/kms: fix kms helper license + Kconfig
Problem Details: Allow the KMS module to work properly, and also rename it to KMS_HELPER so its clearer what its for. Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 8c7309177c08..d42cf54f7804 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -18,12 +18,13 @@ menuconfig DRM details. You should also select and configure AGP (/dev/agpgart) support. -config DRM_MODE_HELPER +conf...
87831cb660954356d68cebdb1406f3be09e784e9
Analyze and fix the following issue in the Linux kernel code: ASoC: Fix WM835x Out4 capture enumeration
Problem Details: It's the 8th enum of a zero indexed array. This is why I don't let new drivers use these arrays of enums... Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
```diff diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c index 71c9c4bb2632..3ff0373dff89 100644 --- a/sound/soc/codecs/wm8350.c +++ b/sound/soc/codecs/wm8350.c @@ -612,7 +612,7 @@ SOC_DAPM_SINGLE("Switch", WM8350_BEEP_VOLUME, 15, 1, 1); /* Out4 Capture Mux */ static const struct snd_kcontrol_new ...
6b2eef8fd78ff909c3396b8671d57c42559cc51d
Analyze and fix the following issue in the Linux kernel code: IB/mad: Fix possible lock-lock-timer deadlock
Problem Details: Lockdep reported a possible deadlock with cm_id_priv->lock, mad_agent_priv->lock and mad_agent_priv->timed_work.timer; this happens because the mad module does cancel_delayed_work(&mad_agent_priv->timed_work); while holding mad_agent_priv->lock. cancel_delayed_work() internally does del_timer_sync(...
```diff diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index de922a04ca2d..bc30c00c5d7a 100644 --- a/drivers/infiniband/core/mad.c +++ b/drivers/infiniband/core/mad.c @@ -1974,7 +1974,7 @@ static void adjust_timeout(struct ib_mad_agent_private *mad_agent_priv) unsigned long delay; if (...
99f329a2ba3c2d07cc90ca9309babf27ddf98bff
Analyze and fix the following issue in the Linux kernel code: [ARM] pxa/sharpsl_pm: zaurus c3000 aka spitz: fix resume
Problem Details: sharpsl_pm.c code tries to read battery state very early during resume, but those battery meters are connected on SPI and that's only resumed way later. Replace the check with simple checking of battery fatal signal, that actually works at this stage. Signed-off-by: Pavel Machek <pavel@ucw.cz> Tested...
```diff diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c index 2546c066cd6e..629e05d1196e 100644 --- a/arch/arm/mach-pxa/sharpsl_pm.c +++ b/arch/arm/mach-pxa/sharpsl_pm.c @@ -678,8 +678,8 @@ static int corgi_enter_suspend(unsigned long alarm_time, unsigned int alarm_enab dev_dbg(sharpsl_p...
7f1be819cccea65dcd2a8c86de6369946b91c224
Analyze and fix the following issue in the Linux kernel code: leds: Fix indentation in LEDS_LP3944 Kconfig entry
Problem Details: Signed-off-by: Antonio Ospite <ospite@studenti.unina.it> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
```diff diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig index edfd4e302be7..e4f599f20e38 100644 --- a/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig @@ -150,9 +150,9 @@ config LEDS_LP3944 tristate "LED Support for N.S. LP3944 (Fun Light) I2C chip" depends on LEDS_CLASS && I2C help - This option enabl...
db3f520738a8c5bf593e13d4ac71f8da9ffcb964
Analyze and fix the following issue in the Linux kernel code: leds: Fix LED names
Problem Details: This is needed to get kde-powersave to work properly on some g4 powerbooks. From: Olaf Hering <olh@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
```diff diff --git a/drivers/leds/leds-cobalt-qube.c b/drivers/leds/leds-cobalt-qube.c index 059aa2924b1c..8816806accd2 100644 --- a/drivers/leds/leds-cobalt-qube.c +++ b/drivers/leds/leds-cobalt-qube.c @@ -28,7 +28,7 @@ static void qube_front_led_set(struct led_classdev *led_cdev, } static struct led_classdev qube...
85c5204a677bc1053cb636590859c32fd0cf6bf9
Analyze and fix the following issue in the Linux kernel code: leds: Fix leds-pca9532 whitespace issues
Problem Details: Signed-off-by: Richard Purdie <rpurdie@linux.intel.com
```diff diff --git a/drivers/leds/leds-pca9532.c b/drivers/leds/leds-pca9532.c index dba8921240f2..708a8017c21d 100644 --- a/drivers/leds/leds-pca9532.c +++ b/drivers/leds/leds-pca9532.c @@ -34,7 +34,7 @@ struct pca9532_data { struct i2c_client *client; struct pca9532_led leds[16]; struct mutex update_lock; - str...
74cbe20294c9f54a0926d19235395cf8e22b7830
Analyze and fix the following issue in the Linux kernel code: leds: fix coding style in worker thread code for ledtrig-gpio.
Problem Details: [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Signed-off-by: Samuel R. C. Vale <srcvale@holoscopio.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
```diff diff --git a/drivers/leds/ledtrig-gpio.c b/drivers/leds/ledtrig-gpio.c index 1bc5db4ece0d..f5913372d691 100644 --- a/drivers/leds/ledtrig-gpio.c +++ b/drivers/leds/ledtrig-gpio.c @@ -44,22 +44,22 @@ static void gpio_trig_work(struct work_struct *work) struct gpio_trig_data, work); int tmp; - if (!...
2fea09222ab48517d729a7fb4542092cf428f528
Analyze and fix the following issue in the Linux kernel code: leds: gpio-leds: fix typographics fault
Problem Details: [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
```diff diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c index 6b06638eb5b4..7467980b8cf9 100644 --- a/drivers/leds/leds-gpio.c +++ b/drivers/leds/leds-gpio.c @@ -80,7 +80,7 @@ static int __devinit create_gpio_led(const struct gpio_led *template, /* skip leds that aren't available */ if (!gpio_is_...
be1d6a5f55b30042c57bdfbe7cb4761ed081def0
Analyze and fix the following issue in the Linux kernel code: KEYS: Fix default security_session_to_parent()
Problem Details: Fix the default security_session_to_parent() in linux/security.h to have a body. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: James Morris <jmorris@namei.org>
```diff diff --git a/include/linux/security.h b/include/linux/security.h index f4eb32d5b890..10a09257952b 100644 --- a/include/linux/security.h +++ b/include/linux/security.h @@ -2988,7 +2988,10 @@ static inline int security_key_getsecurity(struct key *key, char **_buffer) static inline int security_key_session_to_p...
3a5f29c1dbe5814349efacdea483079c470dcc38
Analyze and fix the following issue in the Linux kernel code: r8169: Fix warning in rtl8169_start_xmit().
Problem Details: Reported by Stephen Rothwell: drivers/net/r8169.c: In function 'rtl8169_start_xmit': drivers/net/r8169.c:3421: warning: label 'out' defined but not used Introduced by commit 61357325f377889a1daffa14962d705dc814dd0e ("netdev: convert bulk of drivers to netdev_tx_t"). Signed-off-by: David S. Miller <d...
```diff diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index a91e9b3a3eb6..50c6a3cfe439 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -3416,7 +3416,6 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb, netif_wake_queue(dev); } -out: return NETDEV_TX_OK; err_stop: ```
cf33ce15463b784a1d648905fc067fa4d6b17466
Analyze and fix the following issue in the Linux kernel code: net: fix hydra printk format warning
Problem Details: m68k: drivers/net/hydra.c:178: warning: format '%08lx' expects type 'long unsigned int', but argument 3 has type 'resource_size_t' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/hydra.c b/drivers/net/hydra.c index 8ac0930c183c..d496b6f4a478 100644 --- a/drivers/net/hydra.c +++ b/drivers/net/hydra.c @@ -173,9 +173,9 @@ static int __devinit hydra_init(struct zorro_dev *z) zorro_set_drvdata(z, dev); - printk(KERN_INFO "%s: Hydra at 0x%08lx, address " +...
d0725e4d3ccf603c4fcf3589850cb464c927d42a
Analyze and fix the following issue in the Linux kernel code: netxen: fix ip addr hashing after firmware reset
Problem Details: Reprogram local IP addresses after firmware is reset or after resuming from suspend. Signed-off-by: Amit Kumar Salecha <amit@netxen.com> Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 498943601379..7038e1baaf4f 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c @@ -86,6 +86,8 @@ static irqreturn_t netxen_intr(int irq, void *data); static irqreturn_t netxen...
d6a65dffb30d8636b1e5d4c201564ef401a246cf
Analyze and fix the following issue in the Linux kernel code: tracing: Fix ring-buffer and ksym tracer merge interaction
Problem Details: The compiler warns us about: kernel/trace/trace_ksym.c: In function ksym_hbp_handler: kernel/trace/trace_ksym.c:92: attention : passing argument 1 of trace_buffer_lock_reserve from incompatible pointer type kernel/trace/trace_ksym.c:106: attention : passing argument 1 of trace_buffer_unlock_comm...
```diff diff --git a/kernel/trace/trace_ksym.c b/kernel/trace/trace_ksym.c index 2fde875ead4c..6d5609c67378 100644 --- a/kernel/trace/trace_ksym.c +++ b/kernel/trace/trace_ksym.c @@ -78,17 +78,18 @@ void ksym_collect_stats(unsigned long hbp_hit_addr) void ksym_hbp_handler(struct hw_breakpoint *hbp, struct pt_regs *reg...
adf551bb25bfb83b79ce3c3887557ed817e26cc9
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: add updated registers from drm-fixes.
Problem Details: Fixes up the DISCARD + 2 sided stencil in the new generator scripts. Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/reg_srcs/r300 b/drivers/gpu/drm/radeon/reg_srcs/r300 index d927005c6fa2..19c4663fa9c6 100644 --- a/drivers/gpu/drm/radeon/reg_srcs/r300 +++ b/drivers/gpu/drm/radeon/reg_srcs/r300 @@ -708,6 +708,8 @@ r300 0x4f60 0x4E80 RB3D_AARESOLVE_OFFSET 0x4E84 RB3D_AARESOLVE_PITCH 0x4E8...
b6d9c25631e7c38dc7be220b04553068fb542683
Analyze and fix the following issue in the Linux kernel code: Security/SELinux: includecheck fix kernel/sysctl.c
Problem Details: fix the following 'make includecheck' warning: kernel/sysctl.c: linux/security.h is included more than once. Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Signed-off-by: James Morris <jmorris@namei.org>
```diff diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 58be76017fd0..71d8dc7f9920 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -49,7 +49,6 @@ #include <linux/acpi.h> #include <linux/reboot.h> #include <linux/ftrace.h> -#include <linux/security.h> #include <linux/slow-work.h> #include <linux/perf_cou...
01dfba93d9dfcf6d7abfc55ff5d9d6e76fa01ba0
Analyze and fix the following issue in the Linux kernel code: drm/i915: Put the idle reclocking work on our private workqueue as well.
Problem Details: Fixes (again) whole-system lockups due to GPU lockups. Signed-off-by: Eric Anholt <eric@anholt.net>
```diff diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 9aa1d2de8a84..f6741032c608 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -3201,7 +3201,7 @@ static void intel_gpu_idle_timer(unsigned long arg) dev_priv->busy = fa...
0ef82af7253c1929a3995f271b8b0db462d1a0c3
Analyze and fix the following issue in the Linux kernel code: drm/i915: Pad ringbuffer with NOOPs before wrapping
Problem Details: According to the docs, the ringbuffer is not allowed to wrap in the middle of an instruction. G45 PRM, Vol 1b, p101: While the “free space” wrap may allow commands to be wrapped around the end of the Ring Buffer, the wrap should only occur between commands. Padding (with NOP) may be required to ...
```diff diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 8f28325bc5ef..1e3bdcee863c 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -333,15 +333,13 @@ static int i915_ringbuffer_info(struct seq_file *m, void *data) struct drm_in...
de6d5cdf881353f83006d5f3e28ac4fffd42145e
Analyze and fix the following issue in the Linux kernel code: net_sched: make cls_ops->change and cls_ops->delete optional
Problem Details: Some schedulers don't support creating, changing or deleting classes. Make the respective callbacks optionally and consistently return -EOPNOTSUPP for unsupported operations, instead of currently either -EOPNOTSUPP, -ENOSYS or no error. In case of sch_prio and sch_multiq, the removed operations additi...
```diff diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index bef2d645a366..166fcca86e7a 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -1417,7 +1417,9 @@ static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n, void *arg) goto out; break; case RTM_DELTCLASS: - err = cops->d...
d9d8e0418ffd3d189345c435861e254c17ae06e5
Analyze and fix the following issue in the Linux kernel code: gianfar: Fix build.
Problem Details: Reported by Michael Guntsche <mike@it-loops.com> -------------------- Commit 38bddf04bcfe661fbdab94888c3b72c32f6873b3 gianfar: gfar_remove needs to call unregister_netdev() breaks the build of the gianfar driver because "dev" is undefined in this function. To quickly test rc9 I changed this to priv->...
```diff diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 24f7ca5e17de..a00ec639c380 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c @@ -491,7 +491,7 @@ static int gfar_remove(struct of_device *ofdev) dev_set_drvdata(&ofdev->dev, NULL); - unregister_netdev(dev); + unregister_netdev(p...
23b6c52cf558f2a1dc6c7010c601b3624eb4591f
Analyze and fix the following issue in the Linux kernel code: x86: Decrease the level of some NUMA messages to KERN_DEBUG
Problem Details: Some NUMA messages in srat_32.c are confusing to users, because they seem to indicate errors, while in fact they reflect normal behaviour. Decrease the level of these messages to KERN_DEBUG so that they don't show up unnecessarily. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> LKML-Reference: <20090...
```diff diff --git a/arch/x86/mm/srat_32.c b/arch/x86/mm/srat_32.c index 29a0e37114f8..6f8aa33031c7 100644 --- a/arch/x86/mm/srat_32.c +++ b/arch/x86/mm/srat_32.c @@ -215,7 +215,7 @@ int __init get_memcfg_from_srat(void) goto out_fail; if (num_memory_chunks == 0) { - printk(KERN_WARNING + printk(KERN_DEBUG ...
873fcdd4bfc75880888a7d148a71d70ed87c9ebf
Analyze and fix the following issue in the Linux kernel code: RDMA/nes: Allocate work item for disconnect event handling
Problem Details: The code currently has a work structure in the QP. This requires a lock and a pending flag to ensure there is never more than one request active. When two events happen quickly (such as FIN and LLP CLOSE), it causes unnecessary timeouts since the second one is dropped. This fix allocates memory for ...
```diff diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index fe08eb57c99f..d89bdee0cf55 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c @@ -2450,20 +2450,16 @@ static int nes_cm_init_tsa_conn(struct nes_qp *nesqp, struct nes_cm_node *cm_nod ...
c4c3f279cd8e9cc1d3e2f364a27beadb2e69cda8
Analyze and fix the following issue in the Linux kernel code: RDMA/nes: Update refcnt during disconnect
Problem Details: During termination, it is possible for the refcnt to go to zero while the worker thread is posting events upward. This fix increments the refcnt before the request is passed to the worker thread. The thread decrements the refcnt when the request is completed. Signed-off-by: Don Wood <donald.e.wood@i...
```diff diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index 114b802771ad..fe08eb57c99f 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c @@ -2456,6 +2456,7 @@ int nes_cm_disconn(struct nes_qp *nesqp) if (nesqp->disconn_pending == 0) { ne...
d84106477733cb155c5dcaea664ddf120bf69eb7
Analyze and fix the following issue in the Linux kernel code: IB/mthca: Don't allow userspace open while recovering from catastrophic error
Problem Details: Userspace apps are supposed to release all ib device resources if they receive a fatal async event (IBV_EVENT_DEVICE_FATAL). However, the app has no way of knowing when the device has come back up, except to repeatedly attempt ibv_open_device() until it succeeds. However, currently there is no protec...
```diff diff --git a/drivers/infiniband/hw/mthca/mthca_catas.c b/drivers/infiniband/hw/mthca/mthca_catas.c index 65ad359fdf16..056b2a4c6970 100644 --- a/drivers/infiniband/hw/mthca/mthca_catas.c +++ b/drivers/infiniband/hw/mthca/mthca_catas.c @@ -88,6 +88,7 @@ static void handle_catas(struct mthca_dev *dev) event.dev...
ffe063f32bacad7d5111ae9c2b3e31addb47ce39
Analyze and fix the following issue in the Linux kernel code: IB/mthca: Annotate CQ locking
Problem Details: mthca_ib_lock_cqs()/mthca_ib_unlock_cqs() are helper functions that lock/unlock both CQs attached to a QP in the proper order to avoid AB-BA deadlocks. Annotate this so sparse can understand what's going on (and warn us if we misuse these functions). Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c index f5081bfde6db..c10576fa60c1 100644 --- a/drivers/infiniband/hw/mthca/mthca_qp.c +++ b/drivers/infiniband/hw/mthca/mthca_qp.c @@ -1319,10 +1319,12 @@ int mthca_alloc_qp(struct mthca_dev *dev, } static void mthca...
3b4a8cd51e59c1c342c51b241bbb96c6ac24a147
Analyze and fix the following issue in the Linux kernel code: IB/mlx4: Don't allow userspace open while recovering from catastrophic error
Problem Details: Userspace apps are supposed to release all ib device resources if they receive a fatal async event (IBV_EVENT_DEVICE_FATAL). However, the app has no way of knowing when the device has come back up, except to repeatedly attempt ibv_open_device() until it succeeds. However, currently there is no protec...
```diff diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index ae3d7590346e..313ce7fb2735 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c @@ -342,6 +342,9 @@ static struct ib_ucontext *mlx4_ib_alloc_ucontext(struct ib_device *ibdev, struct mlx4_...
fa0681d2129732027355d6b7083dd8932b9b799d
Analyze and fix the following issue in the Linux kernel code: mlx4_core: Allocate and map sufficient ICM memory for EQ context
Problem Details: The current implementation allocates a single host page for EQ context memory, which was OK when we only allocated a few EQs. However, since we now allocate an EQ for each CPU core, this patch removes the hard-coded limit (which we exceed with 4 KB pages and 128 byte EQ context entries with 32 CPUs) a...
```diff diff --git a/drivers/net/mlx4/eq.c b/drivers/net/mlx4/eq.c index c11a0525c40e..d7974a60b961 100644 --- a/drivers/net/mlx4/eq.c +++ b/drivers/net/mlx4/eq.c @@ -525,48 +525,6 @@ static void mlx4_unmap_clr_int(struct mlx4_dev *dev) iounmap(priv->clr_base); } -int mlx4_map_eq_icm(struct mlx4_dev *dev, u64 icm_...
338a8fad27908f64a0d249cc9f5c7d4ddb7e5684
Analyze and fix the following issue in the Linux kernel code: IB/mlx4: Annotate CQ locking
Problem Details: mlx4_ib_lock_cqs()/mlx4_ib_unlock_cqs() are helper functions that lock/unlock both CQs attached to a QP in the proper order to avoid AB-BA deadlocks. Annotate this so sparse can understand what's going on (and warn us if we misuse these functions). Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index c4a02648c8af..219b10397b4d 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c @@ -615,10 +615,12 @@ static enum mlx4_qp_state to_mlx4_state(enum ib_qp_state state) } static void mlx4_ib_lock_...
b1b8afb83336b66ac7198111aad4ead41132b53f
Analyze and fix the following issue in the Linux kernel code: IB/uverbs: Return ENOSYS for unimplemented commands (not EINVAL)
Problem Details: Since the original commit 883a99c7 ("[IB] uverbs: Add a mask of device methods allowed for userspace"), the uverbs core returns EINVAL for commands not implemented by a specific low-level driver. This creates a problem that there is no way to tell the difference between an unimplemented command and an...
```diff diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c index 1a3ac3d882b8..d3fff9e008a3 100644 --- a/drivers/infiniband/core/uverbs_main.c +++ b/drivers/infiniband/core/uverbs_main.c @@ -584,14 +584,16 @@ static ssize_t ib_uverbs_write(struct file *filp, const char __user *bu...
e1d7806df32bd247af6a2fe52433ecdd34fee773
Analyze and fix the following issue in the Linux kernel code: IB/core: Fix send multicast group leave retry
Problem Details: Until now, retries were only sent when joining a multicast group. This patch will adds retries when leaving a multicast group as well. Signed-off-by: Ron Livne <ronli@voltaire.com> Signed-off-by: Yossi Etigin <yosefe@voltaire.com> Acked-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreie...
```diff diff --git a/drivers/infiniband/core/multicast.c b/drivers/infiniband/core/multicast.c index 107f170c57cd..8d82ba171353 100644 --- a/drivers/infiniband/core/multicast.c +++ b/drivers/infiniband/core/multicast.c @@ -106,6 +106,8 @@ struct mcast_group { struct ib_sa_query *query; int query_id; u16 pkey_...
60f2b652f54aa4ac4127a538abad05235fb9c469
Analyze and fix the following issue in the Linux kernel code: IB/mad: Check hop count field in directed route MAD to avoid array overflow
Problem Details: The hop count field in a directed route MAD is only allowed to be in the range 0 to 63 (by spec). Check that this really is the case to avoid accessing outside the bounds of the hop array. Reported-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/core/smi.c b/drivers/infiniband/core/smi.c index 87236753bce9..5855e4405d9b 100644 --- a/drivers/infiniband/core/smi.c +++ b/drivers/infiniband/core/smi.c @@ -52,6 +52,10 @@ enum smi_action smi_handle_dr_smp_send(struct ib_smp *smp, hop_cnt = smp->hop_cnt; /* See section 14...
721d67cdca5b7642b380ca0584de8dceecf6102f
Analyze and fix the following issue in the Linux kernel code: IPoIB: Drop priv->lock before calling ipoib_send()
Problem Details: IPoIB currently must use irqsave locking for priv->lock, since it is taken from interrupt context in one path. However, ipoib_send() does skb_orphan(), and the network stack locking is not IRQ-safe. Therefore we need to make sure we don't hold priv->lock when calling ipoib_send() to avoid lockdep warn...
```diff diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index e319d91f60a6..2bf5116deec4 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -604,8 +604,11 @@ static void neigh_add_path(struct sk_buff *skb, struct n...
6303e74c699d6ba8bd3d44ec6898b2d6aa55d788
Analyze and fix the following issue in the Linux kernel code: IB/ehca: Fix CQE flags reporting
Problem Details: The driver was reporting CQE flags in the wrong bit positions, causing consumers to miss incoming immediate data. Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/ehca/ehca_reqs.c b/drivers/infiniband/hw/ehca/ehca_reqs.c index 5a3d96f84c79..8fd88cd828fd 100644 --- a/drivers/infiniband/hw/ehca/ehca_reqs.c +++ b/drivers/infiniband/hw/ehca/ehca_reqs.c @@ -786,7 +786,11 @@ repoll: wc->slid = cqe->rlid; wc->dlid_path_bits = cqe->dlid; ...
a52bf98d99e922363d1d600a79de6aaf00090d47
Analyze and fix the following issue in the Linux kernel code: RDMA/cxgb3: Wake up any waiters on peer close/abort
Problem Details: A close/abort while waiting for a wr_ack during connection migration can cause a hung process in iwch_accept_cr/iwch_reject_cr. The fix is to set rpl_error/rpl_done and wake up the waiters when we get a close/abort while in MPA_REQ_RCVD state. Signed-off-by: Steve Wise <swise@opengridcomputing.com> S...
```diff diff --git a/drivers/infiniband/hw/cxgb3/iwch_cm.c b/drivers/infiniband/hw/cxgb3/iwch_cm.c index 7f22f1797718..66b41351910a 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_cm.c +++ b/drivers/infiniband/hw/cxgb3/iwch_cm.c @@ -1478,9 +1478,14 @@ static int peer_close(struct t3cdev *tdev, struct sk_buff *skb, void *...
44fc48f7048ab9657b524938a832fec4e0acea98
Analyze and fix the following issue in the Linux kernel code: ext4: Fix small typo for move_extent_per_page()
Problem Details: This function means moving extents every page, so change its name from move_exgtent_par_page(). Signed-off-by: Akira Fujita <a-fujita@rs.jp.nec.co.jp> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
```diff diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c index c8c66b167cd7..4c4491cef357 100644 --- a/fs/ext4/move_extent.c +++ b/fs/ext4/move_extent.c @@ -740,7 +740,7 @@ out: * on success, or a negative error value on failure. */ static int -move_extent_par_page(struct file *o_filp, struct inode *dono...
70d5d3dcea47c16058d2b093c29e07fdf61b56ad
Analyze and fix the following issue in the Linux kernel code: ext4: Fix wrong comparisons in mext_check_arguments()
Problem Details: The mext_check_arguments() function in move_extents.c has wrong comparisons. orig_start which is passed from user-space is block unit, but i_size of inode is byte unit, therefore the checks do not work fine. This mis-check leads to the overflow of 'len' and then hits BUG_ON() in ext4_move_extents(). ...
```diff diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c index 5821e0bee917..c593eb2b193a 100644 --- a/fs/ext4/move_extent.c +++ b/fs/ext4/move_extent.c @@ -898,6 +898,10 @@ mext_check_arguments(struct inode *orig_inode, struct inode *donor_inode, __u64 orig_start, __u64 donor_start, __u64 *len, _...
5f3481e9a80c240f169b36ea886e2325b9aeb745
Analyze and fix the following issue in the Linux kernel code: ext4: fix cache flush in ext4_sync_file
Problem Details: We need to flush the write cache unconditionally in ->fsync, otherwise writes into already allocated blocks can get lost. Writes into fully allocated files are very common when using disk images for virtualization, and without this fix can easily lose data after an fdatasync, which is the typical impl...
```diff diff --git a/fs/ext4/fsync.c b/fs/ext4/fsync.c index 83cf6415f599..ab418c0f502d 100644 --- a/fs/ext4/fsync.c +++ b/fs/ext4/fsync.c @@ -92,9 +92,9 @@ int ext4_sync_file(struct file *file, struct dentry *dentry, int datasync) .nr_to_write = 0, /* sys_fsync did this */ }; ret = sync_inode(inode, &wbc); -...
74a01180db4bbfd61304ae0ba1f60af55ffc803d
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix i8259 interrupt driver kernel crash on ML510
Problem Details: This patch fixes a null pointer exception caused by removal of 'ack()' for level interrupts in the Xilinx interrupt driver. A recent change to the xilinx interrupt controller removed the ack hook for level irqs. Signed-off-by: Roderick Colenbrander <thunderbird2k@gmail.com> Signed-off-by: Grant Likel...
```diff diff --git a/arch/powerpc/sysdev/xilinx_intc.c b/arch/powerpc/sysdev/xilinx_intc.c index 3ee1fd37bbfc..40edad520770 100644 --- a/arch/powerpc/sysdev/xilinx_intc.c +++ b/arch/powerpc/sysdev/xilinx_intc.c @@ -234,7 +234,6 @@ static void xilinx_i8259_cascade(unsigned int irq, struct irq_desc *desc) generic_hand...
9de6886ec6e37f45807266a702bb7621498395ad
Analyze and fix the following issue in the Linux kernel code: ext2: fix unbalanced kmap()/kunmap()
Problem Details: In ext2_rename(), dir_page is acquired through ext2_dotdot(). It is then released through ext2_set_link() but only if old_dir != new_dir. Failing that, the pkmap reference count is never decremented and the page remains pinned forever. Repeat that a couple times with highmem pages and all pkmap slots...
```diff diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c index e1dedb0f7873..78d9b925fc94 100644 --- a/fs/ext2/namei.c +++ b/fs/ext2/namei.c @@ -362,6 +362,10 @@ static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry, if (dir_de) { if (old_dir != new_dir) ext2_set_link(old_inode, dir_de, dir_...
ac89a9174decf343de049a06fad75681f71890eb
Analyze and fix the following issue in the Linux kernel code: pty: don't limit the writes to 'pty_space()' inside 'pty_write()'
Problem Details: The whole write-room thing is something that is up to the _caller_ to worry about, not the pty layer itself. The total buffer space will still be limited by the buffering routines themselves, so there is no advantage or need in having pty_write() artificially limit the size somehow. And what happened...
```diff diff --git a/drivers/char/pty.c b/drivers/char/pty.c index d083c73d784a..b33d6688e910 100644 --- a/drivers/char/pty.c +++ b/drivers/char/pty.c @@ -109,21 +109,13 @@ static int pty_space(struct tty_struct *to) * the other side of the pty/tty pair. */ -static int pty_write(struct tty_struct *tty, const unsi...
a2a8474c3fff88d8dd52d05cb450563fb26fd26c
Analyze and fix the following issue in the Linux kernel code: exec: do not sleep in TASK_TRACED under ->cred_guard_mutex
Problem Details: Tom Horsley reports that his debugger hangs when it tries to read /proc/pid_of_tracee/maps, this happens since "mm_for_maps: take ->cred_guard_mutex to fix the race with exec" 04b836cbf19e885f8366bccb2e4b0474346c02d commit in 2.6.31. But the root of the problem lies in the fact that do_execve() pa...
```diff diff --git a/fs/compat.c b/fs/compat.c index 94502dab972a..6d6f98fe64a0 100644 --- a/fs/compat.c +++ b/fs/compat.c @@ -1485,20 +1485,15 @@ int compat_do_execve(char * filename, if (!bprm) goto out_files; - retval = -ERESTARTNOINTR; - if (mutex_lock_interruptible(&current->cred_guard_mutex)) + retval = pr...
dd5d241ea955006122d76af88af87de73fec25b4
Analyze and fix the following issue in the Linux kernel code: page-allocator: always change pageblock ownership when anti-fragmentation is disabled
Problem Details: On low-memory systems, anti-fragmentation gets disabled as fragmentation cannot be avoided on a sufficiently large boundary to be worthwhile. Once disabled, there is a period of time when all the pageblocks are marked MOVABLE and the expectation is that they get marked UNMOVABLE at each call to __rmqu...
```diff diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 5cc986eb9f6f..a0de15f46987 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -817,13 +817,15 @@ __rmqueue_fallback(struct zone *zone, int order, int start_migratetype) * agressive about taking ownership of free pages */ if (unlikely(current_...
a190887b58c32d19c2eee007c5eb8faa970a69ba
Analyze and fix the following issue in the Linux kernel code: nommu: fix error handling in do_mmap_pgoff()
Problem Details: Fix the error handling in do_mmap_pgoff(). If do_mmap_shared_file() or do_mmap_private() fail, we jump to the error_put_region label at which point we cann __put_nommu_region() on the region - but we haven't yet added the region to the tree, and so __put_nommu_region() may BUG because the region tree ...
```diff diff --git a/mm/nommu.c b/mm/nommu.c index 4bde489ec431..66e81e7e9fe9 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -1352,6 +1352,7 @@ unsigned long do_mmap_pgoff(struct file *file, } vma->vm_region = region; + add_nommu_region(region); /* set up the mapping */ if (file && vma->vm_flags & VM_SHARED) @...