id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
1bbedc3a7bf2a72b9b58ce1d171811db757b1940
Analyze and fix the following issue in the Linux kernel code: xtensa: fix missing return in do_page_fault for SIGBUS case
Problem Details: Signed-off-by: Marc Gauthier <marc@tensilica.com> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
```diff diff --git a/arch/xtensa/mm/fault.c b/arch/xtensa/mm/fault.c index 2c2f710ed1dc..245b08f7eaf4 100644 --- a/arch/xtensa/mm/fault.c +++ b/arch/xtensa/mm/fault.c @@ -6,7 +6,7 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. * - * Copyright (C) 2001 - 2005 Tensil...
84ed30538b5d9a29a9612b93dd0a45d561624f82
Analyze and fix the following issue in the Linux kernel code: xtensa: copy_thread with CLONE_VM must not copy live parent AR windows
Problem Details: When doing a fork (new VM), the new task has a mirror image of the parent's stack, so keeps the same live register windows etc. However when doing a clone with CLONE_VM, keeping the same VM (eg. when creating a new thread), the child starts afresh on a new stack -- it cannot share any part of the paren...
```diff diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c index bc020825cce5..7901ee76b9be 100644 --- a/arch/xtensa/kernel/process.c +++ b/arch/xtensa/kernel/process.c @@ -173,6 +173,16 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) * * Note: This is a pristine ...
eae8a416afe140df4b054c448476654db0d46bde
Analyze and fix the following issue in the Linux kernel code: xtensa: fix memmove(), bcopy(), and memcpy().
Problem Details: - fix memmove to correctly handle overlapping src and dst; - fix memcpy loop ending conditions from signed '<=' to '!='; - modify bcopy to call memmove; Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
```diff diff --git a/arch/xtensa/lib/memcopy.S b/arch/xtensa/lib/memcopy.S index ea59dcd03866..c48b80acb5f0 100644 --- a/arch/xtensa/lib/memcopy.S +++ b/arch/xtensa/lib/memcopy.S @@ -6,7 +6,7 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. * - * Copyright (C) 2002 -...
c88d8df0cc69fe0238f2c805a87cc67fb27a43fe
Analyze and fix the following issue in the Linux kernel code: xtensa: ISS: fix rs_put_char
Problem Details: ISS serial console prints garbage instead of symbols printed via rs_put_char. gcc optimizes away putting prined symbol into memory buffer because there's no evidence that the buffer is used afterwards. Make rs_put_char and rs_write use simc_write that has explicit wmb. Signed-off-by: Max Filippov <jc...
```diff diff --git a/arch/xtensa/platforms/iss/console.c b/arch/xtensa/platforms/iss/console.c index 8ab47edd7c82..7e74895eee04 100644 --- a/arch/xtensa/platforms/iss/console.c +++ b/arch/xtensa/platforms/iss/console.c @@ -91,7 +91,7 @@ static int rs_write(struct tty_struct * tty, { /* see drivers/char/serialX.c to ...
50c08f8e9f44bc7b20e06c06d1180f3b914e5a83
Analyze and fix the following issue in the Linux kernel code: xtensa: ISS: fix specific simcalls
Problem Details: Simcalls that take memory buffer definitely need wmb or rmb to make sure gcc doesn't optimize away code that fills the buffer. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
```diff diff --git a/arch/xtensa/platforms/iss/include/platform/simcall.h b/arch/xtensa/platforms/iss/include/platform/simcall.h index 8c43bfea05e1..bd78192e2fc9 100644 --- a/arch/xtensa/platforms/iss/include/platform/simcall.h +++ b/arch/xtensa/platforms/iss/include/platform/simcall.h @@ -78,8 +78,9 @@ static inline i...
5448a279ebf2a8e4cc7289ff1ef382b3e71b8ea6
Analyze and fix the following issue in the Linux kernel code: dtb: fix interrupt assignment for ehci/uhci on wm8505
Problem Details: EHCI and UHCI devices in wm8505.dtsi should use IRQ 1 & 0 respectively - not 43 as used on newer models. Signed-off-by: Tony Prisk <linux@prisktech.co.nz> Signed-off-by: Olof Johansson <olof@lixom.net>
```diff diff --git a/arch/arm/boot/dts/wm8505.dtsi b/arch/arm/boot/dts/wm8505.dtsi index b459691655ab..330f833ac3b0 100644 --- a/arch/arm/boot/dts/wm8505.dtsi +++ b/arch/arm/boot/dts/wm8505.dtsi @@ -71,13 +71,13 @@ ehci@d8007100 { compatible = "via,vt8500-ehci"; reg = <0xd8007100 0x200>; - interrupts = <43...
be5b779ae9ce64ede0a8f4939360b0320bb257e2
Analyze and fix the following issue in the Linux kernel code: random: make it possible to enable debugging without rebuild
Problem Details: The module parameter that turns debugging mode (which basically means printing a few extra lines during runtime) is in '#if 0' block. Forcing everyone who would like to see how entropy is behaving on his system to rebuild seems to be a little bit too harsh. If we were concerned about speed, we could p...
```diff diff --git a/drivers/char/random.c b/drivers/char/random.c index b86eae9b77df..9ac4443a1854 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -399,7 +399,6 @@ static DECLARE_WAIT_QUEUE_HEAD(random_read_wait); static DECLARE_WAIT_QUEUE_HEAD(random_write_wait); static struct fasync_struct *fasyn...
7b8505300525d7e802ecf52ae160bc63f4ba28d7
Analyze and fix the following issue in the Linux kernel code: drm: fix warning on 32-bit.
Problem Details: This cast was causing a warning on 32-bit builds. Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/drm_info.c b/drivers/gpu/drm/drm_info.c index cdf8b1e7602d..441ebc1bdbef 100644 --- a/drivers/gpu/drm/drm_info.c +++ b/drivers/gpu/drm/drm_info.c @@ -239,7 +239,7 @@ int drm_vma_info(struct seq_file *m, void *data) mutex_lock(&dev->struct_mutex); seq_printf(m, "vma use count: %d...
bd6126bd0766cb0e03a4d832cc3611dff5ea8e50
Analyze and fix the following issue in the Linux kernel code: drm: radeon: fix printk format warning
Problem Details: drivers/gpu/drm/radeon/radeon_atpx_handler.c:151:3: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'size_t' [airlied: Alex had others fixed already, except for atpx one] Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_atpx_handler.c b/drivers/gpu/drm/radeon/radeon_atpx_handler.c index 582e99449c12..1aa3f910b993 100644 --- a/drivers/gpu/drm/radeon/radeon_atpx_handler.c +++ b/drivers/gpu/drm/radeon/radeon_atpx_handler.c @@ -148,7 +148,7 @@ static int radeon_atpx_verify_interface(struc...
11f93576b0b50bf391ffafa544b85e541f5e59a5
Analyze and fix the following issue in the Linux kernel code: ARM: shmobile: r8a7779: use __iomem pointers for MMIO
Problem Details: 0a4b04dc299dfb691827a4001b3d8d7e443b71c9 (ARM: shmobile: use __iomem pointers for MMIO) modified iomem pointers so that IOMEM() macro will be used, but clock-r8a7779.c was out of target. This patch fixes it up. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Simon Ho...
```diff diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c index 3cafb6ab5e9a..37b2a3133b3b 100644 --- a/arch/arm/mach-shmobile/clock-r8a7779.c +++ b/arch/arm/mach-shmobile/clock-r8a7779.c @@ -24,17 +24,17 @@ #include <linux/clkdev.h> #include <mach/common.h> -#define FRQMR...
dd8e8c4a2c902d8350b702e7bc7c2799e5e7e331
Analyze and fix the following issue in the Linux kernel code: thermal, cpufreq: Fix build when CPU_FREQ_TABLE isn't configured
Problem Details: Commit 023614183768 ("thermal: add generic cpufreq cooling implementation") requires cpufreq_frequency_get_table(), but that function is only defined for CONFIG_CPU_FREQ_TABLE resulting in the following build error: drivers/built-in.o: In function `cpufreq_get_max_state': drivers/thermal/cpu_cooli...
```diff diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index edfd67d25013..e1cb6bd75f60 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -22,6 +22,7 @@ config THERMAL_HWMON config CPU_THERMAL bool "generic cpu cooling support" depends on THERMAL && CPU_FREQ + select CPU_FREQ_TA...
1b61810d196b84bfdc14c289126d98de765b7f97
Analyze and fix the following issue in the Linux kernel code: RapidIO: Fix comment error.
Problem Details: The resource index for the mailboxes was incorrect. Signed-off-by: Chad Reese <kreese@caviumnetworks.com> Acked-by: Alexandre Bounine <alexandre.bounine@idt.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/include/linux/rio.h b/include/linux/rio.h index a90ebadd9da0..abddba9db130 100644 --- a/include/linux/rio.h +++ b/include/linux/rio.h @@ -62,7 +62,7 @@ * * 0 RapidIO inbound doorbells * 1 RapidIO inbound mailboxes - * 1 RapidIO outbound mailboxes + * 2 RapidIO outbound mailboxes */ #define...
0db10c8e8ff24559b3768b8d010191b01e0940ae
Analyze and fix the following issue in the Linux kernel code: krealloc: Fix kernel-doc comment
Problem Details: It should say "@new_size" and not "@size". Correct that. Signed-off-by: Borislav Petkov <borislav.petkov@amd.com> Cc: trivial@kernel.org Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/mm/util.c b/mm/util.c index 8c7265afa29f..3a5278c08d76 100644 --- a/mm/util.c +++ b/mm/util.c @@ -145,7 +145,7 @@ EXPORT_SYMBOL(__krealloc); * * The contents of the object pointed to are preserved up to the * lesser of the new and old sizes. If @p is %NULL, krealloc() - * behaves exactly lik...
3ce9e53e788881da0d5f3912f80e0dd6b501f304
Analyze and fix the following issue in the Linux kernel code: kbuild: Fix accidental revert in commit fe04ddf
Problem Details: Commit fe04ddf7c291 ("kbuild: Do not package /boot and /lib in make tar-pkg") accidentally reverted two previous kbuild commits. I don't know what I was thinking. This brings back changes made by commits 24cc7fb69a5b ("x86/kbuild: archscripts depends on scripts_basic") and c1c1a59e37da ("firmware: fi...
```diff diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 58790bd85c1d..05afcca66de6 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -142,7 +142,7 @@ KBUILD_CFLAGS += $(call cc-option,-mno-avx,) KBUILD_CFLAGS += $(mflags-y) KBUILD_AFLAGS += $(mflags-y) -archscripts: +archscripts: scripts_basic $(...
d79550a7bc35c16476ebdc27c78378d8093390ec
Analyze and fix the following issue in the Linux kernel code: gpio-timberdale: fix a potential wrapping issue
Problem Details: ->last_ier is an unsigned long but the high bits can't be used int the original code because the shift wraps. Cc: stable@kernel.org Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
```diff diff --git a/drivers/gpio/gpio-timberdale.c b/drivers/gpio/gpio-timberdale.c index 031c6adf5b65..1a3e2b9b4772 100644 --- a/drivers/gpio/gpio-timberdale.c +++ b/drivers/gpio/gpio-timberdale.c @@ -116,7 +116,7 @@ static void timbgpio_irq_disable(struct irq_data *d) unsigned long flags; spin_lock_irqsave(&tg...
bf11315eeda510ea4fc1a2bf972d8155d31d89b4
Analyze and fix the following issue in the Linux kernel code: net/wireless: ipw2200: Fix panic occurring in ipw_handle_promiscuous_tx()
Problem Details: The driver does not count space of radiotap fields when allocating skb for radiotap packet. This leads to kernel panic with the following call trace: ... [67607.676067] [<c152f90f>] error_code+0x67/0x6c [67607.676067] [<c142f831>] ? skb_put+0x91/0xa0 [67607.676067] [<f8cf5e5b>] ? ipw_handle_promiscuou...
```diff diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c index 935120fc8c93..768bf612533e 100644 --- a/drivers/net/wireless/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/ipw2x00/ipw2200.c @@ -10472,7 +10472,7 @@ static void ipw_handle_promiscuous_tx(struct ipw_priv *priv, }...
1fffa905adffbf0d3767fc978ef09afb830275eb
Analyze and fix the following issue in the Linux kernel code: bcma: fix unregistration of cores
Problem Details: When cores are unregistered, entries need to be removed from cores list in a safe manner. Reported-by: Stanislaw Gruszka <sgruszka@redhat.com> Reviewed-by: Arend Van Spriel <arend@broadcom.com> Signed-off-by: Piotr Haber <phaber@broadcom.com> Cc: stable@vger.kernel.org Signed-off-by: John W. Linville ...
```diff diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c index 432aeeedfd5e..d865470bc951 100644 --- a/drivers/bcma/main.c +++ b/drivers/bcma/main.c @@ -158,9 +158,10 @@ static int bcma_register_cores(struct bcma_bus *bus) static void bcma_unregister_cores(struct bcma_bus *bus) { - struct bcma_device *core; +...
d4fa14cd62bd078c8e3ef39283b9f237e5b2ff0f
Analyze and fix the following issue in the Linux kernel code: mac80211: use ieee80211_free_txskb in a few more places
Problem Details: Free tx status skbs when draining power save buffers, pending frames, or when tearing down a vif. Fixes remaining conditions that can lead to hostapd/wpa_supplicant hangs when running out of socket write memory. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@vger.kernel.org Signed-off-by: J...
```diff diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 6f8a73c64fb3..7de7717ad67d 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c @@ -853,7 +853,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); if (info->...
3e4f319dacc60c1b4537b85329d393ad18bf7501
Analyze and fix the following issue in the Linux kernel code: brcmfmac: fix end of loop check (signedness bug)
Problem Details: The problem here is that we loop until "remained_buf_len" is less than zero, but since it is unsigned, it never is. "remained_buf_len" has to be large enough to hold the value from "mgmt_ie_buf_len". That variable is type u32, but it only holds small values so I have changed to both variables to int....
```diff diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c index 2c66bae77b37..411dfe7c7ff0 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c @@ -3972,7 +3972,7 @@ brcmf_s...
4045f72bcf3c293c7c5932ef001742d8bb5ded76
Analyze and fix the following issue in the Linux kernel code: mac80211: check if key has TKIP type before updating IV
Problem Details: This patch fix corruption which can manifest itself by following crash when switching on rfkill switch with rt2x00 driver: https://bugzilla.redhat.com/attachment.cgi?id=615362 Pointer key->u.ccmp.tfm of group key get corrupted in: ieee80211_rx_h_michael_mic_verify(): /* update IV in key info...
```diff diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c index bdb53aba888e..e72562a18bad 100644 --- a/net/mac80211/wpa.c +++ b/net/mac80211/wpa.c @@ -106,7 +106,8 @@ ieee80211_rx_h_michael_mic_verify(struct ieee80211_rx_data *rx) if (status->flag & RX_FLAG_MMIC_ERROR) goto mic_fail; - if (!(status->flag ...
8ad33cdf97639e2a1601b6dd8629d351c1c50198
Analyze and fix the following issue in the Linux kernel code: drm/radeon: fix spelling typos in debugging output
Problem Details: Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c index bba66902c83b..47634f27f2e5 100644 --- a/drivers/gpu/drm/radeon/radeon_ring.c +++ b/drivers/gpu/drm/radeon/radeon_ring.c @@ -305,7 +305,7 @@ void radeon_ring_write(struct radeon_ring *ring, uint32_t v) { #if DRM_DEBU...
082918471139b07964967cfe5f70230909c82ae1
Analyze and fix the following issue in the Linux kernel code: drm/radeon: Don't destroy I2C Bus Rec in radeon_ext_tmds_enc_destroy().
Problem Details: radeon_i2c_fini() walks thru the list of I2C bus recs rdev->i2c_bus[] to destroy each of them. radeon_ext_tmds_enc_destroy() however also has code to destroy it's associated I2C bus rec which has been obtained by radeon_i2c_lookup() and is therefore also in the i2c_bus[] list. This causes a double free...
```diff diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c index fb15b62ff984..a13ad9d707cf 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c @@ -991,11 +991,7 @@ static void radeon_legacy_tmds_e...
3691feea9826771d853d28d37b6b6e34758fa66d
Analyze and fix the following issue in the Linux kernel code: drm/radeon: check if pcie gen 2 is already enabled (v2)
Problem Details: If so, skip enabling it to save time. v2: coding style fixes Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index a1f49c5fd74b..14313ad43b76 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c @@ -3431,9 +3431,14 @@ void evergreen_pcie_gen2_enable(struct radeon_device *rdev) if (!(mask & DRM_PCI...
90a51a329258e3c868f6f4c1fb264ca01c590c57
Analyze and fix the following issue in the Linux kernel code: drm/radeon: allocate page tables on demand v4
Problem Details: Based on Dmitries work, but splitting the code into page directory and page table handling makes it far more readable and (hopefully) more reliable. Allocations of page tables are made from the SA on demand, that should still work fine since all page tables are of the same size. Also using the fact t...
```diff diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c index 83dc0852d5c9..ab8d1f5fe68a 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c @@ -1580,7 +1580,7 @@ void cayman_vm_flush(struct radeon_device *rdev, int ridx, struct radeon_vm *vm) radeon_ring_write(ring, 0); ...
cd23492af3d4401c02c48a4bebe5995c9498eac5
Analyze and fix the following issue in the Linux kernel code: drm/radeon: fix compilation with backlight disabled
Problem Details: Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_acpi.c b/drivers/gpu/drm/radeon/radeon_acpi.c index ecb7e3374a56..196d28d99570 100644 --- a/drivers/gpu/drm/radeon/radeon_acpi.c +++ b/drivers/gpu/drm/radeon/radeon_acpi.c @@ -370,6 +370,7 @@ int radeon_atif_handler(struct radeon_device *rdev, radeon_set_backligh...
a1871936c0f4f10850a5671c5deb1a92fcca1155
Analyze and fix the following issue in the Linux kernel code: drm/radeon: use %zu for formatting size_t
Problem Details: Fixes compiler warnings on 32bit. Signed-off-by: Luca Tettamanti <kronos.it@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_acpi.c b/drivers/gpu/drm/radeon/radeon_acpi.c index b0a5688c67f8..ecb7e3374a56 100644 --- a/drivers/gpu/drm/radeon/radeon_acpi.c +++ b/drivers/gpu/drm/radeon/radeon_acpi.c @@ -201,7 +201,7 @@ static int radeon_atif_verify_interface(acpi_handle handle, size = *(u16 ...
76495ec1d47e1c0fe0673faf9179bda6bc8ab5c2
Analyze and fix the following issue in the Linux kernel code: ext4: fix undefined bit shift result in ext4_fill_flex_info
Problem Details: The result of the bit shift expression in '1 << sbi->s_log_groups_per_flex' can be undefined in the case that s_log_groups_per_flex is 31 because the result of the shift is bigger than INT_MAX. In reality this probably should not cause much problems since we'll end up with INT_MIN which will then be co...
```diff diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 5ededf135335..8ab650b1aa1e 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1970,7 +1970,7 @@ static int ext4_fill_flex_info(struct super_block *sb) sbi->s_log_groups_per_flex = 0; return 1; } - groups_per_flex = 1 << sbi->s_log_groups_per_flex;...
29bb4cc5e0547a7589556f8629e39016c5d203c0
Analyze and fix the following issue in the Linux kernel code: docbook: networking: fix file paths for uapi headers
Problem Details: Update file paths in Documentation/DocBook/networking.tmpl for uapi headers. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/Documentation/DocBook/networking.tmpl b/Documentation/DocBook/networking.tmpl index 59ad69a9d777..29df25016c7c 100644 --- a/Documentation/DocBook/networking.tmpl +++ b/Documentation/DocBook/networking.tmpl @@ -56,7 +56,7 @@ !Enet/core/filter.c </sect1> <sect1><title>Generic Network Sta...
325adeb55e32c50055c654e5b06a49f0bd88420b
Analyze and fix the following issue in the Linux kernel code: mm: huge_memory: Fix build error.
Problem Details: Certain configurations won't implicitly pull in <linux/pagemap.h> resulting in the following build error: mm/huge_memory.c: In function 'release_pte_page': mm/huge_memory.c:1697:2: error: implicit declaration of function 'unlock_page' [-Werror=implicit-function-declaration] mm/huge_memory.c: In ...
```diff diff --git a/mm/huge_memory.c b/mm/huge_memory.c index a863af26c79c..40f17c34b415 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -17,6 +17,7 @@ #include <linux/khugepaged.h> #include <linux/freezer.h> #include <linux/mman.h> +#include <linux/pagemap.h> #include <asm/tlb.h> #include <asm/pgalloc.h>...
68687c842caefd5386d47a571fb4725df3556891
Analyze and fix the following issue in the Linux kernel code: ARM: fix oops on initial entry to userspace with Thumb2 kernels
Problem Details: Daniel Mack reports an oops at boot with the latest kernels: Internal error: Oops - undefined instruction: 0 [#1] SMP THUMB2 Modules linked in: CPU: 0 Not tainted (3.6.0-11057-g584df1d #145) PC is at cpsw_probe+0x45a/0x9ac LR is at trace_hardirqs_on_caller+0x8f/0xfc pc : [<c03493de>] ...
```diff diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 417bac1846bd..34711757ba59 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S @@ -88,9 +88,9 @@ ENTRY(ret_from_fork) bl schedule_tail cmp r5, #0 movne r0, r4 - movne lr, pc + adrne lr, BSYM(1f)...
8fcdc31b3d09bc348ff9bf752ae1291828756cfa
Analyze and fix the following issue in the Linux kernel code: NFSv4.1: Kill nfs4_ds_disconnect()
Problem Details: There is nothing to prevent another thread from dereferencing ds->ds_clp during or after the call to nfs4_ds_disconnect(), and Oopsing due to the resulting NULL pointer. Instead, we should just rely on filelayout_mark_devid_invalid() to keep us out of trouble by avoiding that deviceid. Signed-off-by:...
```diff diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c index 52d847212066..816c2d0d133a 100644 --- a/fs/nfs/nfs4filelayout.c +++ b/fs/nfs/nfs4filelayout.c @@ -207,7 +207,6 @@ static int filelayout_async_handle_error(struct rpc_task *task, clear_bit(NFS_INO_LAYOUTCOMMIT, &NFS_I(inode)->flags); _pnf...
44009105081b51417f311f4c3be0061870b6b8ed
Analyze and fix the following issue in the Linux kernel code: oprofile, x86: Fix wrapping bug in op_x86_get_ctrl()
Problem Details: The "event" variable is a u16 so the shift will always wrap to zero making the line a no-op. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: <stable@vger.kernel.org> v2.6.32.. Signed-off-by: Robert Richter <robert.richter@amd.com>
```diff diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c index 26b8a8514ee5..48768df2471a 100644 --- a/arch/x86/oprofile/nmi_int.c +++ b/arch/x86/oprofile/nmi_int.c @@ -55,7 +55,7 @@ u64 op_x86_get_ctrl(struct op_x86_model_spec const *model, val |= counter_config->extra; event &= model->event_...
6ff1f3d3bd7c69c62ca5773b1b684bce42eff06a
Analyze and fix the following issue in the Linux kernel code: usb: musb: am35xx: drop spurious unplugging a device
Problem Details: On AM3517, tx and rx interrupt are detected together with the disconnect event. This generates a kernel panic in musb_interrupt, because rx / tx are handled after disconnect. This issue was seen on a Technexion's TAM3517 SOM. Unplugging a device, tx / rx interrupts together with disconnect are detected...
```diff diff --git a/drivers/usb/musb/am35x.c b/drivers/usb/musb/am35x.c index 457f25e62c51..c964d6af178b 100644 --- a/drivers/usb/musb/am35x.c +++ b/drivers/usb/musb/am35x.c @@ -305,6 +305,12 @@ static irqreturn_t am35x_musb_interrupt(int irq, void *hci) ret = IRQ_HANDLED; } + /* Drop spurious RX and TX if devi...
041d81f493d90c940ec41f0ec98bc7c4f2fba431
Analyze and fix the following issue in the Linux kernel code: usb: dwc3: gadget: fix 'endpoint always busy' bug
Problem Details: If a USB transfer has already been started, meaning we have already issued StartTransfer command to that particular endpoint, DWC3_EP_BUSY flag has also already been set. When we try to cancel this transfer which is already in controller's cache, we will not receive XferComplete event and we must clea...
```diff diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index c9e729a4bf65..7b7deddf6a52 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1904,7 +1904,7 @@ static void dwc3_stop_active_transfer(struct dwc3 *dwc, u32 epnum) ret = dwc3_send_gadget_ep_cmd(dwc, dep->number, cm...
9728df9565c8031eee78075a6b37fb3068d02322
Analyze and fix the following issue in the Linux kernel code: ARM: ux500: 8500: register LCD VSI pinctrl table
Problem Details: This fixes up the pins used by the VSI interface to the HDMI AV8100 encoder. Signed-off-by: Patrice Chotard <patrice.chotard@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
```diff diff --git a/arch/arm/mach-ux500/board-mop500-pins.c b/arch/arm/mach-ux500/board-mop500-pins.c index a267c6d30e37..8ab86889f037 100644 --- a/arch/arm/mach-ux500/board-mop500-pins.c +++ b/arch/arm/mach-ux500/board-mop500-pins.c @@ -162,7 +162,10 @@ static struct pinctrl_map __initdata mop500_family_pinmap[] = { ...
939ccba437da1726a5c8a5b702a47d473da927ae
Analyze and fix the following issue in the Linux kernel code: netfilter: xt_nat: fix incorrect hooks for SNAT and DNAT targets
Problem Details: In (c7232c9 netfilter: add protocol independent NAT core), the hooks were accidentally modified: SNAT hooks are POST_ROUTING and LOCAL_IN (before it was LOCAL_OUT). DNAT hooks are PRE_ROUTING and LOCAL_OUT (before it was LOCAL_IN). Signed-off-by: Elison Niven <elison.niven@cyberoam.com> Signed-off-by...
```diff diff --git a/net/netfilter/xt_nat.c b/net/netfilter/xt_nat.c index 81aafa8e4fef..bea7464cc43f 100644 --- a/net/netfilter/xt_nat.c +++ b/net/netfilter/xt_nat.c @@ -111,7 +111,7 @@ static struct xt_target xt_nat_target_reg[] __read_mostly = { .family = NFPROTO_IPV4, .table = "nat", .hooks = (1 << NF_I...
0153d5a810ab335aae86acfe69722a7efc1db536
Analyze and fix the following issue in the Linux kernel code: netfilter: xt_CT: fix timeout setting with IPv6
Problem Details: This patch fixes ip6tables and the CT target if it is used to set some custom conntrack timeout policy for IPv6. Use xt_ct_find_proto which already handles the ip6tables case for us. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
```diff diff --git a/net/netfilter/xt_CT.c b/net/netfilter/xt_CT.c index 16c712563860..ae7f5daeee43 100644 --- a/net/netfilter/xt_CT.c +++ b/net/netfilter/xt_CT.c @@ -180,9 +180,9 @@ xt_ct_set_timeout(struct nf_conn *ct, const struct xt_tgchk_param *par, typeof(nf_ct_timeout_find_get_hook) timeout_find_get; struct ...
47f88af4ed80ac9ca593543e21ebf86a31d7e8ba
Analyze and fix the following issue in the Linux kernel code: mtd: nand: omap: bring in gpmc nand macros
Problem Details: Bring onto driver the macros defined in gpmc.h that are not necessary outside driver, helps in removing inclusion of gpmc.h too. Also remove GPMC prefix on those macros to make clear it's independence with gpmc header. Signed-off-by: Afzal Mohammed <afzal@ti.com>
```diff diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index abfc602c4cfc..f0a1b1d69d32 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -110,6 +110,11 @@ #define ECC1RESULTSIZE 0x1 #define ECCCLEAR 0x100 #define ECC1 0x1 +#define PREFETCH_FIFOTHRESHOLD_MAX 0x40 +#defi...
128960a9ad67e2d119738f5211956e0304517551
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix registration race of VGA switcheroo
Problem Details: Delay the registration of VGA switcheroo client to the end of the probing. Otherwise a too quick switching may result in Oops during probing. Also add the check of the return value from snd_hda_lock_devices(). Reported-and-tested-by: Daniel J Blueman <daniel@quora.org> Cc: <stable@vger.kernel.org> [...
```diff diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 69810b21f7f4..ecf277506ad1 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -501,6 +501,7 @@ struct azx { /* VGA-switcheroo setup */ unsigned int use_vga_switcheroo:1; + unsigned int vga_switcheroo_registered...
e73fa21b4e6ce10934cc8016a9a512d7152a860b
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Clean up superfluous position_fix list entries
Problem Details: The white-list entries of position_fix for ASUS laptops have been added just as a workaround for broken COMBO mode. Now the combo mode itself is disabled, we can safely remove these entries. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 6833835a218b..69810b21f7f4 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -2813,8 +2813,6 @@ static struct snd_pci_quirk position_fix_list[] __devinitdata = { SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX...
733a48e5ae5bf28b046fad984d458c747cbb8c21
Analyze and fix the following issue in the Linux kernel code: ALSA: ac97 - Fix missing NULL check in snd_ac97_cvol_new()
Problem Details: Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=44721 Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index 9473fca9681d..8b0f99688303 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c @@ -1271,6 +1271,8 @@ static int snd_ac97_cvol_new(struct snd_card *card, char *name, int reg, unsigne tmp.index = ac97->num; k...
3ee73aa077d1468b293bb208814a8c240eefa9b7
Analyze and fix the following issue in the Linux kernel code: pinctrl: fix return value in bcm2835_pinctrl_probe()
Problem Details: In case of error, the function pinctrl_register() returns NULL not ERR_PTR(). The PTR_ERR() in the return value should be replaced with error no. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: S...
```diff diff --git a/drivers/pinctrl/pinctrl-bcm2835.c b/drivers/pinctrl/pinctrl-bcm2835.c index 956d585309b3..7e9be18ec2d2 100644 --- a/drivers/pinctrl/pinctrl-bcm2835.c +++ b/drivers/pinctrl/pinctrl-bcm2835.c @@ -1031,7 +1031,7 @@ static int __devinit bcm2835_pinctrl_probe(struct platform_device *pdev) pc->pctl_dev...
0dd4d5cbe4c38165dc9b3ad329ebb23f24d74fdb
Analyze and fix the following issue in the Linux kernel code: sh: Fix up more fallout from pointless ARM __iomem churn.
Problem Details: It was already pointed out how to fix these cases before the offending patches were merged, but unsurprisingly, that didn't happen. As this change is entirely superfluous to begin with, simply shut things up by casting everything away. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/drivers/sh/intc/access.c b/drivers/sh/intc/access.c index f892ae1d212a..114390f967d2 100644 --- a/drivers/sh/intc/access.c +++ b/drivers/sh/intc/access.c @@ -75,54 +75,61 @@ unsigned long intc_get_field_from_handle(unsigned int value, unsigned int handle static unsigned long test_8(unsigned long a...
0ffecd7d869a156b710b7b6cb59153748c6de3ae
Analyze and fix the following issue in the Linux kernel code: ASoC: wm8958: Load firmwares simultaneously
Problem Details: As of commit 99c2aa (firmware loader: fix creation failure of fw loader device) we can have more than one firmware request outstanding at once so there is no need to daisychain our requests any more. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/codecs/wm8958-dsp2.c b/sound/soc/codecs/wm8958-dsp2.c index 00121ba36597..bff96500c3f3 100644 --- a/sound/soc/codecs/wm8958-dsp2.c +++ b/sound/soc/codecs/wm8958-dsp2.c @@ -883,13 +883,6 @@ static void wm8958_mbc_vss_loaded(const struct firmware *fw, void *context) wm8994->mbc_vss = fw;...
2a8c8a569ff3631f6b6d82ea17c57b9f064b2a7b
Analyze and fix the following issue in the Linux kernel code: ASoC: fsi: fixup channels_min/max
Problem Details: FSI can support 1 - 8 channel input/output, but current driver is supporting 2 channel format only. This patch fixes channel mismatch Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 5328ae5539f1..c9927a22148e 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -1497,7 +1497,7 @@ static struct snd_pcm_hardware fsi_pcm_hardware = { .rates = FSI_RATES, .rate_min = 8000, .rate_max = 192000, - .channels_min = 1, + .ch...
6dde5ac5220b3b9c28f82f291b64eca3e5ebe80d
Analyze and fix the following issue in the Linux kernel code: ARM: imx: move debug macros to include/debug
Problem Details: Move imx debug-macro.S over to common debug macro directory. It removes the inclusion to hardware.h by hard-coding the physical address of uart port and copying IMX_IO_P2V from hardware.h. Since we will need a common solution, which might use a fixed virtual address for uart port across platforms, we...
```diff diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index b0f3857b3a4c..5566520686a5 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -412,6 +412,14 @@ endchoice config DEBUG_LL_INCLUDE string default "debug/icedcc.S" if DEBUG_ICEDCC + default "debug/imx.S" if DEBUG_IMX1_UART ||...
c45b1342b1d3ac144ccf55b377e5b70088fbaed2
Analyze and fix the following issue in the Linux kernel code: ARM: imx: remove unnecessary inclusion from device-imx*.h
Problem Details: There is no need for device-imx*.h to include <soc>.h. Remove them and fix one indirect inclusion in mach-mx31ads.c. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Arnd Bergmann <arnd@arndb.de>
```diff diff --git a/arch/arm/mach-imx/devices-imx1.h b/arch/arm/mach-imx/devices-imx1.h index 3aad1e70de96..eb2603b59b5a 100644 --- a/arch/arm/mach-imx/devices-imx1.h +++ b/arch/arm/mach-imx/devices-imx1.h @@ -6,7 +6,6 @@ * the terms of the GNU General Public License version 2 as published by the * Free Software F...
83cc76909622a4ee21f750148e779104d0606e9f
Analyze and fix the following issue in the Linux kernel code: vt8500: Fix header in mach-vt8500/timer.c
Problem Details: Correct filename reference in file header. Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
```diff diff --git a/arch/arm/mach-vt8500/timer.c b/arch/arm/mach-vt8500/timer.c index 050e1833f2d0..3dd21a47881f 100644 --- a/arch/arm/mach-vt8500/timer.c +++ b/arch/arm/mach-vt8500/timer.c @@ -1,5 +1,5 @@ /* - * arch/arm/mach-vt8500/timer_dt.c + * arch/arm/mach-vt8500/timer.c * * Copyright (C) 2012 Tony Prisk...
061adc064adbbdd9eb127ab2e86b7a71f4ccaf2e
Analyze and fix the following issue in the Linux kernel code: regmap: When we sanity check during range adds say what errors we find
Problem Details: Rather than just returning a single error code for every possible thing we can notice print an error message saying what the problem was. This makes it very much easier to figure out what's wrong and fix it. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index ea9d6eb826bd..0544f63ecd31 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -524,11 +524,29 @@ struct regmap *regmap_init(struct device *dev, struct regmap_range_node *new; /* Sanity check */ - ...
ff0ab8af9c3f36e7b6f716c3b9e8811a4202eec6
Analyze and fix the following issue in the Linux kernel code: parisc: optimizations in copy_thread() and friends
Problem Details: * in user thread case the registers had been copied as part of task_struct already; no need to do it in copy_thread(). * no need to store kernel stack pointer into regs->r21; we know its offset anyway. * no need to clobber r3 in sys_fork_wrapper and friends - r28 will do just as well and *it* will be o...
```diff diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index 7d22e97347b7..47fb6ddcf12e 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S @@ -719,7 +719,7 @@ ENTRY(ret_from_kernel_thread) BL schedule_tail, %r2 nop - LDREG TI_TASK-THREAD_SZ_ALGN(%r30), %r1 + LDREG TI_TA...
7d380c8f1ed2b6768e1fc496ad373f716160fcf0
Analyze and fix the following issue in the Linux kernel code: perf: Fix UAPI fallout
Problem Details: The UAPI commits forgot to test tooling builds such as tools/perf/, and this fixes the fallout. Manual conversion. Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 247264502fb7..f7c968ad5178 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -252,10 +252,10 @@ $(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c LIB_FILE=$(OUTPUT)libperf.a -LIB_H += ../../include/linux/perf_eve...
93e22567a138783202143c3af70d701a3ad20629
Analyze and fix the following issue in the Linux kernel code: ARM: config: make sure that platforms are ordered by option string
Problem Details: The large platform selection choice should be sorted by option string so it's easy to find the platform you're looking for. Fix the few options which are out of this order. Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index bd12ddd15448..1bc092eb42e6 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -348,16 +348,6 @@ config ARCH_BCM2835 This enables support for the Broadcom BCM2835 SoC. This SoC is use in the Raspberry Pi, and Roku 2 devices. -config ARCH_CLPS7...
08cce05c5a91f5017f4edc9866cf026908c73f9f
Analyze and fix the following issue in the Linux kernel code: UAPI: Unexport linux/blk_types.h
Problem Details: It seems that was linux/blk_types.h incorrectly exported to fix up some missing bits required by the exported parts of linux/fs.h (READ, WRITE, READA, etc.). So unexport linux/blk_types.h and unexport the relevant bits of linux/fs.h. Signed-off-by: David Howells <dhowells@redhat.com> cc: Jens Axboe <...
```diff diff --git a/include/linux/Kbuild b/include/linux/Kbuild index d114db9477f4..e2a1346514a6 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild @@ -69,7 +69,6 @@ header-y += b1lli.h header-y += baycom.h header-y += bfs_fs.h header-y += binfmts.h -header-y += blk_types.h header-y += blkpg.h header-y ...
871a0596cb2f51b57dc583d1a7c4be0186582fe7
Analyze and fix the following issue in the Linux kernel code: perf: Handle new rbtree implementation
Problem Details: Perf build fails with the new rbtree implementation: ../../lib/rbtree.c:24:36: fatal error: linux/rbtree_augmented.h: No such file or directory compilation terminated. Fix by updating the Makefile and adding a btree_augmented.h wrapper. Reported-and-tested-by: Borislav Petkov <borislav.petkov@amd....
```diff diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 86258c2a2c23..9546ff58f024 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -268,6 +268,7 @@ LIB_H += util/include/linux/magic.h LIB_H += util/include/linux/poison.h LIB_H += util/include/linux/prefetch.h LIB_H += util/include/linux/rb...
fc33ff43134790ef3cb997ed90048a50b4d1b15e
Analyze and fix the following issue in the Linux kernel code: arm: at91: at91sam9x5: fix gpio number per bank
Problem Details: On the at91sam9x5 SoC series, GPIO banks B and D only have 19 and 22 pins. So add a property to set this parameter. Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
```diff diff --git a/Documentation/devicetree/bindings/gpio/gpio_atmel.txt b/Documentation/devicetree/bindings/gpio/gpio_atmel.txt index 66efc804806a..85f8c0d084fa 100644 --- a/Documentation/devicetree/bindings/gpio/gpio_atmel.txt +++ b/Documentation/devicetree/bindings/gpio/gpio_atmel.txt @@ -9,6 +9,10 @@ Required pro...
e4541ff21284e5f2208473b39b535fcd50318c92
Analyze and fix the following issue in the Linux kernel code: at91: regroup gpio and pinctrl under the same ranges
Problem Details: Fix also the reg size as we have 512 bytes bank not 256 bytes per gpio/mux controller Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
```diff diff --git a/arch/arm/boot/dts/at91sam9260.dtsi b/arch/arm/boot/dts/at91sam9260.dtsi index d410581a5a85..425da936051d 100644 --- a/arch/arm/boot/dts/at91sam9260.dtsi +++ b/arch/arm/boot/dts/at91sam9260.dtsi @@ -98,34 +98,41 @@ interrupts = <26 4 0 27 4 0 28 4 0>; }; - pioA: gpio@fffff400 { - com...
669abf4e5539c8aa48bf28c965be05c0a7b58a27
Analyze and fix the following issue in the Linux kernel code: vfs: make path_openat take a struct filename pointer
Problem Details: ...and fix up the callers. For do_file_open_root, just declare a struct filename on the stack and fill out the .name field. For do_filp_open, make it also take a struct filename pointer, and fix up its callers to call it appropriately. For filp_open, add a variant that takes a struct filename pointer ...
```diff diff --git a/fs/exec.c b/fs/exec.c index 4e591e20e108..8b9011b67041 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -116,7 +116,7 @@ SYSCALL_DEFINE1(uselib, const char __user *, library) if (IS_ERR(tmp)) goto out; - file = do_filp_open(AT_FDCWD, tmp->name, &uselib_flags, LOOKUP_FOLLOW); + file = do_filp_open(A...
e9069f470803eeb5e243a05bc717452c6218bd71
Analyze and fix the following issue in the Linux kernel code: btrfs: Fix compilation with user namespace support enabled
Problem Details: When compiling with user namespace support btrfs fails like: fs/btrfs/tree-log.c: In function ‘fill_inode_item’: fs/btrfs/tree-log.c:2955:2: error: incompatible type for argument 3 of ‘btrfs_set_inode_uid’ fs/btrfs/ctree.h:2026:1: note: expected ‘u32’ but argument is of type ‘kuid_t’ fs/btrfs/tree-log...
```diff diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index e9ebb472b28b..81e407d9677a 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -2952,8 +2952,8 @@ static void fill_inode_item(struct btrfs_trans_handle *trans, struct btrfs_inode_item *item, struct inode *inode, int log_inode...
ea1fd7776e7ed41ee4ddcff32104db5c7b372309
Analyze and fix the following issue in the Linux kernel code: userns: Fix posix_acl_file_xattr_userns gid conversion
Problem Details: The code needs to be from_kgid(make_kgid(...)...) not from_kuid(make_kgid(...)...). Doh! Reported-by: Jan Kara <jack@suse.cz> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
```diff diff --git a/fs/xattr_acl.c b/fs/xattr_acl.c index 11efd830b5f5..9fbea87fdb6e 100644 --- a/fs/xattr_acl.c +++ b/fs/xattr_acl.c @@ -45,7 +45,7 @@ static void posix_acl_fix_xattr_userns( break; case ACL_GROUP: gid = make_kgid(from, le32_to_cpu(entry->e_id)); - entry->e_id = cpu_to_le32(from_kuid(to, ...
44feb387f6f5584535bd6e3ad7ccfdce715d7dba
Analyze and fix the following issue in the Linux kernel code: dm thin: prepare to separate bio_prison code
Problem Details: The bio prison code will be useful to share with future DM targets. Prepare to move this code into a separate module, adding a dm prefix to structures and functions that will be exported. Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Joe Thornber <ejt@redhat.com> Signed-off-by: Alas...
```diff diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index df20a115136f..22a22a701e16 100644 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c @@ -58,7 +58,7 @@ * i) plug io further to this physical block. (see bio_prison code). * * ii) quiesce any read io to that shared data block. Obviously - *...
dabdaf0caa3af520dbc1df87b2fb4e77224037bd
Analyze and fix the following issue in the Linux kernel code: mcs7830: Fix link state detection
Problem Details: The device had an undocumented "feature": it can provide a sequence of spurious link-down status data even if the link is up all the time. A sequence of 10 was seen so update the link state only after the device reports the same link state 20 times. Signed-off-by: Ondrej Zary <linux@rainbow-software.o...
```diff diff --git a/drivers/net/usb/mcs7830.c b/drivers/net/usb/mcs7830.c index 03c2d8d653df..cc7e72010ac3 100644 --- a/drivers/net/usb/mcs7830.c +++ b/drivers/net/usb/mcs7830.c @@ -117,6 +117,7 @@ enum { struct mcs7830_data { u8 multi_filter[8]; u8 config; + u8 link_counter; }; static const char driver_name[...
8437e7610c2d3e06f87f71fb82e10ed4b291812a
Analyze and fix the following issue in the Linux kernel code: vti: fix sparse bit endian warnings
Problem Details: Use be32_to_cpu instead of htonl to keep sparse happy. Signed-off-by: Stephen Hemminger <shemminger@vyatta.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c index 978bca4818ae..1831092f999f 100644 --- a/net/ipv4/ip_vti.c +++ b/net/ipv4/ip_vti.c @@ -374,7 +374,7 @@ static netdev_tx_t vti_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) memset(&fl4, 0, sizeof(fl4)); flowi4_init_output(&fl4, tunnel->parm...
4c67525849e0b7f4bd4fab2487ec9e43ea52ef29
Analyze and fix the following issue in the Linux kernel code: tcp: resets are misrouted
Problem Details: After commit e2446eaa ("tcp_v4_send_reset: binding oif to iif in no sock case").. tcp resets are always lost, when routing is asymmetric. Yes, backing out that patch will result in misrouting of resets for dead connections which used interface binding when were alive, but we actually cannot do anything...
```diff diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 75735c9a6a9d..ef998b008a57 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -708,10 +708,11 @@ static void tcp_v4_send_reset(struct sock *sk, struct sk_buff *skb) arg.csumoffset = offsetof(struct tcphdr, check) / 2; arg.flags = (sk &&...
a71a261f5c39685698f7f1970dc7046b36e132d1
Analyze and fix the following issue in the Linux kernel code: dm mpath: fix check for null mpio in end_io fn
Problem Details: The mpio dereference should be moved below the BUG_ON NULL test in multipath_end_io(). spatch with a semantic match was used to found this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
```diff diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index d778563a4ffd..573bd04591bf 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c @@ -1309,13 +1309,14 @@ static int multipath_end_io(struct dm_target *ti, struct request *clone, { struct multipath *m = ti->private; struct dm_mpath_io...
cb6b6df111e46b9d0f79eb971575fd50555f43f4
Analyze and fix the following issue in the Linux kernel code: xen/pv-on-hvm kexec: add quirk for Xen 3.4 and shutdown watches.
Problem Details: The commit 254d1a3f02ebc10ccc6e4903394d8d3f484f715e, titled "xen/pv-on-hvm kexec: shutdown watches from old kernel" assumes that the XenBus backend can deal with reading of values from: "control/platform-feature-xs_reset_watches": ... a patch for xenstored is required so that it accepts the X...
```diff diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c index 131dec04794e..48220e129f85 100644 --- a/drivers/xen/xenbus/xenbus_xs.c +++ b/drivers/xen/xenbus/xenbus_xs.c @@ -48,6 +48,7 @@ #include <xen/xenbus.h> #include <xen/xen.h> #include "xenbus_comms.h" +#include <asm/xen/hypervisor...
1a7bbda5b1ab0e02622761305a32dc38735b90b2
Analyze and fix the following issue in the Linux kernel code: xen/bootup: allow {read|write}_cr8 pvops call.
Problem Details: We actually do not do anything about it. Just return a default value of zero and if the kernel tries to write anything but 0 we BUG_ON. This fixes the case when an user tries to suspend the machine and it blows up in save_processor_state b/c 'read_cr8' is set to NULL and we get: kernel BUG at /home/k...
```diff diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 668bbfee0cce..4466feb4c69b 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -987,7 +987,16 @@ static void xen_write_cr4(unsigned long cr4) native_write_cr4(cr4); } - +#ifdef CONFIG_X86_64 +static inline unsigned l...
cd0608e71e9757f4dae35bcfb4e88f4d1a03a8ab
Analyze and fix the following issue in the Linux kernel code: xen/bootup: allow read_tscp call for Xen PV guests.
Problem Details: The hypervisor will trap it. However without this patch, we would crash as the .read_tscp is set to NULL. This patch fixes it and sets it to the native_read_tscp call. CC: stable@vger.kernel.org Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
```diff diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 70f140447a28..668bbfee0cce 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -1164,6 +1164,8 @@ static const struct pv_cpu_ops xen_cpu_ops __initconst = { .read_tsc = native_read_tsc, .read_pmc = native_read_pmc, ...
f2f0945e356daef87cdb01c0302801fb11cf382a
Analyze and fix the following issue in the Linux kernel code: tty/console: fix warnings in drivers/tty/serial/kgdboc.c
Problem Details: The con_debug_leave/con_debug_enter functions are stubbed out by defining them to (0), which causes harmless build warnings. Using proper inline functions is the normal way to deal with this. Without this patch, building the ARM bcm2835_defconfig results in: drivers/tty/serial/kgdboc.c: In function '...
```diff diff --git a/include/linux/console.h b/include/linux/console.h index 7201ce4280ca..dedb082fe50f 100644 --- a/include/linux/console.h +++ b/include/linux/console.h @@ -83,8 +83,14 @@ void give_up_console(const struct consw *sw); int con_debug_enter(struct vc_data *vc); int con_debug_leave(void); #else -#defin...
17b572e82032bc246324ce136696656b66d4e3f1
Analyze and fix the following issue in the Linux kernel code: kdb,vt_console: Fix missed data due to pager overruns
Problem Details: It is possible to miss data when using the kdb pager. The kdb pager does not pay attention to the maximum column constraint of the screen or serial terminal. This result is not incrementing the shown lines correctly and the pager will print more lines that fit on the screen. Obviously that is less th...
```diff diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index 84cbf298c094..a13f7e158c5b 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -3475,6 +3475,19 @@ int con_debug_enter(struct vc_data *vc) kdb_set(2, setargs); } } + if (vc->vc_cols < 999) { + int colcount; + char cols[4]; + cons...
d1871b38fccdc4b6575b0cabdea9e06bc70167eb
Analyze and fix the following issue in the Linux kernel code: kdb: Fix dmesg/bta scroll to quit with 'q'
Problem Details: If you press 'q' the pager should exit instead of printing everything from dmesg which can really bog down a 9600 baud serial link. The same is true for the bta command. Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
```diff diff --git a/kernel/debug/kdb/kdb_bt.c b/kernel/debug/kdb/kdb_bt.c index 07c9bbb94a0b..b03e0e814e43 100644 --- a/kernel/debug/kdb/kdb_bt.c +++ b/kernel/debug/kdb/kdb_bt.c @@ -129,6 +129,8 @@ kdb_bt(int argc, const char **argv) } /* Now the inactive tasks */ kdb_do_each_thread(g, p) { + if (KDB_FLAG(C...
42c12213141d7c88e8f649b4bacd19ba14577658
Analyze and fix the following issue in the Linux kernel code: kgdb,x86: fix warning about unused variable
Problem Details: When compiling without CONFIG_DEBUG_RODATA the following compiler warning is generated: arch/x86/kernel/kgdb.c: In function 'kgdb_arch_set_breakpoint': arch/x86/kernel/kgdb.c:749: warning: unused variable 'opc' The variable instantiation needs to be inside the #ifdef to make the warning go away. Rep...
```diff diff --git a/arch/x86/kernel/kgdb.c b/arch/x86/kernel/kgdb.c index 3f61904365cf..836f8322960e 100644 --- a/arch/x86/kernel/kgdb.c +++ b/arch/x86/kernel/kgdb.c @@ -746,7 +746,9 @@ void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long ip) int kgdb_arch_set_breakpoint(struct kgdb_bkpt *bpt) { int err; +#if...
f0a996eeeda214f4293e234df33b29bec003b536
Analyze and fix the following issue in the Linux kernel code: mips,kgdb: fix recursive page fault with CONFIG_KPROBES
Problem Details: This fault was detected using the kgdb test suite on boot and it crashes recursively due to the fact that CONFIG_KPROBES on mips adds an extra die notifier in the page fault handler. The crash signature looks like this: kgdbts:RUN bad memory access test KGDB: re-enter exception: ALL breakpoints kille...
```diff diff --git a/arch/mips/kernel/kgdb.c b/arch/mips/kernel/kgdb.c index f4546e97c60d..23817a6e32b6 100644 --- a/arch/mips/kernel/kgdb.c +++ b/arch/mips/kernel/kgdb.c @@ -283,6 +283,15 @@ static int kgdb_mips_notify(struct notifier_block *self, unsigned long cmd, struct pt_regs *regs = args->regs; int trap = (r...
f30fed10c440a25937e509860fa207399b26efe5
Analyze and fix the following issue in the Linux kernel code: kgdb: Add module event hooks
Problem Details: Allow gdb to auto load kernel modules when it is attached, which makes it trivially easy to debug module init functions or pre-set breakpoints in a kernel module that has not loaded yet. Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
```diff diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c index 0557f24c6bca..8bfa373cd5fd 100644 --- a/kernel/debug/debug_core.c +++ b/kernel/debug/debug_core.c @@ -688,6 +688,22 @@ kgdb_handle_exception(int evector, int signo, int ecode, struct pt_regs *regs) return kgdb_cpu_enter(ks, regs, DCPU_WA...
28bcd199cc4465733c1ac0c70135a385fff97c71
Analyze and fix the following issue in the Linux kernel code: OMAPDSS: Remove dss_debug variable
Problem Details: All the debug prints have been replaced with pr_debug(). Thus, the dependency on dss_debug variable is replaced with dyndbg in dynamic debugging mode and DEBUG flag otherwise. So, the dss_debug variable is removed along with checks for DEBUG flag. Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.c...
```diff diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c index 826d64faeaa7..3794147b6eb0 100644 --- a/drivers/video/omap2/dss/core.c +++ b/drivers/video/omap2/dss/core.c @@ -53,11 +53,6 @@ static char *def_disp_name; module_param_named(def_disp, def_disp_name, charp, 0); MODULE_PARM_DESC(...
f30be7d326671ec5691f83b6d473550ac002e008
Analyze and fix the following issue in the Linux kernel code: OMAPDSS: Replace multi part debug prints with pr_debug
Problem Details: The various functions in dispc and dsi such as print_irq_status(), print_irq_status_vc(), print_irq_status_cio() and _dsi_print_reset_status() consist of a number of debug prints which need to be enabled all at once or none at all. So, these debug prints in corresponding functions are replaced with one...
```diff diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index a173a9481a23..67d9f3bdea39 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c @@ -3675,26 +3675,20 @@ static void print_irq_status(u32 status) if ((status & dispc.irq_error_mask) == 0) retur...
702d267eb8ec66e1b2cde9448fc5960315ed8662
Analyze and fix the following issue in the Linux kernel code: OMAPDSS: Cleanup DSSDBG with dynamic pr_debug function
Problem Details: The printk in DSSDBG function definition is replaced with dynamic debug enabled pr_debug(). The use of dynamic debugging provides more flexibility as each debug statement can be enabled or disabled dynamically on basis of source filename, line number, module name etc., by writing to a control file in d...
```diff diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c index 19d66f471b4b..e923d9f90ee6 100644 --- a/drivers/video/omap2/dss/apply.c +++ b/drivers/video/omap2/dss/apply.c @@ -573,7 +573,7 @@ static void dss_ovl_write_regs(struct omap_overlay *ovl) struct mgr_priv_data *mp; int r; -...
1b3bcb33fb9faeab29e5c734fa000f6c7746ea1c
Analyze and fix the following issue in the Linux kernel code: OMAPDSS: Create new debug config options
Problem Details: The config option CONFIG_OMAP2_DSS_DEBUG_SUPPORT has been removed and replaced with CONFIG_OMAP2_DSS_DEBUG and CONFIG_OMAP2_DSS_DEBUGFS. CONFIG_OMAP2_DSS_DEBUG enables DEBUG flag and CONFIG_OMAP2_DSS_DEBUGFS enables creation of debugfs for OMAPDSS. Both the config options are disabled by default and ca...
```diff diff --git a/drivers/video/omap2/dss/Kconfig b/drivers/video/omap2/dss/Kconfig index 80f5390aa136..7052487495cd 100644 --- a/drivers/video/omap2/dss/Kconfig +++ b/drivers/video/omap2/dss/Kconfig @@ -18,16 +18,26 @@ config OMAP2_VRAM_SIZE You can also set this with "vram=<bytes>" kernel argument, or in t...
7ad6623a4980caa053eb9eb3207e0c3ba7d4ed4d
Analyze and fix the following issue in the Linux kernel code: OMAPDSS: Move definition of DEBUG flag to Makefile
Problem Details: In OMAPDSS the DEBUG flag is set only after the OMAPDSS module is called, for which the debugging capabilities are available only after its proper initialization. As a result of which tracking of bugs prior to or during initial process becomes difficult. So, the definition of DEBUG is being moved to th...
```diff diff --git a/drivers/video/omap2/dss/Makefile b/drivers/video/omap2/dss/Makefile index 4549869bfe1a..86493e3dd65d 100644 --- a/drivers/video/omap2/dss/Makefile +++ b/drivers/video/omap2/dss/Makefile @@ -8,3 +8,4 @@ omapdss-$(CONFIG_OMAP2_DSS_SDI) += sdi.o omapdss-$(CONFIG_OMAP2_DSS_DSI) += dsi.o omapdss-$(CON...
065a13e2cc665f6547dc7e8a9d6b6565badf940a
Analyze and fix the following issue in the Linux kernel code: Bluetooth: SMP: Fix setting unknown auth_req bits
Problem Details: When sending a pairing request or response we should not just blindly copy the value that the remote device sent. Instead we should at least make sure to mask out any unknown bits. This is particularly critical from the upcoming LE Secure Connections feature perspective as incorrectly indicating suppor...
```diff diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index 8c225ef349cd..2ac8d50861e0 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c @@ -32,6 +32,8 @@ #define SMP_TIMEOUT msecs_to_jiffies(30000) +#define AUTH_REQ_MASK 0x07 + static inline void swap128(u8 src[16], u8 dst[16]) { int i; @@...
be3cd5e37716bcf1579f63bdd919345a1f9692b9
Analyze and fix the following issue in the Linux kernel code: drm/i915: fix non-DP-D eDP backlight cleanup and module reload
Problem Details: Backlight is initialized for eDP, but cleaned up only for eDP on DP-D port. This leaves behind a dangling backlight interface on module unload on machines that have eDP connected to something other than DP-D, and breaks the backlight interface for subsequent module reloads. Fix the cleanup, and thus mo...
```diff diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index c14d407d41e8..bd2c34a0aa9a 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -2370,8 +2370,9 @@ static void intel_dp_destroy(struct drm_connector *connector) { struct drm_device *dev = co...
4afa0ace429624fde392b29d05a803672a41192e
Analyze and fix the following issue in the Linux kernel code: drm/i915/dvo-ch7xxx: fix get_hw_state
Problem Details: The boot-up state seems to be all-zeros, so it's safer to check for the bits that need to be set when the dvo encoder is in the dpms on state, than checking the bits we set when it's in the off state. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55047 Tested-by: Chris Wilson <chris@chris-wil...
```diff diff --git a/drivers/gpu/drm/i915/dvo_ch7xxx.c b/drivers/gpu/drm/i915/dvo_ch7xxx.c index 38f3a6cb8c7d..3edd981e0770 100644 --- a/drivers/gpu/drm/i915/dvo_ch7xxx.c +++ b/drivers/gpu/drm/i915/dvo_ch7xxx.c @@ -303,10 +303,10 @@ static bool ch7xxx_get_hw_state(struct intel_dvo_device *dvo) ch7xxx_readb(dvo, CH7...
fa55583797d12b10928a1813f3dcf066637caf5e
Analyze and fix the following issue in the Linux kernel code: drm/i915: fixup the plane->pipe fixup code
Problem Details: We need to check whether the _other plane is on our pipe, not whether our plane is on the other pipe. Otherwise if not both pipes/planes are active, we won't properly clean up the mess and set up our desired plane->pipe mapping. v2: Fixup the logic, I've totally fumbled it. Noticed by Chris Wilson. v...
```diff diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index f3b2d18482d8..3511effa01ec 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -8058,29 +8058,42 @@ static void intel_enable_pipe_a(struct drm_device *dev) } +static bo...
9169d3a88072b20f42e68a946e916bd7dfbc7f2c
Analyze and fix the following issue in the Linux kernel code: drm/i915: disable wc gtt pte mappings on gen2
Problem Details: It doesn't work since the gtt pte range sits in the middle of the mmio bar. We didn't notice that since both my and Chris' gen2 machines don't support PAT and hence all wc io mapping request will automatically be demoted to uc. This regression has been introduce in commit edef7e685da05c13cce50c012618...
```diff diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c index e01f5eaaec82..38390f7c6ab6 100644 --- a/drivers/char/agp/intel-gtt.c +++ b/drivers/char/agp/intel-gtt.c @@ -667,7 +667,7 @@ static int intel_gtt_init(void) gtt_map_size = intel_private.base.gtt_total_entries * 4; intel_private....
bfcec7087458812f575d9022b2d151641f34ee84
Analyze and fix the following issue in the Linux kernel code: audit: set the name_len in audit_inode for parent lookups
Problem Details: Currently, this gets set mostly by happenstance when we call into audit_inode_child. While that might be a little more efficient, it seems wrong. If the syscall ends up failing before audit_inode_child ever gets called, then you'll have an audit_names record that shows the full path but has the parent ...
```diff diff --git a/fs/namei.c b/fs/namei.c index a7ad35c66807..6a92d988573f 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1973,7 +1973,7 @@ static int do_path_lookup(int dfd, const char *name, retval = path_lookupat(dfd, name, flags | LOOKUP_REVAL, nd); if (likely(!retval)) - audit_inode(name, nd->path.dentry)...
4c5bb2e42e6f12c02e6c8db9883ffa7602c68c19
Analyze and fix the following issue in the Linux kernel code: mmc: mxs-mmc: Fix merge issue causing build error
Problem Details: The following error appeared due to a merge problem; the patches: fc108d24 "mmc: mxs-mmc: fix deadlock caused by recursion loop" 829c1bf4 "mmc: spi: Pull out parts shared between MMC and SPI" came in through separate branches and cause this build error when combined. drivers/mmc/host/mxs-mmc.c: In f...
```diff diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c index bb4c2bf04d09..80d1e6d4b0ae 100644 --- a/drivers/mmc/host/mxs-mmc.c +++ b/drivers/mmc/host/mxs-mmc.c @@ -525,7 +525,7 @@ static void mxs_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable) writel(BM_SSP_CTRL0_SDIO_IRQ_CHECK, ...
39bc66c9371fa6cdb1029e6c1768824f068be913
Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix the SCC/SSC typo in the SPLL bits definition
Problem Details: We're talking about Spread Spectrum Clocks here, thus SSC. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
```diff diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index c8c8dd0ff7b4..8200c317f1fd 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -4496,8 +4496,8 @@ /* SPLL */ #define SPLL_CTL 0x46020 #define SPLL_PLL_ENABLE (1<<31) -#define SPLL_PLL_S...
aac9453b65c5d41eac133095586379be5b923a1e
Analyze and fix the following issue in the Linux kernel code: net/ethernet/jme: disable ASPM
Problem Details: Based on patch from Matthew Garrett <mjg@redhat.com> (https://lkml.org/lkml/2011/11/11/168). http://driveragent.com/archive/30421/7-0-14 indicates that ASPM is disabled on the 250 and 260. Duplicate for sanity. Fixes random RX engine hangs I experienced with JMC250 on Clevo W270HU. Signed-off-by: Ke...
```diff diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c index c911d883c27e..f8064df10cc4 100644 --- a/drivers/net/ethernet/jme.c +++ b/drivers/net/ethernet/jme.c @@ -27,6 +27,7 @@ #include <linux/module.h> #include <linux/kernel.h> #include <linux/pci.h> +#include <linux/pci-aspm.h> #include <l...
0abc1ceec52fcb9f962a2cd52e89baccccbc1d2e
Analyze and fix the following issue in the Linux kernel code: kaweth: print correct debug ptr
Problem Details: We nowdays copy the buffer and free fw->data, so make the debug printk use the right thing. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c index c75e11e1b385..afb117c16d2d 100644 --- a/drivers/net/usb/kaweth.c +++ b/drivers/net/usb/kaweth.c @@ -424,7 +424,7 @@ static int kaweth_download_firmware(struct kaweth_device *kaweth, netdev_dbg(kaweth->net, "Downloading firmware at ...
759f42987f98915764bad922ee123acb0eadbe33
Analyze and fix the following issue in the Linux kernel code: 9P: Fix race between p9_write_work() and p9_fd_request()
Problem Details: Race scenario: thread A thread B p9_write_work() p9_fd_request() if (list_empty (&m->unsent_req_list)) ... spin_lock(&client->lock); req->status = REQ_STATUS_UNSENT; list_add_tail(..., ...
```diff diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c index b2c308fffb8a..0031a8cf145d 100644 --- a/net/9p/trans_fd.c +++ b/net/9p/trans_fd.c @@ -453,12 +453,13 @@ static void p9_write_work(struct work_struct *work) } if (!m->wsize) { + spin_lock(&m->client->lock); if (list_empty(&m->unsent_req_list)) { ...
8e49f418c9632790bf456634742d34d97120a784
Analyze and fix the following issue in the Linux kernel code: ring-buffer: Check for uninitialized cpu buffer before resizing
Problem Details: With a system where, num_present_cpus < num_possible_cpus, even if all CPUs are online, non-present CPUs don't have per_cpu buffers allocated. If per_cpu/<cpu>/buffer_size_kb is modified for such a CPU, it can cause a panic due to NULL dereference in ring_buffer_resize(). To fix this, resize operation...
```diff diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index b32ed0e385a5..b979426d16c6 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -1567,6 +1567,10 @@ int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size, put_online_cpus(); } else { + /* Ma...
8eea8a6a9a2af067bd3006f7fefab66a4fb66451
Analyze and fix the following issue in the Linux kernel code: openrisc: fix typos in comments and warnings
Problem Details: Signed-off-by: Jonas Bonn <jonas@southpole.se>
```diff diff --git a/arch/openrisc/kernel/irq.c b/arch/openrisc/kernel/irq.c index 094c394eee5b..61327985f967 100644 --- a/arch/openrisc/kernel/irq.c +++ b/arch/openrisc/kernel/irq.c @@ -58,7 +58,7 @@ static void or1k_pic_ack(struct irq_data *data) { /* EDGE-triggered interrupts need to be ack'ed in order to clear ...
2eaaac508a7435dda92f9f16d612a1354ea3d7c4
Analyze and fix the following issue in the Linux kernel code: MIPS: Malta: Fix section mismatch.
Problem Details: LD arch/mips/pci/built-in.o WARNING: arch/mips/pci/built-in.o(.devinit.text+0x2a0): Section mismatch in reference from the function malta_piix_func0_fixup() to the variable .init.data:pci_irq The function __devinit malta_piix_func0_fixup() references a variable __initdata pci_irq. If pci_irq is on...
```diff diff --git a/arch/mips/pci/fixup-malta.c b/arch/mips/pci/fixup-malta.c index 819622f93e9c..9a1a2244522a 100644 --- a/arch/mips/pci/fixup-malta.c +++ b/arch/mips/pci/fixup-malta.c @@ -8,7 +8,8 @@ #define PCID 4 /* This table is filled in by interrogating the PIIX4 chip */ -static char pci_irq[5] __initdata;...
91502f099dfc5a1e8812898e26ee280713e1d002
Analyze and fix the following issue in the Linux kernel code: md/raid10: use correct limit variable
Problem Details: Clang complains that we are assigning a variable to itself. This should be using bad_sectors like the similar earlier check does. Bug has been present since 3.1-rc1. It is minor but could conceivably cause corruption or other bad behaviour. Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter <d...
```diff diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 146749b277c6..867d1b4e9634 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -3218,7 +3218,7 @@ static sector_t sync_request(struct mddev *mddev, sector_t sector_nr, else { bad_sectors -= (sector - first_bad); if (max_sync...
8edc0e624db3756783233e464879eb2e3b904c13
Analyze and fix the following issue in the Linux kernel code: e1000e: Change wthresh to 1 to avoid possible Tx stalls
Problem Details: This patch originated from Hiroaki SHIMODA but has been modified by Intel with some minor cleanups and additional commit log text. Denys Fedoryshchenko and others reported Tx stalls on e1000e with BQL enabled. Issue was root caused to hardware delays. They were introduced because some of the e1000e h...
```diff diff --git a/drivers/net/ethernet/intel/e1000e/e1000.h b/drivers/net/ethernet/intel/e1000e/e1000.h index cb3356c9af80..04668b47a1df 100644 --- a/drivers/net/ethernet/intel/e1000e/e1000.h +++ b/drivers/net/ethernet/intel/e1000e/e1000.h @@ -175,13 +175,13 @@ struct e1000_info; /* * in the case of WTHRESH, it a...
68aaed54e7682aef261d5c2cf99e85a9dbf33a84
Analyze and fix the following issue in the Linux kernel code: ipv4: fix route mark sparse warning
Problem Details: Sparse complains about RTA_MARK which is should be host order according to include file and usage in iproute. net/ipv4/route.c:2223:46: warning: incorrect type in argument 3 (different base types) net/ipv4/route.c:2223:46: expected restricted __be32 [usertype] value net/ipv4/route.c:2223:46: got...
```diff diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 1a0da8dc8180..432f4bb77238 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -2220,7 +2220,7 @@ static int rt_fill_info(struct net *net, __be32 dst, __be32 src, goto nla_put_failure; if (fl4->flowi4_mark && - nla_put_be32(skb, RTA_MARK, fl...
435f08a721919a0027ff4f39f0b51c141c0e2c29
Analyze and fix the following issue in the Linux kernel code: isdn: fix a wrapping bug in isdn_ppp_ioctl()
Problem Details: "protos" is an array of unsigned longs and "i" is the number of bits in an unsigned long so we need to use 1UL as well to prevent the shift from wrapping around. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c index a1e760150821..61d78fa03b1a 100644 --- a/drivers/isdn/i4l/isdn_ppp.c +++ b/drivers/isdn/i4l/isdn_ppp.c @@ -595,7 +595,7 @@ isdn_ppp_ioctl(int min, struct file *file, unsigned int cmd, unsigned long arg) j = ipc->num / (sizeof(long) ...
b97390aec4756373168ad2976e1f117b610513ea
Analyze and fix the following issue in the Linux kernel code: md/raid5: protect debug message against NULL derefernce.
Problem Details: The pr_debug in add_stripe_bio could race with something changing *bip, so it is best to hold the lock until after the pr_debug. Reported-by: "Jianpeng Ma" <majianpeng@gmail.com> Signed-off-by: NeilBrown <neilb@suse.de>
```diff diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 36c0a158730b..d11012604e28 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -2436,11 +2436,11 @@ static int add_stripe_bio(struct stripe_head *sh, struct bio *bi, int dd_idx, in if (sector >= sh->dev[dd_idx].sector + STRIPE_SECTORS) se...
761becff016b82a6a7a1b2ef224248da5f46bae9
Analyze and fix the following issue in the Linux kernel code: DM RAID: Fix for "sync" directive ineffectiveness
Problem Details: There are two table arguments that can be given to a DM RAID target that control whether the array is forced to (re)synchronize or skip initialization: "sync" and "nosync". When "sync" is given, we set mddev->recovery_cp to 0 in order to cause the device to resynchronize. This is insufficient if there...
```diff diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c index 89a06a361332..45d94a7e7f6d 100644 --- a/drivers/md/dm-raid.c +++ b/drivers/md/dm-raid.c @@ -1017,6 +1017,19 @@ static int analyse_superblocks(struct dm_target *ti, struct raid_set *rs) freshest = NULL; rdev_for_each_safe(rdev, tmp, mddev) { + ...
34e02aa1fb0886d8e92ab00e3dc17d631487f92d
Analyze and fix the following issue in the Linux kernel code: vxlan: fix oops when give unknown ifindex
Problem Details: If vxlan is created and the ifindex is passed; there are two cases which are incorrectly handled by the existing code. The ifindex could be zero (i.e. no device) or there could be no device with that ifindex. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <dave...
```diff diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 763061d97921..607976c00162 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -1090,14 +1090,18 @@ static int vxlan_newlink(struct net *net, struct net_device *dev, if (data[IFLA_VXLAN_LOCAL]) vxlan->saddr = nla_get_be32(data[IFLA_VXLA...
d97c00a32198f0d066556006cfcd409efb28f746
Analyze and fix the following issue in the Linux kernel code: vxlan: fix receive checksum handling
Problem Details: Vxlan was trying to use postpull_rcsum to allow receive checksum offload to work on drivers using CHECKSUM_COMPLETE method. But this doesn't work correctly. Just force full receive checksum on received packet. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <dav...
```diff diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 0b95d5fffce7..763061d97921 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -537,7 +537,6 @@ static int vxlan_udp_encap_recv(struct sock *sk, struct sk_buff *skb) } __skb_pull(skb, sizeof(struct vxlanhdr)); - skb_postpull_rcsum(skb,...