id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
7cac9cd935533e52e277c0c8799a8ba16c24f250 | Analyze and fix the following issue in the Linux kernel code: Input: sunkbd - fix formatting | Problem Details:
Adjust the way 'switch' statements were indented; make sure we stay
under 80 ciolumns.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru> | ```diff
diff --git a/drivers/input/keyboard/sunkbd.c b/drivers/input/keyboard/sunkbd.c
index e7aa935a294a..472b56639cdb 100644
--- a/drivers/input/keyboard/sunkbd.c
+++ b/drivers/input/keyboard/sunkbd.c
@@ -73,7 +73,7 @@ static unsigned char sunkbd_keycode[128] = {
*/
struct sunkbd {
- unsigned char keycode[128];
... |
1c7827ae70e7c8456e08f7bb9ef2238d27814cbe | Analyze and fix the following issue in the Linux kernel code: Input: i8042 - bypass AUX IRQ delivery test on laptops | Problem Details:
It seems that many laptops do not fully implement AUX LOOP command in
their keyboard controllers, causing issues with touchpad detection.
We know however that almost every laptop/portable uses a PS/2 pointing
device and, even if user disables it in favor of an external mouse,
the system will not use IR... | ```diff
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
index ae04d8a494e5..66829a860eec 100644
--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -449,6 +449,34 @@ static struct dmi_system_id __initdata i8042_dmi_nopnp_table[] = {
},
... |
6a78ec16ca40cc98e387b2d8d80adbeedda02bbc | Analyze and fix the following issue in the Linux kernel code: sh: Fix the indication point of the liquid crystal of AP-325RXA(AP3300) | Problem Details:
Signed-off-by: Yusuke Goda <goda.yusuke@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org> | ```diff
diff --git a/arch/sh/boards/board-ap325rxa.c b/arch/sh/boards/board-ap325rxa.c
index 19eea4ab1ccc..bcf1f40bcc6c 100644
--- a/arch/sh/boards/board-ap325rxa.c
+++ b/arch/sh/boards/board-ap325rxa.c
@@ -188,7 +188,7 @@ static struct sh_mobile_lcdc_info lcdc_info = {
.name = "LB070WV1",
.xres = 800,
.yre... |
6e9f23d1619f7badaf9090dac09e86a22d6061d8 | Analyze and fix the following issue in the Linux kernel code: tracing/kprobes: Show event name in trace output | Problem Details:
Show event name in tracing/trace output. This also fixes kprobes events
format to comply with other tracepoint events formats.
Before patching:
<...>-1447 [001] 1038282.286875: do_sys_open+0x0/0xd6: ...
<...>-1447 [001] 1038282.286878: sys_openat+0xc/0xe <- do_sys_open: ...
After patching:
<...>-14... | ```diff
diff --git a/Documentation/trace/kprobetrace.txt b/Documentation/trace/kprobetrace.txt
index aaa6c1067c78..a849889e6092 100644
--- a/Documentation/trace/kprobetrace.txt
+++ b/Documentation/trace/kprobetrace.txt
@@ -114,7 +114,7 @@ format:
field: unsigned long flags; offset:48;tsize:8;
field: unsigned long m... |
0e3d2a6313d03413d93327202a60256d1d726fdc | Analyze and fix the following issue in the Linux kernel code: ext4: Fix async commit mode to be safe by using a barrier | Problem Details:
Previously the journal_async_commit mount option was equivalent to
using barrier=0 (and just as unsafe). This patch fixes it so that we
eliminate the barrier before the commit block (by not using ordered
mode), and explicitly issuing an empty barrier bio after writing the
commit block. Because of the... | ```diff
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
index 0df600e9162d..26d991ddc1e6 100644
--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -25,6 +25,7 @@
#include <linux/writeback.h>
#include <linux/backing-dev.h>
#include <linux/bio.h>
+#include <linux/blkdev.h>
#include <trace/events/jbd2.h>
/*
@@ -133,... |
2fba0c8867af47f6455490e7b59e512dd180c027 | Analyze and fix the following issue in the Linux kernel code: tracing/kprobes: Fix probe offset to be unsigned | Problem Details:
Prohibit user to specify negative offset from symbols.
Since kprobe.offset is unsigned int, the offset must be always positive
value.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Jim Keniston <jkenisto@us.ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Andi Kleen <ak@linux... | ```diff
diff --git a/Documentation/trace/kprobetrace.txt b/Documentation/trace/kprobetrace.txt
index 3de751747164..db5531865648 100644
--- a/Documentation/trace/kprobetrace.txt
+++ b/Documentation/trace/kprobetrace.txt
@@ -25,15 +25,15 @@ probe events via /sys/kernel/debug/tracing/events/kprobes/<EVENT>/filter.
Syno... |
ad5cafcdb09c57008c990edd309c0a563b09f238 | Analyze and fix the following issue in the Linux kernel code: x86/ptrace: Fix regs_get_argument_nth() to add correct offset | Problem Details:
Fix regs_get_argument_nth() to add correct offset bytes. Because
offset_of() returns offset in byte, the offset should be added
to char * instead of unsigned long *.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Jim Keniston <jkenisto@us.ibm.c... | ```diff
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
index a33a17d5d5c8..caffb6809452 100644
--- a/arch/x86/kernel/ptrace.c
+++ b/arch/x86/kernel/ptrace.c
@@ -150,7 +150,7 @@ static const int arg_offs_table[] = {
unsigned long regs_get_argument_nth(struct pt_regs *regs, unsigned int n)
{
if (n <... |
705af9c7a8bcb9c8752a73be9ca356acb5c7688c | Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: pull in latest quirks and fixes from ddx | Problem Details:
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_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
index a8fb392c9cd6..4dff85b450ea 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -104,7 +104,7 @@ static bool radeon_atom_apply_quirks(struct drm_device *dev,
... |
bc00351edd5c1b84d48c3fdca740fedfce4ae6ce | Analyze and fix the following issue in the Linux kernel code: powerpc/ps3: Workaround for flash memory I/O error | Problem Details:
A workaround for flash memory I/O errors when the PS3 internal
hard disk has not been formatted for OtherOS use.
This error condition mainly effects 'Live CD' users who have not
formatted the PS3's internal hard disk for OtherOS.
Fixes errors similar to these when using the ps3-flash-util
or ps3-boot... | ```diff
diff --git a/drivers/ps3/ps3stor_lib.c b/drivers/ps3/ps3stor_lib.c
index 18066d555397..af0afa1db4a8 100644
--- a/drivers/ps3/ps3stor_lib.c
+++ b/drivers/ps3/ps3stor_lib.c
@@ -23,6 +23,65 @@
#include <asm/lv1call.h>
#include <asm/ps3stor.h>
+/*
+ * A workaround for flash memory I/O errors when the internal h... |
e51ee31e8af22948dcc3b115978469b09c96c3fd | Analyze and fix the following issue in the Linux kernel code: powerpc/perf_counters: Reduce stack usage of power_check_constraints | Problem Details:
Michael Ellerman reported stack-frame size warnings being produced
for power_check_constraints(), which uses an 8*8 array of u64 and
two 8*8 arrays of unsigned long, which are currently allocated on the
stack, along with some other smaller variables. These arrays come
to 1.5kB on 64-bit or 1kB on 32-b... | ```diff
diff --git a/arch/powerpc/kernel/perf_counter.c b/arch/powerpc/kernel/perf_counter.c
index ccd6b2135642..7ceefaf3a7f5 100644
--- a/arch/powerpc/kernel/perf_counter.c
+++ b/arch/powerpc/kernel/perf_counter.c
@@ -32,6 +32,9 @@ struct cpu_hw_counters {
unsigned long mmcr[3];
struct perf_counter *limited_counte... |
a6dbf93a2ad853585409e715eb96dca9177e3c39 | Analyze and fix the following issue in the Linux kernel code: powerpc: Fix bug where perf_counters breaks oprofile | Problem Details:
Currently there is a bug where if you use oprofile on a pSeries
machine, then use perf_counters, then use oprofile again, oprofile
will not work correctly; it will lose the PMU configuration the next
time the hypervisor does a partition context switch, and thereafter
won't count anything.
Maynard John... | ```diff
diff --git a/arch/powerpc/include/asm/pmc.h b/arch/powerpc/include/asm/pmc.h
index d6a616a1b3ea..ccc68b50d05d 100644
--- a/arch/powerpc/include/asm/pmc.h
+++ b/arch/powerpc/include/asm/pmc.h
@@ -27,10 +27,22 @@ extern perf_irq_t perf_irq;
int reserve_pmc_hardware(perf_irq_t new_perf_irq);
void release_pmc_h... |
757cbd46d11cfa7506b7dd5dd6657ae645bf6a17 | Analyze and fix the following issue in the Linux kernel code: powerpc/85xx: Fix SMP compile error and allow NULL for smp_ops | Problem Details:
The following commit introduced a compile error since it removed
the implementation of smp_85xx_basic_setup:
commit 77c0a700c1c292edafa11c1e52821ce4636f81b0
Author: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: Fri Aug 28 14:25:04 2009 +1000
powerpc: Properly start decrementer on Book... | ```diff
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 96f107cc0160..d387b3937ccc 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -269,7 +269,10 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
cpu_callin_map[boot_cpuid] = 1;
if (smp_ops)
- max_cpus = smp... |
8708d002c416b8bf87351bc626d15d7407896edb | Analyze and fix the following issue in the Linux kernel code: powerpc/irq: Improve nanodoc | Problem Details:
The OF helpers look like nanodoc but are missing the header. Fix this and a
typo (s/nad/and/) while we are here.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> | ```diff
diff --git a/arch/powerpc/include/asm/irq.h b/arch/powerpc/include/asm/irq.h
index 0a5137676e1b..bbcd1aaf3dfd 100644
--- a/arch/powerpc/include/asm/irq.h
+++ b/arch/powerpc/include/asm/irq.h
@@ -302,7 +302,8 @@ extern void irq_free_virt(unsigned int virq, unsigned int count);
/* -- OF helpers -- */
-/* irq... |
5367b6887e7d8c870a5da7d9b8c6e9c207684e43 | Analyze and fix the following issue in the Linux kernel code: x86: Fix code patching for paravirt-alternatives on 486 | Problem Details:
As reported in <http://bugs.debian.org/511703> and
<http://bugs.debian.org/515982>, kernels with paravirt-alternatives
enabled crash in text_poke_early() on at least some 486-class
processors.
The problem is that text_poke_early() itself uses inline functions
affected by paravirt-alternatives and so w... | ```diff
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
index c7768269b1cf..2db56c57a281 100644
--- a/arch/x86/include/asm/processor.h
+++ b/arch/x86/include/asm/processor.h
@@ -703,13 +703,23 @@ static inline void cpu_relax(void)
rep_nop();
}
-/* Stop speculative execution: */
+/*... |
f12b4f546b4e327d5620a544a2bddab68de66027 | Analyze and fix the following issue in the Linux kernel code: x86: Add MMX support for instruction decoder | Problem Details:
Add MMX/SSE instructions to x86 opcode maps, since some of those
instructions are used in the kernel.
This also fixes failures in the x86 instruction decoder seftest.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Jim Keniston <jkenisto@us.ibm.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Sa... | ```diff
diff --git a/arch/x86/lib/x86-opcode-map.txt b/arch/x86/lib/x86-opcode-map.txt
index 083dd59dd74b..59e20d5c2a52 100644
--- a/arch/x86/lib/x86-opcode-map.txt
+++ b/arch/x86/lib/x86-opcode-map.txt
@@ -310,14 +310,14 @@ Referrer: 2-byte escape
0e:
0f:
# 0x0f 0x10-0x1f
-10:
-11:
-12:
-13:
-14:
-15:
-16:
-17:
+10... |
c1c7af60892070e4b82ad63bbfb95ae745056de0 | Analyze and fix the following issue in the Linux kernel code: drm/i915: force mode set at lid open time | Problem Details:
Some laptop platforms will disable pipes and/or planes at lid close time
and not restore them when the lid is opened again. So catch the lid
event, and if the lid was opened, force a mode restore.
Fixes fdo bug #21230.
Acked-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Jesse Barnes <jbarnes@v... | ```diff
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index e4d971c8b9d0..f831ea159291 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -102,6 +102,7 @@ config DRM_I915
select BACKLIGHT_CLASS_DEVICE if ACPI
select INPUT if ACPI
select ACPI_VIDEO if ACPI
+ select ACPI_BUTTON i... |
0d03d59d9b31cd1e33b7e46a80b6fef66244b1f2 | Analyze and fix the following issue in the Linux kernel code: md: Fix "strchr" [drivers/md/dm-log-userspace.ko] undefined! | Problem Details:
Commit b8313b6da7e2e7c7f47d93d8561969a3ff9ba0ea ("dm log: remove incorrect
field from userspace table output") added a call to strstr() with a
single-character "needle" string parameter.
Unfortunately some versions of gcc replace such calls to strstr() by calls
to strchr() behind our back. This cause... | ```diff
diff --git a/drivers/md/dm-log-userspace-base.c b/drivers/md/dm-log-userspace-base.c
index 6e186b1a062d..652bd33109e3 100644
--- a/drivers/md/dm-log-userspace-base.c
+++ b/drivers/md/dm-log-userspace-base.c
@@ -582,7 +582,7 @@ static int userspace_status(struct dm_dirty_log *log, status_type_t status_type,
b... |
71290b368ad5e1e0b0b300c9d5638490a9fd1a2d | Analyze and fix the following issue in the Linux kernel code: ext4: Don't update superblock write time when filesystem is read-only | Problem Details:
This avoids updating the superblock write time when we are mounting
the root file system read/only but we need to replay the journal; at
that point, for people who are east of GMT and who make their clock
tick in localtime for Windows bug-for-bug compatibility, and this will
cause e2fsck to complain an... | ```diff
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index f1815d3bcfd5..9f6fa3f74629 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3222,7 +3222,18 @@ static int ext4_commit_super(struct super_block *sb, int sync)
clear_buffer_write_io_error(sbh);
set_buffer_uptodate(sbh);
}
- es->s_wtime = cpu_to_le... |
e8188807b7cd14e0a001946005f0c58f9dd9dfe6 | Analyze and fix the following issue in the Linux kernel code: Doc: seq_file.txt fix wrong dd command example. | Problem Details:
Small error in the "dd" command example, "out=" should be "of=".
Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: Jonathan Corbet <corbet@lwn.net> | ```diff
diff --git a/Documentation/filesystems/seq_file.txt b/Documentation/filesystems/seq_file.txt
index b843743aa0b5..0d15ebccf5b0 100644
--- a/Documentation/filesystems/seq_file.txt
+++ b/Documentation/filesystems/seq_file.txt
@@ -46,7 +46,7 @@ better to do. The file is seekable, in that one can do something like t... |
e1f8450854d69f0291882804406ea1bab3ca44b4 | Analyze and fix the following issue in the Linux kernel code: sched: Fix sched::sched_stat_wait tracepoint field | Problem Details:
This weird perf trace output:
cc1-9943 [001] 2802.059479616: sched_stat_wait: task: as:9944 wait: 2801938766276 [ns]
Is caused by setting one component field of the delta to zero
a bit too early. Move it to later.
( Note, this does not affect the NEW_FAIR_SLEEPERS interactivity bug,
it's just ... | ```diff
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 26fadb44250c..aa7f84121016 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -545,14 +545,13 @@ update_stats_wait_end(struct cfs_rq *cfs_rq, struct sched_entity *se)
schedstat_set(se->wait_count, se->wait_count + 1);
schedstat_set(se->... |
3f2aa307c4d26b4ed6509d0a79e8254c9e07e921 | Analyze and fix the following issue in the Linux kernel code: sched: Disable NEW_FAIR_SLEEPERS for now | Problem Details:
Nikos Chantziaras and Jens Axboe reported that turning off
NEW_FAIR_SLEEPERS improves desktop interactivity visibly.
Nikos described his experiences the following way:
" With this setting, I can do "nice -n 19 make -j20" and
still have a very smooth desktop and watch a movie at
the same tim... | ```diff
diff --git a/kernel/sched_features.h b/kernel/sched_features.h
index 4569bfa7df9b..e2dc63a5815d 100644
--- a/kernel/sched_features.h
+++ b/kernel/sched_features.h
@@ -1,4 +1,4 @@
-SCHED_FEAT(NEW_FAIR_SLEEPERS, 1)
+SCHED_FEAT(NEW_FAIR_SLEEPERS, 0)
SCHED_FEAT(NORMALIZED_SLEEPER, 0)
SCHED_FEAT(ADAPTIVE_GRAN, 1)
... |
bb66c5122b4300b475b585fffb811311f39f5431 | Analyze and fix the following issue in the Linux kernel code: drm/i915: Write zero to DPLL_MD Reg for non-SDVO output | Problem Details:
When the output device is LVDS, maybe the pixel clock of adjusted_mode will be
less than that in mode. In such case it will set the incorrect multipler factor
in DPLL_MD register.
So the dpll_md_reg will be reset when the output type is non-SDVO
https://bugs.freedesktop.org/show_bug.cgi?id=22761
Sign... | ```diff
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 155719ff99d1..cb5305ccb15c 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2652,9 +2652,12 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
udelay(150);
... |
b9219c5e8be99ddd697e3f9b61069d7ea477ddec | Analyze and fix the following issue in the Linux kernel code: drm/i915: Add the enhancement property for SDVO-TV | Problem Details:
When the sdvo device is detected as SDVO-TV, we will check whether the
sepecific picture enhancement is supported. If it is supported, we will
add the corresponnding property for SDVO-TV. We will add the following
property for the SDVO-TV enhancements if they are supported:
* Contrast/Brightness/Satur... | ```diff
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index 0bf28efcf2c1..ce8c5622d653 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -135,6 +135,30 @@ struct intel_sdvo_priv {
struct intel_sdvo_dtd save_input_dtd_1, save_input_dtd_2;
s... |
e7a51997dad4e17395be1209970e18d2e9305b24 | Analyze and fix the following issue in the Linux kernel code: [SCSI] fcoe: flush per-cpu thread work when destroying interface | Problem Details:
This fixes one cause of an occational problem when unloading
libfc where the exchange manager pool doesn't have all items freed.
The existing WARN_ON(mp->total_exches <= 0) isn't hit.
However, note that total_exches is decremented when the
exchange is completed, and it can be held with a refcnt
for a ... | ```diff
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index ac481ad112ad..704b8e034946 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -57,6 +57,9 @@ MODULE_PARM_DESC(ddp_min, "Minimum I/O size in bytes for " \
DEFINE_MUTEX(fcoe_config_mutex);
+/* fcoe_percpu_clean comple... |
1d490ce33ee8b93638d09e471a3bc66ae33b6606 | Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: don't swap OX_ID and RX_ID when sending BA_RJT | Problem Details:
I saw an lport debug message from the exchange manager saying:
"lport 70500: Received response for out of range oxid:ffff"
A trace showed this was a BA_RJT sent due to an incoming ABTS
which arrived on an unknown exchange. So, the sender of the
BA_RJT was in error, but in this case, both the initiat... | ```diff
diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
index b51db15a3876..c1c15748220c 100644
--- a/drivers/scsi/libfc/fc_exch.c
+++ b/drivers/scsi/libfc/fc_exch.c
@@ -1017,8 +1017,8 @@ static void fc_exch_send_ba_rjt(struct fc_frame *rx_fp,
*/
memcpy(fh->fh_s_id, rx_fh->fh_d_id, 3);
m... |
2ab7e1ecb81ce35ed8e8df512e3fc6338a4c55bb | Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: send GPN_ID in reaction to single-port RSCNs. | Problem Details:
When an RSCN indicates changes to individual remote ports,
don't blindly log them out and then back in. Instead, determine
whether they're still in the directory, by doing GPN_ID.
If that is successful, call login, which will send ADISC and reverify,
otherwise, call logoff. Perhaps we should just de... | ```diff
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
index 4242894cce7c..c48799e9dd8e 100644
--- a/drivers/scsi/libfc/fc_disc.c
+++ b/drivers/scsi/libfc/fc_disc.c
@@ -47,7 +47,7 @@ static void fc_disc_gpn_ft_req(struct fc_disc *);
static void fc_disc_gpn_ft_resp(struct fc_seq *, struct fc_f... |
8abbe3a42324264c9d5cc4e7c3d265b5be6d82d6 | Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: fix handling of incoming Discover Address (ADISC) requests | Problem Details:
The local port facility has been replying to ADISC requests without
looking to see if the remote port is logged in. This is incorrect.
An ADISC request requires PLOGI first. It should be rejected if
the sending remote port is not logged in.
This is like other incoming requests that require login, al... | ```diff
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index 3f2f72390145..bd2f77197447 100644
--- a/drivers/scsi/libfc/fc_lport.c
+++ b/drivers/scsi/libfc/fc_lport.c
@@ -451,56 +451,6 @@ static void fc_lport_recv_rnid_req(struct fc_seq *sp, struct fc_frame *in_fp,
fc_frame_free(in_fp);
}... |
83fe6a93465750d1a20221aaa9a253d9ea7fe45c | Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: fix rport error handling for login-required and invalid ops | Problem Details:
When receiving an ELS request, if the request isn't recognized,
the unsupported operation error should be given even if the port
is not found or not logged in.
Also, the LOGO request shouldn't give the login-required explanation.
Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: Robert L... | ```diff
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
index e121ff92c8ea..04e9846ad1b5 100644
--- a/drivers/scsi/libfc/fc_rport.c
+++ b/drivers/scsi/libfc/fc_rport.c
@@ -69,7 +69,7 @@ static void fc_rport_recv_prli_req(struct fc_rport_priv *,
struct fc_seq *, struct fc_frame *);
st... |
f657d299cf05883e23e12a69e86842da1df378ad | Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: improve debug messages for ELS response handlers | Problem Details:
Improve lport and rport debug messages to indicate whether
the response is LS_ACC, LS_RJT, closed, or timeout.
Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de> | ```diff
diff --git a/drivers/scsi/libfc/fc_elsct.c b/drivers/scsi/libfc/fc_elsct.c
index 5e8b011af50e..d655924d46b6 100644
--- a/drivers/scsi/libfc/fc_elsct.c
+++ b/drivers/scsi/libfc/fc_elsct.c
@@ -70,3 +70,41 @@ int fc_elsct_init(struct fc_lport *lport)
return 0;
}
EXPORT_SYMBOL(fc_elsct_init);
+
+/**
+ * fc_els_... |
25b37b981e706c6df72c28c94f7787c3ea0cd343 | Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: fix: rport_recv_req needs disc_mutex when calling rport_lookup | Problem Details:
The rport_lookup function must be called while holding the disc_mutex.
Otherwise, the rdata could be deleted just after that by another thread.
All callers now check the state after grabbing the rdata rp_mutex.
Even though rport_lookup skips ports in DELETE state, it does that
without holding the rdat... | ```diff
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
index acdc72d6b873..02200b26d897 100644
--- a/drivers/scsi/libfc/fc_rport.c
+++ b/drivers/scsi/libfc/fc_rport.c
@@ -932,14 +932,17 @@ void fc_rport_recv_req(struct fc_seq *sp, struct fc_frame *fp,
fh = fc_frame_header_get(fp);
s_id =... |
81a67b9717d9e4f81bed7d1f2df6ba86aaab9ad9 | Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: discovery gpn_ft parse bug | Problem Details:
In fc_disc_gpn_ft_parse(), after fc_disc_done() is called, the
disc state is changed by setting buf_len = 0. This is wrong
since the discovery may have restarted. Instead, return
after calling fc_disc_done.
Also, return an error on memory allocation failure.
Signed-off-by: Joe Eykholt <jeykholt@ci... | ```diff
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
index 3efdbbab9b2b..a2410dc74441 100644
--- a/drivers/scsi/libfc/fc_disc.c
+++ b/drivers/scsi/libfc/fc_disc.c
@@ -479,6 +479,7 @@ static int fc_disc_gpn_ft_parse(struct fc_disc *disc, void *buf, size_t len)
plen = len;
np = (struct fc_... |
3667d7e7f7bb63a394f73a671fdaf4a187aa858e | Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: discovery retry should clear pending first. | Problem Details:
Currently fc_disc_timeout() restarts discovery only if it is not pending.
When the timer is scheduled, the discovery is left pending, so the
timeout never restarts it.
Fix by not checking for pending in the timeout handler.
If discovery is stopped and restarted in the meantime, the timeout will
be ca... | ```diff
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
index 9b8043bdeddb..3efdbbab9b2b 100644
--- a/drivers/scsi/libfc/fc_disc.c
+++ b/drivers/scsi/libfc/fc_disc.c
@@ -233,6 +233,7 @@ static void fc_disc_restart(struct fc_disc *disc)
* freshly-discovered remote ports. Avoid wrapping to ze... |
c762608bf75f792dcaf3658338189b9970951704 | Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: fix: empty zone causes endless discovery retries. | Problem Details:
On some switches, an empty zone causes GPN_FT to be rejected
with reason 9 (unable) explanation 7 (FC-4 types not registered),
which causes discovery to be retried endlessly. Treat this as
just an empty response and consider discovery complete.
Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
Signed-o... | ```diff
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
index 844376c1d8dc..9b8043bdeddb 100644
--- a/drivers/scsi/libfc/fc_disc.c
+++ b/drivers/scsi/libfc/fc_disc.c
@@ -617,6 +617,9 @@ static void fc_disc_gpn_ft_resp(struct fc_seq *sp, struct fc_frame *fp,
"(check zoning)\n", cp->ct_r... |
883a337cf8969b2906ffd8aeb838d875f7338190 | Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: handle discovery failure more correctly. | Problem Details:
Abhijeet Joglekar wrote: "In gpn_ft_resp, if the payload is short,
or unexpected response or out of sequence frame, then we just
return and do nothing. We should either enter fc_disc_done()
with DISC_EV_FAIL which will then restart any queued discovery
requests or call lport module which will reset loc... | ```diff
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
index 819ec6256a53..844376c1d8dc 100644
--- a/drivers/scsi/libfc/fc_disc.c
+++ b/drivers/scsi/libfc/fc_disc.c
@@ -606,6 +606,7 @@ static void fc_disc_gpn_ft_resp(struct fc_seq *sp, struct fc_frame *fp,
if (!cp) {
FC_DISC_DBG(disc, "... |
c356afd48690775097507c37780ee17c0b0ea375 | Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: discovery restart sequence error fix | Problem Details:
When an RSCN is received during fabric discovery, it restarts.
After the restart, disc->seq_count was incremented, so when
the first frame was received, it was considered "out of sequence".
That left the state disc->active, preventing further discoveries.
Change to advance the sequence count before pa... | ```diff
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
index ddf494424ff4..fd3a6b287e98 100644
--- a/drivers/scsi/libfc/fc_disc.c
+++ b/drivers/scsi/libfc/fc_disc.c
@@ -629,11 +629,10 @@ static void fc_disc_gpn_ft_resp(struct fc_seq *sp, struct fc_frame *fp,
seq_cnt, disc->seq_count, f... |
b5cbf083736e14911c32fca2a93c540a92e8413d | Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: simplify fc_lport_rport_callback | Problem Details:
The lport rport callback can only be called for the dNS rport,
since its the only rport who's ops point to that function.
Remove unnecessary checking and debug messages.
Put the locking outside the switch statement as a simplification.
Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: Ro... | ```diff
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index 016f771ebe69..22c0f7bc004f 100644
--- a/drivers/scsi/libfc/fc_lport.c
+++ b/drivers/scsi/libfc/fc_lport.c
@@ -146,44 +146,31 @@ static void fc_lport_rport_callback(struct fc_lport *lport,
FC_LPORT_DBG(lport, "Received a %d event ... |
cdbe6dfece038e75214735d56cd06319b9a6df46 | Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: rport debug messages were printing pointer values | Problem Details:
Don't print large negative decimal numbers for frame pointers in
the debug messages from fc_rport_error(). Just print 0 if its a
frame pointer, and print the error numbers as positive.
Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: ... | ```diff
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
index cbf6c9f233ca..6ecf36d4708c 100644
--- a/drivers/scsi/libfc/fc_rport.c
+++ b/drivers/scsi/libfc/fc_rport.c
@@ -436,7 +436,8 @@ static void fc_rport_timeout(struct work_struct *work)
static void fc_rport_error(struct fc_rport_priv *... |
00fea930d404b9a9039291d5a61975e6c2ea974e | Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: fix rport event race between READY and LOGO | Problem Details:
When a remote port becomes ready and a LOGO is received before
the READY event is in rport_work waiting on the mutex, the
event is changed to LOGO and the work queued, so both the
calls to rport_work see the LOGO event, and both try to do
the list_del(), causing a crash.
Don't change the event if it i... | ```diff
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
index a1794a39158e..cbf6c9f233ca 100644
--- a/drivers/scsi/libfc/fc_rport.c
+++ b/drivers/scsi/libfc/fc_rport.c
@@ -1267,9 +1267,7 @@ static void fc_rport_recv_logo_req(struct fc_rport_priv *rdata,
return;
}
- rdata->event = RPORT... |
922aa210bcad4b34a7bb98ec9d318b7e59e7a5ca | Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: fix RPORT_TO_PRIV and PRIV_TO_RPORT() macros. | Problem Details:
These macros introduce extra undesirable semicolons that keep
them from being used in expressions, and they don't protect
against being passed an expression.
Add parens and remove the semicolons.
Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Sign... | ```diff
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index d888cbecd72e..2fdd8ac12b89 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -223,9 +223,9 @@ struct fc_rport_libfc_priv {
};
#define PRIV_TO_RPORT(x) \
- (struct fc_rport *)((void *)x - sizeof(struct fc_rport));
+ ((struct fc... |
2e70e2415193b84c1b79ec373af15c3f280ad7c4 | Analyze and fix the following issue in the Linux kernel code: [SCSI] fcoe: Fix module ref count bug by adding NETDEV UNREGISTER handling | Problem Details:
Fixes reference counting on fcoe_instance and net_device, and adds
NETDEV_UNREGISTER notifier handling so that you can unload network drivers.
FCoE no longer increments the module use count for the network driver.
On an NETDEV_UNREGISTER event, destroying the FCoE instance is deferred to a
workqueue c... | ```diff
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index c9a0346e493a..c0264a984394 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -74,12 +74,13 @@ static int fcoe_link_ok(struct fc_lport *lp);
static struct fc_lport *fcoe_hostlist_lookup(const struct net_device *);
st... |
5892c32f8a2d5a37d4c2ff1df62f6e8a2664abdb | Analyze and fix the following issue in the Linux kernel code: [SCSI] fcoe: fix missing error check in call to fcoe_if_init | Problem Details:
fcoe_if_init() can fail, but it's return value wasn't checked
Signed-off-by: Chris Leech <christopher.leech@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de> | ```diff
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index a39d370bccf8..d205ac08d07c 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -1900,7 +1900,9 @@ static int __init fcoe_init(void)
/* Setup link change notification */
fcoe_dev_setup();
- fcoe_if_init();
+ rc = fco... |
28bcb112183cb822a394b155a2e7d788fe4a109a | Analyze and fix the following issue in the Linux kernel code: KVM: fix compile warnings on s390 | Problem Details:
CC arch/s390/kvm/../../../virt/kvm/kvm_main.o
arch/s390/kvm/../../../virt/kvm/kvm_main.c: In function '__kvm_set_memory_region':
arch/s390/kvm/../../../virt/kvm/kvm_main.c:485: warning: unused variable 'j'
arch/s390/kvm/../../../virt/kvm/kvm_main.c:484: warning: unused variable 'lpages'
arch/s390/... | ```diff
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 1df4c0422f68..897bff3b7df9 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1091,9 +1091,8 @@ int __kvm_set_memory_region(struct kvm *kvm,
{
int r;
gfn_t base_gfn;
- unsigned long npages, ugfn;
- int lpages;
- unsigned long i, j;
+ ... |
0a79b009525b160081d75cef5dbf45817956acf2 | Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Check cpl before emulating debug register access | Problem Details:
Debug registers may only be accessed from cpl 0. Unfortunately, vmx will
code to emulate the instruction even though it was issued from guest
userspace, possibly leading to an unexpected trap later.
Cc: stable@kernel.org
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosa... | ```diff
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index e8f166a02c79..3be000435fad 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -620,6 +620,7 @@ void kvm_queue_exception(struct kvm_vcpu *vcpu, unsigned nr);
void kvm_queue_exception_e(struct ... |
4da748960a6bd7b1e123e01bfa8f2dbcb6be209e | Analyze and fix the following issue in the Linux kernel code: KVM: fix misreporting of coalesced interrupts by kvm tracer | Problem Details:
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> | ```diff
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 5b9d1ae09cad..1ae5ceba7eb2 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -376,7 +376,7 @@ static int __apic_accept_irq(struct kvm_lapic *apic, int delivery_mode,
result = !apic_test_and_set_irr(vector, apic);
trace_kvm_apic... |
e8a48342e9bc1c65ffe4bb3b3ac964e726dbd4c0 | Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Conditionally reload debug register 6 | Problem Details:
Only reload debug register 6 if we're running with the guest's
debug registers. Saves around 150 cycles from the guest lightweight
exit path.
dr6 contains a couple of bits that are updated on #DB, so intercept
that unconditionally and update those bits then.
Signed-off-by: Avi Kivity <avi@redhat.com... | ```diff
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index eec04129402f..f482100eff87 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -540,10 +540,12 @@ static void update_exception_bitmap(struct kvm_vcpu *vcpu)
eb = (1u << PF_VECTOR) | (1u << UD_VECTOR) | (1u << MC_VECTOR);
if (!vcpu->fpu_activ... |
3d53c27d05950390712f92c5ad1604c60190ed64 | Analyze and fix the following issue in the Linux kernel code: KVM: Use thread debug register storage instead of kvm specific data | Problem Details:
Instead of saving the debug registers from the processor to a kvm data
structure, rely in the debug registers stored in the thread structure.
This allows us not to save dr6 and dr7.
Reduces lightweight vmexit cost by 350 cycles, or 11 percent.
Signed-off-by: Avi Kivity <avi@redhat.com> | ```diff
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 33901be75a36..e8f166a02c79 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -362,9 +362,6 @@ struct kvm_vcpu_arch {
u32 pat;
int switch_db_regs;
- unsigned long host_db[KVM_NR_DB_REGS]... |
6ba661787594868512a71c129062ebd57d0c01e7 | Analyze and fix the following issue in the Linux kernel code: KVM guest: do not batch pte updates from interrupt context | Problem Details:
Commit b8bcfe997e4 made paravirt pte updates synchronous in interrupt
context.
Unfortunately the KVM pv mmu code caches the lazy/nonlazy mode
internally, so a pte update from interrupt context during a lazy mmu
operation can be batched while it should be performed synchronously.
https://bugzilla.redh... | ```diff
diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
index c664d515f613..63b0ec8d3d4a 100644
--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
@@ -34,7 +34,6 @@
struct kvm_para_state {
u8 mmu_queue[MMU_QUEUE_SIZE];
int mmu_queue_len;
- enum paravirt_lazy_mode mode;
};
static DEFINE_PER_CPU(... |
496c07e3b43475124d7f2d77fafbc1f5055abfee | Analyze and fix the following issue in the Linux kernel code: sparc64: Provide a way to specify a perf counter overflow IRQ enable bit. | Problem Details:
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/arch/sparc/kernel/perf_counter.c b/arch/sparc/kernel/perf_counter.c
index d86009fa6f8d..0cd5487b3413 100644
--- a/arch/sparc/kernel/perf_counter.c
+++ b/arch/sparc/kernel/perf_counter.c
@@ -78,6 +78,7 @@ struct sparc_pmu {
int lower_shift;
int event_mask;
int hv_bit;
+ int irq_bit... |
752807871ad27520d31baec1800f1db59e84f2a1 | Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: fix mailing list entries for ARM/Palm devices | Problem Details:
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Sergey Lapin <slapin@ossfans.org>
Acked-by: Tomas Cech <sleep_walker@suse.cz>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com> | ```diff
diff --git a/MAINTAINERS b/MAINTAINERS
index efe015ddc567..8e2b4b8cd566 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -709,16 +709,19 @@ S: Maintained
ARM/PALMTX,PALMT5,PALMLD,PALMTE2,PALMTC SUPPORT
P: Marek Vasut
M: marek.vasut@gmail.com
+L: linux-arm-kernel@lists.infradead.org
W: http://hackndev.com
S: M... |
e2c509c7e63ffdeef21f292441c3d4ce73db9250 | Analyze and fix the following issue in the Linux kernel code: [ARM] pxa/hx4700: use platform_lcd driver | Problem Details:
Instead of directly registering an lcd_device, use the platform_lcd driver.
This fixes a broken build in case CONFIG_LCD_CLASS_DEVICE is not enabled.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Cc: Ben Dooks <ben-linux-arm@fluff.org>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com> | ```diff
diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c
index 81359d574f88..f2058721254b 100644
--- a/arch/arm/mach-pxa/hx4700.c
+++ b/arch/arm/mach-pxa/hx4700.c
@@ -45,6 +45,7 @@
#include <mach/irda.h>
#include <mach/pxa2xx_spi.h>
+#include <video/platform_lcd.h>
#include <video/w100fb.h>
... |
6cf4442feba5af93a09cadfc5a6512a971f7825d | Analyze and fix the following issue in the Linux kernel code: [ARM] pxa/palm: fix possibly uninitialized variable in PalmTC-pcmcia | Problem Details:
This 'problem' actually cant cause a failure of the driver, but it's always
better to be correct.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com> | ```diff
diff --git a/drivers/pcmcia/pxa2xx_palmtc.c b/drivers/pcmcia/pxa2xx_palmtc.c
index 2c295078032a..3a8993ed5621 100644
--- a/drivers/pcmcia/pxa2xx_palmtc.c
+++ b/drivers/pcmcia/pxa2xx_palmtc.c
@@ -156,7 +156,7 @@ static int palmtc_wifi_powerup(void)
static int palmtc_pcmcia_configure_socket(struct soc_pcmcia_soc... |
9cf97b1beeb8596b1e923642e3f2af949fc68082 | Analyze and fix the following issue in the Linux kernel code: [ARM] pxa/em-x270: remove debug leftovers | Problem Details:
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com> | ```diff
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c
index 2ed1dfe194b3..8614cabd2ddf 100644
--- a/arch/arm/mach-pxa/em-x270.c
+++ b/arch/arm/mach-pxa/em-x270.c
@@ -1258,7 +1258,6 @@ static void __init em_x270_init_i2c(void)
static void __init em_x270_module_init(void)
{
- pr_info("%s\n", ... |
d294948c2ce4e1c85f452154469752cc9b8e876d | Analyze and fix the following issue in the Linux kernel code: [ARM] pxa/dma: add debugfs entries | Problem Details:
Add some debug information for PXA DMA :
- descriptors queued
- channels state
- global state
--
Since V1: reverted to old register access (no more dma_readl() or dma_writel()).
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com> | ```diff
diff --git a/arch/arm/plat-pxa/dma.c b/arch/arm/plat-pxa/dma.c
index 56b51cf0718b..2975798d411f 100644
--- a/arch/arm/plat-pxa/dma.c
+++ b/arch/arm/plat-pxa/dma.c
@@ -17,22 +17,266 @@
#include <linux/kernel.h>
#include <linux/interrupt.h>
#include <linux/errno.h>
+#include <linux/dma-mapping.h>
#include <... |
9f0ab4a3f0fdb1ff404d150618ace2fa069bb2e1 | Analyze and fix the following issue in the Linux kernel code: binfmt_elf: fix PT_INTERP bss handling | Problem Details:
In fs/binfmt_elf.c, load_elf_interp() calls padzero() for .bss even if
the PT_LOAD has no PROT_WRITE and no .bss. This generates EFAULT.
Here is a small test case. (Yes, there are other, useful PT_INTERP
which have only .text and no .data/.bss.)
----- ptinterp.S
_start: .globl _start
nop
in... | ```diff
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index b7c1603cd4bd..7c1e65d54872 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -501,22 +501,22 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
}
}
- /*
- * Now fill out the bss section. First pad the last page up
- * to the p... |
873a64c762f0c52cdf95dcee59bd416bbf9688e6 | Analyze and fix the following issue in the Linux kernel code: UBIFS: amend commentaries | Problem Details:
This patch amends and nicifies commentaries in file.c, as well as
fixes some spelling problems.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | ```diff
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
index 6d34dc7e33e1..2e6481a7701c 100644
--- a/fs/ubifs/file.c
+++ b/fs/ubifs/file.c
@@ -21,34 +21,32 @@
*/
/*
- * This file implements VFS file and inode operations of regular files, device
+ * This file implements VFS file and inode operations for regular fil... |
119e20dc149581db3064661b2e659f308f97b663 | Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms/r600: fix blit support | Problem Details:
select the correct max number of bytes per blit based
on whether the size is multiple of 4 bytes. This
determines whether we can use 8 or 32 bit pixels for
the blit.
airlied: also merged the IB padding patch +
correcting the VS offset for context
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
S... | ```diff
diff --git a/drivers/gpu/drm/radeon/r600_blit_kms.c b/drivers/gpu/drm/radeon/r600_blit_kms.c
index 5755647e688a..bbb0d615ac1c 100644
--- a/drivers/gpu/drm/radeon/r600_blit_kms.c
+++ b/drivers/gpu/drm/radeon/r600_blit_kms.c
@@ -129,6 +129,7 @@ set_shaders(struct radeon_device *rdev)
radeon_ring_write(rdev, (SQ... |
65a82211636f156a276cac3f8665605ae18f371f | Analyze and fix the following issue in the Linux kernel code: KVM: Fix coalesced interrupt reporting in IOAPIC | Problem Details:
This bug was introduced by b4a2f5e723e4f7df467.
Cc: stable@kernel.org
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com> | ```diff
diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c
index fa05f67423ab..9fe140bb38ec 100644
--- a/virt/kvm/ioapic.c
+++ b/virt/kvm/ioapic.c
@@ -193,6 +193,8 @@ int kvm_ioapic_set_irq(struct kvm_ioapic *ioapic, int irq, int level)
if ((edge && old_irr != ioapic->irr) ||
(!edge && !entry.fields.remote_... |
a20316d2aa41a8f4fd171648bad8f044f6060826 | Analyze and fix the following issue in the Linux kernel code: KVM guest: fix bogus wallclock physical address calculation | Problem Details:
The use of __pa() to calculate the address of a C-visible symbol
is wrong, and can lead to unpredictable results. See arch/x86/include/asm/page.h
for details.
It should be replaced with __pa_symbol(), that does the correct math here,
by taking relocations into account. This ensures the correct wallcl... | ```diff
diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c
index 223af43f1526..e5efcdcca31b 100644
--- a/arch/x86/kernel/kvmclock.c
+++ b/arch/x86/kernel/kvmclock.c
@@ -50,8 +50,8 @@ static unsigned long kvm_get_wallclock(void)
struct timespec ts;
int low, high;
- low = (int)__pa(&wall_clock);
-... |
5fff7d270bd6a4759b6d663741b729cdee370257 | Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Fix cr8 exiting control clobbering by EPT | Problem Details:
Don't call adjust_vmx_controls() two times for the same control.
It restores options that were dropped earlier. This loses us the cr8
exit control, which causes a massive performance regression Windows x64.
Cc: stable@kernel.org
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity ... | ```diff
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 1ee811cef236..eec04129402f 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -1262,12 +1262,9 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf)
if (_cpu_based_2nd_exec_control & SECONDARY_EXEC_ENABLE_EPT) {
/* CR3 acce... |
95eb84a7588d7d7afd3096807efc052adc7479e1 | Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Fix EPT with WP bit change during paging | Problem Details:
QNX update WP bit when paging enabled, which is not covered yet. This one fix
QNX boot with EPT.
Cc: stable@kernel.org
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com> | ```diff
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 2b7e7bd190fd..1ee811cef236 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -1642,7 +1642,6 @@ static void ept_update_paging_mode_cr0(unsigned long *hw_cr0,
CPU_BASED_CR3_STORE_EXITING));
vcpu->arch.cr0 = cr0;
vmx_set_cr4(vcpu... |
c0c7c04b874bf98a10d8e0c8322a5d3bc93536bc | Analyze and fix the following issue in the Linux kernel code: KVM: When switching to a vm8086 task, load segments as 16-bit | Problem Details:
According to 16.2.5 in the SDM, eflags.vm in the tss is consulted before loading
and new segments. If eflags.vm == 1, then the segments are treated as 16-bit
segments. The LDTR and TR are not normally available in vm86 mode so if they
happen to somehow get loaded, they need to be treated as 32-bit se... | ```diff
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 31bf98427f4e..1aa7e6d91d4f 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -4101,12 +4101,19 @@ static int kvm_load_realmode_segment(struct kvm_vcpu *vcpu, u16 selector, int se
return 0;
}
+static int is_vm86_segment(struct kvm_vcpu *vc... |
108768de55949c778bd95b36f3b17e652e59cd5b | Analyze and fix the following issue in the Linux kernel code: KVM: SVM: check for nested VINTR flag in svm_interrupt_allowed | Problem Details:
Not checking for this flag breaks any nested hypervisor that does not
set VINTR. So fix it with this patch.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com> | ```diff
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 144f2025799f..6610f60b4c96 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -2463,7 +2463,7 @@ static int svm_interrupt_allowed(struct kvm_vcpu *vcpu)
return (vmcb->save.rflags & X86_EFLAGS_IF) &&
!(vmcb->control.int_state & SVM_INTERRUP... |
3d62d9aa9868865217ce3a1b70d6039a98b50820 | Analyze and fix the following issue in the Linux kernel code: KVM: SVM: clean up nested_svm_exit_handled_msr | Problem Details:
This patch changes nested svm to call nested_svm_exit_handled_msr
directly and not through nested_svm_do.
[alex: fix oops due to nested kmap_atomics]
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com> | ```diff
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 5e55a1bdd13d..e85d79142ffc 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -1483,18 +1483,21 @@ static int nested_svm_do(struct vcpu_svm *svm,
return retval;
}
-static int nested_svm_exit_handled_msr(struct vcpu_svm *svm,
- vo... |
e3c3efc243462d67ba9fa7f67620dcbc4597bf0a | Analyze and fix the following issue in the Linux kernel code: UBIFS: add inode size debugging check | Problem Details:
Add one more check to UBIFS - a check that makes sure that there
are no data nodes beyond inode size. And few commantaries fixes
along the line.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Reviewed-by: Adrian Hunter <Adrian.Hunter@nokia.com> | ```diff
diff --git a/fs/ubifs/debug.h b/fs/ubifs/debug.h
index c1cd73b2e06e..fe2c9274c6a9 100644
--- a/fs/ubifs/debug.h
+++ b/fs/ubifs/debug.h
@@ -321,6 +321,8 @@ void dbg_check_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat,
int dbg_check_lprops(struct ubifs_info *c);
int dbg_check_lpt_nodes(struct ... |
0460a979b4b7a564e59eaa8efbba6f5ae38c5b78 | Analyze and fix the following issue in the Linux kernel code: KVM: SVM: copy only necessary parts of the control area on vmrun/vmexit | Problem Details:
The vmcb control area contains more then 800 bytes of reserved fields
which are unnecessarily copied. Fix this by introducing a copy
function which only copies the relevant part and saves time.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: A... | ```diff
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index f11f88005c29..df795bcebd22 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -1567,6 +1567,38 @@ static int nested_svm_exit_handled(struct vcpu_svm *svm, bool kvm_override)
nested_svm_exit_handled_real);
}
+static inline void copy_... |
3a34a8810b2ed316bfe58fa53640e8d30de3f6c2 | Analyze and fix the following issue in the Linux kernel code: KVM: fix EFER read buffer overflow | Problem Details:
Check whether index is within bounds before grabbing the element.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Avi Kivity <avi@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Avi Kivity <avi@redhat.com> | ```diff
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 0ba706e87c50..31c3a8740c42 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -571,12 +571,15 @@ static void reload_tss(void)
static void load_transition_efer(struct vcpu_vmx *vmx)
{
int efer_offset = vmx->msr_offset_efer;
- u64 host_efer =... |
b90c062c65cc8839edfac39778a37a55ca9bda36 | Analyze and fix the following issue in the Linux kernel code: KVM: MMU: fix bogus alloc_mmu_pages assignment | Problem Details:
Remove the bogus n_free_mmu_pages assignment from alloc_mmu_pages.
It breaks accounting of mmu pages, since n_free_mmu_pages is modified
but the real number of pages remains the same.
Cc: stable@kernel.org
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com> | ```diff
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 28be35c6ff1d..6f38178af926 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -2786,14 +2786,6 @@ static int alloc_mmu_pages(struct kvm_vcpu *vcpu)
ASSERT(vcpu);
- spin_lock(&vcpu->kvm->mmu_lock);
- if (vcpu->kvm->arch.n_requested_mmu_pag... |
95fb4eb6981216c07ac01f598e61b273b6eff58c | Analyze and fix the following issue in the Linux kernel code: KVM: remove superfluous NULL pointer check in kvm_inject_pit_timer_irqs() | Problem Details:
This takes care of the following entries from Dan's list:
arch/x86/kvm/i8254.c +714 kvm_inject_pit_timer_irqs(6) warning: variable derefenced in initializer 'vcpu'
arch/x86/kvm/i8254.c +714 kvm_inject_pit_timer_irqs(6) warning: variable derefenced before check 'vcpu'
Reported-by: Dan Carpenter <error... | ```diff
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
index 472653c15a2a..82ad523b4901 100644
--- a/arch/x86/kvm/i8254.c
+++ b/arch/x86/kvm/i8254.c
@@ -713,7 +713,7 @@ void kvm_inject_pit_timer_irqs(struct kvm_vcpu *vcpu)
struct kvm *kvm = vcpu->kvm;
struct kvm_kpit_state *ps;
- if (vcpu && pit) {
+ if... |
7e4e4056f72da51c5dede48515df0ecd20eaf8ca | Analyze and fix the following issue in the Linux kernel code: KVM: MMU: shadow support for 1gb pages | Problem Details:
This patch adds support for shadow paging to the 1gb page table code in KVM.
With this code the guest can use 1gb pages even if the host does not support
them.
[ Marcelo: fix shadow page collision on pmd level if a guest 1gb page is mapped
with 4kb ptes on host level ]
Signed-off-by: Joerg... | ```diff
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index e09dc26d96bd..c9fb2bc13a81 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -315,7 +315,6 @@ struct kvm_vcpu_arch {
struct {
gfn_t gfn; /* presumed gfn during guest pte update */
pfn... |
e04da980c35d75fa050ba4009ad99025432d8d7d | Analyze and fix the following issue in the Linux kernel code: KVM: MMU: make page walker aware of mapping levels | Problem Details:
The page walker may be used with nested paging too when accessing mmio
areas. Make it support the additional page-level too.
[ Marcelo: fix reserved bit check for 1gb pte ]
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivi... | ```diff
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 110c224ed1fb..09ab6433bf1d 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -108,6 +108,9 @@ module_param(oos_shadow, bool, 0644);
#define PT32_LEVEL_MASK(level) \
(((1ULL << PT32_LEVEL_BITS) - 1) << PT32_LEVEL_SHIFT(level))
+#define PT... |
aed665f7bbacf09121370bc7e21b4cc7d55fc5ef | Analyze and fix the following issue in the Linux kernel code: KVM: fix kvm_init() error handling | Problem Details:
Remove debugfs file if kvm_arch_init() return error
Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: Avi Kivity <avi@redhat.com> | ```diff
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 646cf2ae32fd..4470251ddc53 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -2791,8 +2791,8 @@ out_free_0:
__free_page(bad_page);
out:
kvm_arch_exit();
- kvm_exit_debug();
out_fail:
+ kvm_exit_debug();
return r;
}
EXPORT_SYMBOL_... |
5f0269f5d72f622514daec9af158c32e933800b6 | Analyze and fix the following issue in the Linux kernel code: KVM: Align cr8 threshold when userspace changes cr8 | Problem Details:
Commit f0a3602c20 ("KVM: Move interrupt injection logic to x86.c") does not
update the cr8 intercept if the lapic is disabled, so when userspace updates
cr8, the cr8 threshold control is not updated and we are left with illegal
control fields.
Fix by explicitly resetting the cr8 threshold.
Signed-off... | ```diff
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index f4cb1baaa04b..69de7248083f 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -4445,6 +4445,8 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu,
kvm_set_segment(vcpu, &sregs->tr, VCPU_SREG_TR);
kvm_set_segment(vcpu, &sregs->ldt, VC... |
6a1ac77110ee3e8d8dfdef8442f3b30b3d83e6a2 | Analyze and fix the following issue in the Linux kernel code: KVM: MMU: fix missing locking in alloc_mmu_pages | Problem Details:
n_requested_mmu_pages/n_free_mmu_pages are used by
kvm_mmu_change_mmu_pages to calculate the number of pages to zap.
alloc_mmu_pages, called from the vcpu initialization path, modifies this
variables without proper locking, which can result in a negative value
in kvm_mmu_change_mmu_pages (say, with cp... | ```diff
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 87c67f449279..86c2551fe136 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -2728,12 +2728,14 @@ static int alloc_mmu_pages(struct kvm_vcpu *vcpu)
ASSERT(vcpu);
+ spin_lock(&vcpu->kvm->mmu_lock);
if (vcpu->kvm->arch.n_requested_mmu_pa... |
a205bc19f0d203f31a15bd2f9464ef05f918b77e | Analyze and fix the following issue in the Linux kernel code: KVM: MMU: Fix MMU_DEBUG compile breakage | Problem Details:
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com> | ```diff
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index ac121b39a5bc..f1f08159e11e 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -1808,8 +1808,8 @@ static void mmu_set_spte(struct kvm_vcpu *vcpu, u64 *sptep,
pgprintk("%s: setting spte %llx\n", __func__, *sptep);
pgprintk("instantiating %s P... |
090b7aff27120cdae76a346a70db394844fea598 | Analyze and fix the following issue in the Linux kernel code: KVM: make io_bus interface more robust | Problem Details:
Today kvm_io_bus_regsiter_dev() returns void and will internally BUG_ON
if it fails. We want to create dynamic MMIO/PIO entries driven from
userspace later in the series, so we need to enhance the code to be more
robust with the following changes:
1) Add a return value to the registration function... | ```diff
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
index 9b62c57ba6e4..137e54817102 100644
--- a/arch/x86/kvm/i8254.c
+++ b/arch/x86/kvm/i8254.c
@@ -605,6 +605,7 @@ struct kvm_pit *kvm_create_pit(struct kvm *kvm, u32 flags)
{
struct kvm_pit *pit;
struct kvm_kpit_state *pit_state;
+ int ret;
pit =... |
e9f4275732add046fed4a548b8dbb98dbe500d2f | Analyze and fix the following issue in the Linux kernel code: KVM: PIT support for HPET legacy mode | Problem Details:
When kvm is in hpet_legacy_mode, the hpet is providing the timer
interrupt and the pit should not be. So in legacy mode, the pit timer
is destroyed, but the *state* of the pit is maintained. So if kvm or
the guest tries to modify the state of the pit, this modification is
accepted, *except* that the ti... | ```diff
diff --git a/arch/x86/include/asm/kvm.h b/arch/x86/include/asm/kvm.h
index 708b9c32a5da..4a5fe914dc59 100644
--- a/arch/x86/include/asm/kvm.h
+++ b/arch/x86/include/asm/kvm.h
@@ -18,6 +18,7 @@
#define __KVM_HAVE_GUEST_DEBUG
#define __KVM_HAVE_MSIX
#define __KVM_HAVE_MCE
+#define __KVM_HAVE_PIT_STATE2
/* A... |
f7c6d140032ae7e80df36d350c6edc41f92b2f94 | Analyze and fix the following issue in the Linux kernel code: KVM: fix MMIO_CONF_BASE MSR access | Problem Details:
Some Windows versions check whether the BIOS has setup MMI/O for
config space accesses on AMD Fam10h CPUs, we say "no" by returning 0 on
reads and only allow disabling of MMI/O CfgSpace setup by igoring "0" writes.
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Avi Kivity <avi@r... | ```diff
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 0e74d98641a0..95fa45c0f16e 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -844,6 +844,13 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data)
return 1;
}
break;
+ case MSR_FAM10H_MMIO_CONF_BASE:
+ if (data != 0) {
... |
756975bbfd185169aac19f227d65a8d738a5f5f8 | Analyze and fix the following issue in the Linux kernel code: KVM: Fix apic_mmio_write return for unaligned write | Problem Details:
Some in-famous OS do unaligned writing for APIC MMIO, and the return value
has been missed in recent change, then the OS hangs.
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com> | ```diff
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 683345a121b7..6c8460308548 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -834,7 +834,7 @@ static int apic_mmio_write(struct kvm_io_device *this,
if (len != 4 || (offset & 0xf)) {
/* Don't shout loud, $infamous_os would cause o... |
27c4ba60171d9ce29d3645619837760d758ed288 | Analyze and fix the following issue in the Linux kernel code: KVM: fix lock imbalance | Problem Details:
There is a missing unlock on one fail path in ioapic_mmio_write,
fix that.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com> | ```diff
diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c
index ddf6aa998b18..8a9c6cc382f8 100644
--- a/virt/kvm/ioapic.c
+++ b/virt/kvm/ioapic.c
@@ -292,7 +292,7 @@ static int ioapic_mmio_write(struct kvm_io_device *this, gpa_t addr, int len,
data = *(u32 *) val;
else {
printk(KERN_WARNING "ioapic: Unsupporte... |
d5c2dcc36aaf4dfdf9e01513493c71d71715f817 | Analyze and fix the following issue in the Linux kernel code: KVM: switch coalesced mmio changes to slots_lock | Problem Details:
switch coalesced mmio slots_lock. slots_lock is already taken for read
everywhere, so we only need to take it for write when changing zones.
This is in preparation to removing in_range and kvm->lock around it.
[avi: fix build]
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Avi Kiv... | ```diff
diff --git a/virt/kvm/coalesced_mmio.c b/virt/kvm/coalesced_mmio.c
index 397f41936698..b40946c1237d 100644
--- a/virt/kvm/coalesced_mmio.c
+++ b/virt/kvm/coalesced_mmio.c
@@ -115,16 +115,16 @@ int kvm_vm_ioctl_register_coalesced_mmio(struct kvm *kvm,
if (dev == NULL)
return -EINVAL;
- mutex_lock(&kvm->lo... |
ec04b2604c3707a46db1d26d98f82b11d0844669 | Analyze and fix the following issue in the Linux kernel code: KVM: Prepare memslot data structures for multiple hugepage sizes | Problem Details:
[avi: fix build on non-x86]
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com> | ```diff
diff --git a/arch/ia64/include/asm/kvm_host.h b/arch/ia64/include/asm/kvm_host.h
index 9cf1c4b1f92f..d9b6325a9328 100644
--- a/arch/ia64/include/asm/kvm_host.h
+++ b/arch/ia64/include/asm/kvm_host.h
@@ -235,7 +235,8 @@ struct kvm_vm_data {
#define KVM_REQ_PTC_G 32
#define KVM_REQ_RESUME 33
-#define KVM_PA... |
3eea8437f61ca1f9192d146124425e759c3e5758 | Analyze and fix the following issue in the Linux kernel code: KVM: s390: Fix memslot initialization for userspace_addr != 0 | Problem Details:
Since
commit 854b5338196b1175706e99d63be43a4f8d8ab607
Author: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
KVM: s390: streamline memslot handling
s390 uses the values of the memslot instead of doing everything in the arch
ioctl handler of the KVM_SET_USER_MEMORY_REGION. Unfortunately we missed... | ```diff
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 04bdeddebdac..1da8072d61b1 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1199,6 +1199,10 @@ int __kvm_set_memory_region(struct kvm *kvm,
if (old.npages)
kvm_arch_flush_shadow(kvm);
}
+#else /* not defined CONFIG_S390 */
+ ne... |
e66bb2ccdcf76d032bbb464b35c292bb3ee58f9b | Analyze and fix the following issue in the Linux kernel code: KVM: x86 emulator: add syscall emulation | Problem Details:
Handle #UD intercept of the syscall instruction in 32bit compat mode on
an Intel host.
Setup the segment descriptors for CS and SS and the EIP/ESP registers
according to the manual. Save the RIP and EFLAGS to the correct registers.
[avi: fix build on i386 due to missing R11]
Signed-off-by: Christoph ... | ```diff
diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c
index b0da29d74032..4d7256da59d8 100644
--- a/arch/x86/kvm/x86_emulate.c
+++ b/arch/x86/kvm/x86_emulate.c
@@ -1397,6 +1397,85 @@ static void toggle_interruptibility(struct x86_emulate_ctxt *ctxt, u32 mask)
ctxt->interruptibility = mask;
}
... |
229456fc34b1c9031b04f7581e7b755d1cebfe9c | Analyze and fix the following issue in the Linux kernel code: KVM: convert custom marker based tracing to event traces | Problem Details:
This allows use of the powerful ftrace infrastructure.
See Documentation/trace/ for usage information.
[avi, stephen: various build fixes]
[sheng: fix control register breakage]
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by:... | ```diff
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index c7b0cc2b7020..19027ab20412 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -14,6 +14,7 @@
#include <linux/types.h>
#include <linux/mm.h>
#include <linux/mmu_notifier.h>
+#include <linux/... |
3c5d0a44b011e0a1d857452f05c698e1008b4b4a | Analyze and fix the following issue in the Linux kernel code: KVM: Implement MSRs used by Hyper-V | Problem Details:
Hyper-V uses some MSRs, some of which are actually reserved for BIOS usage.
But let's be nice today and have it its way, because otherwise it fails
terribly.
[jaswinder: fix build for linux-next changes]
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Jaswinder Singh Rajput <jaswinderra... | ```diff
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 132be0c7c3eb..146c17d406ed 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -2131,6 +2131,11 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 data)
case MSR_VM_HSAVE_PA:
svm->hsave_msr = data;
break;
+ case MSR_VM_CR... |
f7104db26ab2bc5f642892774ac8fb0f15400969 | Analyze and fix the following issue in the Linux kernel code: KVM: Fix racy event propagation in timer | Problem Details:
Minor issue that likely had no practical relevance: the kvm timer
function so far incremented the pending counter and then may reset it
again to 1 in case reinjection was disabled. This opened a small racy
window with the corresponding VCPU loop that may have happened to run
on another (real) CPU and a... | ```diff
diff --git a/arch/x86/kvm/timer.c b/arch/x86/kvm/timer.c
index 85cc743a8203..1baed414b57a 100644
--- a/arch/x86/kvm/timer.c
+++ b/arch/x86/kvm/timer.c
@@ -9,12 +9,16 @@ static int __kvm_timer_fn(struct kvm_vcpu *vcpu, struct kvm_timer *ktimer)
int restart_timer = 0;
wait_queue_head_t *q = &vcpu->wq;
- /* ... |
71db602322b1197e7951655c46339324b6208bf9 | Analyze and fix the following issue in the Linux kernel code: KVM: Move performance counter MSR access interception to generic x86 path | Problem Details:
The performance counter MSRs are different for AMD and Intel CPUs and they
are chosen mainly by the CPUID vendor string. This patch catches writes to
all addresses (regardless of VMX/SVM path) and handles them in the generic
MSR handler routine. Writing a 0 into the event select register is something
w... | ```diff
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 28b981409a8f..060aa9f5571e 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -2142,22 +2142,6 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 data)
else
svm_disable_lbrv(svm);
break;
- case MSR_K7_EVNTSEL0:
- case ... |
439e218a6f4716da484314fc5a1f0a59b0212c01 | Analyze and fix the following issue in the Linux kernel code: KVM: MMU: Fix is_dirty_pte() | Problem Details:
is_dirty_pte() is used on guest ptes, not shadow ptes, so it needs to avoid
shadow_dirty_mask and use PT_DIRTY_MASK instead.
Misdetecting dirty pages could lead to unnecessarily setting the dirty bit
under EPT.
Signed-off-by: Avi Kivity <avi@redhat.com> | ```diff
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 8ee67e3fb9d0..8f2cb29db2fe 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -242,7 +242,7 @@ static int is_writeble_pte(unsigned long pte)
static int is_dirty_pte(unsigned long pte)
{
- return pte & shadow_dirty_mask;
+ return pte & PT_DI... |
fa40a8214bb9bcae8d49c234c19d8b4a6c1f37ff | Analyze and fix the following issue in the Linux kernel code: KVM: switch irq injection/acking data structures to irq_lock | Problem Details:
Protect irq injection/acking data structures with a separate irq_lock
mutex. This fixes the following deadlock:
CPU A CPU B
kvm_vm_ioctl_deassign_dev_irq()
mutex_lock(&kvm->lock); worker_thread()
-> kvm_deassign_irq() -> kvm_assigned_dev_inte... | ```diff
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
index 319922137fdd..8dde36953af3 100644
--- a/arch/ia64/kvm/kvm-ia64.c
+++ b/arch/ia64/kvm/kvm-ia64.c
@@ -1000,10 +1000,10 @@ long kvm_arch_vm_ioctl(struct file *filp,
goto out;
if (irqchip_in_kernel(kvm)) {
__s32 status;
- mutex_lock... |
596ae895653fe336b9b5815ad2c175d22bb26f21 | Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Fix reporting of unhandled EPT violations | Problem Details:
Instead of returning -ENOTSUPP, exit normally but indicate the hardware
exit reason.
Signed-off-by: Avi Kivity <avi@redhat.com> | ```diff
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index d726dec69529..959cb59cfaeb 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -3153,8 +3153,8 @@ static int handle_ept_violation(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
printk(KERN_ERR "EPT: Exit qualification is 0x%lx\n",
(long ... |
2986b8c72c272ea58edd37903b042c6da985627d | Analyze and fix the following issue in the Linux kernel code: KVM: powerpc: fix some init/exit annotations | Problem Details:
Fixes a couple of warnings like this one:
WARNING: arch/powerpc/kvm/kvm-440.o(.text+0x1e8c): Section mismatch in reference from the function kvmppc_44x_exit() to the function .exit.text:kvmppc_booke_exit()
The function kvmppc_44x_exit() references a function in an exit section.
Often the function kvmp... | ```diff
diff --git a/arch/powerpc/kvm/44x.c b/arch/powerpc/kvm/44x.c
index 0cef809cec21..f4d1b55aa70b 100644
--- a/arch/powerpc/kvm/44x.c
+++ b/arch/powerpc/kvm/44x.c
@@ -138,7 +138,7 @@ void kvmppc_core_vcpu_free(struct kvm_vcpu *vcpu)
kmem_cache_free(kvm_vcpu_cache, vcpu_44x);
}
-static int kvmppc_44x_init(void)... |
017cb99e875f2d8ff375cbb576c794b081cd0bd5 | Analyze and fix the following issue in the Linux kernel code: KVM: SVM: use explicit 64bit storage for sysenter values | Problem Details:
Since AMD does not support sysenter in 64bit mode, the VMCB fields storing
the MSRs are truncated to 32bit upon VMRUN/#VMEXIT. So store the values
in a separate 64bit storage to avoid truncation.
[andre: fix amd->amd migration]
Signed-off-by: Christoph Egger <christoph.egger@amd.com>
Signed-off-by: A... | ```diff
diff --git a/arch/x86/kvm/kvm_svm.h b/arch/x86/kvm/kvm_svm.h
index ed66e4c078dc..6f275b4cf628 100644
--- a/arch/x86/kvm/kvm_svm.h
+++ b/arch/x86/kvm/kvm_svm.h
@@ -27,6 +27,8 @@ struct vcpu_svm {
unsigned long vmcb_pa;
struct svm_cpu_data *svm_data;
uint64_t asid_generation;
+ uint64_t sysenter_esp;
+ uint... |
b1d16c495d9e6fe48e7df2e1d18cafc6555a116a | Analyze and fix the following issue in the Linux kernel code: KVM: s390: fix signal handling | Problem Details:
If signal pending is true we exit without updating kvm_run, userspace
currently just does nothing and jumps to kvm_run again.
Since we did not set an exit_reason we might end up with a random one
(whatever was the last exit). Therefore it was possible to e.g. jump to
the psw position the last real inte... | ```diff
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 1d65f6277166..5c1c30259002 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -527,8 +527,10 @@ rerun_vcpu:
if (rc == SIE_INTERCEPT_RERUNVCPU)
goto rerun_vcpu;
- if (signal_pending(current) && !rc)
+ if (signal_pe... |
787ff73637bbf34ef276cb04a127b421de71cc43 | Analyze and fix the following issue in the Linux kernel code: KVM: Drop interrupt shadow when single stepping should be done only on VMX | Problem Details:
The problem exists only on VMX. Also currently we skip this step if
there is pending exception. The patch fixes this too.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com> | ```diff
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index c87c93fd129a..c14bffc8c1f9 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -3453,6 +3453,14 @@ static void vmx_vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
if (test_bit(VCPU_REGS_RIP, (unsigned long *)&vcpu->arch.regs_dirty))
... |
ee3d29e8bee8d7c321279a9bd9bd25d4cfbf79b7 | Analyze and fix the following issue in the Linux kernel code: KVM: x86 emulator: fix jmp far decoding (opcode 0xea) | Problem Details:
The jump target should not be sign extened; use an unsigned decode flag.
Cc: stable@kernel.org
Signed-off-by: Avi Kivity <avi@redhat.com> | ```diff
diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c
index a30d5fc17eef..ef4dfca3ed7e 100644
--- a/arch/x86/kvm/x86_emulate.c
+++ b/arch/x86/kvm/x86_emulate.c
@@ -196,7 +196,7 @@ static u32 opcode_table[256] = {
ByteOp | SrcImmUByte, SrcImmUByte,
/* 0xE8 - 0xEF */
SrcImm | Stack, SrcImm | ... |
cb007648de83cf226d69ec76e1c01848b4e8e49f | Analyze and fix the following issue in the Linux kernel code: KVM: fix cpuid E2BIG handling for extended request types | Problem Details:
If we run out of cpuid entries for extended request types
we should return -E2BIG, just like we do for the standard
request types.
Signed-off-by: Mark McLoughlin <markmc@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 a93ba37eb52c..25a1c5739dfc 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1506,6 +1506,10 @@ static int kvm_dev_ioctl_get_supported_cpuid(struct kvm_cpuid2 *cpuid,
for (func = 0x80000001; func <= limit && nent < cpuid->nent; ++func)
d... |
ae0bb3e011fec51fa67073d8e23d8ffeb36185d1 | Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Properly handle software interrupt re-injection in real mode | Problem Details:
When reinjecting a software interrupt or exception, use the correct
instruction length provided by the hardware instead of a hardcoded 1.
Fixes problems running the suse 9.1 livecd boot loader.
Problem introduced by commit f0a3602c20 ("KVM: Move interrupt injection
logic to x86.c").
Signed-off-by: G... | ```diff
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 29f912927a58..db0b8b6df198 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -801,8 +801,9 @@ static void vmx_queue_exception(struct kvm_vcpu *vcpu, unsigned nr,
vmx->rmode.irq.pending = true;
vmx->rmode.irq.vector = nr;
vmx->rmode.ir... |
bd9cfca9cb71200dd82b320bba12540dc078f4e0 | Analyze and fix the following issue in the Linux kernel code: tracing: format clean ups | Problem Details:
Fix white-space formatting.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <4AA8579B.4020706@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org> | ```diff
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 536ae1d83629..86a0523b8e59 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -169,20 +169,20 @@ enum kmemtrace_type_id {
struct kmemtrace_alloc_entry {
struct trace_entry ent;
- enum kmemtrace_type_id type_id;
- unsigned long call... |
752015d1b0683a8c623ebfe4c62893413e9b30d3 | Analyze and fix the following issue in the Linux kernel code: binfmt_elf: fix PT_INTERP bss handling | Problem Details:
In fs/binfmt_elf.c, load_elf_interp() calls padzero() for .bss even if
the PT_LOAD has no PROT_WRITE and no .bss. This generates EFAULT.
Here is a small test case. (Yes, there are other, useful PT_INTERP
which have only .text and no .data/.bss.)
----- ptinterp.S
_start: .globl _start
nop
in... | ```diff
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index b7c1603cd4bd..7c1e65d54872 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -501,22 +501,22 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
}
}
- /*
- * Now fill out the bss section. First pad the last page up
- * to the p... |
58f25468b5636c390ad2a58356b127c0055884b4 | Analyze and fix the following issue in the Linux kernel code: netxen: fix tx descriptor structure | Problem Details:
Fix the offset of vlan_TCI field in cmd_desc_type0.
Signed-off-by: Amit Kumar Salecha <amit@qlogic.com>
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h
index 2a52479bcdf0..23718887d02c 100644
--- a/drivers/net/netxen/netxen_nic.h
+++ b/drivers/net/netxen/netxen_nic.h
@@ -348,9 +348,9 @@ struct cmd_desc_type0 {
__le64 addr_buffer4;
- __le16 vlan_TCI;
- __le16 reserved;
__le32... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.