id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
00c5a9834b476a138158fb17d576da751727a9f1
Analyze and fix the following issue in the Linux kernel code: net: Fix corruption of skb csum field in pskb_expand_head() of net/core/skbuff.c
Problem Details: Make pskb_expand_head() check ip_summed to make sure csum_start is really csum_start and not csum before adjusting it. This fixes a bug I encountered using a Sun Quad-Fast Ethernet card and VLANs. On my configuration, the sunhme driver produces skbs with differing amounts of headroom on receive depend...
```diff diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 34432b4e96bb..c699159b3ede 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -843,7 +843,9 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail, skb->network_header += off; if (skb_mac_header_was_set(skb)) skb->mac_header += ...
8a35747a5d13b99e076b0222729e0caa48cb69b6
Analyze and fix the following issue in the Linux kernel code: macvtap: Limit packet queue length
Problem Details: Mark Wagner reported OOM symptoms when sending UDP traffic over a macvtap link to a kvm receiver. This appears to be caused by the fact that macvtap packet queues are unlimited in length. This means that if the receiver can't keep up with the rate of flow, then we will hit OOM. Of course it gets wors...
```diff diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index 87e8d4cb4057..f15fe2cf72ae 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c @@ -499,7 +499,7 @@ static const struct net_device_ops macvlan_netdev_ops = { .ndo_validate_addr = eth_validate_addr, }; -static void macvlan_setup(stru...
e6d9e64e36fbeddc7d5b640379bd13930075129b
Analyze and fix the following issue in the Linux kernel code: Staging: ti-st: smarten, reduce logs
Problem Details: Replace looping on the data buffers and printk-ing by print_hex_dump. Also replace most of the pr_info by pr_debug to reduce logging at default loglevels (7 in our case..) Signed-off-by: Pavan Savoy <pavan_savoy@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/ti-st/st_core.c b/drivers/staging/ti-st/st_core.c index 0ad8cecd5e4f..7806843fc861 100644 --- a/drivers/staging/ti-st/st_core.c +++ b/drivers/staging/ti-st/st_core.c @@ -38,6 +38,7 @@ #include "st_ll.h" #include "st.h" +#define VERBOSE #ifdef DEBUG /* strings to be used for rf...
638b5acd4dfe9dd79260a9c824be74b29408ee9a
Analyze and fix the following issue in the Linux kernel code: staging: rtl8192su: fix a compiler warning
Problem Details: fix for: drivers/staging/rtl8192su/r8192U_core.c: In function ‘rtl8192SU_MacConfigAfterFwDownload’: drivers/staging/rtl8192su/r8192U_core.c:4403:24: warning: comparison between ‘rtl819xUsb_loopback_e’ and ‘enum _RTL8192SUSB_LOOPBACK’ drivers/staging/rtl8192su/r8192U_core.c:4405:30: warning: comparison ...
```diff diff --git a/drivers/staging/rtl8192su/r8192U.h b/drivers/staging/rtl8192su/r8192U.h index eccf4478fba8..d4f2d99560bc 100644 --- a/drivers/staging/rtl8192su/r8192U.h +++ b/drivers/staging/rtl8192su/r8192U.h @@ -687,13 +687,6 @@ typedef enum rf_optype RF_OP_By_FW, RF_OP_MAX }rf_op_type; -/* 8190 Loopback Mo...
a484e54fae891703cbe1c9ec1b536605f11f5482
Analyze and fix the following issue in the Linux kernel code: tracing: Fix $mcount_regex for MIPS in recordmcount.pl
Problem Details: I found this issue in a locally patched 2.6.32.x, current kernels have moved the offending code to an __init function which is skipped by recordmcount.pl, so the bug is not currently being exercised. However, I think the patch is still a good idea, to avoid future problems if _mcount were to ever have ...
```diff diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl index f3c9c0a90b98..0171060b5fd6 100755 --- a/scripts/recordmcount.pl +++ b/scripts/recordmcount.pl @@ -326,7 +326,7 @@ if ($arch eq "x86_64") { # 14: R_MIPS_NONE *ABS* # 18: 00020021 nop if ($is_module eq...
7ecac4c38a813021155c4207592693ad1949b9b7
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: Cleanup style issues in adl_pci9111.c
Problem Details: This patch fixes some coding style issues in adl_pci9111.c from checkpatch.pl Signed-off-by: Mark Rankilor <reodge@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/comedi/drivers/adl_pci9111.c b/drivers/staging/comedi/drivers/adl_pci9111.c index 43b84534b78f..99e3bdb6bfae 100644 --- a/drivers/staging/comedi/drivers/adl_pci9111.c +++ b/drivers/staging/comedi/drivers/adl_pci9111.c @@ -38,8 +38,8 @@ Supports: - do_insn read/write - ai_do_cm...
69584bd6d257e008fe4eeebd95c318201dc71d83
Analyze and fix the following issue in the Linux kernel code: staging: iio: Fix scan_element naming issue
Problem Details: The addition of a number to the scan_element names caused an issue in drivers that used either #define or an enum to provide the number. Before this fix names like ADIS16350_ACCEL_X_accel_x_en occur rather than 5_accel_x_en. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-H...
```diff diff --git a/drivers/staging/iio/accel/adis16209.h b/drivers/staging/iio/accel/adis16209.h index 92daf6fad787..4e97596620ef 100644 --- a/drivers/staging/iio/accel/adis16209.h +++ b/drivers/staging/iio/accel/adis16209.h @@ -126,16 +126,15 @@ struct adis16209_state { int adis16209_set_irq(struct device *dev, boo...
cb46f472cbb08c44ae47a5bea80207c4e4407ee3
Analyze and fix the following issue in the Linux kernel code: Staging: panel: fix memory leak
Problem Details: panel_bind_key() must free allocated memory. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c index 3e07e41eb885..aeca01c05e40 100644 --- a/drivers/staging/panel/panel.c +++ b/drivers/staging/panel/panel.c @@ -1995,8 +1995,10 @@ static struct logical_input *panel_bind_key(char *name, char *press, return NULL; } if (!input_...
47c7157f3406e83648dad1c5c4e6e8c0f574dfc3
Analyze and fix the following issue in the Linux kernel code: staging: usbip: fix memory leak
Problem Details: sdev should be freed if stub_add_files() failed. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/usbip/stub_dev.c b/drivers/staging/usbip/stub_dev.c index 3f95605427a7..1f4085116927 100644 --- a/drivers/staging/usbip/stub_dev.c +++ b/drivers/staging/usbip/stub_dev.c @@ -438,6 +438,8 @@ static int stub_probe(struct usb_interface *interface, if (err) { dev_err(&interface->de...
23dcab8f8e89bb25d7e156ffec4b27542d1f737a
Analyze and fix the following issue in the Linux kernel code: powerpc/kexec: Fix boundary case for book-e kexec memory limits
Problem Details: The KEXEC_*_MEMORY_LIMITs are inclusive addresses. We define them as 2Gs as that is what we allow mapping via TLBs. However, this should be 2G - 1 to be inclusive, otherwise if we have >2G of memory in a system we fail to boot properly via kexec. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
```diff diff --git a/arch/powerpc/include/asm/kexec.h b/arch/powerpc/include/asm/kexec.h index 2a9cd74a841e..076327f2eff7 100644 --- a/arch/powerpc/include/asm/kexec.h +++ b/arch/powerpc/include/asm/kexec.h @@ -8,9 +8,9 @@ * On FSL-BookE we setup a 1:1 mapping which covers the first 2GiB of memory * and therefore w...
ab366c1a23183b134eb19c5814f5c9fd3b0c831d
Analyze and fix the following issue in the Linux kernel code: Staging: line6: fix leaks in line6_probe()
Problem Details: If error occurs line6_probe() must put interface and usbdev that were got before. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/line6/driver.c b/drivers/staging/line6/driver.c index 1d5a47302763..27b986a50a03 100644 --- a/drivers/staging/line6/driver.c +++ b/drivers/staging/line6/driver.c @@ -679,8 +679,10 @@ static int line6_probe(struct usb_interface *interface, const struct usb_device_ usb_get_dev(usbde...
0d9073abb7735dc7005a76835af055f4b6851586
Analyze and fix the following issue in the Linux kernel code: staging: ti dspbridge: fix compilation error
Problem Details: This patch fix a compilation error in uuid_hex_to_bin due to the patch "simplify and clean up" Signed-off-by: Rene Sapiens <rene.sapiens@ti.com> Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/tidspbridge/gen/uuidutil.c b/drivers/staging/tidspbridge/gen/uuidutil.c index eb09bc32e881..070761bf62bb 100644 --- a/drivers/staging/tidspbridge/gen/uuidutil.c +++ b/drivers/staging/tidspbridge/gen/uuidutil.c @@ -58,6 +58,7 @@ static s32 uuid_hex_to_bin(char *buf, s32 len) { s32...
70a7cb3b39994ff366ff100b46f9dc97b1510c0f
Analyze and fix the following issue in the Linux kernel code: perf annotate: Fix handling of goto labels that are valid hex numbers
Problem Details: When parsing the objdump disassembly output we can have goto labels that are valid hex numbers and thus get confused with lines with machine code. Handle the common case of a label that has nothing after it and other cases where there is just source code by validating the resulting "ip". It is still ...
```diff diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index 699cf81ea082..784ee0bdda77 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c @@ -976,13 +976,17 @@ static int hist_entry__parse_objdump_line(struct hist_entry *self, FILE *file, * Parse hexa addresses followed by ':' */ ...
4c0c03ca54f72fdd5912516ad0a23ec5cf01bda7
Analyze and fix the following issue in the Linux kernel code: CIFS: Fix a malicious redirect problem in the DNS lookup code
Problem Details: Fix the security problem in the CIFS filesystem DNS lookup code in which a malicious redirect could be installed by a random user by simply adding a result record into one of their keyrings with add_key() and then invoking a CIFS CFS lookup [CVE-2010-2524]. This is done by creating an internal keyring...
```diff diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 484e52bb40bb..2cb1a70214d7 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c @@ -923,7 +923,7 @@ init_cifs(void) goto out_unregister_filesystem; #endif #ifdef CONFIG_CIFS_DFS_UPCALL - rc = register_key_type(&key_type_dns_resolver); + rc = cifs_init_...
4c21adf26f8fcf86a755b9b9f55c2e9fd241e1fb
Analyze and fix the following issue in the Linux kernel code: x86 cpufreq, perf: Make trace_power_frequency cpufreq driver independent
Problem Details: and fix the broken case if a core's frequency depends on others. trace_power_frequency was only implemented in a rather ungeneric way in acpi-cpufreq driver's target() function only. -> Move the call to trace_power_frequency to cpufreq.c:cpufreq_notify_transition() where CPUFREQ_POSTCHANGE noti...
```diff diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c index 1d3cddaa40ee..cee5263927c1 100644 --- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c @@ -34,7 +34,6 @@ #include <linux/compiler.h> #include <linux/dmi.h> #...
a7029c82622f6483a27ebe7ed61b622e1a00664d
Analyze and fix the following issue in the Linux kernel code: ARM: 6230/1: fix nuc900 touchscreen clk definition bug
Problem Details: This patch is to fix nuc900 touchscreen clk definition bug,the .dev_id's name should be 'nuc900-ts', it should be the same to pdev.name. or else, the touchscreen driver will be not working well due to clock engine disabled. Signed-off-by: Wan ZongShun <mcuos.com@gmail.com> Signed-off-by: Russell King ...
```diff diff --git a/arch/arm/mach-w90x900/cpu.c b/arch/arm/mach-w90x900/cpu.c index 642207e18198..83c56324a472 100644 --- a/arch/arm/mach-w90x900/cpu.c +++ b/arch/arm/mach-w90x900/cpu.c @@ -93,7 +93,7 @@ static struct clk_lookup nuc900_clkregs[] = { DEF_CLKLOOK(&clk_kpi, "nuc900-kpi", NULL), DEF_CLKLOOK(&clk_wdt, ...
52fa2bbc8ec46255039e2048d616bbd0852ee292
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: add quirk to make HP DV5000 laptop resume
Problem Details: Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=29062 Reported-by: Andres Cimmarusti <acimmarusti@gmail.com> Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c index d1c1d8dd93ce..2417d7b06fdb 100644 --- a/drivers/gpu/drm/radeon/radeon_combios.c +++ b/drivers/gpu/drm/radeon/radeon_combios.c @@ -3050,6 +3050,14 @@ void radeon_combios_asic_init(struct drm_device *dev) rd...
4cfa580e7eebb8694b875d2caff3b989ada2efac
Analyze and fix the following issue in the Linux kernel code: r6040: Fix args to phy_mii_ioctl().
Problem Details: Reported by Stephen Rothwell. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c index 7d482a2316ac..142c381e1d73 100644 --- a/drivers/net/r6040.c +++ b/drivers/net/r6040.c @@ -510,7 +510,7 @@ static int r6040_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) if (!lp->phydev) return -EINVAL; - return phy_mii_ioctl(lp->phyd...
4c3e5edf2f33546392fbd9beaae04e9bed7304ff
Analyze and fix the following issue in the Linux kernel code: vhost net: Fix warning.
Problem Details: Reported by Stephen Rothwell. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 7a104e2de3fa..f11e6bb5b036 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -533,7 +533,6 @@ static long vhost_net_set_backend(struct vhost_net *n, unsigned index, int fd) vhost_net_enable_vq(n, vq); } -done: mutex_...
0327559151c6886814d6d5b373b4bf6de63fb9f6
Analyze and fix the following issue in the Linux kernel code: x86: auditsyscall: fix fastpath return value after reschedule
Problem Details: In the CONFIG_AUDITSYSCALL fast-path for x86 64-bit system calls, we can pass a bad return value and/or error indication for the system call to audit_syscall_exit(). This happens when TIF_NEED_RESCHED was set as the system call returned, so we went out to schedule() and came back to the exit-audit fas...
```diff diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index 0697ff139837..4db7c4d12ffa 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S @@ -571,8 +571,8 @@ auditsys: * masked off. */ sysret_audit: - movq %rax,%rsi /* second arg, syscall return value */ - cmpq $0,%r...
b0679c63db655fa12007558e267bc0eb1d486fdb
Analyze and fix the following issue in the Linux kernel code: debug_core,kdb: fix kgdb_connected bit set in the wrong place
Problem Details: Immediately following an exit from the kdb shell the kgdb_connected variable should be set to zero, unless there are breakpoints planted. If the kgdb_connected variable is not zeroed out with kdb, it is impossible to turn off kdb. This patch is merely a work around for now, the real fix will check for...
```diff diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c index 5cb7cd1de10c..8bc5eeffec8a 100644 --- a/kernel/debug/debug_core.c +++ b/kernel/debug/debug_core.c @@ -605,13 +605,13 @@ cpu_master_loop: if (dbg_kdb_mode) { kgdb_connected = 1; error = kdb_stub(ks); + kgdb_connected = 0; } ...
9e8b624fcaebf9c237b5be9116f4424bf168e6d1
Analyze and fix the following issue in the Linux kernel code: Fix merge regression from external kdb to upstream kdb
Problem Details: In the process of merging kdb to the mainline, the kdb lsmod command stopped printing the base load address of kernel modules. This is needed for using kdb in conjunction with external tools such as gdb. Simply restore the functionality by adding a kdb_printf for the base load address of the kernel m...
```diff diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c index a7fe2e98d613..7e9bfd54a0db 100644 --- a/kernel/debug/kdb/kdb_main.c +++ b/kernel/debug/kdb/kdb_main.c @@ -1883,6 +1883,7 @@ static int kdb_lsmod(int argc, const char **argv) kdb_printf(" (Loading)"); else kdb_printf(" (Live)...
0baf2d8fe43fdd81faa30e65ff71785c99c78520
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix RADEON_INFO_CRTC_FROM_ID info ioctl
Problem Details: Return the crtc_id, not the counter value. They are not necessarily the same. Cc: Jerome Glisse <glisse@freedesktop.org> Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c index 6a70c0dc7f92..ab389f89fa8d 100644 --- a/drivers/gpu/drm/radeon/radeon_kms.c +++ b/drivers/gpu/drm/radeon/radeon_kms.c @@ -128,7 +128,8 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) ...
d667865114d10723f4d22cc5b7bf2c743d1f2198
Analyze and fix the following issue in the Linux kernel code: Fix ttm_page_alloc.c build breakage
Problem Details: The commit 1e8655f87333def92bb8215b423adc65403b08a5 drm/ttm: Fix build on architectures without AGP looks at TTM_HAS_AGP before it has been set in ttm_bo_driver.h Move the conditional inclusion of <asm/agp.h> *after* we have included ttm_bo_driver.h Signed-of-by: Tony Luck <tony.luck@intel.com> ...
```diff diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index 1f32b460adce..f394b3b2fadf 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c @@ -40,13 +40,13 @@ #include <linux/slab.h> #include <asm/atomic.h> -#ifdef TTM_HAS_AGP -#inc...
15cb02c0a0338ee724bf23e31c7c410ecbffeeba
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix legacy LVDS dpms sequence
Problem Details: Add delay after turning off the LVDS encoder. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=16389 Tested-by: Jan Kreuzer <kontrollator@gmx.de> Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c index bad77f40a9da..5688a0cf6bbe 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c @@ -108,6 +108,7 @@ static void radeon_legacy_lvds_dp...
29508eb66bfacdef324d2199eeaea31e0cdfaa29
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: drop taking lock around crtc lookup.
Problem Details: We only add/remove crtcs at driver load, you cannot remove when the GPU is running a CS packet since the fd is open, when GPU hotplugging on radeons actually is needed all this locking needs a review and I've started re-working kms core locking to deal with this better. But for now avoid long delays in...
```diff diff --git a/drivers/gpu/drm/radeon/evergreen_cs.c b/drivers/gpu/drm/radeon/evergreen_cs.c index 010963d4570f..345a75a03c96 100644 --- a/drivers/gpu/drm/radeon/evergreen_cs.c +++ b/drivers/gpu/drm/radeon/evergreen_cs.c @@ -333,7 +333,6 @@ static int evergreen_cs_packet_parse_vline(struct radeon_cs_parser *p) ...
30b6777b8931afc5f3aa42858fe917938b570f79
Analyze and fix the following issue in the Linux kernel code: [SCSI] zfcp: Fix check whether unchained ct_els is possible
Problem Details: A false check was performed whether an unchained ct_els is possible or not. Signed-off-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 9ac6a6e4a604..4e15361a83b9 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c @@ -981,7 +981,7 @@ static int zfcp_fsf_setup_ct_els_sbals(struct zfcp_fsf_req *req, } /* use single, unchained SBAL if it ...
5adcbeb34d2a031d3baca227eef23e56734006ba
Analyze and fix the following issue in the Linux kernel code: [SCSI] ipr: fix resource path display and formatting
Problem Details: It was possible to overflow the buffer used to print out the formatted version of the resource path. The fix is to limit the number of bytes that get formatted. This patch also updates the ipr_show_resource_path function to display the resource address for devices that are attached to adapters that d...
```diff diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 82ea4a8226b0..f820cffb7f00 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -1129,20 +1129,22 @@ static int ipr_is_same_device(struct ipr_resource_entry *res, } /** - * ipr_format_resource_path - Format the resource path for printing. + *...
e675b6db1245649f91bb1bfb10baef9af6d3f8e6
Analyze and fix the following issue in the Linux kernel code: IB/ehca: Catch failing ioremap()
Problem Details: When ioremap() fails with a NULL pointer, catch the error and pass it to the caller of create_qp() or create_cq() instead of trying to dereference the NULL pointer later on. Signed-off-by: Alexander Schmidt <alexs@linux.vnet.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/ehca/hcp_if.c b/drivers/infiniband/hw/ehca/hcp_if.c index 4d5dc3304d42..e6f9cdd94c7a 100644 --- a/drivers/infiniband/hw/ehca/hcp_if.c +++ b/drivers/infiniband/hw/ehca/hcp_if.c @@ -269,6 +269,7 @@ u64 hipz_h_alloc_resource_cq(const struct ipz_adapter_handle adapter_handle, ...
eebef74695e1498e04e5f85be9c6f84bd2e7358a
Analyze and fix the following issue in the Linux kernel code: sched: Use correct macro to display sched_child_runs_first in /proc/sched_debug
Problem Details: The sched_child_runs_first value in /proc/sched_debug is currently displayed using a macro meant to split ns time values. This patch uses the correct macro to display it as a plain decimal value. Signed-off-by: Josh Hunt <johunt@akamai.com> Cc: peterz@infradead.org Cc: juhlenko@akamai.com Cc: efault@g...
```diff diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c index 35565395d00d..2e1b0d17dd9b 100644 --- a/kernel/sched_debug.c +++ b/kernel/sched_debug.c @@ -332,7 +332,7 @@ static int sched_debug_show(struct seq_file *m, void *v) PN(sysctl_sched_latency); PN(sysctl_sched_min_granularity); PN(sysctl_sched_wa...
bc05d19f4b884b1dbbce48912710ae3f972c89d2
Analyze and fix the following issue in the Linux kernel code: mac80211: fix IBSS lockdep complaint
Problem Details: Bob reported a lockdep complaint originating in the mac80211 IBSS code due to the common work struct patch. The reason is that the IBSS and station mode code have different locking orders for the cfg80211 wdev lock and the work struct (where "locking" implies running/canceling). Fix this by simply not...
```diff diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index d4e84b22a66d..090e344d5f90 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c @@ -943,11 +943,6 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata) } } - del_timer_sync(&sdata->u.ibss.timer); - clear_bit(IEEE80211_IBSS_REQ_...
5a652052fedbd7869572c757dd2ffc2ed420c69d
Analyze and fix the following issue in the Linux kernel code: cfg80211: fix race between sysfs and cfg80211
Problem Details: device_add() is called before adding the phy to the cfg80211 device list. So if a userspace program uses sysfs uevents to detect new phy devices, and queries nl80211 to get phy info, it can get ENODEV even though the phy exists in sysfs. An easy workaround is to hold the cfg80211 mutex until the phy ...
```diff diff --git a/net/wireless/core.c b/net/wireless/core.c index 47fcfd0eebc2..f65c6494ede9 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c @@ -472,24 +472,22 @@ int wiphy_register(struct wiphy *wiphy) /* check and set up bitrates */ ieee80211_set_bitrate_flags(wiphy); + mutex_lock(&cfg80211_mutex)...
5edd19af18a36a4e22c570b1b969179e0ca1fe4c
Analyze and fix the following issue in the Linux kernel code: x86, UV: Make kdump avoid stack dumps
Problem Details: UV NMI callback's should not write stack dumps when a kdump is to be written. When invoking the crash kernel to write a dump, kdump_nmi_shootdown_cpus() uses NMI's to get all the cpu's to save their register context and halt. But the NMI interrupt handler runs a callback list. This patch sets a flag...
```diff diff --git a/arch/x86/include/asm/kdebug.h b/arch/x86/include/asm/kdebug.h index fa7c0b974761..7a2910b3512b 100644 --- a/arch/x86/include/asm/kdebug.h +++ b/arch/x86/include/asm/kdebug.h @@ -33,5 +33,6 @@ extern void __show_regs(struct pt_regs *regs, int all); extern void show_regs(struct pt_regs *regs); exte...
f25c80a4b2bf93c99820f470573626557db35202
Analyze and fix the following issue in the Linux kernel code: arch/um/drivers: remove duplicate structure field initialization
Problem Details: There are two initializations of ndo_set_mac_address, one to a local function that is not used otherwise and one to a function that is defined elsewhere. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ identifier I, s, fld; position p0,p; expressio...
```diff diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index f05372694233..2ab233ba32c1 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c @@ -25,11 +25,6 @@ #include "net_kern.h" #include "net_user.h" -static inline void set_ether_mac(struct net_device *dev, unsigned cha...
d0996faeec8b3ab5bda65074c274bc67baf13501
Analyze and fix the following issue in the Linux kernel code: bnx2x: Protect statistics ramrod and sequence number
Problem Details: Bug fix: Protect statistics ramrod sending code and a statistics counter update with a spinlock. Otherwise there was a race condition that would allow sending a statistics ramrods with the same sequence number or with sequence numbers not in a natural order, which would cause a FW assert. Signed-off-b...
```diff diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index 3dc876ce6e1f..b86e47be9967 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c @@ -3789,6 +3789,8 @@ static void bnx2x_storm_stats_post(struct bnx2x *bp) struct eth_query_ramrod_data ramrod_data = {0}; int i, rc; + ...
a13773a53faa28cf79982601b6fc9ddb0ca45f36
Analyze and fix the following issue in the Linux kernel code: bnx2x: Protect a SM state change
Problem Details: Bug fix: Protect the statistics state machine state update with a spinlock. Otherwise there was a race condition that would cause the statistics to stay enabled despite the fact that they were disabled in the LINK_DOWN event handler. Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com> Signed-off-...
```diff diff --git a/drivers/net/bnx2x.h b/drivers/net/bnx2x.h index 8bd23687c530..bb0872a63315 100644 --- a/drivers/net/bnx2x.h +++ b/drivers/net/bnx2x.h @@ -1062,6 +1062,10 @@ struct bnx2x { /* used to synchronize stats collecting */ int stats_state; + + /* used for synchronization of concurrent threads stati...
dccb816de38efe72becc5d7f90a5dfedcd6fd053
Analyze and fix the following issue in the Linux kernel code: IB/ipath: Fix probe failure path
Problem Details: The failure path in ipath_init_one() does not match the cleanup code in ipath_remove_one() and appears to leave interrupts enabled in some cases. Change it to match. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c index 21337468c652..765f0fc1da76 100644 --- a/drivers/infiniband/hw/ipath/ipath_driver.c +++ b/drivers/infiniband/hw/ipath/ipath_driver.c @@ -390,6 +390,8 @@ done: ipath_enable_armlaunch(dd); } +static void...
893ef9711286d01763f3c175385d70076d5f9546
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix typo in hci_event.c
Problem Details: memmory -> memory Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index a96980022305..2069c3b05fda 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -584,7 +584,7 @@ static inline void hci_cs_create_conn(struct hci_dev *hdev, __u8 status) conn->out = 1; conn->link_mode |= HCI_...
89746b856c88af9e5019e84615d88e002fb54dc3
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix bug in kzalloc allocation size
Problem Details: Probably a typo error. We were using the wrong struct to get size. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index e366be0792cb..419e2c3306aa 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -530,7 +530,7 @@ static void l2cap_conn_start(struct l2cap_conn *conn) conn->feat_mask) && l2cap_pi(sk)->conf_state & L2CAP_CONF_STAT...
963cf687e825f7a59817f145a1ea19bdc224a18f
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix error return on L2CAP-HCI interface.
Problem Details: L2CAP only deals with ACL links. EINVAL should be returned otherwise. Signed-off-by: João Paulo Rechi Vita <jprvita@profusion.mobi> Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index de545f1687d8..a3dfee97ab9d 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -4415,7 +4415,7 @@ static int l2cap_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type) struct hlist_node *node; if (type != ACL_LINK) - r...
7a560e5c99dc5f03e2c0dbe05ed20008af5d0bcf
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix error value for wrong FCS.
Problem Details: Signed-off-by: João Paulo Rechi Vita <jprvita@profusion.mobi> Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 58c81cbb4040..de545f1687d8 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -3423,7 +3423,7 @@ static int l2cap_check_fcs(struct l2cap_pinfo *pi, struct sk_buff *skb) our_fcs = crc16(0, skb->data - hdr_size, skb->len + hdr_siz...
57d3b22bf56579bb1ab2d6f5020d372c99a7afae
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix error return for l2cap_connect_rsp().
Problem Details: Signed-off-by: João Paulo Rechi Vita <jprvita@profusion.mobi> Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index ac25952538fd..58c81cbb4040 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -2986,11 +2986,11 @@ static inline int l2cap_connect_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hd if (scid) { sk = l2cap_get_chan_by_scid(&conn->...
bc766db2ef3700ae74bdfc88d74b771b97971a24
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix error return value on sendmsg.
Problem Details: When the socket is in a bad state EBADFD is more appropriate then EINVAL. Signed-off-by: João Paulo Rechi Vita <jprvita@profusion.mobi> Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 884b840081ae..ac25952538fd 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -1881,7 +1881,7 @@ static int l2cap_sock_sendmsg(struct kiocb *iocb, struct socket *sock, struct ms default: BT_DBG("bad state %1.1x", pi->mode); -...
f9dd11b03c5c3cd6bdf2e503400bbc922c898974
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix error return value on sendmsg.
Problem Details: When we try to send a message bigger than the outgoing MTU value EMSGSIZE (message too long) should be returned. Signed-off-by: João Paulo Rechi Vita <jprvita@profusion.mobi> Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 33e134b0d402..884b840081ae 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -1827,7 +1827,7 @@ static int l2cap_sock_sendmsg(struct kiocb *iocb, struct socket *sock, struct ms case L2CAP_MODE_BASIC: /* Check outgoing MTU */ ...
8b0dc6dc827fb71efd6c9dfb5c4172b7b5c96cee
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix l2cap_sock_connect error return.
Problem Details: Return a proper error value if socket is already connected. Signed-off-by: João Paulo Rechi Vita <jprvita@profusion.mobi> Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 6b839d682143..e322be8ff948 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -1158,6 +1158,7 @@ static int l2cap_sock_connect(struct socket *sock, struct sockaddr *addr, int al case BT_CONNECTED: /* Already connected */ + e...
218bb9dfd21472128f86b38ad2eab123205c2991
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Add backlog queue to ERTM code
Problem Details: backlog queue is the canonical mechanism to avoid race conditions due interrupts in bottom half context. After the socket lock is released the net core take care of push all skb in its backlog queue. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: Marcel Holtmann <marcel@holt...
```diff diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index dc8601fc2404..cf4481f7f566 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -77,6 +77,8 @@ static void l2cap_sock_kill(struct sock *sk); static struct sk_buff *l2cap_build_cmd(struct l2cap_conn *conn, u8 code, u8 ident, u16 ...
e0f66218b3a7d0bcf37ca95186123c257fda0ba5
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Remove the send_lock spinlock from ERTM
Problem Details: Using a lock to deal with the ERTM race condition - interruption with new data from the hci layer - is wrong. We should use the native skb backlog queue. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index f8bae5415438..7df70e47c878 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h @@ -358,7 +358,6 @@ struct l2cap_pinfo { __le16 sport; - spinlock_t send_lock; struct timer_list retrans_timer; s...
0e98958d4f827f814444757e0376546b462dfe6f
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Add debug output to ERTM code
Problem Details: Use the dynamic debug to output info about ERTM protocol stuff. The following script can be used to enable debug for ERTM: DEBUGFS="/sys/kernel/debug/dynamic_debug/control" echo -n 'func l2cap_send_disconn_req +p' > $DEBUGFS echo -n 'func l2cap_monitor_timeout +p' > $DEBUGFS echo -n 'func l2cap_retra...
```diff diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 1e39d72b80af..6e8a0512a9c9 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -1314,6 +1314,8 @@ static void l2cap_monitor_timeout(unsigned long arg) { struct sock *sk = (void *) arg; + BT_DBG("sk %p", sk); + bh_lock_sock(sk)...
9b108fc0cf4e79c34a7d5626f5c2c4c529ef6d3f
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix ERTM error reporting to the userspace
Problem Details: If any error occurs during transfers we have to tell userspace that something wrong happened. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Reviewed-by: João Paulo Rechi Vita <jprvita@profusion.mobi> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 7c2273732909..1e39d72b80af 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -456,7 +456,7 @@ static void l2cap_do_start(struct sock *sk) } } -static void l2cap_send_disconn_req(struct l2cap_conn *conn, struct sock *sk) +stati...
4ea727ef9d507413f15da0de401d8a50b125649a
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix missing retransmission action with RR(P=1)
Problem Details: The Bluetooth SIG Profile Tuning Suite Software uses the CSA1 spec to run the L2CAP tests. The new 3.0 spec has a missing Retransmit-I-Frames action when the Remote side is Busy. We still start the retransmission timer if Remote is Busy and unacked frames > 0. We do everything we did before this change...
```diff diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 8c9f577dd46d..7c2273732909 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -3405,8 +3405,8 @@ static inline void l2cap_send_i_or_rr_or_rnr(struct sock *sk) pi->conn_state &= ~L2CAP_CONN_SEND_FBIT; } - if (pi->conn_state & ...
3cb123d1c03a0510d3c325bfaa971ce4df1e050d
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix handle of received P-bit
Problem Details: ERTM spec mandates that after receive a P-bit we shall send an F-bit in response. This patch fixes this for retransmitted packets, on retransmitting we were missing to check for a pending F-bit to be sent. Also we were missing some annotation to send a F-bit. Signed-off-by: Gustavo F. Padovan <padovan...
```diff diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index ecf3e3dcefe3..f0441b0b0335 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -1430,10 +1430,15 @@ static void l2cap_retransmit_one_frame(struct sock *sk, u8 tx_seq) tx_skb = skb_clone(skb, GFP_ATOMIC); bt_cb(skb)->retries++; ...
7452d24cfb91e84f9be61beda5ad68d2a56d0938
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix warning: variable 'tty' set but not used
Problem Details: The patch below fixes a warning message when using gcc 4.6.0. CC [M] drivers/bluetooth/hci_ldisc.o drivers/bluetooth/hci_ldisc.c: In function 'hci_uart_send_frame': drivers/bluetooth/hci_ldisc.c:213:21: warning: variable 'tty' set but not used Signed-off-by: Justin P. Mattock <justinmattock@gmail....
```diff diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c index 76a1abb8f214..e8beffe80b31 100644 --- a/drivers/bluetooth/hci_ldisc.c +++ b/drivers/bluetooth/hci_ldisc.c @@ -210,7 +210,6 @@ static int hci_uart_close(struct hci_dev *hdev) static int hci_uart_send_frame(struct sk_buff *skb) { ...
95ffa97827371ede501615d9bd048eb5b49e8fe1
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix L2CAP control bit field corruption
Problem Details: When resending an I-frame, ERTM was reusing the control bits from the last time it was sent, that was causing a corruption in the new control field due to it dirty fields. This patches extracts only the SAR bits from the old field and reuse it to resend the packet, the others bits should be reset and ...
```diff diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 4415eb48c6ae..c2fb26d9286c 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -1430,6 +1430,8 @@ static void l2cap_retransmit_one_frame(struct sock *sk, u8 tx_seq) tx_skb = skb_clone(skb, GFP_ATOMIC); bt_cb(skb)->retries++; co...
c13ffa620f15cb28d18268a773464cf51550fa9f
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Proper shutdown ERTM when closing the channel
Problem Details: Fix a crash regarding the Monitor Timeout, it was running even after the shutdown of the ACL connection, which doesn't make sense. The same code also fixes another issue, before this patch L2CAP was sending many Disconnections Requests while we have to send only one. The issues are related to each ot...
```diff diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 4af8fc0d512c..4415eb48c6ae 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -272,6 +272,24 @@ static void l2cap_chan_del(struct sock *sk, int err) parent->sk_data_ready(parent, 0); } else sk->sk_state_change(sk); + + skb_q...
51893f88dd916efead5e24a212c907b2cd35e160
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix bug with ERTM minimum packet length
Problem Details: ERTM and streaming mode L2CAP sockets have no minimum packet length. Only basic mode connections have minimum length. Instead, validate the packet containing all necessary control, FCS, and SAR fields. The patch fixes the drop of valid packets with length lower than 4. Signed-off-by: Nathan Holstein...
```diff diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index b89762134e4e..4af8fc0d512c 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -4092,9 +4092,9 @@ static inline int l2cap_data_channel(struct l2cap_conn *conn, u16 cid, struct sk { struct sock *sk; struct l2cap_pinfo *pi; - u16 ...
bfbacc11550a785caf082f3ccfcd7ecf882e09a4
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix SREJ_QUEUE corruption in L2CAP
Problem Details: Since all TxSeq values are modulo, we shall not compare them directly. We have to compare their offset inside the TxWindow instead. Signed-off-by: João Paulo Rechi Vita <jprvita@profusion.mobi> Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 69f098d98141..b89762134e4e 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -3394,6 +3394,8 @@ static inline void l2cap_send_i_or_rr_or_rnr(struct sock *sk) static int l2cap_add_to_srej_queue(struct sock *sk, struct sk_buff *skb,...
6e2b6722abaa3f6042357e11f465488b7c12f94c
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix bug in l2cap_ertm_send() behavior
Problem Details: This patch makes l2cap_ertm_send() similar to the Send-Data action of the ERTM spec. We shall not check for RemoteBusy or WAIT_F state inside l2cap_ertm_send(). Such checks were causing a bug in the retransmission logic of ERTM and making ERTM stalls until the ACL is dropped. Signed-off-by: Gustavo F...
```diff diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 108c2f290ac5..69f098d98141 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -1415,11 +1415,8 @@ static int l2cap_ertm_send(struct sock *sk) u16 control, fcs; int nsent = 0; - if (pi->conn_state & L2CAP_CONN_WAIT_F) - return...
8ff50ec04a7ecdbba6e0a5423cf6f2c5f7fc605e
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix bug with ERTM vars increment
Problem Details: All ERTM operations regarding the txWindow should be modulo 64, otherwise we confuse the ERTM logic and connections will break. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Reviewed-by: João Paulo Rechi Vita <jprvita@profusion.mobi> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 7e39d9ee0b9c..a9fdfe401f5b 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -3748,7 +3748,7 @@ static void l2cap_check_srej_gap(struct sock *sk, u8 tx_seq) l2cap_ertm_reassembly_sdu(sk, skb, control); l2cap_pi(sk)->buffer_se...
f6337c771126420c348b702e012262cfb5f0d56e
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix drop of packets with invalid req_seq/tx_seq
Problem Details: We shall not use an unsigned var since we are expecting negatives value there. Using unsigned causes ERTM connection to close due to invalid ReqSeq numbers. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 6c5462b2a244..7e39d9ee0b9c 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -3796,7 +3796,7 @@ static inline int l2cap_data_channel_iframe(struct sock *sk, u16 rx_control, str u8 tx_seq = __get_txseq(rx_control); u8 req_seq = ...
a4ce96ac356e7024a7724ade9d18ba1bdf3c5c06
Analyze and fix the following issue in the Linux kernel code: Fix up trivial spelling errors ('taht' -> 'that')
Problem Details: Pointed out by Lucas who found the new one in a comment in setup_percpu.c. And then I fixed the others that I grepped for. Reported-by: Lucas <canolucas@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c index 690c2c09faf3..a60df9ae6454 100644 --- a/arch/x86/kernel/setup_percpu.c +++ b/arch/x86/kernel/setup_percpu.c @@ -239,7 +239,7 @@ void __init setup_per_cpu_areas(void) per_cpu(x86_cpu_to_node_map, cpu) = early_per_cpu_map(x8...
6c9c0fd062a6540dbee233151679b5f03ce433d9
Analyze and fix the following issue in the Linux kernel code: ACPI: fix unused function warning
Problem Details: CONFIG_ACPI_PROCFS=n: drivers/acpi/processor_idle.c:83: warning: 'us_to_pm_timer_ticks' defined but not used. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index b1b385692f46..d0035946b6b9 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -80,10 +80,13 @@ module_param(nocst, uint, 0000); static unsigned int latency_factor __read_mostly = 2; module_param(lat...
b003afe32f608b8d9f9a898b36514dfbf374fd3a
Analyze and fix the following issue in the Linux kernel code: kbuild: Fix make rpm
Problem Details: make rpm was broken by commit 0915512: make clean set -e; cd ..; ln -sf /usr/src/iwlwifi-2.6 kernel-2.6.35rc4wl /bin/sh /usr/src/iwlwifi-2.6/scripts/setlocalversion --scm-only > /usr/src/iwlwifi-2.6/.scmversion cat: .scmversion: input file is output file make[1]: *** [rpm] Error 1 Reported-and-tested-...
```diff diff --git a/scripts/package/Makefile b/scripts/package/Makefile index 3a681ef25306..d2c29b63adda 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile @@ -44,7 +44,7 @@ rpm-pkg rpm: $(objtree)/kernel.spec FORCE fi $(MAKE) clean $(PREV) ln -sf $(srctree) $(KERNELPATH) - $(CONFIG_SHELL) $(sr...
f25f624263445785b94f39739a6339ba9ed3275d
Analyze and fix the following issue in the Linux kernel code: ext3: Avoid filesystem corruption after a crash under heavy delete load
Problem Details: It can happen that ext3_free_branches calls ext3_forget() for an indirect block in an earlier transaction than a transaction in which we clear pointer to this indirect block. Thus if we crash before a transaction clearing the block pointer is committed, we will see indirect block pointing to already fr...
```diff diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index a786db403efc..436e5bbccbc2 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c @@ -2269,27 +2269,6 @@ static void ext3_free_branches(handle_t *handle, struct inode *inode, (__le32*)bh->b_data + addr_per_block, depth); - /* - * We've pr...
0411ba7902e09111d6f2041b4697a597d2cf7736
Analyze and fix the following issue in the Linux kernel code: ext3: Fix set but unused variables
Problem Details: [tytso@mit.edu: Fix compilation with CONFIG_JBD_DEBUG enabled] Acked-by: tytso@mit.edu cc: linux-ext4@vger.kernel.org Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Jan Kara <jack@suse.cz>
```diff diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c index ee184084ca42..2b35ddb70d65 100644 --- a/fs/ext3/namei.c +++ b/fs/ext3/namei.c @@ -1447,7 +1447,6 @@ static int ext3_add_entry (handle_t *handle, struct dentry *dentry, struct inode *inode) { struct inode *dir = dentry->d_parent->d_inode; - unsigned long ...
418c527873049a9b866aa02948931d7baad7094a
Analyze and fix the following issue in the Linux kernel code: pcmcia: fix 'driver ... did not release config properly' warning
Problem Details: Up to 2.6.34 pcmcia_release_irq() reset p_dev->_irq to 0 after releasing the irq. The IRQ is now released in pcmcia_disable_device(), however p_dev->_irq is not reset, triggering a warning in pcmcia_device_remove(). Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Andrew Morton <akpm@l...
```diff diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index 29f91fac1dff..a4cd9adfcbc0 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c @@ -857,8 +857,10 @@ void pcmcia_disable_device(struct pcmcia_device *p_dev) { pcmcia_release_configuration(p_...
f4d01439515acd5d9a09de1d1e02ca40403dda49
Analyze and fix the following issue in the Linux kernel code: Kconfig.debug: FAIL_IO_TIMEOUT: typo Faul -> Fault
Problem Details: The last 't' of 'fault' is missing in the description of FAIL_IO_TIMEOUT. Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index e722e9d62221..dfdc0347b05d 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -937,7 +937,7 @@ config FAIL_MAKE_REQUEST Provide fault-injection capability for disk IO. config FAIL_IO_TIMEOUT - bool "Faul-injection capability for faking disk ...
3fea60261e73dbf4a51130d40cafcc8465b0f2c3
Analyze and fix the following issue in the Linux kernel code: Input: twl40300-keypad - fix handling of "all ground" rows
Problem Details: The Nokia RX51 board code (arch/arm/mach-omap2/board-rx51-peripherals.c) defines a key map for the matrix keypad keyboard. The hardware seems to use all of the 8 rows and 8 columns of the keypad, although not all possible locations are used. The TWL4030 supports keypads with at most 8 rows and 8 colum...
```diff diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index abdf321c2d41..c5555ca13d00 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c @@ -175,6 +175,10 @@ static void __init rx51_add_gpio_keys(void) ...
c25f7b763cc35a249232ce612a36a811b0e263f9
Analyze and fix the following issue in the Linux kernel code: Input: gamecon - reference correct pad in gc_psx_command()
Problem Details: Otherwise we won't see any events from the gamepad. Addresses https://bugzilla.kernel.org/show_bug.cgi?id=16408 Reported-and-tested-by: Eugene Yudin <eugene.yudin@gmail.com> Cc: stable@kernel.org Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/joystick/gamecon.c b/drivers/input/joystick/gamecon.c index a79f70844108..0ffaf2c77a19 100644 --- a/drivers/input/joystick/gamecon.c +++ b/drivers/input/joystick/gamecon.c @@ -578,7 +578,7 @@ static void gc_psx_command(struct gc *gc, int b, unsigned char *data) read = parport_read_...
f8324e20f8289dffc646d64366332e05eaacab25
Analyze and fix the following issue in the Linux kernel code: math-emu: correct test for downshifting fraction in _FP_FROM_INT()
Problem Details: The kernel's math-emu code contains a macro _FP_FROM_INT() which is used to convert an integer to a raw normalized floating-point value. It does this basically in three steps: 1. Compute the exponent from the number of leading zero bits. 2. Downshift large fractions to put the MSB in the right positio...
```diff diff --git a/include/math-emu/op-common.h b/include/math-emu/op-common.h index fd882261225e..9696a5e2c437 100644 --- a/include/math-emu/op-common.h +++ b/include/math-emu/op-common.h @@ -799,7 +799,7 @@ do { \ X##_e -= (_FP_W_TYPE_SIZE - rsize); \ X##_e = rsize - X##_e - 1; \ \ - if...
90c1efdd121c84ee73e9960667229a662f2315a3
Analyze and fix the following issue in the Linux kernel code: drm: Return EBUSY if the framebuffer is unbound when flipping.
Problem Details: It looks like there is a race condition between unbinding a framebuffer on a hotplug event and user space trying to flip: BUG: unable to handle kernel NULL pointer dereference at 0000000000000058 IP: [<ffffffffa008c7d3>] intel_crtc_page_flip+0xc9/0x39c [i915] PGD 114724067 PUD 1145bd067 PMD 0 Oops: 00...
```diff diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index d8d65f4232a9..4c68f76993d8 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -2617,6 +2617,15 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev, goto out; crtc = obj_to_crtc(obj); + if (crtc->fb == N...
c42750b0261274107ae85c894c088e618a3e38b9
Analyze and fix the following issue in the Linux kernel code: drm/r600: fix possible NULL pointer derefernce
Problem Details: Reported-by: Alexander Y. Fomichev <git.user@gmail.com> 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 f4fb88ece2bb..ca5c29f70779 100644 --- a/drivers/gpu/drm/radeon/r600_blit.c +++ b/drivers/gpu/drm/radeon/r600_blit.c @@ -538,9 +538,12 @@ int r600_prepare_blit_copy(struct drm_device *dev, struct drm_file *file_priv) { ...
468c30f2bbdf1ba0fbf16667eade23a46eaa8f06
Analyze and fix the following issue in the Linux kernel code: x86, iomap: Fix wrong page aligned size calculation in ioremapping code
Problem Details: x86 early_iounmap(): fix off-by-one error in page alignment of allocation size for sizes where size%PAGE_SIZE==1. Signed-off-by: Florian Zumbiehl <florz@florz.de> LKML-Reference: <201007202219.o6KMJlES021058@imap1.linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-of...
```diff diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index d41d3a9036ca..3ba6e0608c55 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c @@ -611,7 +611,7 @@ void __init early_iounmap(void __iomem *addr, unsigned long size) return; } offset = virt_addr & ~PAGE_MASK; - nrpages = PAGE_ALIG...
844b9a8707f1fcf0482e0c52f44a555e799ccda6
Analyze and fix the following issue in the Linux kernel code: vfs: fix RCU-lockdep false positive due to /proc
Problem Details: If a single-threaded process does a file-descriptor operation, and some other process accesses that same file descriptor via /proc, the current rcu_dereference_check_fdtable() can give a false-positive RCU-lockdep splat due to the reference count being increased by the /proc access after the reference-...
```diff diff --git a/include/linux/fdtable.h b/include/linux/fdtable.h index 013dc529e95f..d147461bc271 100644 --- a/include/linux/fdtable.h +++ b/include/linux/fdtable.h @@ -61,7 +61,8 @@ struct files_struct { (rcu_dereference_check((fdtfd), \ rcu_read_lock_held() || \ lockdep_is_held(&(files)-...
b8ab9f82025adea77864115da73e70026fa4f540
Analyze and fix the following issue in the Linux kernel code: x86,nobootmem: make alloc_bootmem_node fall back to other node when 32bit numa is used
Problem Details: Borislav Petkov reported his 32bit numa system has problem: [ 0.000000] Reserving total of 4c00 pages for numa KVA remap [ 0.000000] kva_start_pfn ~ 32800 max_low_pfn ~ 375fe [ 0.000000] max_pfn = 238000 [ 0.000000] 8202MB HIGHMEM available. [ 0.000000] 885MB LOWMEM available. [ 0.00...
```diff diff --git a/mm/bootmem.c b/mm/bootmem.c index 58c66cc5056a..142c84a54993 100644 --- a/mm/bootmem.c +++ b/mm/bootmem.c @@ -833,15 +833,24 @@ static void * __init ___alloc_bootmem_node(bootmem_data_t *bdata, void * __init __alloc_bootmem_node(pg_data_t *pgdat, unsigned long size, unsigned long align, un...
9aebbdb637a73a6092e1456ebb4a2df32cc1f611
Analyze and fix the following issue in the Linux kernel code: x86, numa: fix boot without RAM on node0 again
Problem Details: Commit e534c7c5f8d6 ("numa: x86_64: use generic percpu var numa_node_id() implementation") broke numa systems that don't have ram on node0 when MEMORY_HOTPLUG is enabled, because cpu_up() will call cpu_to_node() before per_cpu(numa_node) is setup for APs. When Node0 doesn't have RAM, on x86, cpus alre...
```diff diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c index de3b63ae3da2..690c2c09faf3 100644 --- a/arch/x86/kernel/setup_percpu.c +++ b/arch/x86/kernel/setup_percpu.c @@ -238,6 +238,15 @@ void __init setup_per_cpu_areas(void) #ifdef CONFIG_NUMA per_cpu(x86_cpu_to_node_map, cpu) = ...
1cd8521e7d77def75fdb1cb35ecd135385e4be4f
Analyze and fix the following issue in the Linux kernel code: edac: mpc85xx: fix MPC85xx dependency
Problem Details: Since commit 5753c082f66eca5be81f6bda85c1718c5eea6ada ("powerpc/85xx: Kconfig cleanup"), there is no MPC85xx Kconfig symbol anymore, so the driver became non-selectable. This patch fixes the issue by switching to PPC_85xx symbol. Signed-off-by: Anton Vorontsov <avorontsov@mvista.com> Cc: Doug Thompso...
```diff diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig index aedef7941b22..0d2f9dbb47e4 100644 --- a/drivers/edac/Kconfig +++ b/drivers/edac/Kconfig @@ -209,7 +209,7 @@ config EDAC_I5100 config EDAC_MPC85XX tristate "Freescale MPC83xx / MPC85xx" - depends on EDAC_MM_EDAC && FSL_SOC && (PPC_83xx || MPC85x...
a6aa62a0909b9ccb1f8b0d2653920ba071037972
Analyze and fix the following issue in the Linux kernel code: mm/vmscan.c: fix mapping use after free
Problem Details: We need lock_page_nosync() here because we have no reference to the mapping when taking the page lock. Signed-off-by: Nick Piggin <npiggin@suse.de> Reviewed-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Mel Gorman <mel@csn.ul.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: L...
```diff diff --git a/mm/vmscan.c b/mm/vmscan.c index 199fa436c0dd..b94fe1b3da43 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -298,7 +298,7 @@ static int may_write_to_queue(struct backing_dev_info *bdi) static void handle_write_error(struct address_space *mapping, struct page *page, int error) { - lock_page(page...
c61284e99191b2284fb74dae6961d4d09e4e59e8
Analyze and fix the following issue in the Linux kernel code: ipc/sem.c: bugfix for semop() not reporting successful operation
Problem Details: The last change to improve the scalability moved the actual wake-up out of the section that is protected by spin_lock(sma->sem_perm.lock). This means that IN_WAKEUP can be in queue.status even when the spinlock is acquired by the current task. Thus the same loop that is performed when queue.status is...
```diff diff --git a/ipc/sem.c b/ipc/sem.c index 506c8491a8d1..40a8f462a822 100644 --- a/ipc/sem.c +++ b/ipc/sem.c @@ -1256,6 +1256,33 @@ out: return un; } + +/** + * get_queue_result - Retrieve the result code from sem_queue + * @q: Pointer to queue structure + * + * Retrieve the return code from the pending queu...
7aa2b5f8ec60505160df1c25398e8286c8432689
Analyze and fix the following issue in the Linux kernel code: x86, xsave: Do not include asm/i387.h in asm/xsave.h
Problem Details: There are no dependencies to asm/i387.h. Instead, if including only xsave.h the following error occurs: .../arch/x86/include/asm/i387.h:110: error: ‘XSTATE_FP’ undeclared (first use in this function) .../arch/x86/include/asm/i387.h:110: error: (Each undeclared identifier is reported only once .../a...
```diff diff --git a/arch/x86/include/asm/xsave.h b/arch/x86/include/asm/xsave.h index ec86c5fd6a6e..94d5f84d89f2 100644 --- a/arch/x86/include/asm/xsave.h +++ b/arch/x86/include/asm/xsave.h @@ -3,7 +3,6 @@ #include <linux/types.h> #include <asm/processor.h> -#include <asm/i387.h> #define XSTATE_FP 0x1 #define ...
07fca0e57fca925032526349f4370f97ed580cc9
Analyze and fix the following issue in the Linux kernel code: tracing: Properly align linker defined symbols
Problem Details: We define a number of symbols in the linker scipt like this: __start_syscalls_metadata = .; *(__syscalls_metadata) But we do not know the alignment of "." when we assign the __start_syscalls_metadata symbol. gcc started to uses bigger alignment for structs (32 bytes), so we saw situations whe...
```diff diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 48c5299cbf26..4b5902ad0d5d 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -63,6 +63,12 @@ /* Align . to a 8 byte boundary equals to maximum function alignment. */ #define ALIGN_F...
7173aeff025a7fed3fa903e362bf773e6258dd47
Analyze and fix the following issue in the Linux kernel code: drm/nouveau: Fix crashes during fbcon init on single head cards.
Problem Details: this fixes a regression since the fbcon rework. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c index c9a4a0d2a115..257ea130ae13 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c @@ -387,7 +387,8 @@ int nouveau_fbcon_init(struct drm_device *dev) dev_priv->nfbdev...
14d7ec11d165fe11c2bce5b412773af70b7c8e1b
Analyze and fix the following issue in the Linux kernel code: drm/nouveau: fix pcirom vbios shadow breakage from acpi rom patch
Problem Details: On nv50 it became impossible to attempt a PCI ROM shadow of the VBIOS, which will break some setups. This patch also removes the different ordering of shadow methods for pre-nv50 chipsets. The reason for the different ordering was paranoia, but it should hopefully be OK to try shadowing PRAMIN first....
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index fc924b649195..e492919faf44 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c @@ -203,36 +203,26 @@ struct methods { const bool rw; }; -static struct methods nv04...
fa10ba64ac94fec4611b79804023eb087862ffe0
Analyze and fix the following issue in the Linux kernel code: x86, gcc-4.6: Fix set but not read variables
Problem Details: Just some dead code, no real bugs. Found by gcc 4.6 -Wall Signed-off-by: Andi Kleen <ak@linux.intel.com> LKML-Reference: <201007202219.o6KMJnQ0021072@imap1.linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
```diff diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c index b5d8b0bcf235..a2e0caf26e17 100644 --- a/arch/x86/kernel/aperture_64.c +++ b/arch/x86/kernel/aperture_64.c @@ -280,7 +280,7 @@ void __init early_gart_iommu_check(void) * or BIOS forget to put that in reserved. * try to update ...
42f14c4b454946650cf0bf66e0b631d02e328f61
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix shared ddc harder
Problem Details: This fixes a regression caused by b2ea4aa67bfd084834edd070e0a4a47857d6db59 due to the way shared ddc with multiple digital connectors was handled. You generally have two cases where DDC lines are shared: - HDMI + VGA - HDMI + DVI-D HDMI + VGA is easy to deal with because you can check the EDID for th...
```diff diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index f58f8bd8f77b..adccbc2c202c 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c @@ -771,14 +771,14 @@ static enum drm_connector_status radeon_dvi_detect(...
b603742f49c3ec922522602e18ac22e8f6835132
Analyze and fix the following issue in the Linux kernel code: mwl8k: correct/silence sparse warnings
Problem Details: drivers/net/wireless/mwl8k.c:1541:21: warning: incorrect type in assignment (different base types) drivers/net/wireless/mwl8k.c:1541:21: expected restricted __le16 [usertype] result drivers/net/wireless/mwl8k.c:1541:21: got int drivers/net/wireless/mwl8k.c:1575:42: expected unsigned short [uns...
```diff diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index cd37b2ac5356..e3f130c4eaff 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c @@ -314,13 +314,15 @@ static const struct ieee80211_rate mwl8k_rates_50[] = { #define MWL8K_CMD_SET_NEW_STN 0x1111 /* per-vif ...
16124541321e3c4030973b34b3f013605f052679
Analyze and fix the following issue in the Linux kernel code: rt2x00: correct sparse warning in rt2x00debug.c
Problem Details: CHECK drivers/net/wireless/rt2x00/rt2x00debug.c drivers/net/wireless/rt2x00/rt2x00debug.c:193:28: warning: incorrect type in assignment (different base types) drivers/net/wireless/rt2x00/rt2x00debug.c:193:28: expected restricted __le32 [usertype] chip_rev drivers/net/wireless/rt2x00/rt2x00debug.c:...
```diff diff --git a/drivers/net/wireless/rt2x00/rt2x00dump.h b/drivers/net/wireless/rt2x00/rt2x00dump.h index 6df2e0b746b8..5d6e0b83151f 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dump.h +++ b/drivers/net/wireless/rt2x00/rt2x00dump.h @@ -116,7 +116,7 @@ struct rt2x00dump_hdr { __le16 chip_rt; __le16 chip_rf;...
a3d3da14fb0c8dcfac374543fd7fedda05e9d4fd
Analyze and fix the following issue in the Linux kernel code: ath9k: correct sparse identified endian bug in ath_paprd_calibrate
Problem Details: drivers/net/wireless/ath/ath9k/main.c:282:26: warning: incorrect type in assignment (different base types) drivers/net/wireless/ath/ath9k/main.c:282:26: expected restricted __le16 [usertype] duration_id drivers/net/wireless/ath/ath9k/main.c:282:26: got int Signed-off-by: John W. Linville <linvil...
```diff diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index d45cf0b5db05..6cf0410ae0ba 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -279,7 +279,7 @@ void ath_paprd_calibrate(struct work_struct *work) hdr = (struct ieee80...
875ae5f68883c75aad826e715df8ec0619551a07
Analyze and fix the following issue in the Linux kernel code: mac80211: fix aggregation action frame handling with AP VLANs
Problem Details: When aggregation related action frames are enqueued for further work, and they originate from a STA that is part of an AP VLAN, they are currently enqueued for the AP interface. This breaks the sta_info_get() lookup in the actual work function, and because of that, aggregation sessions are not establis...
```diff diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 910729fc18cd..8ef2fde6e920 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c @@ -741,7 +741,7 @@ static void ieee80211_iface_work(struct work_struct *work) int len = skb->len; mutex_lock(&local->sta_mtx); - sta = sta_info_get(...
06ee1c261360545c97fd836fff9dbd10ebd9301b
Analyze and fix the following issue in the Linux kernel code: wireless: use netif_rx_ni in ieee80211_send_layer2_update
Problem Details: These synthetic frames are all triggered from userland requests in process context. https://bugzilla.kernel.org/show_bug.cgi?id=16412 Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index c7000a6ca379..67ee34f57df7 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -632,7 +632,7 @@ static void ieee80211_send_layer2_update(struct sta_info *sta) skb->dev = sta->sdata->dev; skb->protocol = eth_type_trans(skb, sta->sdata->dev); ...
c8639a827fa48985432ad2e0e21b1280a1e3a65e
Analyze and fix the following issue in the Linux kernel code: cxgb4vf: Fix bug where we were only allocating one queue in MSI mode
Problem Details: Fix bug in setup_sge_queues() where we were incorrectly only allocating a single "Queue Set" for MSI mode. Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/cxgb4vf/cxgb4vf_main.c b/drivers/net/cxgb4vf/cxgb4vf_main.c index d065516c0ffd..a16563219ac9 100644 --- a/drivers/net/cxgb4vf/cxgb4vf_main.c +++ b/drivers/net/cxgb4vf/cxgb4vf_main.c @@ -533,10 +533,9 @@ static int setup_sge_queues(struct adapter *adapter) struct port_info *pi = netde...
024e6293f959dc86827284bc1d7c93c8baed1ec6
Analyze and fix the following issue in the Linux kernel code: cxgb4vf: Fix off-by-one error checking for the end of the mailbox delay array
Problem Details: Fix off-by-one error in checking for the end of the mailbox response delay array. We ended up walking off the end and, if we were unlucky, we'd end up pulling in a 0 and never terminate the mailbox response delay loop ... Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller...
```diff diff --git a/drivers/net/cxgb4vf/t4vf_hw.c b/drivers/net/cxgb4vf/t4vf_hw.c index 1ef252864b9c..ea1c123f0cb4 100644 --- a/drivers/net/cxgb4vf/t4vf_hw.c +++ b/drivers/net/cxgb4vf/t4vf_hw.c @@ -163,7 +163,7 @@ int t4vf_wr_mbox_core(struct adapter *adapter, const void *cmd, int size, for (i = 0; i < 500; i += ms)...
9fe41e4197f351bc78547ab2d8808e1aca30d87c
Analyze and fix the following issue in the Linux kernel code: documentation: fix almost duplicate filenames (IO/io-mapping.txt)
Problem Details: Having both IO-mapping.txt and io-mapping.txt in Documentation/ was confusing and/or bothersome to some people, so rename IO-mapping.txt to bus-virt-phys-mapping.txt. Also update Documentation/00-INDEX for both of these files. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Kees Bakker <kee...
```diff diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX index dd10b51b4e65..5405f7aecefc 100644 --- a/Documentation/00-INDEX +++ b/Documentation/00-INDEX @@ -32,8 +32,6 @@ DocBook/ - directory with DocBook templates etc. for kernel documentation. HOWTO - the process and procedures of how to do Linux k...
59b48568312a262cbba814c683a320fb4e0dccae
Analyze and fix the following issue in the Linux kernel code: fs/Kconfig: Fix typo Userpace -> Userspace
Problem Details: Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/fs/Kconfig b/fs/Kconfig index 5f85b5947613..3d185308ec88 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -64,7 +64,7 @@ source "fs/autofs4/Kconfig" source "fs/fuse/Kconfig" config CUSE - tristate "Character device in Userpace support" + tristate "Character device in Userspace support" depends on ...
f2e005aaff4878a8ea93d5fb033a21389b72579a
Analyze and fix the following issue in the Linux kernel code: workqueue: fix mayday_mask handling on UP
Problem Details: All cpumasks are assumed to have cpu 0 permanently set on UP, so it can't be used to signify whether there's something to be done for the CPU. workqueue was using cpumask to track which CPU requested rescuer assistance and this led rescuer thread to think there always are pending mayday requests on UP...
```diff diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 79a11e40f311..c11edc9c9365 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -185,6 +185,27 @@ struct wq_flusher { struct completion done; /* flush completion */ }; +/* + * All cpumasks are assumed to be always set on UP and thus can't b...
cd7643bfb772dc7103ed6fc8dda6b233a8e14178
Analyze and fix the following issue in the Linux kernel code: ALSA: hda-intel - fix function_id rework (add missing bitmask)
Problem Details: Signed-off-by: Jaroslav Kysela <perex@perex.cz>
```diff diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 6e0de65f1f3a..3252945f3743 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -731,7 +731,7 @@ static void /*__devinit*/ setup_fg_nodes(struct hda_codec *codec) for (i = 0; i < total_nodes; i++, nid++) { functio...
931ac77ef65d2d90ee1def63d2041402ec7c53ab
Analyze and fix the following issue in the Linux kernel code: workqueue: fix build problem on !CONFIG_SMP
Problem Details: Commit f3421797 (workqueue: implement unbound workqueue) incorrectly tested CONFIG_SMP as part of a C expression in alloc/free_cwqs(). As CONFIG_SMP is not defined in UP, this breaks build. Fix it by using Found during linux-next build test. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Ste...
```diff diff --git a/kernel/workqueue.c b/kernel/workqueue.c index aca94726e20a..79a11e40f311 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -2615,11 +2615,15 @@ static int alloc_cwqs(struct workqueue_struct *wq) const size_t size = sizeof(struct cpu_workqueue_struct); const size_t align = max_t(size_t...
48519f0ae03bc7e86b3dc93e56f1334d53803770
Analyze and fix the following issue in the Linux kernel code: ASoC: davinci: let platform data define edma queue numbers
Problem Details: Currently the EDMA queue to be used by for servicing ASP through internal RAM is fixed to EDMAQ_0 and that to service internal RAM from external RAM is fixed to EDMAQ_1. This may not be the desirable configuration on all platforms. For example, on DM365, queue 0 has large fifo size and is more suitabl...
```diff diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c index 212d97084bd7..bc384d3561da 100644 --- a/arch/arm/mach-davinci/board-da830-evm.c +++ b/arch/arm/mach-davinci/board-da830-evm.c @@ -208,7 +208,7 @@ static struct snd_platform_data da830_evm_snd_data = { .num_ser...
573201f36fd9c7c6d5218cdcd9948cee700b277d
Analyze and fix the following issue in the Linux kernel code: bridge: Partially disable netpoll support
Problem Details: The new netpoll code in bridging contains use-after-free bugs that are non-trivial to fix. This patch fixes this by removing the code that uses skbs after they're freed. As a consequence, this means that we can no longer call bridge from the netpoll path, so this patch also removes the controller fun...
```diff diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c index eedf2c94820e..753fc4221f3c 100644 --- a/net/bridge/br_device.c +++ b/net/bridge/br_device.c @@ -217,14 +217,6 @@ static bool br_devices_support_netpoll(struct net_bridge *br) return count != 0 && ret; } -static void br_poll_controller(struc...
944001201ca0196bcdb088129e5866a9f379d08c
Analyze and fix the following issue in the Linux kernel code: drm/i915: enable low power render writes on GEN3 hardware.
Problem Details: A lot of 945GMs have had stability issues for a long time, this manifested as X hangs, blitter engine hangs, and lots of crashes. one such report is at: https://bugs.freedesktop.org/show_bug.cgi?id=20560 along with numerous distro bugzillas. This only took a week of digging and hair ripping to figur...
```diff diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 074385882ccf..43ce3809ef64 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -4741,6 +4741,16 @@ i915_gem_load(struct drm_device *dev) list_add(&dev_priv->mm.shrink_list, &shrink_list); s...
1e8655f87333def92bb8215b423adc65403b08a5
Analyze and fix the following issue in the Linux kernel code: drm/ttm: Fix build on architectures without AGP
Problem Details: Make inclusion of <asm/agp.h> conditional on TTM_HAS_AGP. The use of the functions declared in it is already conditional. Reported-by: Geert Stappers <stappers@stappers.nl> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Tested-by: Geert Stappers <stappers@stappers.nl> Signed-off-by: Dave Airlie <...
```diff diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index b1d67dc973dc..1f32b460adce 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c @@ -40,7 +40,9 @@ #include <linux/slab.h> #include <asm/atomic.h> +#ifdef TTM_HAS_AGP #inclu...