id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
83cf0a9b86ba12664ab0648f5afb118c981371e9
Analyze and fix the following issue in the Linux kernel code: comment typo fix: sybsystem -> subsystem
Problem Details: Signed-off-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c index 1e8dd8c74a64..8f7d0d146f24 100644 --- a/drivers/net/irda/smsc-ircc2.c +++ b/drivers/net/irda/smsc-ircc2.c @@ -115,7 +115,7 @@ struct smsc_ircc_subsystem_configuration { unsigned short vendor; /* PCI vendor ID */ unsigned short ...
f1970c48ef06ece4e23765501976507ab52b0edd
Analyze and fix the following issue in the Linux kernel code: ipc: fix unused variable warning
Problem Details: Commit a0d092f introduced the following warning: ipc/msg.c: In function ?msgctl_down?: ipc/msg.c:415: warning: ?msqid64? may be used uninitialized in this function The gcc warning in this case is actually bogus, as msqid64 is touched only iff cmd == IPC_SET, and in such case, copy_msqid_from_user() in...
```diff diff --git a/ipc/msg.c b/ipc/msg.c index 2ceab7f12fcb..085bd58f2f07 100644 --- a/ipc/msg.c +++ b/ipc/msg.c @@ -412,7 +412,7 @@ static int msgctl_down(struct ipc_namespace *ns, int msqid, int cmd, struct msqid_ds __user *buf, int version) { struct kern_ipc_perm *ipcp; - struct msqid64_ds msqid64; + ...
e9de25dda359c9272998daddeae7788376a44e41
Analyze and fix the following issue in the Linux kernel code: mm: fix comments for invalidate_inode_pages2()
Problem Details: invalidate_inode_pages2() returns -EBUSY *NOT* -EIO if any pages could not be invalidated. Signed-off-by: Peng Tao <bergwolf@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/mm/truncate.c b/mm/truncate.c index 450cebdabfc0..2c147a7e5f2c 100644 --- a/mm/truncate.c +++ b/mm/truncate.c @@ -490,7 +490,7 @@ EXPORT_SYMBOL_GPL(invalidate_inode_pages2_range); * Any pages which are found to be mapped into pagetables are unmapped prior to * invalidation. * - * Returns -EIO...
1e04b7ae709d19d5c9f69c64e1e30253018ce102
Analyze and fix the following issue in the Linux kernel code: sdio_uart: coding style fixes
Problem Details: Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/mmc/card/sdio_uart.c b/drivers/mmc/card/sdio_uart.c index 36a8d53ad2a2..b8e7c5ae981e 100644 --- a/drivers/mmc/card/sdio_uart.c +++ b/drivers/mmc/card/sdio_uart.c @@ -231,7 +231,8 @@ static unsigned int sdio_uart_get_mctrl(struct sdio_uart_port *port) return ret; } -static void sdio_uar...
94e2bd688820aed72b4f8092f88c2ccf64e003de
Analyze and fix the following issue in the Linux kernel code: tree-wide: fix some typos and punctuation in comments
Problem Details: fix some typos and punctuation in comments Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c index 575593a8b4e6..27c77729c7ca 100644 --- a/drivers/acpi/video_detect.c +++ b/drivers/acpi/video_detect.c @@ -7,7 +7,7 @@ * video_detect.c: * Provides acpi_is_video_device() for early scanning of ACPI devices in scan.c * There a Linu...
65cb76baa1058d17d51ce948b697cdbd5dc97421
Analyze and fix the following issue in the Linux kernel code: ehci-hcd: Fix typo in an error message
Problem Details: The correct word is handshake. Signed-off-by: Ozan Çağlayan <ozan@pardus.org.tr> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 9835e0713943..a68eb2c87c3e 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -209,7 +209,7 @@ static int handshake_on_error_set_halt(struct ehci_hcd *ehci, void __iomem *ptr, if (error) { ehci_halt(ehci...
fedea672a3aab3b99d03e69805ee423c73af1961
Analyze and fix the following issue in the Linux kernel code: mx31moboard: fix typo
Problem Details: Currently, linux-next breaks due to a typo introduced in commit 33c4d91928bea4444b067e620496befbeb87029c This patch fixes it. Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de> Cc: Valentin Longchamp <valentin.longchamp@epfl.ch> Cc: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Sascha ...
```diff diff --git a/arch/arm/mach-mx3/mx31moboard.c b/arch/arm/mach-mx3/mx31moboard.c index 1ec679a3c72f..b70529145936 100644 --- a/arch/arm/mach-mx3/mx31moboard.c +++ b/arch/arm/mach-mx3/mx31moboard.c @@ -226,7 +226,7 @@ static struct mc13783_regulator_init_data moboard_regulators[] = { static struct mc13783_platfor...
06a5bad898b332b8c6525fc8c4d1c1c9a8df65de
Analyze and fix the following issue in the Linux kernel code: powerpc/44x: Fix PCI node in Yosemite DTS
Problem Details: The stanza for PCI was copied from Bamboo which has four PCI slots. Yosemite only has one PCI slot which is mapped to IDSEL 12, ADDR 22, IRQ2 Vector 25, INTA. Signed-off-by: Curtis Wald <cwald@watchguardvideo.com> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
```diff diff --git a/arch/powerpc/boot/dts/yosemite.dts b/arch/powerpc/boot/dts/yosemite.dts index 1fa3cb4c4ebb..64923245f0e5 100644 --- a/arch/powerpc/boot/dts/yosemite.dts +++ b/arch/powerpc/boot/dts/yosemite.dts @@ -282,20 +282,10 @@ /* Inbound 2GB range starting at 0 */ dma-ranges = <0x42000000 0x0 0x0 0x0 ...
2e991cfa9b9b508725a7b56174b6aade895772b2
Analyze and fix the following issue in the Linux kernel code: powerpc/44x: Fix DMA ranges in DTS file for Katmai board.
Problem Details: Set PCI-E node inbound DMA ranges size to 4GB for correct boot up of Katmai. Signed-off-by: Pravin Bathija <pbathija@amcc.com> Acked-by: Feng Kan <fkan@amcc.com> Acked-by: Prodyut Hazarika <phazarika@amcc.com> Acked-by: Loc Ho <lho@amcc.com> Acked-by: Tirumala Reddy Marri <tmarri@amcc.com> Acked-by: V...
```diff diff --git a/arch/powerpc/boot/dts/katmai.dts b/arch/powerpc/boot/dts/katmai.dts index b8cd97c5c74e..51eb6ed5da2d 100644 --- a/arch/powerpc/boot/dts/katmai.dts +++ b/arch/powerpc/boot/dts/katmai.dts @@ -253,8 +253,8 @@ ranges = <0x02000000 0x00000000 0x80000000 0x0000000d 0x80000000 0x00000000 0x80000000 ...
237e5bc4e51813e9d8ba9da0f63e7acc608882d7
Analyze and fix the following issue in the Linux kernel code: io controller: quick fix for blk-cgroup and modular CFQ
Problem Details: It's currently not an allowed configuration, so express that in Kconfig. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
```diff diff --git a/block/Kconfig.iosched b/block/Kconfig.iosched index b71abfb0d726..5368d74207e8 100644 --- a/block/Kconfig.iosched +++ b/block/Kconfig.iosched @@ -34,7 +34,7 @@ config IOSCHED_CFQ config CFQ_GROUP_IOSCHED bool "CFQ Group Scheduling support" - depends on IOSCHED_CFQ && CGROUPS + depends on IOSCH...
7e213481d606e41ffb917e42eb88b1586333444b
Analyze and fix the following issue in the Linux kernel code: sh: fix sh7724 VEU3F resource size
Problem Details: Fix one-off VEU3F size error for sh7724. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c index 16e18749ac1b..845e89c936e7 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c @@ -204,7 +204,7 @@ static struct resource veu0_resources[] = { [0] = { .name = "VEU...
b1516803d5274386256bef4972dfbf8c9eed5165
Analyze and fix the following issue in the Linux kernel code: serial: sh-sci: Fix too early port disabling.
Problem Details: Currently serial ports on SH CPUs get disabled too early, because the sci_tx_empty() routine claims to not be able to detect whether the transmission has been completed and just always returns TIOCSER_TEMT. This results in corrupt output of last characters if the port is not open for reading at the sam...
```diff diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index 972fca0a3ef1..ff38dbdb5c6e 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c @@ -799,8 +799,8 @@ static void sci_free_irq(struct sci_port *port) static unsigned int sci_tx_empty(struct uart_port *port) { - /* Can't detect ...
722f29434e72188b2d20f9b41f4b5952073ed568
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix vram setup on rs600
Problem Details: also fix up rs690 mem width. should fix fdo bug 25408 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c index c97eb63a21d2..00bc71fe98d1 100644 --- a/drivers/gpu/drm/radeon/rs600.c +++ b/drivers/gpu/drm/radeon/rs600.c @@ -320,6 +320,12 @@ void rs600_vram_info(struct radeon_device *rdev) /* FIXME: to do or is these values sane ? */ rd...
8de21525439e6b5bb8d8c81e49094d867bf82f6d
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix legacy crtc2 dpms
Problem Details: noticed by Matthijs Kooijman on fdo bug 22140 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c index 6f3ff8b84faf..4a5f2d36efe6 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c @@ -292,8 +292,7 @@ void radeon_crtc_dpms(struct drm_crtc *crtc, int ...
4c4f5413c3208da7621cd29baac1fbdca89181b2
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: don't use bios dividers for lvds on r4xx
Problem Details: R4xx cards don't have lvds pll dividers since they use atom. should fix rh bug 541562 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c index c1e1706d06b4..6f3ff8b84faf 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c @@ -796,18 +796,20 @@ static void radeon_set_pll(struct drm_crtc *crt...
d684076627a4561ea698bf7652a1a1baabdcdbdc
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix ring info in debugfs on r600+
Problem Details: Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Acked-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index 26947e8dadcb..94e7fd2f59e9 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c @@ -2361,21 +2361,21 @@ static int r600_debugfs_cp_ring_info(struct seq_file *m, void *data) struct drm_info_node *node = (...
93e7de7b37cb6c75032007e5b84e1305f1705485
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix typo in define: engine -> memory
Problem Details: Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 57416d2b9650..92bebc0f4814 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h @@ -979,7 +979,7 @@ static inline void radeon_ring_write(struct radeon_device *rdev, uint32_t v) #define radeon_get_...
c142c3e5e3e826bdeca77062ec44be558ff2f6b9
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms/pm: fix typos
Problem Details: Unit typo noticed by taiu on IRC Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index 46146c6a2a06..34b08d307c81 100644 --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c @@ -27,7 +27,7 @@ int radeon_debugfs_pm_init(struct radeon_device *rdev); int radeon_pm_init(struct rade...
01d01ba947670cf58f22119fc126fdf39078f6ba
Analyze and fix the following issue in the Linux kernel code: drm/mm: fixup typo in debug functions.
Problem Details: Free and used were reversed. Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c index c861d80fd779..59cebd7d3fc2 100644 --- a/drivers/gpu/drm/drm_mm.c +++ b/drivers/gpu/drm/drm_mm.c @@ -386,7 +386,7 @@ int drm_mm_dump_table(struct seq_file *m, struct drm_mm *mm) else total_used += entry->size; } - seq_printf(m, "tota...
47e1c323069bcef0acb8a2b48921688573f5ca63
Analyze and fix the following issue in the Linux kernel code: tcp: fix a timewait refcnt race
Problem Details: After TCP RCU conversion, tw->tw_refcnt should not be set to 1 in inet_twsk_alloc(). It allows a RCU reader to get this timewait socket, while we not yet stabilized it. Only choice we have is to set tw_refcnt to 0 in inet_twsk_alloc(), then atomic_add() it later, once everything is done. Location of ...
```diff diff --git a/net/ipv4/inet_timewait_sock.c b/net/ipv4/inet_timewait_sock.c index 11a107a5af4f..0fdf45e4c90c 100644 --- a/net/ipv4/inet_timewait_sock.c +++ b/net/ipv4/inet_timewait_sock.c @@ -109,7 +109,6 @@ void __inet_twsk_hashdance(struct inet_timewait_sock *tw, struct sock *sk, tw->tw_tb = icsk->icsk_bind_...
13475a30b66cdb9250a34052c19ac98847373030
Analyze and fix the following issue in the Linux kernel code: tcp: connect() race with timewait reuse
Problem Details: Its currently possible that several threads issuing a connect() find the same timewait socket and try to reuse it, leading to list corruptions. Condition for bug is that these threads bound their socket on same address/port of to-be-find timewait socket, and connected to same target. (SO_REUSEADDR nee...
```diff diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h index 4fd007f34dd5..b801ade2295e 100644 --- a/include/net/inet_timewait_sock.h +++ b/include/net/inet_timewait_sock.h @@ -199,6 +199,8 @@ static inline __be32 inet_rcv_saddr(const struct sock *sk) extern void inet_twsk_put(struc...
3320eae51d6e4c65b4733bf4d87de3b833973a1f
Analyze and fix the following issue in the Linux kernel code: net: Fix ks8851 snl NULL pointer dereference Oops
Problem Details: This fixes the NULL pointer dereference Oops in the ks8851 snl network driver during transmission. All socket buffers from the queue are processed inside the loop, but new workqueues have been scheduled to run. Signed-off-by: Tristram Ha <Tristram.Ha@micrel.com> Signed-off-by: David S. Miller <davem@...
```diff diff --git a/drivers/net/ks8851.c b/drivers/net/ks8851.c index a23f739d222f..6d3ac65bc35c 100644 --- a/drivers/net/ks8851.c +++ b/drivers/net/ks8851.c @@ -1,4 +1,4 @@ -/* drivers/net/ks8651.c +/* drivers/net/ks8851.c * * Copyright 2009 Simtec Electronics * http://www.simtec.co.uk/ @@ -714,7 +714,7 @@ stat...
012093f6d5d89e6ed6e89c55c383f84b1cff7a78
Analyze and fix the following issue in the Linux kernel code: bnx2: Refine VPD logic.
Problem Details: - Replace magic values with constants - Simplify length calculation and fix a bug Based on valuable feedback from Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index cf4322d01823..4bfc80812926 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -7730,24 +7730,27 @@ bnx2_read_vpd_fw_ver(struct bnx2 *bp) u8 *v0_str = NULL; bool mn_match = false; +#define BNX2_VPD_NVRAM_OFFSET 0x300 +#define BNX2_VPD_LEN ...
c3a73ba13bac7fd96030f39202b2d37fb19c46a6
Analyze and fix the following issue in the Linux kernel code: drm/ttm: Fix build failure due to missing struct page
Problem Details: drm/ttm fails to build on MIPS because "struct page" is not known: | In file included from drivers/gpu/drm/ttm/ttm_memory.c:28: | include/drm/ttm/ttm_memory.h:154: warning: 'struct page' declared inside parameter list | include/drm/ttm/ttm_memory.h:154: warning: its scope is only this definition or dec...
```diff diff --git a/include/drm/ttm/ttm_memory.h b/include/drm/ttm/ttm_memory.h index 6983a7cf4da4..b199170b3c2c 100644 --- a/include/drm/ttm/ttm_memory.h +++ b/include/drm/ttm/ttm_memory.h @@ -33,6 +33,7 @@ #include <linux/wait.h> #include <linux/errno.h> #include <linux/kobject.h> +#include <linux/mm.h> /** ...
46a79fa08a9a890a12cf9ec3ce51800911a907bf
Analyze and fix the following issue in the Linux kernel code: drm/ttm: fix small memory leak in ttm_memory.c
Problem Details: I moved the allocation until after the check for (si->totalhigh == 0). Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-By: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/ttm/ttm_memory.c b/drivers/gpu/drm/ttm/ttm_memory.c index 072c281a6bb5..336976e8652d 100644 --- a/drivers/gpu/drm/ttm/ttm_memory.c +++ b/drivers/gpu/drm/ttm/ttm_memory.c @@ -274,16 +274,17 @@ static int ttm_mem_init_kernel_zone(struct ttm_mem_global *glob, static int ttm_mem_init_h...
d413ff3e2aa09a4ebef718dbc4be4356f879467f
Analyze and fix the following issue in the Linux kernel code: pata_hpt3x2n: fix overclocked MWDMA0 timing
Problem Details: Remove superfluous timings table entry while at it. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/pata_hpt3x2n.c b/drivers/ata/pata_hpt3x2n.c index d30da8072091..9a09a1b11ca5 100644 --- a/drivers/ata/pata_hpt3x2n.c +++ b/drivers/ata/pata_hpt3x2n.c @@ -80,14 +80,13 @@ static struct hpt_clock hpt3x2n_clocks[] = { { XFER_MW_DMA_2, 0x2c829c62 }, { XFER_MW_DMA_1, 0x2c829c66 }, - { ...
9cf00977da092096c7a983276dad8b3002d23a99
Analyze and fix the following issue in the Linux kernel code: drm/edid: Unify detailed block parsing between base and extension blocks
Problem Details: Also fix an embarassing bug in standard timing subblock parsing that would result in an infinite loop. Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index bdea31308236..999571ab0b69 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -838,8 +838,57 @@ static int add_standard_modes(struct drm_connector *connector, struct edid *edid return modes; } +static int ad...
20175c57f23cde2049c509eb00a2f9d373478107
Analyze and fix the following issue in the Linux kernel code: bnx2: Dump some state during tx timeout.
Problem Details: To help debug the problem. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 03eb51f1c694..665253a3e73a 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -6278,11 +6278,34 @@ bnx2_reset_task(struct work_struct *work) rtnl_unlock(); } +static void +bnx2_dump_state(struct bnx2 *bp) +{ + struct net_device *dev = bp->...
51bf6bb424c14bfd3590a0de03fbd07fc800435e
Analyze and fix the following issue in the Linux kernel code: bnx2: Protect tx timeout reset with rtnl_lock().
Problem Details: To prevent race conditions with other reset events. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 4cae2a86e741..03eb51f1c694 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -6263,8 +6263,11 @@ bnx2_reset_task(struct work_struct *work) { struct bnx2 *bp = container_of(work, struct bnx2, reset_task); - if (!netif_running(bp->dev)) + r...
c4d8a20022e617174eb887c82356d3f513e279a7
Analyze and fix the following issue in the Linux kernel code: pata_via: clear UDMA transfer mode bit for PIO and MWDMA
Problem Details: Fix register naming while at it. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index 78eac276effb..0d97890af681 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c @@ -303,14 +303,21 @@ static void via_do_set_mode(struct ata_port *ap, struct ata_device *adev, int mo } /* Set UDMA unless device is not UDMA capa...
750c7136ea873255ed0b74e20f0d3ef9ac8984c0
Analyze and fix the following issue in the Linux kernel code: pata_sis: Power Management fix
Problem Details: Call sis_fixup() on resume. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c index d70ecece93ee..8af0dc88fd98 100644 --- a/drivers/ata/pata_sis.c +++ b/drivers/ata/pata_sis.c @@ -2,7 +2,7 @@ * pata_sis.c - SiS ATA driver * * (C) 2005 Red Hat - * (C) 2007 Bartlomiej Zolnierkiewicz + * (C) 2007,2009 Bartlomiej Zolnierki...
0826ef5f6fa28c50b70cfae001fd31531a1656f8
Analyze and fix the following issue in the Linux kernel code: pata_rz1000: Power Management fix
Problem Details: Fix ->resume method to re-enable & re-init PCI device properly before doing chipset specific setup. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/pata_rz1000.c b/drivers/ata/pata_rz1000.c index a5e4dfe60b41..2932998fc4c6 100644 --- a/drivers/ata/pata_rz1000.c +++ b/drivers/ata/pata_rz1000.c @@ -105,11 +105,20 @@ static int rz1000_init_one (struct pci_dev *pdev, const struct pci_device_id *en #ifdef CONFIG_PM static int rz1000_r...
dd4a43c979d5da7f2cd20e2751dbbd841116cdfe
Analyze and fix the following issue in the Linux kernel code: pata_radisys: fix UDMA handling
Problem Details: Set correct bits to switch between UDMA2 and UDMA4. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/pata_radisys.c b/drivers/ata/pata_radisys.c index 4401b332eaab..4fd25e737d9a 100644 --- a/drivers/ata/pata_radisys.c +++ b/drivers/ata/pata_radisys.c @@ -139,9 +139,9 @@ static void radisys_set_dmamode (struct ata_port *ap, struct ata_device *adev) pci_read_config_byte(dev, 0x4A, &ud...
a809c68752e63312c20fb027cf33da4a5ac384a5
Analyze and fix the following issue in the Linux kernel code: pata_ns87415: Power Management fix
Problem Details: Fix ->resume method to do chipset specific setup. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/pata_ns87415.c b/drivers/ata/pata_ns87415.c index 773b1590b492..061aa1c41a48 100644 --- a/drivers/ata/pata_ns87415.c +++ b/drivers/ata/pata_ns87415.c @@ -325,6 +325,13 @@ static struct scsi_host_template ns87415_sht = { ATA_BMDMA_SHT(DRV_NAME), }; +static void ns87415_fixup(struct ...
2a2beac928dd5a3a04eb9495e3ab09519f2516f2
Analyze and fix the following issue in the Linux kernel code: pata_marvell: fix marvell_pre_reset() documentation
Problem Details: Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/pata_marvell.c b/drivers/ata/pata_marvell.c index 2096fb737f82..950da39cae3d 100644 --- a/drivers/ata/pata_marvell.c +++ b/drivers/ata/pata_marvell.c @@ -58,7 +58,7 @@ static int marvell_pata_active(struct pci_dev *pdev) } /** - * marvell_pre_reset - check for 40/80 pin + * marvell_...
6809e7301fba4f9fa446ead5167faed115690fc4
Analyze and fix the following issue in the Linux kernel code: pata_legacy: fix access to control register for QDI6580
Problem Details: We need to mask out the port offset from the port number cached in ld_qdi->timing. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c index da2546b1dda2..5afe3567ebcc 100644 --- a/drivers/ata/pata_legacy.c +++ b/drivers/ata/pata_legacy.c @@ -672,7 +672,7 @@ static void qdi6580dp_set_piomode(struct ata_port *ap, struct ata_device *adev) outb(timing, ld_qdi->timing + 2 * ap->p...
43c7d17ee7e03433c57dc4ce457d34110108455a
Analyze and fix the following issue in the Linux kernel code: pata_legacy: fix QDI6580DP support
Problem Details: Dual port QDI6580 has shared PIO timings for master/slave devices so it needs to use custom ->qc_issue method. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c index 6932e56d179c..da2546b1dda2 100644 --- a/drivers/ata/pata_legacy.c +++ b/drivers/ata/pata_legacy.c @@ -787,6 +787,7 @@ static struct ata_port_operations qdi6580_port_ops = { static struct ata_port_operations qdi6580dp_port_ops = { .inher...
13a28c15dd08f321cfa82cbb37024dc1bb825bbe
Analyze and fix the following issue in the Linux kernel code: pata_it8213: fix it8213_pre_reset() documentation
Problem Details: Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/pata_it8213.c b/drivers/ata/pata_it8213.c index bcc190a1c426..feb3d540ee33 100644 --- a/drivers/ata/pata_it8213.c +++ b/drivers/ata/pata_it8213.c @@ -22,7 +22,7 @@ #define DRV_VERSION "0.0.3" /** - * it8213_pre_reset - check for 40/80 pin + * it8213_pre_reset - probe begin * @link...
e3f1d5cd114dad010376c78e5c8eb8c5fe114f80
Analyze and fix the following issue in the Linux kernel code: pata_it8213: fix wrong MWDMA timings being programmed
Problem Details: Clear old MWDMA timings before programming new ones (IT8213 is a single port host so there is no need to check ap->port_no). This change should be safe as this is how we have been doing things in IDE it8213 host driver for years. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-of...
```diff diff --git a/drivers/ata/pata_it8213.c b/drivers/ata/pata_it8213.c index f0bf77ad371f..bcc190a1c426 100644 --- a/drivers/ata/pata_it8213.c +++ b/drivers/ata/pata_it8213.c @@ -210,7 +210,7 @@ static void it8213_set_dmamode (struct ata_port *ap, struct ata_device *adev) master_data &= 0xFF4F; /* Mask out IOR...
ed869ff0c70d482de0dc97c3138ff42cbf87aed5
Analyze and fix the following issue in the Linux kernel code: pata_it8213: fix PIO2 underclocking
Problem Details: [ port of Sergei's fixes for pata_efar from commit 5f33b3b ] Fix the PIO mode 2 using mode 0 timings -- this driver should enable the fast timing bank starting with PIO2, just like the PIIX/ICH drivers do. Also, fix/rephrase some comments while at it. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnie...
```diff diff --git a/drivers/ata/pata_it8213.c b/drivers/ata/pata_it8213.c index 092af531aa09..f0bf77ad371f 100644 --- a/drivers/ata/pata_it8213.c +++ b/drivers/ata/pata_it8213.c @@ -92,18 +92,17 @@ static void it8213_set_piomode (struct ata_port *ap, struct ata_device *adev) { 2, 1 }, { 2, 3 }, }; - ...
088ccb53a341b5c0afab67e392b053ebb0bf7b2b
Analyze and fix the following issue in the Linux kernel code: pata_it8213: fix wrong PIO timings being programmed
Problem Details: * do not clear PIO timings for master when programming slave * program new PIO timings in the correct register nibble Both changes should be safe as this is how we have been doing things in IDE it8213 host driver for years. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: ...
```diff diff --git a/drivers/ata/pata_it8213.c b/drivers/ata/pata_it8213.c index 36d1f61491df..092af531aa09 100644 --- a/drivers/ata/pata_it8213.c +++ b/drivers/ata/pata_it8213.c @@ -112,13 +112,13 @@ static void it8213_set_piomode (struct ata_port *ap, struct ata_device *adev) } else { u8 slave_data; - idetm_d...
e0ee792b75a5cf1b23acfeae7ce3c386f805b20b
Analyze and fix the following issue in the Linux kernel code: pata_it8213: fix UDMA handling
Problem Details: Driver should program the cycle timing not the mode number (doing the latter results in wrong timings being used). There shouldn't be any problems with it as IDE it8213 host driver has been doing it this way for years. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff ...
```diff diff --git a/drivers/ata/pata_it8213.c b/drivers/ata/pata_it8213.c index f156da8076f7..36d1f61491df 100644 --- a/drivers/ata/pata_it8213.c +++ b/drivers/ata/pata_it8213.c @@ -173,10 +173,10 @@ static void it8213_set_dmamode (struct ata_port *ap, struct ata_device *adev) udma_enable |= (1 << devid); - /*...
24e93025ee434a58d35e5abb283c5bcc9a13e477
Analyze and fix the following issue in the Linux kernel code: nfs: clean up sillyrenaming in nfs_rename()
Problem Details: The d_instantiate(new_dentry, NULL) is superfluous, the dentry is already negative. Rehashing this dummy dentry isn't needed either, d_move() works fine on an unhashed target. The re-checking for busy after a failed nfs_sillyrename() is bogus too: new_dentry->d_count < 2 would be a bug here. Signed-...
```diff diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 76b7f539d76e..2c5ace4f00a7 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -1611,14 +1611,11 @@ static int nfs_rename(struct inode *old_dir, struct dentry *old_dentry, /* silly-rename the existing target ... */ err = nfs_sillyrename(new_dir, new_dentry); ...
28f79a1a695e7a5b00af3b6713b449e08581ffbb
Analyze and fix the following issue in the Linux kernel code: nfs: fix comments in nfs_rename()
Problem Details: Comments are wrong or out of date. In particular d_drop() doesn't free the inode it just unhashes the dentry. And if target is a directory then it is not checked for being busy. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index b5fae1953e9d..11d0c4cffffc 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -1581,7 +1581,7 @@ static int nfs_rename(struct inode *old_dir, struct dentry *old_dentry, /* * To prevent any new references to the target during the rename, - * we unhash the dentr...
206a134b4d8abf57cd34dffacf993869355b9aac
Analyze and fix the following issue in the Linux kernel code: SUNRPC: Check explicitly for tk_status == 0 in call_transmit_status()
Problem Details: The success case, where task->tk_status == 0, is by far the most frequent case in call_transmit_status(). The default: arm of the switch statement in call_transmit_status() handles the 0 case. default: was moved close to the top of the switch statement in call_transmit_status() under the theory that ...
```diff diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 38829e20500b..7bcd931e06ee 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -1180,10 +1180,22 @@ static void call_transmit_status(struct rpc_task *task) { task->tk_action = call_status; + + /* + * Common case: success. Force the compiler to...
3915044468217d9c224b824c308e4d112666f58d
Analyze and fix the following issue in the Linux kernel code: pata_hpt3x3: Power Management fix
Problem Details: Fix ->resume method to re-enable & re-init PCI device properly before doing chipset specific setup. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/pata_hpt3x3.c b/drivers/ata/pata_hpt3x3.c index 7e310253b36b..c86c71639a95 100644 --- a/drivers/ata/pata_hpt3x3.c +++ b/drivers/ata/pata_hpt3x3.c @@ -255,8 +255,17 @@ static int hpt3x3_init_one(struct pci_dev *pdev, const struct pci_device_id *id) #ifdef CONFIG_PM static int hpt3x3_re...
1185a552e3d78807031f4021c5edb60d3e8838f1
Analyze and fix the following issue in the Linux kernel code: NFSv4: Ensure nfs4_close_context() is declared as static
Problem Details: Fix another 'sparse' warning in fs/nfs/nfs4proc.c Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index c7b8d39a3ce1..df8a734f1c05 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -1987,7 +1987,7 @@ out_drop: return 0; } -void nfs4_close_context(struct nfs_open_context *ctx, int is_sync) +static void nfs4_close_context(struct nfs_open_context ...
0a6566ecd3afc74aad11c2e07794ff5529c13862
Analyze and fix the following issue in the Linux kernel code: NFSv4: Ensure nfs_dns_lookup() and nfs_dns_update() are declared static
Problem Details: Fix two 'sparse' warnings in fs/nfs/dns_resolve.c Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/dns_resolve.c b/fs/nfs/dns_resolve.c index f4d54ba97cc6..95e1ca765d47 100644 --- a/fs/nfs/dns_resolve.c +++ b/fs/nfs/dns_resolve.c @@ -146,7 +146,7 @@ static int nfs_dns_show(struct seq_file *m, struct cache_detail *cd, return 0; } -struct nfs_dns_ent *nfs_dns_lookup(struct cache_detail...
b6d408ba8c8be3646dea6f80a2fe55ac403119c8
Analyze and fix the following issue in the Linux kernel code: NFSv4: Fix up error handling in the state manager main loop.
Problem Details: The nfs4_state_manager should not be looking at the error values when deciding whether or not to loop round in order to handle a higher priority state recovery task. It should rather be looking at the clp->cl_state. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index b53e37fb0302..62927879572f 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -1046,11 +1046,6 @@ static void nfs4_state_start_reclaim_nograce(struct nfs_client *clp) nfs4_state_mark_reclaim_helper(clp, nfs4_state_mark_reclaim_nograce); } ...
4f7cdf18e14f81860b856ef7694ef58eb1a751c0
Analyze and fix the following issue in the Linux kernel code: NFSv4: The state manager shouldn't exit on errors that were handled
Problem Details: nfs4_recovery_handle_error() will correctly handle errors such as NFS4ERR_CB_PATH_DOWN, however because they are still passed back to the main loop in nfs4_state_manager(), they can cause the latter to exit prematurely. Fix this by letting nfs4_recovery_handle_error() change the error value in cases w...
```diff diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 456631969a58..8f27b4f0a530 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -1051,12 +1051,12 @@ static void nfs4_state_end_reclaim_nograce(struct nfs_client *clp) clear_bit(NFS4CLNT_RECLAIM_NOGRACE, &clp->cl_state); } -static void nfs4_...
e345e88a774875cec26e097ea3ff2dc40c4f9da2
Analyze and fix the following issue in the Linux kernel code: NFSv4: Fix up the callers of nfs4_state_end_reclaim_reboot
Problem Details: In practice, we need to ensure that we call nfs4_state_end_reclaim_reboot in 2 cases: - If we lose the lease while we were reclaiming state OR - After we're done with reboot recovery Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 2ef4fecf3984..456631969a58 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -1060,6 +1060,7 @@ static void nfs4_recovery_handle_error(struct nfs_client *clp, int error) case -NFS4ERR_STALE_CLIENTID: case -NFS4ERR_LEASE_MOVED: set_bi...
dd221f9ce97c33e560a63999c74c17d13ef780b4
Analyze and fix the following issue in the Linux kernel code: pata_efar: fix wrong MWDMA timings being programmed
Problem Details: Do not clear MWDMA timings for device on the other port when programming slave device. This change should be safe as this is how we have been doing things in IDE slc90e66 host driver for years. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.co...
```diff diff --git a/drivers/ata/pata_efar.c b/drivers/ata/pata_efar.c index 540c36426303..f37d98700dfd 100644 --- a/drivers/ata/pata_efar.c +++ b/drivers/ata/pata_efar.c @@ -201,7 +201,7 @@ static void efar_set_dmamode (struct ata_port *ap, struct ata_device *adev) master_data &= 0xFF4F; /* Mask out IORDY|TIME1|D...
f79ff92649efd5ef17f5267fe6f599c64e74e050
Analyze and fix the following issue in the Linux kernel code: pata_efar: fix wrong PIO timings being programmed
Problem Details: * do not clear PIO timings for master when programming slave * do not clear PIO timings for device on the other port when programming slave device Both changes should be safe as this is how we have been doing things in IDE slc90e66 host driver for years. Signed-off-by: Bartlomiej Zolnierkiewicz <bz...
```diff diff --git a/drivers/ata/pata_efar.c b/drivers/ata/pata_efar.c index 2a6412f5d117..540c36426303 100644 --- a/drivers/ata/pata_efar.c +++ b/drivers/ata/pata_efar.c @@ -2,6 +2,7 @@ * pata_efar.c - EFAR PIIX clone controller driver * * (C) 2005 Red Hat + * (C) 2009 Bartlomiej Zolnierkiewicz * * Som...
6938594374ee506e91a4c03117a034ea0ed66783
Analyze and fix the following issue in the Linux kernel code: ata_piix: fix MWDMA handling on PIIX3
Problem Details: Fix erroneous check for ap->udma_mask in do_pata_set_dmamode() resulting in controller not being programmed properly for MWDMA. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index 9ac4e378992e..0c6155f51173 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c @@ -869,10 +869,10 @@ static void do_pata_set_dmamode(struct ata_port *ap, struct ata_device *adev, in (timings[pio][1] << 8); } - if (ap->udm...
2f5ea47712489a9d2d3cb832eb06062e4e64e0ec
Analyze and fix the following issue in the Linux kernel code: cfq-iosched: fix compile problem with !CONFIG_CGROUP
Problem Details: Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
```diff diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h index b24ab71db826..257dc6a956b6 100644 --- a/block/blk-cgroup.h +++ b/block/blk-cgroup.h @@ -15,6 +15,8 @@ #include <linux/cgroup.h> +#ifdef CONFIG_BLK_CGROUP + struct blkio_cgroup { struct cgroup_subsys_state css; unsigned int weight; @@ -41,6 +43...
82beb5d89456a4c8329676985004b93a7ded5b5a
Analyze and fix the following issue in the Linux kernel code: pata_hpt366: fix timing register documentation
Problem Details: The comment in the driver actually describes HPT37x's timing register layout, which is different from HPT36x. Fix it and reformat the comment, while at it. Bump the driver version, accounting for several patches that forgot to do it. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-of...
```diff diff --git a/drivers/ata/pata_hpt366.c b/drivers/ata/pata_hpt366.c index d7f2da127d13..5bfae075968e 100644 --- a/drivers/ata/pata_hpt366.c +++ b/drivers/ata/pata_hpt366.c @@ -27,7 +27,7 @@ #include <linux/libata.h> #define DRV_NAME "pata_hpt366" -#define DRV_VERSION "0.6.2" +#define DRV_VERSION "0.6.7" s...
5600c70e576199a7552e1c0fff43f3fe16f5566e
Analyze and fix the following issue in the Linux kernel code: pata_hpt{37x|3x2n}: fix timing register masks (take 2)
Problem Details: These drivers inherited from the older 'hpt366' IDE driver the buggy timing register masks in their set_piomode() metods. As a result, too low command cycle active time is programmed for slow PIO modes. Quite fortunately, it's later "fixed up" by the set_dmamode() methods which also "helpfully" reprog...
```diff diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c index 9f5189c700bb..defd9b8456ed 100644 --- a/drivers/ata/pata_hpt37x.c +++ b/drivers/ata/pata_hpt37x.c @@ -24,7 +24,7 @@ #include <linux/libata.h> #define DRV_NAME "pata_hpt37x" -#define DRV_VERSION "0.6.12" +#define DRV_VERSION "0.6.14" ...
65f63384b391bf4d384327d8a7c6de9860290b5c
Analyze and fix the following issue in the Linux kernel code: xen: improve error handling in do_suspend.
Problem Details: The existing error handling has a few issues: - If freeze_processes() fails it exits with shutting_down = SHUTDOWN_SUSPEND. - If dpm_suspend_noirq() fails it exits without resuming xenbus. - If stop_machine() fails it exits without resuming xenbus or calling dpm_resume_end(). - xs_suspend()/xs_resume...
```diff diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c index 7b69a1aef877..2fb7d39b814c 100644 --- a/drivers/xen/manage.c +++ b/drivers/xen/manage.c @@ -86,32 +86,32 @@ static void do_suspend(void) err = freeze_processes(); if (err) { printk(KERN_ERR "xen suspend: freeze failed %d\n", err); - return; ...
fed5ea87e02aaf902ff38c65b4514233db03dc09
Analyze and fix the following issue in the Linux kernel code: xen: don't leak IRQs over suspend/resume.
Problem Details: On resume irq_info[*].evtchn is reset to 0 since event channel mappings are not preserved over suspend/resume. The other contents of irq_info is preserved to allow rebind_evtchn_irq() to function. However when a device resumes it will try to unbind from the previous IRQ (e.g. blkfront goes blkfront_r...
```diff diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 2f57276e87a2..ce602dd09bc1 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c @@ -474,6 +474,9 @@ static void unbind_from_irq(unsigned int irq) bind_evtchn_to_cpu(evtchn, 0); evtchn_to_irq[evtchn] = -1; + } + + if (irq_info[irq].ty...
fa24ba62ea2869308ffc9f0b286ac9650b4ca6cb
Analyze and fix the following issue in the Linux kernel code: xen: correctly restore pfn_to_mfn_list_list after resume
Problem Details: pvops kernels >= 2.6.30 can currently only be saved and restored once. The second attempt to save results in: ERROR Internal error: Frame# in pfn-to-mfn frame list is not in pseudophys ERROR Internal error: entry 0: p2m_frame_list[0] is 0xf2c2c2c2, max 0x120000 ERROR Internal error: Failed...
```diff diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 3bf7b1d250ce..bf4cd6bfe959 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c @@ -185,7 +185,7 @@ static inline unsigned p2m_index(unsigned long pfn) } /* Build the parallel p2m_top_mfn structures */ -static void __init xen_build_mfn_list_list...
c6e1971139be1342902873181f3b80a979bfb33b
Analyze and fix the following issue in the Linux kernel code: xen: fix is_disconnected_device/exists_disconnected_device
Problem Details: The logic of is_disconnected_device/exists_disconnected_device is wrong in that they are used to test whether a device is trying to connect (i.e. connecting). For this reason the patch fixes them to not consider a Closing or Closed device to be connecting. At the same time the patch also renames the ...
```diff diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c index 3800da7dabfe..19bce3e1b333 100644 --- a/drivers/xen/xenbus/xenbus_probe.c +++ b/drivers/xen/xenbus/xenbus_probe.c @@ -843,7 +843,7 @@ postcore_initcall(xenbus_probe_init); MODULE_LICENSE("GPL"); -static int is_disconne...
2ab25cdd7b54473dd42dcffc9872737de2517466
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix 'SendRRorRNR' to send the ReqSeq value
Problem Details: SendRRorRNR needs to acknowledge received I-frames (actually every packet needs to acknowledge received I-frames by sending the proper packet sequence number), so ReqSeq is set to the next I-frame number sequence to be pulled by the reassembly function. SendRRorRNR tells the remote side about local bus...
```diff diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 73bda0ae41d6..c898f3439d1c 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -373,6 +373,8 @@ static inline int l2cap_send_rr_or_rnr(struct l2cap_pinfo *pi, u16 control) else control |= L2CAP_SUPER_RCV_READY; + control |= pi...
9f121a5a80b4417c6db5a35e26d2e79c29c3fc0d
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix sending ReqSeq on I-frames
Problem Details: As specified by ERTM spec an ERTM channel can acknowledge received I-frames(the data frames) by sending an I-frame with the proper ReqSeq value (i.e. ReqSeq is set to BufferSeq). Until now we aren't setting the ReqSeq value on I-frame control bits. That way we can save sending S-frames(Supervise frame...
```diff diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index 9516f4b4a3c2..327eb57dab51 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h @@ -324,7 +324,6 @@ struct l2cap_pinfo { __u8 next_tx_seq; __u8 expected_ack_seq; - __u8 req_seq; __u8 expected_t...
889a3ca466018ab68363c3168993793bc2d984f1
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix unset of SrejActioned flag
Problem Details: SrejActioned is a flag that when set prevents local side to retransmit a I-frame(the data frame) already retransmitted. The local entity can retransmit again only when it receives a SREJ frame with the F-bit set. SREJ frame - Selective Reject frame - is sent when an entity wants the retransmission of...
```diff diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index dfd0327cf8da..2d5d37545b10 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -3443,7 +3443,7 @@ static inline int l2cap_data_channel_sframe(struct sock *sk, u16 rx_control, str } else if (rx_control & L2CAP_CTRL_FINAL) { if ...
0565c1c24af94130b891f989fa608faddfadc52c
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Initialize variables and timers for both channel's sides
Problem Details: Fix ERTM's full-duplex channel to work as specified by ERTM spec. ERTM needs to handle state vars, timers and counters to send and receive I-frames(the data frames), i.e., for both sides of data communication. We initialize all of them to the default values here. Full-duplex channel is a mandatory feat...
```diff diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 54992f782301..dfd0327cf8da 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -2173,6 +2173,21 @@ static void l2cap_add_conf_opt(void **ptr, u8 type, u8 len, unsigned long val) *ptr += L2CAP_CONF_OPT_SIZE + len; } +static inlin...
cde9f807f003676862178a6f28b52c7d431511ed
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix handling of BNEP setup connection requests
Problem Details: According to BNEP test specification the proper response should be sent for a setup connection request message after the BNEP connection setup has been completed. Signed-off-by: Vikram Kandukuri <vikram.kandukuri@atheros.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/net/bluetooth/bnep/core.c b/net/bluetooth/bnep/core.c index cafe9f54d841..29b1b220d6cf 100644 --- a/net/bluetooth/bnep/core.c +++ b/net/bluetooth/bnep/core.c @@ -230,7 +230,6 @@ static int bnep_rx_control(struct bnep_session *s, void *data, int len) switch (cmd) { case BNEP_CMD_NOT_UNDERSTOOD...
fed4c2508b7419d0a55958fead6151b32def1683
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix miscdev ops owner for virtual driver
Problem Details: The /dev/vhci ops don't refer to the module and so it is possible to unload the module while the file descriptor is in use. This was an accidental removal after the cleanup. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c index c1d389f2cbaf..7595274103fd 100644 --- a/drivers/bluetooth/hci_vhci.c +++ b/drivers/bluetooth/hci_vhci.c @@ -276,6 +276,7 @@ static int vhci_release(struct inode *inode, struct file *file) } static const struct file_operations vhc...
c04645e592d4dd60c58def40c913699d4c806727
Analyze and fix the following issue in the Linux kernel code: blkio: Wait on sync-noidle queue even if rq_noidle = 1
Problem Details: o rq_noidle() is supposed to tell cfq that do not expect a request after this one, hence don't idle. But this does not seem to work very well. For example for direct random readers, rq_noidle = 1 but there is next request coming after this. Not idling, leads to a group not getting its share even ...
```diff diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 063dcbb714e7..08b057b1b3b2 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -3314,7 +3314,8 @@ static void cfq_completed_request(struct request_queue *q, struct request *rq) * only if we processed at least one !rq_noidle request ...
fb716c0b7bed36064cd41d800c8f339f41adf084
Analyze and fix the following issue in the Linux kernel code: snd-fm801: autodetect SF64-PCR (tuner-only) card
Problem Details: When primary AC97 is not found, don't fail with tons of AC97 errors. Assume that the card is SF64-PCR (tuner-only). This makes the SF64-PCR radio card work "out of the box". Also fixes a bug that can cause an oops here:         if (tea575x_tuner > 0 && (tea575x_tuner & 0x000f) < 4) { when tea575x_tune...
```diff diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c index 60cdb9e0b68d..83508b3964fb 100644 --- a/sound/pci/fm801.c +++ b/sound/pci/fm801.c @@ -55,7 +55,7 @@ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card * * 1 = MediaForte 256-PCS * 2 = MediaForte 256-PCPR * 3 = Me...
1233faa891451dee9eaddd7f8a616ba1ddd77919
Analyze and fix the following issue in the Linux kernel code: ALSA: tea575x-tuner: fix mute
Problem Details: Fix mute state reporting in tea575x-tuner. This fixes mute function in kradio on SF64-PCR radio card. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/i2c/other/tea575x-tuner.c b/sound/i2c/other/tea575x-tuner.c index d31c373e076d..c4c6ef73f9bf 100644 --- a/sound/i2c/other/tea575x-tuner.c +++ b/sound/i2c/other/tea575x-tuner.c @@ -225,7 +225,7 @@ static int vidioc_s_ctrl(struct file *file, void *priv, case V4L2_CID_AUDIO_MUTE: if (tea->o...
a2934c7b363ddcc001964f2444649f909e583bef
Analyze and fix the following issue in the Linux kernel code: cifs: NULL out tcon, pSesInfo, and srvTcp pointers when chasing DFS referrals
Problem Details: The scenario is this: The kernel gets EREMOTE and starts chasing a DFS referral at mount time. The tcon reference is put, which puts the session reference too, but neither pointer is zeroed out. The mount gets retried (goto try_mount_again) with new mount info. Session setup fails fails and rc ends u...
```diff diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 63ea83ff687f..3bbcaa716b3c 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -2287,12 +2287,12 @@ int cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, char *mount_data_global, const char *devname) { - int rc = 0; + int rc; i...
d18cc1fda25295416a2855d44c2936db01df9eec
Analyze and fix the following issue in the Linux kernel code: NFSv4: Fix a potential state manager deadlock when returning delegations
Problem Details: The nfsv4 state manager could potentially deadlock inside __nfs_inode_return_delegation() if the server reboots, so that the calls to nfs_msync_inode() end up waiting on state recovery to complete. Also ensure that if a server reboot or network partition causes us to have to stop returning delegations...
```diff diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index 6dd48a4405b4..eeecd69c130c 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -92,7 +92,7 @@ out: return status; } -static void nfs_delegation_claim_opens(struct inode *inode, const nfs4_stateid *stateid) +static int nfs_delegation_cla...
d327cf7449e6fd5cbac784c641770e9366faa386
Analyze and fix the following issue in the Linux kernel code: Re: acl trouble after upgrading ubuntu
Problem Details: Subject: [PATCH] nfs: fix acl decoding Commit 28f566942c6b1d929f5e240e69e7081b77b238d3 "NFS: use dynamically computed compound_hdr.replen for xdr_inline_pages offset" accidentally changed the amount of space to allow for the acl reply, resulting in an IO error on attempts to get an acl. Reported-by: ...
```diff diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 20b4e30e6c82..3a71b40a990a 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c @@ -2096,7 +2096,7 @@ nfs4_xdr_enc_getacl(struct rpc_rqst *req, __be32 *p, encode_compound_hdr(&xdr, req, &hdr); encode_sequence(&xdr, &args->seq_args, &hdr); encode_putfh...
f0380f3d16df8f9e2fcd1d8c16fb0d94370bea99
Analyze and fix the following issue in the Linux kernel code: RPC: Fix two potential races in put_rpccred
Problem Details: It is possible for rpcauth_destroy_credcache() to cause the rpc credentials to be unhashed while put_rpccred is waiting for the rpc_credcache_lock on another cpu. Should this happen, then we can end up calling hlist_del_rcu(&cred->cr_hash) a second time in put_rpccred, thus causing list corruption. Sh...
```diff diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c index 54a4e042f104..7ee6f7eaddfb 100644 --- a/net/sunrpc/auth.c +++ b/net/sunrpc/auth.c @@ -123,16 +123,19 @@ rpcauth_unhash_cred_locked(struct rpc_cred *cred) clear_bit(RPCAUTH_CRED_HASHED, &cred->cr_flags); } -static void +static int rpcauth_unhash_cred...
bf7ec5bb6114b2f086e536e24486fdacd1c0d339
Analyze and fix the following issue in the Linux kernel code: flusher: Fix PF_FROZEN race
Problem Details: To touch task->flags directly is racy. thaw_process() still has race (changing non_current->flags, but this is another issue) though, I think it's much better off. So, use thaw_process() instead. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle....
```diff diff --git a/mm/backing-dev.c b/mm/backing-dev.c index 67a33a5a1a93..0e8ca0347707 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c @@ -609,7 +609,7 @@ static void bdi_wb_shutdown(struct backing_dev_info *bdi) * it would never exet if it is currently stuck in the refrigerator. */ list_for_each_entry(...
26bb7505cf7db3560286be9f6384b6d3911f78b5
Analyze and fix the following issue in the Linux kernel code: GFS2: Fix glock refcount issues
Problem Details: This patch fixes some ref counting issues. Firstly by moving the point at which we drop the ref count after a dlm lock operation has completed we ensure that we never call gfs2_glock_hold() on a lock with a zero ref count. Secondly, by using atomic_dec_and_lock() in gfs2_glock_put() we ensure that at ...
```diff diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index a3f90ad2af80..f455a03a09e2 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -241,15 +241,14 @@ int gfs2_glock_put(struct gfs2_glock *gl) int rv = 0; write_lock(gl_lock_addr(gl->gl_hash)); - if (atomic_dec_and_test(&gl->gl_ref)) { + if (atomic_dec_a...
0ab7d13fcbd7ce1658c563e345990ba453719deb
Analyze and fix the following issue in the Linux kernel code: GFS2: Tag all metadata with jid
Problem Details: There are two spare field in the header common to all GFS2 metadata. One is just the right size to fit a journal id in it, and this patch updates the journal code so that each time a metadata block is modified, we tag it with the journal id of the node which is performing the modification. The reason ...
```diff diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 6380cd9314b0..26ba2a4c4a2d 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c @@ -947,9 +947,7 @@ void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf) str->di_header.mh_magic = cpu_to_be32(GFS2_MAGIC); str->di_header.mh_type = cpu_to_be32(GFS2_M...
2c77634965ee28c8b4790ffb5e83dd5ff7ac8988
Analyze and fix the following issue in the Linux kernel code: GFS2: Locking order fix in gfs2_check_blk_state
Problem Details: In some cases we already have the rindex lock when we enter this function. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
```diff diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 8f1cfb02a6cb..0608f490c295 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c @@ -1710,11 +1710,16 @@ int gfs2_check_blk_type(struct gfs2_sbd *sdp, u64 no_addr, unsigned int type) { struct gfs2_rgrpd *rgd; struct gfs2_holder ri_gh, rgd_gh; + struct gfs2_inod...
2646a1f61a3b5525914757f10fa12b5b94713648
Analyze and fix the following issue in the Linux kernel code: GFS2: Fix up system xattrs
Problem Details: This code has been shamelessly stolen from XFS at the suggestion of Christoph Hellwig. I've not added support for cached ACLs so far... watch for that in a later patch, although this is designed in such a way that they should be easy to add. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> Cc: C...
```diff diff --git a/fs/gfs2/acl.c b/fs/gfs2/acl.c index 3fc4e3ac7d84..2168da121647 100644 --- a/fs/gfs2/acl.c +++ b/fs/gfs2/acl.c @@ -12,6 +12,7 @@ #include <linux/spinlock.h> #include <linux/completion.h> #include <linux/buffer_head.h> +#include <linux/xattr.h> #include <linux/posix_acl.h> #include <linux/posix_...
f55073ff1eaf99f6b3bc62134a456638bca043a3
Analyze and fix the following issue in the Linux kernel code: GFS2: Fix -o meta mounts for subsequent mounts (i.e. all but the first one)
Problem Details: We have a long term plan to use the "-o meta" flag to GFS2 mounts to access the alternate root which is used to store metadata for a GFS2 filesystem. This will allow us to eventually remove support for the gfs2meta filesystem type (which is in any case just a "front end" to the gfs2 filesystem type wit...
```diff diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index 52fb6c048981..e5ee06231ae5 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -1114,7 +1114,7 @@ void gfs2_online_uevent(struct gfs2_sbd *sdp) * Returns: errno */ -static int fill_super(struct super_block *sb, void *data, int sile...
7e71c55ee73988d0cb61045660b899eaac23bf8f
Analyze and fix the following issue in the Linux kernel code: GFS2: Fix potential race in glock code
Problem Details: We need to be careful of the ordering between clearing the GLF_LOCK bit and scheduling the workqueue. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
```diff diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 8b674b1f3a55..a3f90ad2af80 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -672,12 +672,17 @@ out: return; out_sched: + clear_bit(GLF_LOCK, &gl->gl_flags); + smp_mb__after_clear_bit(); gfs2_glock_hold(gl); if (queue_delayed_work(glock_workqueue...
c08f782985eed9959438368e84ce1d7f2ed03d95
Analyze and fix the following issue in the Linux kernel code: mutex: Fix missing conditions to build mutex_spin_on_owner()
Problem Details: We don't need to build mutex_spin_on_owner() if we have CONFIG_DEBUG_MUTEXES or CONFIG_HAVE_DEFAULT_NO_SPIN_MUTEXES as it won't be used under such configs. Use CONFIG_MUTEX_SPIN_ON_OWNER as it gathers all the necessary checks before building it. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>...
```diff diff --git a/kernel/sched.c b/kernel/sched.c index 3c11ae0a948d..ec0af1fcb195 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -5481,7 +5481,7 @@ need_resched_nonpreemptible: } EXPORT_SYMBOL(schedule); -#ifdef CONFIG_SMP +#ifdef CONFIG_MUTEX_SPIN_ON_OWNER /* * Look out! "owner" is an entirely speculat...
1bc8079879e8edfff451b62b7550bdd18523f963
Analyze and fix the following issue in the Linux kernel code: ASoC: au1x: dbdma2: fix oops on soc device removal.
Problem Details: platform_device_unregister() frees resources for us, no need to do it explicitly. Fixes an oops when machine code removes the soc-audio device. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro...
```diff diff --git a/sound/soc/au1x/dbdma2.c b/sound/soc/au1x/dbdma2.c index fe9f4657c959..2ca33b09a867 100644 --- a/sound/soc/au1x/dbdma2.c +++ b/sound/soc/au1x/dbdma2.c @@ -488,11 +488,8 @@ EXPORT_SYMBOL_GPL(au1xpsc_pcm_add); void au1xpsc_pcm_destroy(struct platform_device *dmapd) { - if (dmapd) { - kfree(dmapd-...
4528752f49c1f4025473d12bc5fa9181085c3f22
Analyze and fix the following issue in the Linux kernel code: x86, Calgary IOMMU quirk: Find nearest matching Calgary while walking up the PCI tree
Problem Details: On a multi-node x3950M2 system, there's a slight oddity in the PCI device tree for all secondary nodes: 30:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1) \-33:00.0 PCI bridge: IBM CalIOC2 PCI-E Root Port (rev 01) \-34:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID S...
```diff diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c index 849a0995d970..c563e4c8ff39 100644 --- a/arch/x86/kernel/pci-calgary_64.c +++ b/arch/x86/kernel/pci-calgary_64.c @@ -316,13 +316,15 @@ static inline struct iommu_table *find_iommu_table(struct device *dev) pdev = to_pci_de...
ac2c92e0cd06387ecee8115f5fa385fba6413c42
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix memory leaks in the previous patch
Problem Details: The previous hack for replacing the codec name give memory leaks at error paths. This patch fixes them. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 98e117bac90a..d967836f36bb 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -13459,8 +13459,10 @@ static int patch_alc269(struct hda_codec *codec) if ((alc_read_coef_idx(codec, 0) & 0x00f0) == 0x0...
d6250a03fa736c1bff4df4601f5af2dc21f2bf9e
Analyze and fix the following issue in the Linux kernel code: pata_ali: Fix regression with old devices
Problem Details: Making the new stuff work broke some of the old chipsets. We need to go back to the old set up values for these it seems. Unfortunately even with documentation this is basically a mix of cargoculting and guesswork. Chased down to the exact line by Gianluca. Signed-off-by: Alan Cox <alan@linux.intel.c...
```diff diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c index 1432dc9d0ab8..9434114b2ca8 100644 --- a/drivers/ata/pata_ali.c +++ b/drivers/ata/pata_ali.c @@ -453,7 +453,9 @@ static void ali_init_chipset(struct pci_dev *pdev) /* Clear CD-ROM DMA write bit */ tmp &= 0x7F; /* Cable and UDMA */ - p...
18f0f97850059303ed73b1f02084f55ca330a80c
Analyze and fix the following issue in the Linux kernel code: libata: add translation for SCSI WRITE SAME (aka TRIM support)
Problem Details: Add support for the ATA TRIM command in libata. We translate a WRITE SAME 16 command with the unmap bit set into an ATA TRIM command and export enough information in READ CAPACITY 16 and the block limits EVPD page so that the new SCSI layer discard support will driver this for us. Note that I hardcod...
```diff diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 512a3ee8caf6..340a616d226b 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -47,6 +47,7 @@ #include <linux/hdreg.h> #include <linux/uaccess.h> #include <linux/suspend.h> +#include <asm/unaligned.h> #include "...
6013efd8860bf15c1f86f365332642cfe557152f
Analyze and fix the following issue in the Linux kernel code: libata: retry failed FLUSH if device didn't fail it
Problem Details: If ATA device failed FLUSH, it means that the device failed to write out some amount of data and the error needs to be reported to upper layers. As retries can't recover the lost data, FLUSH failures need to be reported immediately in general. However, if FLUSH fails due to transmission errors, the FL...
```diff diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index bba2ae5df1c2..0ea97c942ced 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -110,6 +110,13 @@ static const unsigned long ata_eh_identify_timeouts[] = { ULONG_MAX, }; +static const unsigned long ata_eh_flush_timeouts[]...
f3b1cf40d4012351d793793b2965aca57cc9fdd5
Analyze and fix the following issue in the Linux kernel code: pata_hpt3x2n: fix cable detection
Problem Details: The detection was reversed between primary and secondary ports. Fix it to match hpt366 and the vendor driver. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/pata_hpt3x2n.c b/drivers/ata/pata_hpt3x2n.c index 3d59fe0a408d..2ab9fd6c597f 100644 --- a/drivers/ata/pata_hpt3x2n.c +++ b/drivers/ata/pata_hpt3x2n.c @@ -133,7 +133,7 @@ static int hpt3x2n_cable_detect(struct ata_port *ap) /* Restore state */ pci_write_config_byte(pdev, 0x5B, scr2);...
7095e3eb49869051594b33f6110edd65aff6be50
Analyze and fix the following issue in the Linux kernel code: pata_via: fix double put on isa bridge
Problem Details: In via_init_one, when via_isa_bridges iterator reaches PCI_DEVICE_ID_VIA_ANON and last but one via_isa_bridges bridge is found but rev doesn't match, pci_dev_put(isa) is called twice. Do pci_dev_put only once. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat....
```diff diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index 88984b803d6d..520d5a31f8a2 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c @@ -526,7 +526,7 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id) .port_ops = &via_port_ops }; const struct ata_po...
d5696725b2a4c59503f5e0bc33adeee7f30cd45b
Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Fix comparison of guest efer with stale host value
Problem Details: update_transition_efer() masks out some efer bits when deciding whether to switch the msr during guest entry; for example, NX is emulated using the mmu so we don't need to disable it, and LMA/LME are handled by the hardware. However, with shared msrs, the comparison is made against a stale value; at t...
```diff diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 06e085614dad..4f865e8b8540 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -812,6 +812,6 @@ int kvm_arch_interrupt_allowed(struct kvm_vcpu *vcpu); int kvm_cpu_get_interrupt(struct kvm_vcpu...
f50146bd7bdb75435638e60d4960edd9bcdf88b8
Analyze and fix the following issue in the Linux kernel code: KVM: s390: Fix prefix register checking in arch/s390/kvm/sigp.c
Problem Details: This patch corrects the checking of the new address for the prefix register. On s390, the prefix register is used to address the cpu's lowcore (address 0...8k). This check is supposed to verify that the memory is readable and present. copy_from_guest is a helper function, that can be used to read from ...
```diff diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c index 40c8c6748cfe..15ee1111de58 100644 --- a/arch/s390/kvm/sigp.c +++ b/arch/s390/kvm/sigp.c @@ -188,9 +188,9 @@ static int __sigp_set_prefix(struct kvm_vcpu *vcpu, u16 cpu_addr, u32 address, /* make sure that the new value is valid memory */ addre...
3cfc3092f40bc37c57ba556cfd8de4218f2135ab
Analyze and fix the following issue in the Linux kernel code: KVM: x86: Add KVM_GET/SET_VCPU_EVENTS
Problem Details: This new IOCTL exports all yet user-invisible states related to exceptions, interrupts, and NMIs. Together with appropriate user space changes, this fixes sporadic problems of vmsave/restore, live migration and system reset. [avi: future-proof abi by adding a flags field] Signed-off-by: Jan Kiszka <j...
```diff diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt index 36594ba57723..e1a114161027 100644 --- a/Documentation/kvm/api.txt +++ b/Documentation/kvm/api.txt @@ -653,6 +653,55 @@ struct kvm_clock_data { __u32 pad[9]; }; +4.29 KVM_GET_VCPU_EVENTS + +Capability: KVM_CAP_VCPU_EVENTS +Architecture...
4f926bf291863c237188bd2e27222ed801f12094
Analyze and fix the following issue in the Linux kernel code: KVM: x86: Polish exception injection via KVM_SET_GUEST_DEBUG
Problem Details: Decouple KVM_GUESTDBG_INJECT_DB and KVM_GUESTDBG_INJECT_BP from KVM_GUESTDBG_ENABLE, their are actually orthogonal. At this chance, avoid triggering the WARN_ON in kvm_queue_exception if there is already an exception pending and reject such invalid requests. Signed-off-by: Jan Kiszka <jan.kiszka@sieme...
```diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index cd6fe0a5797f..ba8958dca3c4 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4656,10 +4656,20 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu, struct kvm_guest_debug *dbg) { unsigned long rflags; - int i; + int i, r;...
e50212bb51356f0df48d6cce0aae5acf41df336d
Analyze and fix the following issue in the Linux kernel code: KVM: only clear irq_source_id if irqchip is present
Problem Details: Otherwise kvm might attempt to dereference a NULL pointer. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c index 0d454d352717..9b077342ab54 100644 --- a/virt/kvm/irq_comm.c +++ b/virt/kvm/irq_comm.c @@ -243,6 +243,10 @@ void kvm_free_irq_source_id(struct kvm *kvm, int irq_source_id) printk(KERN_ERR "kvm: IRQ source ID out of range!\n"); goto unlock; } + ...
2204ae3c96e9a1fed50f7ee19ce092e69d7dfe82
Analyze and fix the following issue in the Linux kernel code: KVM: x86: disallow KVM_{SET,GET}_LAPIC without allocated in-kernel lapic
Problem Details: Otherwise kvm might attempt to dereference a NULL pointer. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 97f6f9565ac9..cd6fe0a5797f 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -1893,6 +1893,9 @@ long kvm_arch_vcpu_ioctl(struct file *filp, switch (ioctl) { case KVM_GET_LAPIC: { + r = -EINVAL; + if (!vcpu->arch.apic) + goto out; ...
c0a187e12d48235cb8af4cdeff283117ab42bbb2
Analyze and fix the following issue in the Linux kernel code: KVM: powerpc: Fix BUILD_BUG_ON condition
Problem Details: The old BUILD_BUG_ON implementation didn't work with __builtin_constant_p(). Fixing that revealed this test had been inverted for a long time without anybody noticing... Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/powerpc/kvm/timing.h b/arch/powerpc/kvm/timing.h index 806ef67868bd..8167d42a776f 100644 --- a/arch/powerpc/kvm/timing.h +++ b/arch/powerpc/kvm/timing.h @@ -51,7 +51,7 @@ static inline void kvmppc_account_exit_stat(struct kvm_vcpu *vcpu, int type) /* The BUILD_BUG_ON below breaks in funny ...
26bb0981b3ff00b9177d61fe55806db978862b3c
Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Use shared msr infrastructure
Problem Details: Instead of reloading syscall MSRs on every preemption, use the new shared msr infrastructure to reload them at the last possible minute (just before exit to userspace). Improves vcpu/idle/vcpu switches by about 2000 cycles (when EFER needs to be reloaded as well). [jan: fix slot index missing indirec...
```diff diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 32512519e1ac..bf46253149c3 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -86,6 +86,11 @@ struct vmcs { char data[0]; }; +struct shared_msr_entry { + unsigned index; + u64 data; +}; + struct vcpu_vmx { struct kvm_vcpu vcpu; ...
18fa000ae453767b59ab97477925895a3f0c46ea
Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Reset cr0 properly on vcpu reset
Problem Details: svm_vcpu_reset() was not properly resetting the contents of the guest-visible cr0 register, causing the following issue: https://bugzilla.redhat.com/show_bug.cgi?id=525699 Without resetting cr0 properly, the vcpu was running the SIPI bootstrap routine with paging enabled, making the vcpu get a pagefau...
```diff diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index ffa6ad216b71..c9ef6c0e1e98 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -628,11 +628,12 @@ static void init_vmcb(struct vcpu_svm *svm) save->rip = 0x0000fff0; svm->vcpu.arch.regs[VCPU_REGS_RIP] = save->rip; - /* - * cr0 val on cpu ...
afbcf7ab8d1bc8c2d04792f6d9e786e0adeb328d
Analyze and fix the following issue in the Linux kernel code: KVM: allow userspace to adjust kvmclock offset
Problem Details: When we migrate a kvm guest that uses pvclock between two hosts, we may suffer a large skew. This is because there can be significant differences between the monotonic clock of the hosts involved. When a new host with a much larger monotonic time starts running the guest, the view of time will be signi...
```diff diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt index 3e8684e48506..36594ba57723 100644 --- a/Documentation/kvm/api.txt +++ b/Documentation/kvm/api.txt @@ -617,6 +617,42 @@ struct kvm_xen_hvm_config { __u8 pad2[30]; }; +4.27 KVM_GET_CLOCK + +Capability: KVM_CAP_ADJUST_CLOCK +Architecture...