id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
653fc9155769f8af8ea73e7e9c99dcaa5bd62086
Analyze and fix the following issue in the Linux kernel code: macvtap: fix the uninitialized var using in macvtap_alloc_skb()
Problem Details: Commit d1b08284 use new frag API but would leave f to be used uninitialized, this patch fix it. Signed-off-by: Jason Wang <jasowang@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c index 7c3f84acfdfb..3da557830937 100644 --- a/drivers/net/macvtap.c +++ b/drivers/net/macvtap.c @@ -453,7 +453,6 @@ static int zerocopy_sg_from_iovec(struct sk_buff *skb, const struct iovec *from, int copy = skb_headlen(skb); int size, offset1 = 0; ...
f1e45f86ed93b9ec0b6b51dd75841894935d2b68
Analyze and fix the following issue in the Linux kernel code: spi/spi-pl022: Resolve formatting issues
Problem Details: There were few formatting related issues in code. This patch fixes them. Fixes include: - Remove extra blank lines - align code to 80 cols - combine several lines to one line - Replace multiple spaces with tabs - Remove spaces before labels Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Tested-by: ...
```diff diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c index 730b4a37b823..6209540e06a6 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c @@ -113,7 +113,6 @@ #define SSP_CR0_MASK_CSS_ST (0x1FUL << 16) #define SSP_CR0_MASK_FRF_ST (0x3UL << 21) - /* * SSP Control Register 0 - SSP_...
480e5926ce3bb61ec229be2dab08bdce8abb8d2e
Analyze and fix the following issue in the Linux kernel code: [S390] kvm: fix address mode switching
Problem Details: 598841ca9919d008b520114d8a4378c4ce4e40a1 ([S390] use gmap address spaces for kvm guest images) changed kvm to use a separate address space for kvm guests. This address space was switched in __vcpu_run In some cases (preemption, page fault) there is the possibility that this address space switch is lost...
```diff diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index 519eb5f187ef..c0cb794bb365 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h @@ -658,12 +658,14 @@ static inline void pgste_set_pte(pte_t *ptep, pgste_t pgste) * struct gmap_struct - guest add...
844580ff63ef4eb19eec4cfd8cd6e0b62d81279f
Analyze and fix the following issue in the Linux kernel code: HID: hid-logitech-dj: fix off by one
Problem Details: There is a bug where a device with index 6 would write out of bounds in the array of paired devices. This patch fixes that problem. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Reviewed-by: Olivier Gay <ogay@logitech.com> Signed-o...
```diff diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c index 5bb6f42a4278..38b12e45780c 100644 --- a/drivers/hid/hid-logitech-dj.c +++ b/drivers/hid/hid-logitech-dj.c @@ -179,9 +179,6 @@ static const u8 hid_reportid_size_map[NUMBER_OF_HID_REPORTS] = { #define LOGITECH_DJ_INTERFACE_NUMBER ...
4e8858d5130459c4af80b990c2280115a1d49877
Analyze and fix the following issue in the Linux kernel code: watchdog: Initconst section fixes for watchdog
Problem Details: Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
```diff diff --git a/drivers/watchdog/sbc_epx_c3.c b/drivers/watchdog/sbc_epx_c3.c index 3066a5127ca8..eaca366b7234 100644 --- a/drivers/watchdog/sbc_epx_c3.c +++ b/drivers/watchdog/sbc_epx_c3.c @@ -173,7 +173,7 @@ static struct notifier_block epx_c3_notifier = { .notifier_call = epx_c3_notify_sys, }; -static cons...
9cfce47b146cb492b8d5e7b40d6f7b3ea1963d50
Analyze and fix the following issue in the Linux kernel code: watchdog: lantiq: fix watchdogs timeout handling
Problem Details: The enable function was using the global timeout variable for local operations. This resulted in the value of the global variable being corrupted, thus breaking the code. Signed-off-by: John Crispin <blogic@openwrt.org> Signed-off-by: Thomas Langer <thomas.langer@lantiq.com> Signed-off-by: Wim Van Seb...
```diff diff --git a/drivers/watchdog/lantiq_wdt.c b/drivers/watchdog/lantiq_wdt.c index 7d82adac1cb2..102aed0efbf1 100644 --- a/drivers/watchdog/lantiq_wdt.c +++ b/drivers/watchdog/lantiq_wdt.c @@ -51,16 +51,16 @@ static int ltq_wdt_ok_to_close; static void ltq_wdt_enable(void) { - ltq_wdt_timeout = ltq_wdt_timeout...
d890a1a42dff2e6987f04f18fc9e467b10e99cc9
Analyze and fix the following issue in the Linux kernel code: ASoC: fsl: Fix error handling if platform_device_add fails
Problem Details: Call platform_device_put() instead of platform_device_unregister() if platform_device_add() fails. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c index 358f0baaf71b..31af405bda84 100644 --- a/sound/soc/fsl/mpc8610_hpcd.c +++ b/sound/soc/fsl/mpc8610_hpcd.c @@ -505,7 +505,7 @@ static int mpc8610_hpcd_probe(struct platform_device *pdev) return 0; error_sound: - platform_device_unr...
c9d023adb62e17569f714669c93d3da07be49e3f
Analyze and fix the following issue in the Linux kernel code: ASoC: Fix unused variable warning in WM8996
Problem Details: Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
```diff diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c index cd1ba9637c01..1fe676c7aead 100644 --- a/sound/soc/codecs/wm8996.c +++ b/sound/soc/codecs/wm8996.c @@ -669,8 +669,6 @@ SOC_SINGLE_TLV("DSP2 EQ B5 Volume", WM8996_DSP2_RX_EQ_GAINS_2, 6, 31, 0, static int bg_event(struct snd_soc_dapm_widget ...
eef24afb28561a5a9f4be8f8da97735b7e6a826f
Analyze and fix the following issue in the Linux kernel code: irq: Fix check for already initialized irq_domain in irq_domain_add
Problem Details: The sanity check in irq_domain_add() tests desc->irq_data != NULL or irq_data->domain != NULL. This prevents adding an irq_domain to a irq descriptor when irq_data exists, which true when the irq descriptor exists. This went unnoticed so far as the simple domain code did not enter this code path becau...
```diff diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index d5828da3fd38..b57a3776de44 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -29,7 +29,11 @@ void irq_domain_add(struct irq_domain *domain) */ for (hwirq = 0; hwirq < domain->nr_irq; hwirq++) { d = irq_get_irq_data(irq_...
3393b85340a06e33ad290a4e7b88abe0d15d7499
Analyze and fix the following issue in the Linux kernel code: Revert "OMAP: DSS2: HDMI: fix hdmi clock name"
Problem Details: This reverts commit df5d3ed23cf73ee0763a8963003bda9b69d9620f. The HDMI clock name has been fixed in HWMOD data. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
```diff diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index 376732339efe..9353dcfc1f60 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c @@ -1704,9 +1704,9 @@ static int hdmi_get_clocks(struct platform_device *pdev) hdmi.sys_clk = clk; - clk = clk_get(...
281e10da20dcae1730a1aa37356da0688bde989e
Analyze and fix the following issue in the Linux kernel code: ARM: mx5/mm: Remove MX51_DEBUG related mapping
Problem Details: MX51_DEBUG related mapping is dead code, no-one uses it Signed-off-by: Jason Liu <jason.hui@linaro.org> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
```diff diff --git a/arch/arm/mach-mx5/mm.c b/arch/arm/mach-mx5/mm.c index 999f0d3623c5..0002b6815b0d 100644 --- a/arch/arm/mach-mx5/mm.c +++ b/arch/arm/mach-mx5/mm.c @@ -36,7 +36,6 @@ static struct map_desc mx50_io_desc[] __initdata = { */ static struct map_desc mx51_io_desc[] __initdata = { imx_map_entry(MX51, I...
6013690699dd8316f4018324a6c2d90377d50d2c
Analyze and fix the following issue in the Linux kernel code: igb: Replace E1000_XX_DESC_ADV with IGB_XX_DESC
Problem Details: Since igb only uses advanced descriptors we might as well just use an IGB specific define and drop the _ADV suffix for the descriptor declarations. In addition this can be further reduced by assuming that it will be working on pointers since that is normally how the Tx descriptors are handled. Signed-...
```diff diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h index b1ca8ea385eb..8607a1d6aa80 100644 --- a/drivers/net/ethernet/intel/igb/igb.h +++ b/drivers/net/ethernet/intel/igb/igb.h @@ -232,12 +232,12 @@ struct igb_ring { #define IGB_ADVTXD_DCMD (E1000_TXD_CMD_EOP | E1000_TXD...
cd392f5ca976b5ad166acc368c239cce2f0df58a
Analyze and fix the following issue in the Linux kernel code: igb: drop the "adv" off function names relating to descriptors
Problem Details: Many of the function names in the hot path are carrying an extra "_adv" suffix on the end of them to represent the fact that they are using advanced descriptors instead of legacy descriptors. However since all igb uses are advanced descriptors adding the extra suffix doesn't really add any additional ...
```diff diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h index 7036fd5aa34c..b1ca8ea385eb 100644 --- a/drivers/net/ethernet/intel/igb/igb.h +++ b/drivers/net/ethernet/intel/igb/igb.h @@ -374,10 +374,10 @@ extern void igb_configure_tx_ring(struct igb_adapter *, struct igb_ring *);...
84f9df159df6311f33ab16637772788cf3729ede
Analyze and fix the following issue in the Linux kernel code: ALSA: ymfpci: fix PCM open error handling
Problem Details: The installation of the minimum period size constraint in the PCM open callbacks was not checked for errors. Add this check, and move the call to the beginning of the function to avoid having to do any cleanups in the error case. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Taka...
```diff diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c index ebfbb28c35cc..88c5c5c28d02 100644 --- a/sound/pci/ymfpci/ymfpci_main.c +++ b/sound/pci/ymfpci/ymfpci_main.c @@ -897,6 +897,15 @@ static int snd_ymfpci_playback_open_1(struct snd_pcm_substream *substream) struct snd_ymfpci *chip...
ff920bfbe63f240bca6c86ee26daca8a1c43f780
Analyze and fix the following issue in the Linux kernel code: drm/nouveau: fix printk typo in ioremap failure path
Problem Details: Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c index bc0b592788bc..82478e0998e5 100644 --- a/drivers/gpu/drm/nouveau/nouveau_state.c +++ b/drivers/gpu/drm/nouveau/nouveau_state.c @@ -1129,7 +1129,7 @@ int nouveau_load(struct drm_device *dev, unsigned long flags) ...
8ce51fcfee2355cc38ea6fd3062d94bb38dfbaf0
Analyze and fix the following issue in the Linux kernel code: drm/nvc0/pm: minor clock readback fixes
Problem Details: Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nvc0_pm.c b/drivers/gpu/drm/nouveau/nvc0_pm.c index 6dc1a974b577..929aded35cb5 100644 --- a/drivers/gpu/drm/nouveau/nvc0_pm.c +++ b/drivers/gpu/drm/nouveau/nvc0_pm.c @@ -42,12 +42,16 @@ read_vco(struct drm_device *dev, u32 dsrc) static u32 read_pll(struct drm_device *dev, ...
fbba036a56fe0e5c5e8c91daf3fa211f88d94a03
Analyze and fix the following issue in the Linux kernel code: drm/nv50/gr: enable ctxprog xfer only when we need it to save power
Problem Details: This patch adds instructions to ctxprog and by doing, impacts context switching performance. My testcase showed a 1% performance cost using glxgears that is a context-switch bound application. Please test and report bugs/performance/power/other. Many thanks to Maxim Levitsky for his dedicated work o...
```diff diff --git a/drivers/gpu/drm/nouveau/nv50_grctx.c b/drivers/gpu/drm/nouveau/nv50_grctx.c index e04fb4483c5e..d05c2c3b2444 100644 --- a/drivers/gpu/drm/nouveau/nv50_grctx.c +++ b/drivers/gpu/drm/nouveau/nv50_grctx.c @@ -40,6 +40,9 @@ #define CP_FLAG_UNK0B ((0 * 32) + 0xb) #define CP_FLAG_UNK0B_...
daea1175a9f0f70eab5b33e2827d57ba8c686816
Analyze and fix the following issue in the Linux kernel code: powerpc/powernv: Support for OPAL console
Problem Details: This adds a udbg and an hvc console backend for supporting a console using the OPAL console interfaces. On OPAL v1 we have hvc0 mapped to whatever console the system was configured for (network or hvsi serial port) via the service processor. On OPAL v2 we have hvcN mapped to the Nth console provided ...
```diff diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug index 06eb62b0fd90..1b8a9c905cf7 100644 --- a/arch/powerpc/Kconfig.debug +++ b/arch/powerpc/Kconfig.debug @@ -265,8 +265,27 @@ config PPC_EARLY_DEBUG_PS3GELIC Select this to enable early debugging for the PlayStation3 via UDP broadcast...
68c9918479834c19d0c2a1d38b75227b01355674
Analyze and fix the following issue in the Linux kernel code: drm/nouveau: tidy connector hotplug handler, punt messages to debug
Problem Details: Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c index 0acc4c758027..561d4c6677ea 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c @@ -921,22 +921,13 @@ nouveau_connector_hotplug(void *data, int plugg...
91a8f1ea4bd98a7de888f7d56e28b72cc0c63ca1
Analyze and fix the following issue in the Linux kernel code: drm/nouveau: workaround semaphore hw bug causing unnecessary interrupts
Problem Details: The HW will only accept the DMA_FROM_MEMORY class for DMA_SEMAPHORE without asking the driver to intervene. It appears that semaphores will work correctly even without DMA_IN_MEMORY, so lets avoid the large amount of interrupts generated by x-chan sync. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c b/drivers/gpu/drm/nouveau/nouveau_fence.c index c919cfc8f2fd..81116cfea275 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fence.c +++ b/drivers/gpu/drm/nouveau/nouveau_fence.c @@ -519,7 +519,7 @@ nouveau_fence_channel_init(struct nouveau_channel *chan) if (US...
afb0c796d8002a0052662ff337dbd18b5dc5ff97
Analyze and fix the following issue in the Linux kernel code: drm/nouveau/tmr: fix miscalculation of ratio on pre-nv4x chipsets
Problem Details: The clock_get() hook returns KHz, not Hz. Also fixed to use crystal freq from dev_priv. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nv04_timer.c b/drivers/gpu/drm/nouveau/nv04_timer.c index afb9d4b6a029..263301b809dd 100644 --- a/drivers/gpu/drm/nouveau/nv04_timer.c +++ b/drivers/gpu/drm/nouveau/nv04_timer.c @@ -3,30 +3,6 @@ #include "nouveau_drv.h" #include "nouveau_drm.h" -static u32 -nv04_crystal_...
c0cc92a1151447588db6d96e94fc2210b8fc32df
Analyze and fix the following issue in the Linux kernel code: drm/nvd0/disp: remove lp reordering from vram dmaobj, create fb dmaobjs
Problem Details: Fixes CLUT being messed up. Mostly. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nvd0_display.c b/drivers/gpu/drm/nouveau/nvd0_display.c index 0afc5e1ad845..a0cc287aa6fc 100644 --- a/drivers/gpu/drm/nouveau/nvd0_display.c +++ b/drivers/gpu/drm/nouveau/nvd0_display.c @@ -35,6 +35,7 @@ #define MEM_SYNC 0xe0000001 #define MEM_VRAM 0xe0010000 +#include "...
75139063b7a369f7fa849922d5a204b8ba96d582
Analyze and fix the following issue in the Linux kernel code: drm/nouveau/bios: fix INIT_GPIO for new chipsets
Problem Details: Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index 30e723c81069..f0a77b7ce60e 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c @@ -3221,6 +3221,49 @@ init_8d(struct nvbios *bios, uint16_t offset, struct init_exec *ie...
b8bb922c680b7e21af2268bc8eec93b17f5b9ab8
Analyze and fix the following issue in the Linux kernel code: powerpc/udbg: Fix Kconfig entry for avoiding 44x early debug with KVM
Problem Details: It was preventing the global early debug selection whenever KVM was enabled instead of only preventing the 440 specific one. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
```diff diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug index ab2335f160a0..06eb62b0fd90 100644 --- a/arch/powerpc/Kconfig.debug +++ b/arch/powerpc/Kconfig.debug @@ -141,9 +141,6 @@ config BOOTX_TEXT config PPC_EARLY_DEBUG bool "Early debugging (dangerous)" - # PPC_EARLY_DEBUG on 440 leaves AS...
8bdafa39a47265bc029838b35cc6585f69224afa
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix deadlock in icswx code
Problem Details: The icswx code introduced an A-B B-A deadlock: CPU0 CPU1 ---- ---- lock(&anon_vma->mutex); lock(&mm->mmap_sem); lock(&anon_vma->mutex); lock(&mm->mmap_sem); Instead of using the mmap_sem to keep ...
```diff diff --git a/arch/powerpc/mm/mmu_context_hash64.c b/arch/powerpc/mm/mmu_context_hash64.c index 3bafc3deca6d..4ff587e38250 100644 --- a/arch/powerpc/mm/mmu_context_hash64.c +++ b/arch/powerpc/mm/mmu_context_hash64.c @@ -136,8 +136,8 @@ int use_cop(unsigned long acop, struct mm_struct *mm) if (!mm || !acop) ...
a11940978bd598e65996b4f807cf4904793f7025
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix oops when echoing bad values to /sys/devices/system/memory/probe
Problem Details: If we echo an address the hypervisor doesn't like to /sys/devices/system/memory/probe we oops the box: # echo 0x10000000000 > /sys/devices/system/memory/probe kernel BUG at arch/powerpc/mm/hash_utils_64.c:541! The backtrace is: create_section_mapping arch_add_memory add_memory memory_probe_store sy...
```diff diff --git a/arch/powerpc/include/asm/sparsemem.h b/arch/powerpc/include/asm/sparsemem.h index 54a47ea2c3aa..0c5fa3145615 100644 --- a/arch/powerpc/include/asm/sparsemem.h +++ b/arch/powerpc/include/asm/sparsemem.h @@ -16,7 +16,7 @@ #endif /* CONFIG_SPARSEMEM */ #ifdef CONFIG_MEMORY_HOTPLUG -extern void cre...
a200d8e44649de2cbb39de95f42ad4ef5dc8dc22
Analyze and fix the following issue in the Linux kernel code: powerpc/numa: Enable SD_WAKE_AFFINE in node definition
Problem Details: When chasing a performance issue on ppc64, I noticed tasks communicating via a pipe would often end up on different nodes. It turns out SD_WAKE_AFFINE is not set in our node defition. Commit 9fcd18c9e63e (sched: re-tune balancing) enabled SD_WAKE_AFFINE in the node definition for x86 and we need a sim...
```diff diff --git a/arch/powerpc/include/asm/topology.h b/arch/powerpc/include/asm/topology.h index 7ef0d90defc8..6a7e7251cc02 100644 --- a/arch/powerpc/include/asm/topology.h +++ b/arch/powerpc/include/asm/topology.h @@ -73,7 +73,7 @@ static inline int pcibus_to_node(struct pci_bus *bus) | 1*SD_BALANCE_EXEC \ ...
cfbd6f84c2e26c13ded16b6bb0871edb7d75974f
Analyze and fix the following issue in the Linux kernel code: cifs: Fix broken sec=ntlmv2/i sec option (try #2)
Problem Details: Fix sec=ntlmv2/i authentication option during mount of Samba shares. cifs client was coding ntlmv2 response incorrectly. All that is needed in temp as specified in MS-NLMP seciton 3.3.2 "Define ComputeResponse(NegFlg, ResponseKeyNT, ResponseKeyLM, CHALLENGE_MESSAGE.ServerChallenge, ClientChallenge, T...
```diff diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c index e76bfeb68267..30acd22147e1 100644 --- a/fs/cifs/cifsencrypt.c +++ b/fs/cifs/cifsencrypt.c @@ -351,9 +351,7 @@ static int build_avpair_blob(struct cifs_ses *ses, const struct nls_table *nls_cp) { unsigned int dlen; - unsigned int wlen; - unsign...
c9c7fa0064f4afe1d040e72f24c2256dd8ac402d
Analyze and fix the following issue in the Linux kernel code: Fix the conflict between rwpidforward and rw mount options
Problem Details: Both these options are started with "rw" - that's why the first one isn't switched on even if it is specified. Fix this by adding a length check for "rw" option check. Cc: <stable@kernel.org> Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <sfrench@us.ibm.com>
```diff diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 633c246b6775..f4af4cc37500 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -1298,7 +1298,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, /* ignore */ } else if (strnicmp(data, "guest", 5) == 0) { /* ignore */...
5b980b01212199833ee8023770fa4cbf1b85e9f4
Analyze and fix the following issue in the Linux kernel code: CIFS: Fix ERR_PTR dereference in cifs_get_root
Problem Details: move it to the beginning of the loop. Signed-off-by: Pavel Shilovsky <piastryyy@gmail.com> Reviewed-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
```diff diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index f93eb948d071..54b8f1e7da94 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c @@ -548,6 +548,12 @@ cifs_get_root(struct smb_vol *vol, struct super_block *sb) struct inode *dir = dentry->d_inode; struct dentry *child; + if (!dir) { + dput(dentry...
9438fabb73eb48055b58b89fc51e0bc4db22fabd
Analyze and fix the following issue in the Linux kernel code: cifs: fix possible memory corruption in CIFSFindNext
Problem Details: The name_len variable in CIFSFindNext is a signed int that gets set to the resume_name_len in the cifs_search_info. The resume_name_len however is unsigned and for some infolevels is populated directly from a 32 bit value sent by the server. If the server sends a very large value for this, then that v...
```diff diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index aac37d99a487..a80f7bd97b90 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c @@ -4079,7 +4079,8 @@ int CIFSFindNext(const int xid, struct cifs_tcon *tcon, T2_FNEXT_RSP_PARMS *parms; char *response_data; int rc = 0; - int bytes_returned, name_le...
c2d7b49f42f50d7fc5cbfd195b785a128723fdf4
Analyze and fix the following issue in the Linux kernel code: USB: xHCI: prevent infinite loop when processing MSE event
Problem Details: When a xHC host is unable to handle isochronous transfer in the interval, it reports a Missed Service Error event and skips some tds. Currently xhci driver handles MSE event in the following ways: 1. When encounter a MSE event, set ep->skip flag, update event ring dequeue pointer and return. 2. W...
```diff diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 54139a2f06ce..952e2ded61af 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -1934,8 +1934,10 @@ static int handle_tx_event(struct xhci_hcd *xhci, int status = -EINPROGRESS; struct urb_priv *urb_priv...
44f4c3ed60fb21e1d2dd98304390ac121e6c7c6d
Analyze and fix the following issue in the Linux kernel code: USB: xhci: Set change bit when warm reset change is set.
Problem Details: Sometimes, when a USB 3.0 device is disconnected, the Intel Panther Point xHCI host controller will report a link state change with the state set to "SS.Inactive". This causes the xHCI host controller to issue a warm port reset, which doesn't finish before the USB core times out while waiting for it t...
```diff diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 1e96d1f1fe6b..723f8231193d 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c @@ -761,7 +761,7 @@ int xhci_hub_status_data(struct usb_hcd *hcd, char *buf) memset(buf, 0, retval); status = 0; - mask = PORT_...
c19cc78efe922e86da7ba694dbfc4be066dd7eb4
Analyze and fix the following issue in the Linux kernel code: staging: fix comedi build when ISA_DMA_API is enabled but COMEDI_PCI is not enabled
Problem Details: Fix build when CONFIG_ISA_DMA_API is enabled but CONFIG_COMEDI_PCI[_DRIVERS] is not enabled. Fixes these build errors: drivers/staging/comedi/drivers/ni_labpc.c: In function 'labpc_ai_cmd': drivers/staging/comedi/drivers/ni_labpc.c:1351: error: implicit declaration of function 'labpc_suggest_tran...
```diff diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index 6859af0778cf..7611def97d06 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c @@ -241,8 +241,10 @@ static int labpc_eeprom_write_insn(struct comedi_device ...
8feaa43494cee5e938fd5a57b9e9bf1c827e6ccd
Analyze and fix the following issue in the Linux kernel code: powerpc/eeh: Fix /proc/ppc64/eeh creation
Problem Details: Since commit 188917e183cf9ad0374b571006d0fc6d48a7f447, /proc/ppc64 is a symlink to /proc/powerpc/. That means that creating /proc/ppc64/eeh will end up with a unaccessible file, that is not listed under /proc/powerpc/ and, then, not listed under /proc/ppc64/. Creating /proc/powerpc/eeh fixes that prob...
```diff diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index ada6e07532ec..d42f37d8a440 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c @@ -1338,7 +1338,7 @@ static const struct file_operations proc_eeh_operations = { static int __i...
cf01a404d96f9bf6f514074579f0a2d355bfa38e
Analyze and fix the following issue in the Linux kernel code: powerpc/xics: Add __init to marker icp_native_init()
Problem Details: This should fix the following warning: LD arch/powerpc/sysdev/xics/built-in.o WARNING: arch/powerpc/sysdev/xics/built-in.o(.text+0x1310): Section mismatch in reference from the function .icp_native_init() to the function .init.text:.icp_native_init_one_node() The function .icp_native_init() refe...
```diff diff --git a/arch/powerpc/sysdev/xics/icp-native.c b/arch/powerpc/sysdev/xics/icp-native.c index 50e32afe392e..4c79b6fbee1c 100644 --- a/arch/powerpc/sysdev/xics/icp-native.c +++ b/arch/powerpc/sysdev/xics/icp-native.c @@ -276,7 +276,7 @@ static const struct icp_ops icp_native_ops = { #endif }; -int icp_nat...
0330581ab3b9002d55ee66f377ccbbb742175c01
Analyze and fix the following issue in the Linux kernel code: powerpc/mm: Fix the call trace when resumed from hibernation
Problem Details: In SMP mode, the kernel would produce call trace when resumed from hibernation. The reason is when the function destroy_context is called to drop the resuming mm context, the mm->context.active is 1 which is wrong and should be zero. We pass the current->active_mm as previous mm context to function...
```diff diff --git a/arch/powerpc/kernel/swsusp.c b/arch/powerpc/kernel/swsusp.c index aa17b76dd427..641f9adc6205 100644 --- a/arch/powerpc/kernel/swsusp.c +++ b/arch/powerpc/kernel/swsusp.c @@ -33,6 +33,6 @@ void save_processor_state(void) void restore_processor_state(void) { #ifdef CONFIG_PPC32 - switch_mmu_contex...
2fa3d9e5c699ff49e96199eeb9bea4508e7f5dac
Analyze and fix the following issue in the Linux kernel code: powerpc/wsp: Fix Wire Speed Processor platform configs
Problem Details: Some config selections were applied to the platform (reference board) when they actuall apply to the chip. Signed-off-by: Jimi Xenidis <jimix@pobox.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
```diff diff --git a/arch/powerpc/platforms/wsp/Kconfig b/arch/powerpc/platforms/wsp/Kconfig index c3c48eb62cc1..d051581e9ebf 100644 --- a/arch/powerpc/platforms/wsp/Kconfig +++ b/arch/powerpc/platforms/wsp/Kconfig @@ -1,5 +1,9 @@ config PPC_WSP bool + select PPC_A2 + select PPC_SCOM + select PPC_XICS + select PPC_I...
7392769365f32c82340f184f93408b12dc3da4dc
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix build dependencies for epapr.c which needs libfdt.h
Problem Details: Currently, the build can (very rarely) fail to build because libfdt.h has not been created or is in the process of being copied. Signed-off-by: Matthew McClintock <msm@freescale.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
```diff diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index c26200b40a47..ac6705e75711 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -58,7 +58,7 @@ $(addprefix $(obj)/,$(zlib) cuboot-c2k.o gunzip_util.o main.o prpmc2800.o): \ libfdt := fdt.c fdt_ro.c fdt_wip.c...
d8dd032d533719cbaae2de6ca6dcc5553af3034e
Analyze and fix the following issue in the Linux kernel code: ASoC: twl6040: Fix the number of channels for vibra
Problem Details: Only mono audio can be used for vibra (DL4 channel). Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index 987d9c9c9dfd..97f3e374fc67 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c @@ -1449,8 +1449,8 @@ static struct snd_soc_dai_driver twl6040_dai[] = { .name = "twl6040-vib", .playback = { .stream_name = "Vibr...
77f63e06cb5d5127e6f78347db01e092b97e111e
Analyze and fix the following issue in the Linux kernel code: MFD: twl6040: Fix power on GPIO handling
Problem Details: Avoid requesting the audpwron gpio in case of ES1.0 revision. In the past we requested the gpio, but we did not free it up, since we made the check for the revision later. This results later checks for gpio validity to fail, leaving the gpio reserved (even after the driver has been removed). Signed-of...
```diff diff --git a/drivers/mfd/twl6040-core.c b/drivers/mfd/twl6040-core.c index 51c3b47be655..7dc8c4715001 100644 --- a/drivers/mfd/twl6040-core.c +++ b/drivers/mfd/twl6040-core.c @@ -470,7 +470,6 @@ static int __devinit twl6040_probe(struct platform_device *pdev) platform_set_drvdata(pdev, twl6040); twl6040->...
39193498913f82dd7e484aa908843ca4114c3b0c
Analyze and fix the following issue in the Linux kernel code: cfg80211: validate IBSS BSSID
Problem Details: The IBSS BSSID is never validated, so an invalid one might end up being used. Fix this by rejecting invalid configuration. Reported-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 11089541bb03..430b432bc3f0 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -4527,8 +4527,12 @@ static int nl80211_join_ibss(struct sk_buff *skb, struct genl_info *info) wiphy = &rdev->wiphy; - if (info->attrs[NL80211_AT...
7cc44ed48d0ec0937c1f098642540b6c9ca38de5
Analyze and fix the following issue in the Linux kernel code: mac80211: Fix regression on queue stop during 2040 bss change
Problem Details: The commit "mac80211: stop tx before doing hw config and rate update" stops the tx queue and call drv_flush so frequently whenever a beacon got received with 11n htcap. This leads to massive "Failed to stop TX DMA" logspam on embedded hw. So the queue stop and flush should be called if and only if ther...
```diff diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 2f92ae2f9706..1a59fb6630d4 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -160,7 +160,8 @@ static int ecw2cw(int ecw) */ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata, struct ieee80211_ht_info *hti, - ...
143bb15de5ea904195d8e52cca7e2edbf5b31159
Analyze and fix the following issue in the Linux kernel code: iwlagn: signedness bug
Problem Details: re-apply the unsigned shorts bug fixed by Dan Carpenter but get lost after the file move. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c index 62c00523b3bf..c8e56858fa10 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c @@ -544,7 +544,7 @@ int iwl_trans_pcie_tx_agg_all...
000850065c3b8ee6c9e8125496be3ee9773903cc
Analyze and fix the following issue in the Linux kernel code: iwlagn: fix stack corruption for temperature offset v2
Problem Details: Same stack corruption problem as temperature offset Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c index b5bae38eff83..3e40429fa5ef 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c @@ -187,9 +187,9 @@ static int iwlagn_set_temperature_offset_cali...
effd4d9aece9184f526e6556786a94d335e38b71
Analyze and fix the following issue in the Linux kernel code: iwlagn: do not use interruptible waits
Problem Details: Since the dawn of its time, iwlwifi has used interruptible waits to wait for synchronous commands and firmware loading. This leads to "interesting" bugs, because it can't actually handle the interruptions; for example when a command sending is interrupted it will assume the command completed fully, an...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c index 5f8d7b61db4a..b5bae38eff83 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c @@ -114,13 +114,8 @@ static int iwlagn_load_section(struct iwl_pr...
1dd9124e2911b34744672c91ad865f39711f5542
Analyze and fix the following issue in the Linux kernel code: iwlagn: provide data after WARN_ON
Problem Details: From time to time, we hit a WARN_ON in iwl_mac_remove_interface. This basically means that we got out of sync with mac80211: the vif we hold differs from the vif 80211 passes as parameter. Try to get some data that will help to debug this. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 0a426cbcbfc4..ce8a015c7205 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c @@ -1328,7 +1328,13 @@ void iwl_mac_remove_interface(struct ieee80211_hw *hw, mut...
5092e47afcbe6c470094c32095794b16083dfac2
Analyze and fix the following issue in the Linux kernel code: iwlagn: fix modinfo display for 135 ucode.
Problem Details: The modinfo report for 135 ucode is iwlwifi-135-IWL135_UCODE_API_MAX.ucode Change to show the value of the define: iwlwifi-135-6.ucode Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c index 913f2a228527..057939803d68 100644 --- a/drivers/net/wireless/iwlwifi/iwl-2000.c +++ b/drivers/net/wireless/iwlwifi/iwl-2000.c @@ -75,7 +75,7 @@ #define IWL105_MODULE_FIRMWARE(api) IWL105_FW_PRE __stringify(api)...
21023e2696679bea2a42aa963de74ce37c049b13
Analyze and fix the following issue in the Linux kernel code: iwlagn: add documentation to the transport layer
Problem Details: and do a few clean up fixes on the way Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c index ba5c514c4a43..459b82b8a2a7 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c @@ -901,7 +901,7 @@ void iwlagn_rx_reply_compressed_ba(struct iwl_priv *priv,...
39644e9ac5329dc92d9547976c8f30f18da90097
Analyze and fix the following issue in the Linux kernel code: iwlagn: unmap cmd queue's tfds as BIDI
Problem Details: If the driver is unloaded while there is still a host command in flight, its tfd will be freed by iwl_tx_queue_free. This function is called for both types of queues: Tx queues and cmd queue. This didn't take in count the fact that in Tx queues, tfds are mapped as TO_DEVICE (besides the first TB), wher...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-int-pcie.h b/drivers/net/wireless/iwlwifi/iwl-trans-int-pcie.h index 8047e955a27b..fc3375473541 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-int-pcie.h +++ b/drivers/net/wireless/iwlwifi/iwl-trans-int-pcie.h @@ -307,7 +307,7 @@ void iwl_trans_pcie_tx_ag...
e9c10469cf3c71bc1c6b0f01319161e277d6ac9b
Analyze and fix the following issue in the Linux kernel code: ath9k_hw: Fix magnitude/phase coeff correction
Problem Details: Do the magnitude/phase coeff correction only if the outlier is detected. Updating wrong magnitude/phase coeff factor impacts not only tx gain setting but also leads to poor performance in congested networks. In the clear environment the impact is very minimal because the outlier happens very rarely acc...
```diff diff --git a/drivers/net/wireless/ath/ath9k/ar9003_calib.c b/drivers/net/wireless/ath/ath9k/ar9003_calib.c index 3319a676c0fb..695d9d38d482 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c @@ -652,8 +652,9 @@ static void ar9003_hw_detect_outlier(int ...
bf3f204b92c48c4afa3e827dfe98353560d9aa7f
Analyze and fix the following issue in the Linux kernel code: ath9k_hw: fix setting the hardware diversity flag
Problem Details: ath9k_hw_set_diversity is only called from init.c where it cannot affect the hardware setting because it's cleared on the next reset. Instead of using a PHY op for something that's supposed to be initialized statically, set the register value directly in the INI override function. Signed-off-by: Felix...
```diff diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c index 1381a39a1da4..794a2d96a8ef 100644 --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c @@ -704,6 +704,9 @@ static void ar5008_hw_override_ini(struct ath_hw ...
6e82bc4a5bf3a1ce597324c8667baa6a2ed12604
Analyze and fix the following issue in the Linux kernel code: ath9k: fix setting the IEEE80211_TX_CTL_CLEAR_PS_FILT flag
Problem Details: When the driver inserts padding between the 802.11 header and data, it needs to set the hdr variable to the new header location. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index a0cd51f28596..82718ee1386d 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c @@ -1887,6 +1887,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb, skb...
8c23516fbb209ccf8f8c36268311c721faff29ee
Analyze and fix the following issue in the Linux kernel code: b43: Fix beacon problem in ad-hoc mode
Problem Details: In ad-hoc mode, driver b43 does not issue beacons. Signed-off-by: Manual Munz <freifunk@somakoma.de> Tested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 26f1ab840cc7..e293a7921bf0 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c @@ -1632,7 +1632,8 @@ static void handle_irq_beacon(struct b43_wldev *dev) u32 cmd, beacon0_valid, beacon1_valid; ...
e228b7426e65df0f2e93c783c2c89baabe318b9b
Analyze and fix the following issue in the Linux kernel code: Staging: bcm: Add size maximum size restrictions for IOCTL_IDLE_REQ
Problem Details: In the first alteration, the MAX_CNTL_PKT_SIZE is the maximum size of the control packet in ->Adapter->txctlpacket[] which is defined in InitAdapter(). This caps the size of kmalloc memory allocation. In the second change, this max cap fixes a potential memory corruption bug when subsequent memset and ...
```diff diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 1905a83b3385..4c4335383977 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -690,6 +690,9 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) if (IoBuffer.InputLength < sizeof(s...
7518b9b8fc72a6c0ba67f33bdd4689c7dd28686a
Analyze and fix the following issue in the Linux kernel code: staging: usbip: fix up api changes that broke windows clients
Problem Details: Revert changes in definitions that were submitted on May 11 2011 and committed on June 7 2011. No reason for the change in these values was given in the patch comment, it broke compatibility with older versions, and was difficult to detect by the simultaneous move of the lines of code. Signed-off-by: ...
```diff diff --git a/drivers/staging/usbip/usbip_common.h b/drivers/staging/usbip/usbip_common.h index 074ac4267d3b..be216175ae87 100644 --- a/drivers/staging/usbip/usbip_common.h +++ b/drivers/staging/usbip/usbip_common.h @@ -126,12 +126,12 @@ extern struct device_attribute dev_attr_usbip_debug; * */ #define USBI...
6249687f76b69cc0b2ad34636f4a18d693ef3262
Analyze and fix the following issue in the Linux kernel code: tracing: Add a counter clock for those that do not trust clocks
Problem Details: When debugging tight race conditions, it can be helpful to have a synchronized tracing method. Although in most cases the global clock provides this functionality, if timings is not the issue, it is more comforting to know that the order of events really happened in a precise order. Instead of using a...
```diff diff --git a/include/linux/trace_clock.h b/include/linux/trace_clock.h index 7a8130384087..4eb490237d4c 100644 --- a/include/linux/trace_clock.h +++ b/include/linux/trace_clock.h @@ -15,5 +15,6 @@ extern u64 notrace trace_clock_local(void); extern u64 notrace trace_clock(void); extern u64 notrace trace_clock...
f7a4d872078a5e143d88adb561627f637046b05a
Analyze and fix the following issue in the Linux kernel code: nfsd4: hash closed stateid's like any other
Problem Details: Look up closed stateid's in the stateid hash like any other stateid rather than searching the close lru. This is simpler, and fixes a bug: currently we handle only the case of a close that is the last close for a given stateowner, but not the case of a close for a stateowner that still has active open...
```diff diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 922f47dd0d74..e5cba833613f 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -406,7 +406,6 @@ static int nfs4_access_to_omode(u32 access) static void unhash_generic_stateid(struct nfs4_ol_stateid *stp) { - list_del(&stp->st_stid.sc_has...
d093d5bbdb255b64d9dd6478d1d534e2101f9a70
Analyze and fix the following issue in the Linux kernel code: ARM: mx31pdk: Fix build by passing IMX_HAVE_PLATFORM_MXC_MMC
Problem Details: mx31pdk target fails to build: CC init/version.o LD init/built-in.o LD .tmp_vmlinux1 arch/arm/mach-imx/built-in.o: In function `mx31_3ds_init': mach-mx31_3ds.c:(.init.text+0x548): undefined reference to `imx_add_mxc_mmc' mach-mx31_3ds.c:(.init.text+0x69c): undefined reference to `...
```diff diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 0519dd7f034b..e9c2968005dc 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -449,6 +449,7 @@ config MACH_MX31_3DS select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_IPU_CORE select IMX_HAVE_PLATFORM_M...
8974bd51a77824d91010176f9a5da28513c2e1f5
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek - Fix auto-mute with HP+LO configuration
Problem Details: When the system has only the headphone and the line-out jacks without speakers, the current auto-mute code doesn't work. It's because the spec->automute_lines flag is wrongly referred in update_speakers(). This flag must be meaningless when spec->automute_hp_lo isn't set, thus they should be always co...
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 7cabd7317163..0503c999e7d3 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -168,7 +168,7 @@ struct alc_spec { unsigned int auto_mic_valid_imux:1; /* valid imux for auto-mic */ unsigned int auto...
9df337a104ab99c595cc4ede2c917ba1c2b66374
Analyze and fix the following issue in the Linux kernel code: ath6kl: deinitialise wiphy on error
Problem Details: This fixes the following panic observed on card removal. BUG: unable to handle kernel paging request at f86e22ac EIP is at wiphy_update_regulatory+0x252/0x590 [cfg80211] Call Trace: [<f92fb9e5>] set_regdom+0x165/0x600 [cfg80211] [<c02057ba>] ? __kmalloc+0x10a/0x190 [<c0366557>] ? nla_parse+0xb7/0xd...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c index 0cce80169670..4724ddfab4f7 100644 --- a/drivers/net/wireless/ath/ath6kl/sdio.c +++ b/drivers/net/wireless/ath/ath6kl/sdio.c @@ -25,6 +25,7 @@ #include "hif-ops.h" #include "target.h" #include "debug.h" +#includ...
151411e88fe1d1a729a4f706a2aebef8bc000a69
Analyze and fix the following issue in the Linux kernel code: ath6kl: Fix static WEP configuration in AP mode
Problem Details: Configuration of the WEP keys needs to be delayed until the AP mode has been properly started at the target. Partial support for delaying the WEP key configuration was already in place in the driver, but the actual part of deciding when to do this was missing. Signed-off-by: Jouni Malinen <jouni@qca.q...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index 17bb8e28b338..e196097e7524 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -904,6 +904,20 @@ static int ath6kl_cfg80211_add_key(struct wiphy *wip...
f779b2d60ab95c17f1e025778ed0df3ec2f05d75
Analyze and fix the following issue in the Linux kernel code: tcp: fix validation of D-SACK
Problem Details: D-SACK is allowed to reside below snd_una. But the corresponding check in tcp_is_sackblock_valid() is the exact opposite. It looks like a typo. Signed-off-by: Zheng Yan <zheng.z.yan@intel.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index ea0d2183df4b..21fab3edb92c 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -1124,7 +1124,7 @@ static int tcp_is_sackblock_valid(struct tcp_sock *tp, int is_dsack, return 0; /* ...Then it's D-SACK, and must reside below snd_una...
e05c82d3666119075615fdbf6abca0266344f27b
Analyze and fix the following issue in the Linux kernel code: tcp: fix build error if !CONFIG_SYN_COOKIES
Problem Details: commit 946cedccbd7387 (tcp: Change possible SYN flooding messages) added a build error if CONFIG_SYN_COOKIES=n Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/net/tcp.h b/include/net/tcp.h index e9b48b094683..acc620a4a45f 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -431,17 +431,34 @@ extern int tcp_disconnect(struct sock *sk, int flags); extern __u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS]; extern struct sock *cookie_v4_check(s...
589c797193547b12c34f80048440bc1cac242fec
Analyze and fix the following issue in the Linux kernel code: drivers/video: fsl-diu-fb: fix memory leak on error
Problem Details: We were forgetting to unmap the video memory if fsl_diu_check_var() fails. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
```diff diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index 3776949d6183..c66f6ed57886 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c @@ -1200,6 +1200,7 @@ static int __devinit install_fb(struct fb_info *info) if (fsl_diu_check_var(&info->var, info)) { dev_err(inf...
ec02dd23dc423cf019f660a63ac9c9d54840a473
Analyze and fix the following issue in the Linux kernel code: drivers/video: fsl-diu-fb: fix potential memcpy buffer overflow bug
Problem Details: It makes no sense to limit the size of a strncpy() to the length of the source string. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
```diff diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index 19bfbf5bb980..3776949d6183 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c @@ -655,7 +655,7 @@ static void set_fix(struct fb_info *info) struct fb_var_screeninfo *var = &info->var; struct mfb_info *mfbi = inf...
89f08e3e5d063b9fd7f37e8514e5f0af8c1015e8
Analyze and fix the following issue in the Linux kernel code: drivers/video: fsl-diu-fb: fix compilation warning
Problem Details: Fix this compilation warning in the Freescale DIU framebuffer driver: warning: 'dummy_ad_addr' may be used uninitialized in this function Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
```diff diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index 226f4bc345d5..6c544cff3143 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c @@ -1429,7 +1429,7 @@ static int __devinit fsl_diu_probe(struct platform_device *ofdev) { struct device_node *np = ofdev->dev.of_node;...
154152aeea2c5ee4fd01b842257f5cb562234834
Analyze and fix the following issue in the Linux kernel code: drivers/video: fsl-diu-fb: clean up printk usage
Problem Details: Remove debug printk messages (they don't help in debugging), replace printk(KERN_xxx with its pr_xxx or dev_xxx equivalent, and add a couple missing error messages. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
```diff diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index dbb4cb7124dc..10ee411df3cf 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c @@ -322,14 +322,9 @@ static void *fsl_diu_alloc(size_t size, phys_addr_t *phys) { void *virt; - pr_debug("size=%zu\n", size); - vi...
4a85dc8b7dbb0e2f58c44de6d11bf211587c3d6a
Analyze and fix the following issue in the Linux kernel code: drivers/video: fsl-diu-fb: clean up whitespace and formatting
Problem Details: Fix various indentation and line length problems in the Freescale DIU framebuffer driver. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
```diff diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index 0f1933b54596..dbb4cb7124dc 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c @@ -223,53 +223,53 @@ struct mfb_info { static struct mfb_info mfb_template[] = { { /* AOI 0 for plane 0 */ - .index = 0, - .type =...
003cefe0c238e683a29d2207dba945b508cd45b7
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: Make GPU/CPU page size handling consistent in blit code (v2)
Problem Details: The BO blit code inconsistenly handled the page size. This wasn't an issue on system with 4k pages since the GPU's page size is 4k as well. Switch the driver blit callbacks to take num pages in GPU page units. Fixes lemote mipsel systems using AMD rs780/rs880 chipsets. v2: incorporate suggestions f...
```diff diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index f10d1c1c2554..e8a746712b5b 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c @@ -3171,21 +3171,23 @@ int evergreen_suspend(struct radeon_device *rdev) } int evergreen_copy_blit(s...
18b4fada275dd2b6dd9db904ddf70fe39e272222
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix typo in r100_blit_copy
Problem Details: cur_pages is the number of pages per loop iteration. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c index 11e44a3479e3..a536505342d8 100644 --- a/drivers/gpu/drm/radeon/r100.c +++ b/drivers/gpu/drm/radeon/r100.c @@ -773,8 +773,8 @@ int r100_copy_blit(struct radeon_device *rdev, radeon_ring_write(rdev, (0x1fff) | (0x1fff << 16)); ...
48802c8ae2a9d618ec734a61283d645ad527e06c
Analyze and fix the following issue in the Linux kernel code: BTRFS: Fix lseek return value for error
Problem Details: The recent reworking of btrfs' lseek lead to incorrect values being returned. This adds checks for seeking beyond EOF in SEEK_HOLE and makes sure the error values come back correct. Andi Kleen also sent in similar patches. Signed-off-by: Jie Liu <jeff.liu@oracle.com> Reported-by: Andi Kleen <ak@linu...
```diff diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 3c3abff731a7..a381cd22f518 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1817,6 +1817,11 @@ static loff_t btrfs_file_llseek(struct file *file, loff_t offset, int origin) goto out; case SEEK_DATA: case SEEK_HOLE: + if (offset >= i_size_read(in...
0e7b824c4ef9f5bcf5e48cdce164a7b349dde969
Analyze and fix the following issue in the Linux kernel code: Btrfs: don't make a file partly checksummed through file clone
Problem Details: To reproduce the bug: # mount /dev/sda7 /mnt # dd if=/dev/zero of=/mnt/src bs=4K count=1 # umount /mnt # mount -o nodatasum /dev/sda7 /mnt # dd if=/dev/zero of=/mnt/dst bs=4K count=1 # clone_range -s 4K -l 4K /mnt/src /mnt/dst # echo 3 > /proc/sys/vm/drop_caches # cat /mnt/dst # dm...
```diff diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 8bfb514b26c9..1e766e86f334 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -2185,6 +2185,11 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd, if (!(src_file->f_mode & FMODE_READ)) goto out_fput; + /* don't make...
71ef07861080418d125dcf454af41baafa409a2c
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix pages truncation in btrfs_ioctl_clone()
Problem Details: It's a bug in commit f81c9cdc567cd3160ff9e64868d9a1a7ee226480 (Btrfs: truncate pages from clone ioctl target range) We should pass the dest range to the truncate function, but not the src range. Also move the function before locking extent state. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-...
```diff diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 63b4de1626d2..8bfb514b26c9 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -2234,6 +2234,10 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd, goto out_unlock; } + /* truncate page cache pages from target inode...
3765fefaee2da83f10829fa64a74e6b7360350cb
Analyze and fix the following issue in the Linux kernel code: btrfs: fix d_off in the first dirent
Problem Details: Since the d_off in the first dirent for "." (that originates from the 4th argument "offset" of filldir() for the 2nd dirent for "..") is wrongly assigned in btrfs_real_readdir(), telldir returns same offset for different locations. | # mkfs.btrfs /dev/sdb1 | # mount /dev/sdb1 fs0 | # cd fs0 | # to...
```diff diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index b94c0da3b43f..ba951764b005 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -4117,7 +4117,8 @@ static int btrfs_real_readdir(struct file *filp, void *dirent, /* special case for "." */ if (filp->f_pos == 0) { - over = filldir(dirent, ".", 1, 1...
b57ce4179b502b3f481f7632da20aae3e488e31a
Analyze and fix the following issue in the Linux kernel code: [media] drivers/media/video/stk-webcam.c: coding style issue
Problem Details: checkpatch.pl gave some coding style errors, so on the way to the first patch I added the fix to them. Signed-off-by: Arvydas Sidorenko <asido4@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/stk-webcam.c b/drivers/media/video/stk-webcam.c index 859e78fc1aa3..5fc6bbc165fa 100644 --- a/drivers/media/video/stk-webcam.c +++ b/drivers/media/video/stk-webcam.c @@ -518,7 +518,7 @@ static int stk_prepare_sio_buffers(struct stk_camera *dev, unsigned n_sbufs) return -ENOM...
47a7e6f8d282d199f14abbb068c6c3ba00cb7bfc
Analyze and fix the following issue in the Linux kernel code: [media] drivers/media/video/stk-webcam.c: webcam LED bug fix
Problem Details: The probem was on my DC-1125 webcam chip from Syntek. Whenever the webcam turns on, the LED light on it is turn on also and never turns off again unless system is shut downed or restarted. This patch will fix this issue - the LED will be turned off whenever the device is released. Signed-off-by: Arvy...
```diff diff --git a/drivers/media/video/stk-webcam.c b/drivers/media/video/stk-webcam.c index d1a2cefbf55b..859e78fc1aa3 100644 --- a/drivers/media/video/stk-webcam.c +++ b/drivers/media/video/stk-webcam.c @@ -574,6 +574,8 @@ static int v4l_stk_release(struct file *fp) if (dev->owner == fp) { stk_stop_stream(dev)...
09fc9802c31a9358a4e34642aa5f569111752879
Analyze and fix the following issue in the Linux kernel code: [media] cx18: Fix videobuf capture
Problem Details: When we moved to 3.0, we found that the cx18 driver was oopsing on close with: NULL pointer deref at: [ 2290.461009] Call Trace: [ 2290.461009] [<c046007b>] ? pm_qos_add_request+0xc/0x6e [ 2290.461009] [<c082631c>] __mutex_lock_common+0x87/0x125 [ 2290.461009] [<f8970e92>] ? cx18_queue_flush+0x31/...
```diff diff --git a/drivers/media/video/cx18/cx18-driver.h b/drivers/media/video/cx18/cx18-driver.h index 183420723060..b9a94fc5146d 100644 --- a/drivers/media/video/cx18/cx18-driver.h +++ b/drivers/media/video/cx18/cx18-driver.h @@ -409,6 +409,7 @@ struct cx18_stream { /* Videobuf for YUV video */ u32 pixelform...
16e3d2f4fab6e001a79705fa273418afc10188f8
Analyze and fix the following issue in the Linux kernel code: [media] EM28xx - Fix memory leak on disconnect or error
Problem Details: Release the dev->alt_max_pkt_size buffer in all cases. Signed-off-by: Chris Rankin <rankincj@yahoo.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index 5fddcd0869de..013e946bdc45 100644 --- a/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.c @@ -3201,6 +3201,7 @@ static int em28xx_usb_probe(struct usb_interface *inter...
45e1892e70b85d251b2e69f4122a04e509ebdf00
Analyze and fix the following issue in the Linux kernel code: USB: Realtek cr: Fix driver freeze issue
Problem Details: After auto-delink command is triggered, the CSW won't be sent back to host side, in which scenario, the USB Mass Storage driver will wait for the completion of the URB for MAX_SCHEDULE_TIMEOUT. Signed-off-by: edwin_rong <edwin_rong@realsil.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/storage/realtek_cr.c b/drivers/usb/storage/realtek_cr.c index 232167ad4781..f664c865e71e 100644 --- a/drivers/usb/storage/realtek_cr.c +++ b/drivers/usb/storage/realtek_cr.c @@ -293,6 +293,52 @@ static int rts51x_bulk_transport(struct us_data *us, u8 lun, return USB_STOR_TRANSPORT_ERR...
2394d67e446bf616a0885167d5f0d397bdacfdfc
Analyze and fix the following issue in the Linux kernel code: USB: add RESET_RESUME for webcams shown to be quirky
Problem Details: The new runtime PM code has shown that many webcams suffer from a race condition that may crash them upon resume. Runtime PM is especially prone to show the problem because it retains power to the cameras at all times. However system suspension may also crash the devices and retain power to the devices...
```diff diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index 81ce6a8e1d94..38f0510e7607 100644 --- a/drivers/usb/core/quirks.c +++ b/drivers/usb/core/quirks.c @@ -38,6 +38,24 @@ static const struct usb_device_id usb_quirk_list[] = { /* Creative SB Audigy 2 NX */ { USB_DEVICE(0x041e, 0x3020), .dr...
fcda37cb42cc0aa039a2d1e06ec801e4e9f417f4
Analyze and fix the following issue in the Linux kernel code: usb: ehci: fix comment for EHCI_SHRINK_JIFFIES
Problem Details: EHCI_SHRINK_JIFFIES should be 5ms, which was just used originally, and not 200ms, so fix it. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 8696489cde56..2f0cf863b379 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -95,7 +95,7 @@ static const char hcd_name [] = "ehci_hcd"; #define EHCI_IO_JIFFIES (HZ/10) /* io watchdog > irq_thresh */ #def...
839f245f8f1e7d7efd7ba12a7d735f13e8293a2b
Analyze and fix the following issue in the Linux kernel code: usb-storage: fix realtek cr configuration
Problem Details: A typo in the configuration variable name prevents from activating the USB autosuspend on the device. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/storage/Kconfig b/drivers/usb/storage/Kconfig index bedc4b9f2ac4..fe2d803a6347 100644 --- a/drivers/usb/storage/Kconfig +++ b/drivers/usb/storage/Kconfig @@ -42,7 +42,7 @@ config USB_STORAGE_REALTEK config REALTEK_AUTOPM bool "Realtek Card Reader autosuspend support" - depends on U...
8582d86143c690c68cc42f996def466a035bee34
Analyze and fix the following issue in the Linux kernel code: USB: g_printer: fix bug in unregistration
Problem Details: The allocated chardevice region range is only 1 device but on unregister it currently tries to deregister 2. Found this while doing a insmod/rmmod/insmod/rm... of the module which seemed to eat major numbers. Signed-off-by: Fabian Godehardt <fg@emlix.com> Cc: stable <stable@kernel.org> Signed-off-by:...
```diff diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c index 68a0efbc2719..65a8834f274b 100644 --- a/drivers/usb/gadget/printer.c +++ b/drivers/usb/gadget/printer.c @@ -1594,7 +1594,7 @@ cleanup(void) if (status) ERROR(dev, "usb_gadget_unregister_driver %x\n", status); - unregister_chrd...
c58a76cdd7ab5a945a44fd2d64f6faf40323f95b
Analyze and fix the following issue in the Linux kernel code: USB: option: add various ZTE device network interfaces to the blacklist
Problem Details: IDs found in the Windows driver's ZTEusbnet.inf file from the ZTE MF100 drivers (O2 UK). Also fixes the ZTE MF626 device since it really is distinct from the 4G Systems stick and apparently needs the net interface blacklisted too, while there's no indication (yet) that the 4G Systems stick does. Sign...
```diff diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 7a336f7089ac..89ae1f65e1b1 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -497,12 +497,34 @@ static const struct option_blacklist_info zte_0037_blacklist = { static const struct option_blacklist_info z...
bcd326e844c46e0533a79f91e75dea160469cf86
Analyze and fix the following issue in the Linux kernel code: tipc: Fix unsafe device list search when enabling bearer
Problem Details: Ensures that the device list lock is held while trying to locate the Ethernet device used by a newly enabled bearer, so that the addition or removal of a device does not cause problems. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver...
```diff diff --git a/net/tipc/eth_media.c b/net/tipc/eth_media.c index b69092eb95d8..69bedd8a297b 100644 --- a/net/tipc/eth_media.c +++ b/net/tipc/eth_media.c @@ -2,7 +2,7 @@ * net/tipc/eth_media.c: Ethernet bearer support for TIPC * * Copyright (c) 2001-2007, Ericsson AB - * Copyright (c) 2005-2007, Wind River S...
a96e8e11635773dd88dbe1307f9482146cfe0562
Analyze and fix the following issue in the Linux kernel code: [SCSI] bnx2fc: Fix FW assert during RSCN stress tests
Problem Details: Firmware asserts when the same CQE is armed twice. This scenario happens during RSCN stress tests as driver incorrects arms the CQ after the session is offloaded. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
```diff diff --git a/drivers/scsi/bnx2fc/bnx2fc_tgt.c b/drivers/scsi/bnx2fc/bnx2fc_tgt.c index 2138da9571ac..c1800b531270 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_tgt.c +++ b/drivers/scsi/bnx2fc/bnx2fc_tgt.c @@ -133,9 +133,7 @@ retry_ofld: printk(KERN_ERR PFX "map doorbell failed - no mem\n"); /* upload will take ...
013068fa6f65f7037adedc141fbd27afc99ab1bb
Analyze and fix the following issue in the Linux kernel code: [SCSI] bnx2fc: Fix panic caused because of incorrect errror handling in create().
Problem Details: Driver incorrectly calls bnx2fc_interface_cleanup() when bnx2fc_if_create fails which accesses bad pointer. Handle bnx2fc_if_create failure by directly calling bnx2fc_net_cleanup. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
```diff diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index a5111f365f69..330f9f0e1937 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c @@ -1441,6 +1441,14 @@ free_blport: return NULL; } +static void bnx2fc_net_cleanup(struct bnx2fc_interfa...
0cbf32e1681d870632a1772601cbaadd996dc978
Analyze and fix the following issue in the Linux kernel code: [SCSI] bnx2fc: Avoid calling bnx2fc_if_destroy with unnecessary locks
Problem Details: It is not required to hold rtnl_lock and bnx2fc_dev_lock when calling bnx2fc_if_destroy, as the locking is only required to serialize creation and deletion of fcoe instances. More importantly, this unnecessary locking causes deadlock as bnx2fc_if_destroy calls fc_remove_host holding rtnl_lock. Signed-...
```diff diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index 886938d025cd..a5111f365f69 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c @@ -1487,13 +1487,13 @@ static void bnx2fc_if_destroy(struct fc_lport *lport) static void __bnx2fc_destroy(s...
4dfa33868d9f8595717047eb058322e0999691cc
Analyze and fix the following issue in the Linux kernel code: ARM: nommu: fix warning with checksyscalls.sh
Problem Details: CALL scripts/checksyscalls.sh <stdin>:46:1: warning: "__IGNORE_migrate_pages" redefined In file included from <stdin>:2: arch/arm/include/asm/unistd.h:482:1: warning: this is the location of the previous definition This is caused because we define __IGNORE_migrate_pages to be 1, but in the case of ...
```diff diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h index 2c04ed5efeb5..c60a2944f95b 100644 --- a/arch/arm/include/asm/unistd.h +++ b/arch/arm/include/asm/unistd.h @@ -478,8 +478,8 @@ /* * Unimplemented (or alternatively implemented) syscalls */ -#define __IGNORE_fadvise64_64 1 -#de...
106633897e086e1b47126996aac1a427eb80eb1b
Analyze and fix the following issue in the Linux kernel code: r8169: fix WOL setting for 8105 and 8111evl
Problem Details: rtl8105, rtl8111E, and rtl8111evl need enable RxConfig bit 1 ~ 3 for supporting wake on lan. Signed-off-by: Hayes Wang <hayeswang@realtek.com>
```diff diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index b55fba7f3a04..78c1d5832792 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -3320,9 +3320,16 @@ static void r810x_phy_power_up(struct rtl8169_private *tp) static void r810x_pll_power_down(struct rtl8169_private *tp) { + void __iomem *...
c2b0c1e7fb69b54e704cb2dae5a80cc78a8cb0b2
Analyze and fix the following issue in the Linux kernel code: r8169: fix the reset setting for 8111evl
Problem Details: rtl8111evl should stop any TLP requirement before resetting by enabling register 0x37 bit 7. Signed-off-by: Hayes Wang <hayeswang@realtek.com>
```diff diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 02339b3352e7..a1c90707a2dd 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -3988,6 +3988,7 @@ static void rtl8169_hw_reset(struct rtl8169_private *tp) while (RTL_R8(TxPoll) & NPQ) udelay(20); } else if (tp->mac_version == RTL_GI...
8e2ec639173f325977818c45011ee176ef2b11f6
Analyze and fix the following issue in the Linux kernel code: ipv6: don't use inetpeer to store metrics for routes.
Problem Details: Current IPv6 implementation uses inetpeer to store metrics for routes. The problem of inetpeer is that it doesn't take subnet prefix length in to consideration. If two routes have the same address but different prefix length, they share same inetpeer. So changing metrics of one route also affects the o...
```diff diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 9e69eb0ec6dd..1250f9020670 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -104,6 +104,9 @@ static u32 *ipv6_cow_metrics(struct dst_entry *dst, unsigned long old) struct inet_peer *peer; u32 *p = NULL; + if (!(rt->dst.flags & DST_HOST)) + ret...
b9fa1fbf98178c8bbda23ff1d3ed0731bb3c0bd1
Analyze and fix the following issue in the Linux kernel code: bna: Eliminate Small Race Condition Window in RX Path
Problem Details: Change details: - In a continuous sequence of ifconfig up/down operations, there is a small window of race between bnad_set_rx_mode() and bnad_cleanup_rx() while the former tries to access rx_info->rx & the latter sets it to NULL. This race could lead to bna_rx_mode_set() being called with a ...
```diff diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c index 33ab1f81c1c2..abca1399fe51 100644 --- a/drivers/net/ethernet/brocade/bna/bnad.c +++ b/drivers/net/ethernet/brocade/bna/bnad.c @@ -1875,10 +1875,10 @@ bnad_cleanup_rx(struct bnad *bnad, u32 rx_id) spin_lock_i...
3fb9852f98ffb4cdd3bad6eb50b1a6d58cee1298
Analyze and fix the following issue in the Linux kernel code: bna: Set Ring Param Fix
Problem Details: When Rx queue size is changed, queues are torn down and setup with the new queue size. During this operation, clear promiscuous mode and restore the original VLAN filter. Signed-off-by: Gurunatha Karaje <gkaraje@brocade.com> Signed-off-by: Rasesh Mody <rmody@brocade.com> Signed-off-by: David S. Miller...
```diff diff --git a/drivers/net/ethernet/brocade/bna/bnad_ethtool.c b/drivers/net/ethernet/brocade/bna/bnad_ethtool.c index 48422244397c..ac6b49561bf0 100644 --- a/drivers/net/ethernet/brocade/bna/bnad_ethtool.c +++ b/drivers/net/ethernet/brocade/bna/bnad_ethtool.c @@ -471,16 +471,17 @@ bnad_set_ringparam(struct net_d...
1d51a1325e43e0c05df626735c66d52203d610fd
Analyze and fix the following issue in the Linux kernel code: bna: Semaphore Lock Fix
Problem Details: Remove a BUG_ON() as it is not required. Change the unconditional write to release a semaphore to read sem first and then write. This will eliminate the possibility of sem getting locked while trying to release it in case if previous sem_get operation failed. Signed-off-by: Gurunatha Karaje <gkaraje@...
```diff diff --git a/drivers/net/ethernet/brocade/bna/bfa_ioc.c b/drivers/net/ethernet/brocade/bna/bfa_ioc.c index 029fb527e80d..4282fef24f95 100644 --- a/drivers/net/ethernet/brocade/bna/bfa_ioc.c +++ b/drivers/net/ethernet/brocade/bna/bfa_ioc.c @@ -1201,13 +1201,13 @@ bfa_nw_ioc_sem_get(void __iomem *sem_reg) if (!...
80bb25e3eb73f4fdde48ee017da04b947cec8b90
Analyze and fix the following issue in the Linux kernel code: ixgbe: fix FCRTL/H register dump for X540
Problem Details: Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
```diff diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c index 46f4ecf1bba3..63cd2a11ff1e 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c @@ -529,6 +529,7 @@ static void ixgbe_get_regs(st...
f7e1027f61c40eca1acc36e806b8db4cad01f221
Analyze and fix the following issue in the Linux kernel code: v2 ixgbe: Update packet buffer reservation to correct fdir headroom size
Problem Details: This change fixes an issue in which the incorrect amount of headroom was being reserved for flow director filters. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
```diff diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index fec49e6fc3b6..0283e1211390 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -3372,15 +3372,17 @@ static void ixgbe_configure_dcb(struc...
4c1d7b4b5dec6b8a97202d88538c06733173b1c5
Analyze and fix the following issue in the Linux kernel code: ixgbe: remove redundant configuration of tx_sample_rate
Problem Details: This change fixes a minor redundancy in that tx_sample_rate was set twice. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
```diff diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index bb069bc3d1a2..fec49e6fc3b6 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -3409,16 +3409,12 @@ static void ixgbe_fdir_filter_restore...
16650107579aed81e0b0534a60400f9ba911fe9b
Analyze and fix the following issue in the Linux kernel code: MIPS: Trivial style cleanups in mmap.c
Problem Details: Fix checkpatch warnings. Rename arch_get_unmapped_area_foo() to arch_get_unmapped_area_common(). Make indentations and spacing more consistent. Add <linux/compiler.h> for likely/unlikely. Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Cc: Jian Peng <jipeng2005@gmail.com> Cc: David Daney <ddaney...
```diff diff --git a/arch/mips/mm/mmap.c b/arch/mips/mm/mmap.c index 9ff5d0fac556..302d779d5b0d 100644 --- a/arch/mips/mm/mmap.c +++ b/arch/mips/mm/mmap.c @@ -6,6 +6,7 @@ * Copyright (C) 2011 Wind River Systems, * written by Ralf Baechle <ralf@linux-mips.org> */ +#include <linux/compiler.h> #include <linux/err...