id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
2158d3fd2769546cd9004eaeb776fee946155238 | Analyze and fix the following issue in the Linux kernel code: Squashfs: fix f_pos check in get_dir_index_using_offset | Problem Details:
One off error in the f_pos check. If f_pos is 3 or less don't
bother reading the index because we're at the start of the
directory, and we obviously already know where that is on disk.
This eliminates an unnecessary read.
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk> | ```diff
diff --git a/fs/squashfs/dir.c b/fs/squashfs/dir.c
index 7142a6fd28d3..b381305c9a47 100644
--- a/fs/squashfs/dir.c
+++ b/fs/squashfs/dir.c
@@ -64,7 +64,7 @@ static int get_dir_index_using_offset(struct super_block *sb,
* is offset by 3 because we invent "." and ".." entries which are
* not actually stored... |
c7b285550544c22bc005ec20978472c9ac7138c6 | Analyze and fix the following issue in the Linux kernel code: aio: fix the "too late munmap()" race | Problem Details:
Current code has put_ioctx() called asynchronously from aio_fput_routine();
that's done *after* we have killed the request that used to pin ioctx,
so there's nothing to stop io_destroy() waiting in wait_for_all_aios()
from progressing. As the result, we can end up with async call of
put_ioctx() being ... | ```diff
diff --git a/fs/aio.c b/fs/aio.c
index f6578cb22d00..b9d64d89a043 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -228,12 +228,6 @@ static void __put_ioctx(struct kioctx *ctx)
call_rcu(&ctx->rcu_head, ctx_rcu_free);
}
-static inline void get_ioctx(struct kioctx *kioctx)
-{
- BUG_ON(atomic_read(&kioctx->users) <= 0... |
86b62a2cb4fc09037bbce2959d2992962396fd7f | Analyze and fix the following issue in the Linux kernel code: aio: fix io_setup/io_destroy race | Problem Details:
Have ioctx_alloc() return an extra reference, so that caller would drop it
on success and not bother with re-grabbing it on failure exit. The current
code is obviously broken - io_destroy() from another thread that managed
to guess the address io_setup() would've returned would free ioctx right
under ... | ```diff
diff --git a/fs/aio.c b/fs/aio.c
index 67e4b9047cc9..f6578cb22d00 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -273,7 +273,7 @@ static struct kioctx *ioctx_alloc(unsigned nr_events)
mm = ctx->mm = current->mm;
atomic_inc(&mm->mm_count);
- atomic_set(&ctx->users, 1);
+ atomic_set(&ctx->users, 2);
spin_lock_in... |
be22aece684f5a700e6247b9861c3759d5798a3c | Analyze and fix the following issue in the Linux kernel code: memcg: revert fix to mapcount check for this release | Problem Details:
Respectfully revert commit e6ca7b89dc76 "memcg: fix mapcount check
in move charge code for anonymous page" for the 3.3 release, so that
it behaves exactly like releases 2.6.35 through 3.2 in this respect.
Horiguchi-san's commit is correct in itself, 1 makes much more sense
than 2 in that check; but it... | ```diff
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 5585dc3d3646..d0e57a3cda18 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -5075,7 +5075,7 @@ static struct page *mc_handle_present_pte(struct vm_area_struct *vma,
return NULL;
if (PageAnon(page)) {
/* we don't move shared anon */
- if (!move_a... |
d8d789497aa016f802b95606c6473e92361ec0b5 | Analyze and fix the following issue in the Linux kernel code: ptp_pch: rename pch_pcidev to pci_driver to fix section mismatch warnings. | Problem Details:
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/ptp/ptp_pch.c b/drivers/ptp/ptp_pch.c
index 0b38ee1b0f85..375eb04c16ea 100644
--- a/drivers/ptp/ptp_pch.c
+++ b/drivers/ptp/ptp_pch.c
@@ -694,7 +694,7 @@ static DEFINE_PCI_DEVICE_TABLE(pch_ieee1588_pcidev_id) = {
{0}
};
-static struct pci_driver pch_pcidev = {
+static struct pci_driver... |
de3bd7e6de25141c466773c2e0fa319b2fa93655 | Analyze and fix the following issue in the Linux kernel code: spi-topcliff-pch: fix -Wuninitialized warning | Problem Details:
Fix for:
drivers/spi/spi-topcliff-pch.c: In function ‘pch_spi_handler_sub’:
drivers/spi/spi-topcliff-pch.c:325:17: warning: ‘bpw_len’ may be
used uninitialized in this function [-Wuninitialized]
drivers/spi/spi-topcliff-pch.c:325:42: warning: ‘rx_index’ may be
used uninitialized in this function [-... | ```diff
diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c
index 2a6429d8c363..88e6b3fd1f12 100644
--- a/drivers/spi/spi-topcliff-pch.c
+++ b/drivers/spi/spi-topcliff-pch.c
@@ -318,22 +318,23 @@ static void pch_spi_handler_sub(struct pch_spi_data *data, u32 reg_spsr_val,
data->tx_index = tx... |
2a90957f2cfc2bf0b705a62a97830cf0d42a5a40 | Analyze and fix the following issue in the Linux kernel code: Staging: android: binder: Fix use-after-free bug | Problem Details:
binder_update_page_range could read freed memory if the vma of the
selected process was freed right before the check that the vma
belongs to the mm struct it just locked.
If the vm_mm pointer in that freed vma struct had also been rewritten
with a value that matched the locked mm struct, then the code... | ```diff
diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 6db1c1bfeb98..59e095362c81 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -288,6 +288,7 @@ struct binder_proc {
struct rb_root refs_by_node;
int pid;
struct vm_area_struct *vma;
... |
06caa4174ef7ec0f9c1e7c898a52e737c4897714 | Analyze and fix the following issue in the Linux kernel code: staging: ram_console: Fix section mismatches | Problem Details:
WARNING: vmlinux.o(.text+0xfcf6e): Section mismatch in reference
from the function ram_console_driver_probe() to the function
.init.text:persistent_ram_init_ringbuffer()
The function ram_console_driver_probe() references
the function __init persistent_ram_init_ringbuffer().
This is often because ram_co... | ```diff
diff --git a/drivers/staging/android/ram_console.c b/drivers/staging/android/ram_console.c
index b242be246cd8..2918bc19f294 100644
--- a/drivers/staging/android/ram_console.c
+++ b/drivers/staging/android/ram_console.c
@@ -50,7 +50,7 @@ void ram_console_enable_console(int enabled)
ram_console.flags &= ~CON_E... |
3ee0206b5e359aed4dd4f31834bac1d6ac657b5f | Analyze and fix the following issue in the Linux kernel code: staging/comedi/drivers fix spelling errors | Problem Details:
Fix the following spelling errors:
inital -> initial
continous -> continuous
aquisition -> acquisition
aquisitions -> acquisitions
immidiately -> immediately
Signed-off-by: Alexandru Guduleasa <alexandru.guduleasa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ```diff
diff --git a/drivers/staging/comedi/drivers/usbduxsigma.c b/drivers/staging/comedi/drivers/usbduxsigma.c
index ca6bcf8b0231..63c9b6dbc317 100644
--- a/drivers/staging/comedi/drivers/usbduxsigma.c
+++ b/drivers/staging/comedi/drivers/usbduxsigma.c
@@ -39,7 +39,7 @@ Status: testing
*
*
* Revision history:
-... |
1745e4405b2c0da6db2ec4b6bc0ad930612d8295 | Analyze and fix the following issue in the Linux kernel code: iwlwifi: fix the delta for remove max_txq_num patch | Problem Details:
BIg portion of "iwlwifi: remove max_txq_num from hw_params" was
missing during merge, here is the fix for it.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com> | ```diff
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
index 450250332e4b..5b0d888f746b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-1000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
@@ -122,8 +122,6 @@ static const struct iwl_sensitivity_ranges iwl1000_sensitivity = ... |
9ba1947a89938ee83e7c16709ee4095ae3e36c44 | Analyze and fix the following issue in the Linux kernel code: iwlwifi: fix cmd_queue number merge | Problem Details:
iwlwifi: move command queue number out of the iwl_shared struct
move the cmd_queue out of iwl_shared struct, but for some reason the
patch is half done and fail compile
Here is the fix
John, could you apply this patch to wireless-next to address the issue
Thanks
Signed-off-by: Wey-Yi Guy <wey-yi.w.g... | ```diff
diff --git a/drivers/net/wireless/iwlwifi/iwl-prph.h b/drivers/net/wireless/iwlwifi/iwl-prph.h
index a4d11016c3b4..75dc20bd965b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-prph.h
+++ b/drivers/net/wireless/iwlwifi/iwl-prph.h
@@ -216,10 +216,6 @@
#define SCD_TRANS_TBL_OFFSET_QUEUE(x) \
((SCD_TRANS_TBL_MEM_L... |
8f53602be555e500cfcd957955bb40fac19f2a6b | Analyze and fix the following issue in the Linux kernel code: spi: Trivial warning fix | Problem Details:
The loop count i traverses for ntrans which is unsigned
so make the loop count i also unsigned.
Fix the below warning
In file included from drivers/spi/spi-omap2-mcspi.c:38:
include/linux/spi/spi.h: In function 'spi_message_alloc':
include/linux/spi/spi.h:556: warning: comparison between signed and un... | ```diff
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index f9e30a5b3543..98679b061b63 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -600,7 +600,7 @@ static inline struct spi_message *spi_message_alloc(unsigned ntrans, gfp_t flags
+ ntrans * sizeof(struct spi_transfer),
... |
5234ffb9f74cfa8993d174782bc861dd9b7b5bfb | Analyze and fix the following issue in the Linux kernel code: genirq: Get rid of unnecessary IRQTF_DIED flag | Problem Details:
Currently IRQTF_DIED flag is set when a IRQ thread handler calls do_exit()
But also PF_EXITING per process flag gets set when a thread exits. This
fix eliminates the duplicate by using PF_EXITING flag.
Also, there is a race condition in exit_irq_thread(). In case a thread's
bit is cleared in desc->thr... | ```diff
diff --git a/kernel/exit.c b/kernel/exit.c
index 4b4042f9bc6a..752d2c0abd19 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -935,8 +935,6 @@ void do_exit(long code)
schedule();
}
- exit_irq_thread();
-
exit_signals(tsk); /* sets PF_EXITING */
/*
* tsk->flags are checked in the futex code to pro... |
4bcdf1d0b652bc33d52f2322b77463e4dc58abf8 | Analyze and fix the following issue in the Linux kernel code: genirq: Get rid of unnecessary irqaction field in task_struct | Problem Details:
When a new thread handler is created, an irqaction is passed to it as
data. Not only that irqaction is stored in task_struct by the handler
for later use, but also a structure associated with the kernel thread
keeps this value as long as the thread exists.
This fix kicks irqaction out off task_struct.... | ```diff
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 7d379a6bfd88..07f537a371ce 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1319,6 +1319,11 @@ struct task_struct {
unsigned sched_reset_on_fork:1;
unsigned sched_contributes_to_load:1;
+#ifdef CONFIG_GENERIC_HARDIRQS
+ /* ... |
540b60e24f3f4781d80e47122f0c4486a03375b8 | Analyze and fix the following issue in the Linux kernel code: genirq: Fix incorrect check for forced IRQ thread handler | Problem Details:
We do not want a bitwise AND between boolean operands
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Link: http://lkml.kernel.org/r/20120309135912.GA2114@dhcp-26-207.brq.redhat.com
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de... | ```diff
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index a9a9dbe49fea..c0730ad8a117 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -773,7 +773,7 @@ static int irq_thread(void *data)
struct irqaction *action);
int wake;
- if (force_irqthreads & test_bit(IRQTF_FORCED_THREAD,
+ if (force... |
6e930045abe51013ee3b47eaeb5aef4bc5a35218 | Analyze and fix the following issue in the Linux kernel code: iommu/amd: Fix double free of mem-region in error-path | Problem Details:
When ioremap_nocache fails in iommu initialization the code
calls release_mem_region immediatly. But the function is
called again when the propagates into the upper init
functions leading to a double-free. Fix that.
Reported-by: Don Dutile <ddutile@redhat.com>
Signed-off-by: Joerg Roedel <joerg.roedel... | ```diff
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
index 75653daf1de1..526652a7385d 100644
--- a/drivers/iommu/amd_iommu_init.c
+++ b/drivers/iommu/amd_iommu_init.c
@@ -358,8 +358,6 @@ static void iommu_disable(struct amd_iommu *iommu)
*/
static u8 * __init iommu_map_mmio_space(u64 ... |
001b7f3ecd164ba748e45f698714b3a574a11438 | Analyze and fix the following issue in the Linux kernel code: ARM: OMAP2+: Fix compile error when FB_OMAP2 is not set | Problem Details:
Otherwise we will get:
arch/arm/plat-omap/fb.c:101: error: expected ‘)’ before ‘*’ token
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> | ```diff
diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/plat-omap/fb.c
index 24e62693b809..dd6f92c99e56 100644
--- a/arch/arm/plat-omap/fb.c
+++ b/arch/arm/plat-omap/fb.c
@@ -98,6 +98,8 @@ arch_initcall(omap_init_fb);
#else
-void __init omapfb_set_lcd_config(omap_lcd_config *config) { }
+void __init omapfb_set_lcd... |
7eb3aa65853e1b223bfc786b023b702018cb76c0 | Analyze and fix the following issue in the Linux kernel code: UBI: fix eraseblock picking criteria | Problem Details:
The 'find_wl_entry()' function expects the maximum difference as the second
argument, not the maximum absolute value. So the "unknown" eraseblock picking
was incorrect, as Shmulik Ladkani spotted. This patch fixes the issue.
Reported-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: Artem... | ```diff
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c
index 8616f52144c1..512eab07c606 100644
--- a/drivers/mtd/ubi/wl.c
+++ b/drivers/mtd/ubi/wl.c
@@ -390,7 +390,7 @@ static struct ubi_wl_entry *find_wl_entry(struct rb_root *root, int diff)
*/
int ubi_wl_get_peb(struct ubi_device *ubi, int dtype)
{
- in... |
add8287e3fa2160229117c9e1b7c9ca8cb661423 | Analyze and fix the following issue in the Linux kernel code: UBI: fix documentation and improve readability | Problem Details:
The "max" parameter of 'find_wl_entry()' was documented incorrectly and
it actually means the maximum possible difference from the smallest erase
counter. Rename it to "diff" instead, and amend the documentation.
Reported-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: Artem Bityutskiy ... | ```diff
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c
index 0696e36b0539..8616f52144c1 100644
--- a/drivers/mtd/ubi/wl.c
+++ b/drivers/mtd/ubi/wl.c
@@ -350,18 +350,19 @@ static void prot_queue_add(struct ubi_device *ubi, struct ubi_wl_entry *e)
/**
* find_wl_entry - find wear-leveling entry closest to cer... |
62db90681c0db8c76e5db006b929a2edd5d12ae6 | Analyze and fix the following issue in the Linux kernel code: perf tools: Fix ABI compatibility bug in print_event_desc() | Problem Details:
This patches cleans up local variable types for msz and ret.
They need to be size_t and ssize_t respectively.
It also fixes a bug whereby perf would not read attr struct
with a different size than what it knows about.
Signed-off-by: Stephane Eranian <eranian@google.com>
Cc: peterz@infradead.org
Cc: a... | ```diff
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 666f18972fa3..6d580267d043 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -1144,8 +1144,9 @@ static void print_event_desc(struct perf_header *ph, int fd, FILE *fp)
uint64_t id;
void *buf = NULL;
char *str;
- u3... |
b50311dc2ac1c04ad19163c2359910b25e16caf6 | Analyze and fix the following issue in the Linux kernel code: perf report: Add support for taken branch sampling | Problem Details:
This patch adds support for taken branch sampling, i.e, the
PERF_SAMPLE_BRANCH_STACK feature to perf report. In other
words, to display histograms based on taken branches rather
than executed instructions addresses.
The new option is called -b and it takes no argument. To
generate meaningful output, t... | ```diff
diff --git a/tools/perf/Documentation/perf-report.txt b/tools/perf/Documentation/perf-report.txt
index 9b430e98712e..19b9092cf8b7 100644
--- a/tools/perf/Documentation/perf-report.txt
+++ b/tools/perf/Documentation/perf-report.txt
@@ -153,6 +153,13 @@ OPTIONS
information which may be very large and thus may c... |
048be431e40ee32df8e6c1a2c216693afe3ee358 | Analyze and fix the following issue in the Linux kernel code: sh-sci / PM: Avoid deadlocking runtime PM | Problem Details:
The runtime PM of sh-sci devices is enabled when sci_probe() returns,
so the pm_runtime_put_sync() executed by driver_probe_device()
attempts to suspend the device. Then, in some situations, a
diagnostic message is printed to the console by one of the runtime
suspend routines handling the sh-sci devic... | ```diff
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 75085795528e..61b7fd2729cd 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -1710,6 +1710,8 @@ static int sci_startup(struct uart_port *port)
dev_dbg(port->dev, "%s(%d)\n", __func__, port->line);
+ pm... |
def9d83da4f8587dbad5ea57c57d91e53a51006a | Analyze and fix the following issue in the Linux kernel code: powerpc/eeh: Cleanup function names in EEH aux components | Problem Details:
The patch does some cleanup on the function names of EEH
aux components. Currently, only couple of function names from
eeh_cache have been adjusted so that:
* The function name has prefix "eeh_addr_cache".
* Move around pci_addr_cache_build() in the header file
to reflect fun... | ```diff
diff --git a/arch/powerpc/include/asm/ppc-pci.h b/arch/powerpc/include/asm/ppc-pci.h
index b4b18d82b79b..c02d5a76caca 100644
--- a/arch/powerpc/include/asm/ppc-pci.h
+++ b/arch/powerpc/include/asm/ppc-pci.h
@@ -49,10 +49,10 @@ extern unsigned long pci_probe_only;
#ifdef CONFIG_EEH
+void pci_addr_cache_buil... |
cce4b2d243ddd9e8d5da159b893117afd7ccad5c | Analyze and fix the following issue in the Linux kernel code: powerpc/eeh: Cleanup function names in the EEH core | Problem Details:
The EEH has been implemented on pSeries platform. The original
code looks a little bit nasty. The patch does cleanup on the
current EEH implementation so that it looks more clean.
* Try adding prefix "eeh" for functions.
* Some function names have been adjusted so that they looks
... | ```diff
diff --git a/arch/powerpc/include/asm/ppc-pci.h b/arch/powerpc/include/asm/ppc-pci.h
index 221d82fd8231..605a97000fcf 100644
--- a/arch/powerpc/include/asm/ppc-pci.h
+++ b/arch/powerpc/include/asm/ppc-pci.h
@@ -58,16 +58,16 @@ struct pci_dev *pci_get_device_by_addr(unsigned long addr);
void eeh_slot_error_deta... |
9424fabf8617c15e18a5ffd29bc3bcfa36620473 | Analyze and fix the following issue in the Linux kernel code: powerpc: Fix 64-bit BookE FP unavailable exceptions | Problem Details:
We were using CR0.EQ after EXCEPTION_COMMON, hoping it still
contained whether we came from userspace or kernel space.
However, under some circumstances, EXCEPTION_COMMON will
call C code and clobber non-volatile registers, so we really
need to re-load the previous MSR from the stackframe and
re-test.... | ```diff
diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
index 3de9993c5c65..c4c34665c221 100644
--- a/arch/powerpc/kernel/exceptions-64e.S
+++ b/arch/powerpc/kernel/exceptions-64e.S
@@ -353,15 +353,16 @@ interrupt_end_book3e:
NORMAL_EXCEPTION_PROLOG(0x800, PROLOG_ADDITION_NONE... |
990118c84b3e90b2b5354b6e2acd961044d7fa12 | Analyze and fix the following issue in the Linux kernel code: powerpc: Fix register clobbering when accumulating stolen time | Problem Details:
When running under a hypervisor that supports stolen time accounting,
we may call C code from the macro EXCEPTION_PROLOG_COMMON in the
exception entry path, which clobbers CR0.
However, the FPU and vector traps rely on CR0 indicating whether we
are coming from userspace or kernel to decide what to do.... | ```diff
diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h
index 368f72f79808..50f73aa2ba21 100644
--- a/arch/powerpc/include/asm/ppc_asm.h
+++ b/arch/powerpc/include/asm/ppc_asm.h
@@ -60,6 +60,8 @@ BEGIN_FW_FTR_SECTION; \
cmpd cr1,r11,r10; \
beq+ cr1,33f; \
bl .a... |
a546498f3bf9aac311c66f965186373aee2ca0b0 | Analyze and fix the following issue in the Linux kernel code: powerpc: Call do_page_fault() with interrupts off | Problem Details:
We currently turn interrupts back to their previous state before
calling do_page_fault(). This can be annoying when debugging as
a bad fault will potentially have lost some processor state before
getting into the debugger.
We also end up calling some generic code with interrupts enabled
such as notify... | ```diff
diff --git a/arch/powerpc/include/asm/hw_irq.h b/arch/powerpc/include/asm/hw_irq.h
index bb712c9488b3..531ba00fcbab 100644
--- a/arch/powerpc/include/asm/hw_irq.h
+++ b/arch/powerpc/include/asm/hw_irq.h
@@ -79,6 +79,11 @@ static inline bool arch_irqs_disabled(void)
get_paca()->hard_enabled = 0; \
} while(0... |
7450f6f03e9d6dc95d2014c4cceac8adf98560e8 | Analyze and fix the following issue in the Linux kernel code: powerpc: Use the same interrupt prolog for perfmon as other interrupts | Problem Details:
The perfmon interrupt is the sole user of a special variant of the
interrupt prolog which differs from the one used by external and timer
interrupts in that it saves the non-volatile GPRs and doesn't turn the
runlatch on.
The former is unnecessary and the later is arguably incorrect, so
let's clean th... | ```diff
diff --git a/arch/powerpc/include/asm/exception-64s.h b/arch/powerpc/include/asm/exception-64s.h
index cc2bcf464746..041b2227967d 100644
--- a/arch/powerpc/include/asm/exception-64s.h
+++ b/arch/powerpc/include/asm/exception-64s.h
@@ -297,21 +297,10 @@ label##_common: \
/*
* Like STD_EXCEPTION_COMMON,... |
5db51b50c10f3bf56d5c636832c5556ead90562d | Analyze and fix the following issue in the Linux kernel code: USB: serial: metro-usb: move to use dev_dbg() instead of dbg() | Problem Details:
This properly ties the driver into the dynamic debug system and provides
the needed device identification when the messages are printed out.
It also removes a ton of checkpatch warnings as well, which is always a
nice validation that it's the correct thing to do.
Cc: Aleksey Babahin <tamerlan311@gmai... | ```diff
diff --git a/drivers/usb/serial/metro-usb.c b/drivers/usb/serial/metro-usb.c
index 6b7d2779148c..6e1622f2a297 100644
--- a/drivers/usb/serial/metro-usb.c
+++ b/drivers/usb/serial/metro-usb.c
@@ -66,7 +66,7 @@ static void metrousb_read_int_callback(struct urb *urb)
int result = 0;
unsigned long flags = 0;
... |
d4cbd6e990a798d21577ee2f42a3880da09edf3a | Analyze and fix the following issue in the Linux kernel code: USB: serial: metro-usb: fix up coding style errors | Problem Details:
This fixes up all of the coding style errors, and removes the initial,
unneeded comments on how to load the module and the old changelog which
are no longer needed.
There are still a number of coding style warnings left, I'll get to them
later.
Cc: Aleksey Babahin <tamerlan311@gmail.com>
Signed-off-b... | ```diff
diff --git a/drivers/usb/serial/metro-usb.c b/drivers/usb/serial/metro-usb.c
index d22a603597e8..66e9355cfd00 100644
--- a/drivers/usb/serial/metro-usb.c
+++ b/drivers/usb/serial/metro-usb.c
@@ -1,32 +1,9 @@
/*
- Date Created: 9/15/2006
- File Name: metro-usb.c
- Description: metro-usb.c is the drivers mai... |
11a4f40064f38dcc369d716bea2020f6b5e290ff | Analyze and fix the following issue in the Linux kernel code: USB: serial: metro-usb: fix up usb_serial_register calls | Problem Details:
The usb serial core has changed how the driver is to be registered and
unregistered recently. Make these changes to the driver so that it will
properly build and work.
Cc: Aleksey Babahin <tamerlan311@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ```diff
diff --git a/drivers/usb/serial/metro-usb.c b/drivers/usb/serial/metro-usb.c
index 5b8ed50e5dda..bb6838959876 100644
--- a/drivers/usb/serial/metro-usb.c
+++ b/drivers/usb/serial/metro-usb.c
@@ -92,7 +92,6 @@ static struct usb_serial_driver metrousb_device = {
},
.description = "Metrologic USB to serial c... |
33d2832ab0149a26418d360af3c444969a63fb28 | Analyze and fix the following issue in the Linux kernel code: USB: gadget: Make g_hid device class conform to spec. | Problem Details:
HID devices should specify this in their interface descriptors, not in the
device descriptor. This fixes a "missing hardware id" bug under Windows 7 with
a VIA VL800 (3.0) controller.
Signed-off-by: Orjan Friberg <of@flatfrog.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: stable <stable@vger.kernel.org>
Sig... | ```diff
diff --git a/drivers/usb/gadget/hid.c b/drivers/usb/gadget/hid.c
index f888c3ede860..3493adf064f5 100644
--- a/drivers/usb/gadget/hid.c
+++ b/drivers/usb/gadget/hid.c
@@ -60,9 +60,9 @@ static struct usb_device_descriptor device_desc = {
/* .bDeviceClass = USB_CLASS_COMM, */
/* .bDeviceSubClass = 0, */
/*... |
58112dfbfe02d803566a2c6c8bd97b5fa3c62cdc | Analyze and fix the following issue in the Linux kernel code: tty: moxa: fix bit test in moxa_start() | Problem Details:
This is supposed to be doing a shift before the comparison instead of
just doing a bitwise AND directly. The current code means the start()
just returns without doing anything.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jiri Slaby <jslaby@suse.cz>
Cc: stable <stable@vger.kernel... | ```diff
diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c
index 4a26323a926f..8a8d0440bab0 100644
--- a/drivers/tty/moxa.c
+++ b/drivers/tty/moxa.c
@@ -1330,7 +1330,7 @@ static void moxa_start(struct tty_struct *tty)
if (ch == NULL)
return;
- if (!(ch->statusflags & TXSTOPPED))
+ if (!test_bit(TXSTOPPED, &ch-... |
0b479d54ae7b79f62f09ef977c2228e579924d38 | Analyze and fix the following issue in the Linux kernel code: TTY: pdc_cons, fix open vs pdc_console_tty_driver race | Problem Details:
Assign the pointer to pdc_console_tty_driver (a tty_driver) earlier.
Otherwise the timer may dereference NULL.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Helge Deller <deller@gmx.de>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Signed-off-by: Greg Kroah-H... | ```diff
diff --git a/arch/parisc/kernel/pdc_cons.c b/arch/parisc/kernel/pdc_cons.c
index 8ad05215d4b1..d14e20fc60df 100644
--- a/arch/parisc/kernel/pdc_cons.c
+++ b/arch/parisc/kernel/pdc_cons.c
@@ -160,9 +160,7 @@ static void pdc_console_poll(unsigned long unused)
static int __init pdc_console_tty_driver_init(void)... |
52b762f7a94c88e5a8aa2be67a06a6f01020cc82 | Analyze and fix the following issue in the Linux kernel code: TTY: pdc_cons, fix open vs timer race | Problem Details:
The timer is initialized too late. tty->open may fire an invalid
timer. So initialize the timer earlier using DEFINE_TIMER.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Helge Deller <deller@gmx.de>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Signed-off-by:... | ```diff
diff --git a/arch/parisc/kernel/pdc_cons.c b/arch/parisc/kernel/pdc_cons.c
index c1db65fc4525..8ad05215d4b1 100644
--- a/arch/parisc/kernel/pdc_cons.c
+++ b/arch/parisc/kernel/pdc_cons.c
@@ -90,7 +90,8 @@ static int pdc_console_setup(struct console *co, char *options)
#define PDC_CONS_POLL_DELAY (30 * HZ / 1... |
e380a81e34375a38f253b42394ef06ca3127559f | Analyze and fix the following issue in the Linux kernel code: TTY: pdc_cons, fix racy tty test | Problem Details:
The tty->count test in the timer was racy. Let's remove the test and
properly delete the timer and wait for the body to finish using _sync
version of del_timer.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Helge Deller <deller@gmx.de>
Cc: "James E.J. Bottomley" <... | ```diff
diff --git a/arch/parisc/kernel/pdc_cons.c b/arch/parisc/kernel/pdc_cons.c
index fc770be465ff..c1db65fc4525 100644
--- a/arch/parisc/kernel/pdc_cons.c
+++ b/arch/parisc/kernel/pdc_cons.c
@@ -103,7 +103,7 @@ static int pdc_console_tty_open(struct tty_struct *tty, struct file *filp)
static void pdc_console_tty_c... |
b8edebe4b8b4ad5bd436cf9080b77b29e219029a | Analyze and fix the following issue in the Linux kernel code: TTY: amiserial, use tty_port_close_end | Problem Details:
Hmm, the code was sleeping with interrupts disabled. This was not
good. Fix this by turning interrupts at an appropriate place. (The
race is protected by CLOSING flag.)
After the move, the code is identical to tty_port_close_end, so use
it!
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Geert Uytterh... | ```diff
diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c
index 8cc8e15c74d0..9c8b199bad35 100644
--- a/drivers/tty/amiserial.c
+++ b/drivers/tty/amiserial.c
@@ -1433,6 +1433,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
* the line discipline to only process XON/XOFF characters.
... |
6e9ebcfa20b15f0ccdd4b5395a3c63f79c21fa57 | Analyze and fix the following issue in the Linux kernel code: TTY: simserial, final cleanup | Problem Details:
* remove pointless checks (tty cannot be NULL at that points)
* fix some printks (use __func__, print text directly w/o using global
strings)
* remove some empty lines
This is the last patch for simserial. Overall, the driver is 400 lines
shorter. Being now at 560 lines.
It was tested using ski wit... | ```diff
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c
index 516ad09f3131..c34785dca92b 100644
--- a/arch/ia64/hp/sim/simserial.c
+++ b/arch/ia64/hp/sim/simserial.c
@@ -47,9 +47,6 @@ struct serial_state {
int x_char;
};
-static char *serial_name = "SimSerial driver";
-static char *serial_... |
8b916330567b0b788f35ded5d99a7ef7dc30b293 | Analyze and fix the following issue in the Linux kernel code: TTY: simserial, fix includes | Problem Details:
Use headers from linux/* instead of asm/. Remove declaration of
console_drivers, it's in linux/console.h already.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ```diff
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c
index d8237c341995..24d6ca04de86 100644
--- a/arch/ia64/hp/sim/simserial.c
+++ b/arch/ia64/hp/sim/simserial.c
@@ -24,14 +24,13 @@
#include <linux/capability.h>
#include <linux/circ_buf.h>
#include <linux/console.h>
+#include <linux/irq.... |
7210cb7a72a22303cdb225bd1aea28697a17bbae | Analyze and fix the following issue in the Linux kernel code: dlm: fix slow rsb search in dir recovery | Problem Details:
The function used to find an rsb during directory
recovery was searching the single linear list of
rsb's. This wasted a lot of time compared to
using the standard hash table to find the rsb.
Signed-off-by: David Teigland <teigland@redhat.com> | ```diff
diff --git a/fs/dlm/dir.c b/fs/dlm/dir.c
index 83641574b016..dc5eb598b81f 100644
--- a/fs/dlm/dir.c
+++ b/fs/dlm/dir.c
@@ -351,11 +351,28 @@ int dlm_dir_lookup(struct dlm_ls *ls, int nodeid, char *name, int namelen,
static struct dlm_rsb *find_rsb_root(struct dlm_ls *ls, char *name, int len)
{
struct dlm_rs... |
d852256389f1bcf506710ea5de77debde40013b9 | Analyze and fix the following issue in the Linux kernel code: TTY: simserial/amiserial, use one instance of other members | Problem Details:
This means:
* close_delay
* closing_wait
* line
* port
* xmit_fifo_size
This actually fixes a bug in amiserial. It initializes one and uses
the other of the close delays. Yes, duplicating structure members is
evil.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Geert Uytterhoeven <geert@linux-m68k.or... | ```diff
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c
index a08a53f033b4..d32b759b23f1 100644
--- a/arch/ia64/hp/sim/simserial.c
+++ b/arch/ia64/hp/sim/simserial.c
@@ -553,7 +553,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
}
if (--state->count < 0) {
printk(KE... |
0745d19abc492437e601c83281287d10202ee411 | Analyze and fix the following issue in the Linux kernel code: hpsim, fix SAL handling in fw-emu | Problem Details:
The switch-cases of SAL_FREQ_BASE generate non-relocatable code. The
same as for the ifs one level upper. This causes oopses early in boot
because the kernel jumps to the hell instead of the offset in sal
callback.
So use ifs here for SAL_FREQ_BASE decision too.
Isn't there any compiler directive or ... | ```diff
diff --git a/arch/ia64/hp/sim/boot/fw-emu.c b/arch/ia64/hp/sim/boot/fw-emu.c
index bf6d9d8c802f..0216e28300fa 100644
--- a/arch/ia64/hp/sim/boot/fw-emu.c
+++ b/arch/ia64/hp/sim/boot/fw-emu.c
@@ -160,28 +160,19 @@ sal_emulator (long index, unsigned long in1, unsigned long in2,
*/
status = 0;
if (index == ... |
8b0372a258e6bd0e9e5ea3f3d5f05a6bf3972fee | Analyze and fix the following issue in the Linux kernel code: driver core: minor comment formatting cleanups | Problem Details:
Came in in the deferred probe patch, quick, clean them up before a
kernel janitor finds them and sends me 4 individual patches to fix them
up...
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ```diff
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 9fa888e08059..1b1cbb571d38 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -80,8 +80,10 @@ static void deferred_probe_work_func(struct work_struct *work)
get_device(dev);
- /* Drop the mutex while probing each device; the probe path
- ... |
d06283341aee9e48eff1b068779d340785c635ce | Analyze and fix the following issue in the Linux kernel code: iscsi-target: Fix dynamic -> explict NodeACL pointer reference | Problem Details:
This patch fixes a free after use in lio_target_make_nodeacl() where
iscsi_node_acl was referenced from the original se_nacl_new allocation,
instead of from core_tpg_add_initiator_node_acl() in the case of dynamic
-> explict NodeACL conversion.
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellin... | ```diff
diff --git a/drivers/target/iscsi/iscsi_target_configfs.c b/drivers/target/iscsi/iscsi_target_configfs.c
index 6b35b37988ed..dcef63bf5f9d 100644
--- a/drivers/target/iscsi/iscsi_target_configfs.c
+++ b/drivers/target/iscsi/iscsi_target_configfs.c
@@ -812,9 +812,6 @@ static struct se_node_acl *lio_target_make_no... |
4da2405606d47ca767e0c6ba556f127cfa2181d0 | Analyze and fix the following issue in the Linux kernel code: TTY: serial, use atomic_inc_return in ioc4_serial | Problem Details:
We want to know the value of the atomic variable in intr_connect after
the increment. But atomic_inc doesn't, per definition, return the
value. It is just a pure coincidence that ia64 defines atomic_inc as
atomic_inc_return.
So fix this mistake by using atomic_inc_return properly.
Signed-off-by: Jir... | ```diff
diff --git a/drivers/tty/serial/ioc4_serial.c b/drivers/tty/serial/ioc4_serial.c
index 6b36c1554d7e..dfec69a310ab 100644
--- a/drivers/tty/serial/ioc4_serial.c
+++ b/drivers/tty/serial/ioc4_serial.c
@@ -975,7 +975,7 @@ intr_connect(struct ioc4_soft *soft, int type,
BUG_ON(!((type == IOC4_SIO_INTR_TYPE)
... |
c9ddb1d6e29697029118377c1f4f9a4a148d755e | Analyze and fix the following issue in the Linux kernel code: XTENSA: iss/console, fix potential deadlock | Problem Details:
If the timer ticks while we are holding the spinlock, the system
deadlocks. It is due to synchronous del_timer.
So to fix that, use spinlocks that properly disable bottom halves.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Chris Zankel <chris@zankel.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@l... | ```diff
diff --git a/arch/xtensa/platforms/iss/console.c b/arch/xtensa/platforms/iss/console.c
index 01842e4d1904..94ab8eca9d77 100644
--- a/arch/xtensa/platforms/iss/console.c
+++ b/arch/xtensa/platforms/iss/console.c
@@ -91,11 +91,10 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
*/
static void ... |
ecaa3bda65cefebfce11cc7be4b8d9203f5ce12c | Analyze and fix the following issue in the Linux kernel code: TTY: ipwireless, fix tty->index handling | Problem Details:
* do not test if tty->index is in bounds. It is always.
* tty->index is not a minor! Fix that.
>From now on, let's assume that the parameter of the function is tty
index with base being zero. This makes also the code more readable.
Factually, there is no real change as tty_driver->minor_start is zero... | ```diff
diff --git a/drivers/tty/ipwireless/tty.c b/drivers/tty/ipwireless/tty.c
index 6990b3b649d3..77ceaa9c9e3f 100644
--- a/drivers/tty/ipwireless/tty.c
+++ b/drivers/tty/ipwireless/tty.c
@@ -90,33 +90,23 @@ static void report_deregistering(struct ipw_tty *tty)
tty->index);
}
-static struct ipw_tty *get_... |
ee024d494ab75426bc77e0c053700915f0a1a16d | Analyze and fix the following issue in the Linux kernel code: ALPHA: srmcons, fix racy singleton structure | Problem Details:
The test and the assignment were racy. Make it really a singleton.
This is achieved by one global variable initialized at the module
init.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.c... | ```diff
diff --git a/arch/alpha/kernel/srmcons.c b/arch/alpha/kernel/srmcons.c
index f1fdf178bcb4..2c89ce5c9ab6 100644
--- a/arch/alpha/kernel/srmcons.c
+++ b/arch/alpha/kernel/srmcons.c
@@ -33,7 +33,7 @@ struct srmcons_private {
struct tty_struct *tty;
struct timer_list timer;
spinlock_t lock;
-};
+} srmcons_sin... |
2f16669d322e05171c9e1cfd94f402f7399bd2a3 | Analyze and fix the following issue in the Linux kernel code: TTY: remove re-assignments to tty_driver members | Problem Details:
All num, magic and owner are set by alloc_tty_driver. No need to
re-set them on each allocation site.
pti driver sets something different to what it passes to
alloc_tty_driver. It is not a bug, since we don't use the lines
parameter in any way. Anyway this is fixed, and now we do the right
thing.
Sig... | ```diff
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c
index bff0824cf8a4..f513dc02bb87 100644
--- a/arch/ia64/hp/sim/simserial.c
+++ b/arch/ia64/hp/sim/simserial.c
@@ -928,7 +928,6 @@ simrs_init (void)
/* Initialize the tty_driver structure */
- hp_simserial_driver->owner = THIS_MODULE;... |
1a54a76d5171f3ffd89eb69f6f38d535724e3d05 | Analyze and fix the following issue in the Linux kernel code: TTY: let alloc_tty_driver deduce the owner automatically | Problem Details:
Like the rest of the kernel, make a stub from alloc_tty_driver which
calls __alloc_tty_driver with proper owner. This will save us one more
assignment on the driver side.
Also this fixes some drivers which didn't set the owner. This allowed
user to remove the module from the system even though a tty f... | ```diff
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index f105ce5c8e6e..bd95cea3173b 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -3049,7 +3049,7 @@ void tty_unregister_device(struct tty_driver *driver, unsigned index)
}
EXPORT_SYMBOL(tty_unregister_device);
-struct tty_driver *alloc... |
5289475d1375017ab4288b276383e9684280876d | Analyze and fix the following issue in the Linux kernel code: vt: tackle the main part of the selection logic | Problem Details:
We leave the existing paste mess alone and just fix up the vt side of
things.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ```diff
diff --git a/drivers/tty/vt/selection.c b/drivers/tty/vt/selection.c
index 2a5091670927..8e9b4be97a2d 100644
--- a/drivers/tty/vt/selection.c
+++ b/drivers/tty/vt/selection.c
@@ -62,10 +62,14 @@ sel_pos(int n)
use_unicode);
}
-/* remove the current selection highlight, if any,
- from the console holdi... |
f44d4eb54432a0109ff15b2669c91f061428ff39 | Analyze and fix the following issue in the Linux kernel code: mac80211: update ieee80211_tx_rate_control kerneldoc | Problem Details:
* add entry for rate_idx_mcs_mask
* fix order of entries to represent the structs' order
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com> | ```diff
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index c06974accfa6..f7917f765cbc 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -3568,6 +3568,8 @@ enum rate_control_changed {
* @hw: The hardware the algorithm is invoked for.
* @sband: The band this frame is being transmitte... |
dbca36eab48ee48dfc60b8f41ffad54160ebdd09 | Analyze and fix the following issue in the Linux kernel code: tty: cyclades: TIOCSERGETLSR should should store to a uint | Problem Details:
TIOCSERGETLSR should be saved in a uint so the cast here to unsigned
long is a bug.
Reported-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ```diff
diff --git a/drivers/tty/cyclades.c b/drivers/tty/cyclades.c
index c9bf779481d8..5575fee7a55e 100644
--- a/drivers/tty/cyclades.c
+++ b/drivers/tty/cyclades.c
@@ -2413,7 +2413,7 @@ static int get_lsr_info(struct cyclades_port *info, unsigned int __user *value)
/* Not supported yet */
return -EINVAL;
}
-... |
1353a7ba7ebe62dedc60a5ba75c434cfad960ede | Analyze and fix the following issue in the Linux kernel code: iwlwifi: correct status bit refactoring errors | Problem Details:
I missed a couple of status bits in my refactoring changes. This
fixes the ones I missed.
Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com> | ```diff
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c
index 3ad43330f6a1..cc0227c1f352 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c
@@ -628,7 +628,7 @@ static int iwlagn_rx_card_state_notif(struct iwl_priv *pr... |
974205153be8944539890084a170e3ad407164bc | Analyze and fix the following issue in the Linux kernel code: iwlwifi: don't delete AP station directly | Problem Details:
With the mac80211 deauth sequence changes, the
station is deleted before the device is set
unassociated. This can cause the device to get
confused as it expects the station to be there
while the associated bit is set.
To fix this, do not delete the AP station from
the device when mac80211 asks for del... | ```diff
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
index 23e9eab477bb..c4175603864b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
@@ -546,6 +546,41 @@ out_err:
return -EINVAL;
}
+void iwl_deactivate... |
3a73a30049f20a0ff3ef1c5c10170a9c5539e042 | Analyze and fix the following issue in the Linux kernel code: iwlwifi: cleanup/fix memory barriers | Problem Details:
wmb(), rmb() are not needed when writel(), readl() are used as
accessors for MMIO. We use them indirectly via iowrite32(),
ioread32().
What is needed mmiowb(), for synchronizing writes coming from
different CPUs on PCIe bridge (see in patch comments). This
fortunately is not needed on x86, where mmiow... | ```diff
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index ce9ebeb89e4c..64bc2859dd1b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -334,7 +334,6 @@ static void iwl_print_cont_event_trace(struct iwl_priv *priv, u32 bas... |
a5f43138da9beddc46b00ec31d167143a7176683 | Analyze and fix the following issue in the Linux kernel code: tty: serial: OMAP: Fix oops due to NULL pdata in DT boot | Problem Details:
The following commit: be4b0281956c5cae4f63f31f11d07625a6988766
(tty: serial: OMAP: block idle while the UART is transferring data in PIO mode),
is introducing an oops if OMAP is booted using device tree blob because
the pdata will not be initialized.
Check if pdata is set before de-referencing it.
Si... | ```diff
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index f80904145fd4..0121486ac4fa 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -159,7 +159,7 @@ static void serial_omap_stop_tx(struct uart_port *port)
serial_out(up, UART_IER, up->ier);... |
4647ca5761f5534470e98d06494403a2fd0d7b32 | Analyze and fix the following issue in the Linux kernel code: ARM: OMAP2+: Fix build for omap4 only builds with missing include of linux/bug.h | Problem Details:
Found few more with randconfig generated .configs:
In file included from arch/arm/mach-omap2/prm-regbits-34xx.h:17,
from arch/arm/mach-omap2/vc.c:18:
arch/arm/mach-omap2/prm2xxx_3xxx.h: In function ‘omap2_prm_read_mod_reg’:
arch/arm/mach-omap2/prm2xxx_3xxx.h:239: error: implicit decla... | ```diff
diff --git a/arch/arm/mach-omap2/powerdomain44xx.c b/arch/arm/mach-omap2/powerdomain44xx.c
index a7880af4b3d9..601325b852a4 100644
--- a/arch/arm/mach-omap2/powerdomain44xx.c
+++ b/arch/arm/mach-omap2/powerdomain44xx.c
@@ -15,6 +15,7 @@
#include <linux/io.h>
#include <linux/errno.h>
#include <linux/delay.h>
... |
ec0d22e4d563e7cce9f6678e2000900755c2989d | Analyze and fix the following issue in the Linux kernel code: video:uvesafb: Fix oops that uvesafb try to execute NX-protected page | Problem Details:
This patch fixes the oops below
[ 81.560602] uvesafb: NVIDIA Corporation, GT216 Board - 0696a290, Chip Rev , OEM: NVIDIA, VBE v3.0
[ 81.609384] uvesafb: protected mode interface info at c000:d350
[ 81.609388] uvesafb: pmi: set display start = c00cd3b3, set palette = c00cd40e
[ 81.609390] uve... | ```diff
diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c
index e7f69ef572dc..f9a670d338d2 100644
--- a/drivers/video/uvesafb.c
+++ b/drivers/video/uvesafb.c
@@ -23,6 +23,7 @@
#include <video/uvesafb.h>
#ifdef CONFIG_X86
#include <video/vga.h>
+#include <linux/pci.h>
#endif
#ifdef CONFIG_MTRR
#includ... |
e71ff6f265c80b6f04f1d16470b5afa58f0b4648 | Analyze and fix the following issue in the Linux kernel code: udlfb: Fix invalid return codes in edid sysfs entry store function | Problem Details:
Return a negative errno instead of zero in the write function of
the sysfs entry in case of error.
Also add a check on the return value of dlfb_setup_modes().
Signed-off-by: Olivier Sobrie <olivier@sobrie.be>
Acked-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Florian Tobias Schandinat <Flo... | ```diff
diff --git a/drivers/video/udlfb.c b/drivers/video/udlfb.c
index 86c8b256e306..157df78e5bfc 100644
--- a/drivers/video/udlfb.c
+++ b/drivers/video/udlfb.c
@@ -1432,19 +1432,22 @@ static ssize_t edid_store(
struct device *fbdev = container_of(kobj, struct device, kobj);
struct fb_info *fb_info = dev_get_drvd... |
fb281c2d6910b56223bcfa78e140689273727eca | Analyze and fix the following issue in the Linux kernel code: staging: crystalhd: Fix typo in crystalhd_hw.c | Problem Details:
Correct spelling "interal" to "internal" in
drivers/staging/crystalhd/crystalhd_hw.c
Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ```diff
diff --git a/drivers/staging/crystalhd/crystalhd_hw.c b/drivers/staging/crystalhd/crystalhd_hw.c
index 88b538bfe7e3..e617d2fcbb1f 100644
--- a/drivers/staging/crystalhd/crystalhd_hw.c
+++ b/drivers/staging/crystalhd/crystalhd_hw.c
@@ -767,7 +767,7 @@ static enum BC_STATUS crystalhd_hw_fill_desc(struct crystalhd... |
3a21138d3f76296ad070a3692d72eb529e7d5d2c | Analyze and fix the following issue in the Linux kernel code: staging: android: ram_console: fix crash in ram_console_late_init | Problem Details:
If the persistent ram buffer is not available, ram_console_late_init
would crash when dereferencing ram_console_zone. Return early if
ram console was not initialized.
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: John Stultz <john.stu... | ```diff
diff --git a/drivers/staging/android/ram_console.c b/drivers/staging/android/ram_console.c
index 29d347e802ed..d956b8441442 100644
--- a/drivers/staging/android/ram_console.c
+++ b/drivers/staging/android/ram_console.c
@@ -150,6 +150,9 @@ static int __init ram_console_late_init(void)
struct proc_dir_entry *en... |
808d0387eb7df3f83352ca41f8c943cb3ed61246 | Analyze and fix the following issue in the Linux kernel code: staging: android: persistent_ram: make persistent_ram_write atomic | Problem Details:
Allow persistent_ram_write to be called on multiple cpus at
the same time, as long as ecc is not in use. Uses atomics
for the buffer->start and buffer->size counters.
[jstultz: Fix up some pr_info casting issues on 64bit]
CC: Greg KH <gregkh@linuxfoundation.org>
CC: Android Kernel Team <kernel-team@a... | ```diff
diff --git a/drivers/staging/android/persistent_ram.c b/drivers/staging/android/persistent_ram.c
index 81950e61db9b..3eb2fb44e99d 100644
--- a/drivers/staging/android/persistent_ram.c
+++ b/drivers/staging/android/persistent_ram.c
@@ -27,8 +27,8 @@
struct persistent_ram_buffer {
uint32_t sig;
- uint32_t... |
404a6043385de17273624b076599669db5ad891f | Analyze and fix the following issue in the Linux kernel code: staging: android: persistent_ram: handle reserving and mapping memory | Problem Details:
Replace the ioremapped memory passed in from the drivers with
a memblock_reserve and vmap. Adds a new function,
persistent_ram_early_init, designed to be called from the machine
init_early callback, that calls memblock_remove and saves the
provided persistent ram area layout.
Drivers only pass in the... | ```diff
diff --git a/drivers/staging/android/persistent_ram.c b/drivers/staging/android/persistent_ram.c
index 35c57a05f16d..81950e61db9b 100644
--- a/drivers/staging/android/persistent_ram.c
+++ b/drivers/staging/android/persistent_ram.c
@@ -12,12 +12,17 @@
*
*/
+#include <linux/device.h>
+#include <linux/err.h>... |
1b1301e67bbcad0649a8b3c6a944d2b2acddc411 | Analyze and fix the following issue in the Linux kernel code: [media] Fix small DocBook typo | Problem Details:
Here is a small patch which fixes a DocBook mistake in the decoder_cmd
documentation.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/Documentation/DocBook/media/v4l/vidioc-decoder-cmd.xml b/Documentation/DocBook/media/v4l/vidioc-decoder-cmd.xml
index 466fe27d3ffe..74b87f6e480a 100644
--- a/Documentation/DocBook/media/v4l/vidioc-decoder-cmd.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-decoder-cmd.xml
@@ -118,7 +118,7 @@ this ... |
d994c46d4309df85aea86049024cadfcbf523116 | Analyze and fix the following issue in the Linux kernel code: [media] staging: easycap: Fix incorrect comment | Problem Details:
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/staging/media/easycap/easycap_main.c b/drivers/staging/media/easycap/easycap_main.c
index 95f3cc1867db..d0fe34afc2e5 100644
--- a/drivers/staging/media/easycap/easycap_main.c
+++ b/drivers/staging/media/easycap/easycap_main.c
@@ -3542,9 +3542,8 @@ static int easycap_usb_probe(struct usb_int... |
d138210ffa90e6c78e3f7a2c348f50e865ff735c | Analyze and fix the following issue in the Linux kernel code: [media] smsdvb: fix get_frontend | Problem Details:
In the get_frontend function, an internal copy of the dtv_frontend_properties
struct (which is never initialized) is copied over the frontend property cache
data structure, resetting everything to 0.
In particular, the delivery system is reset to 0 (which is an invalid value)
so the driver stops workin... | ```diff
diff --git a/drivers/media/dvb/siano/smsdvb.c b/drivers/media/dvb/siano/smsdvb.c
index e2dc80da82cc..aa77e54a8fae 100644
--- a/drivers/media/dvb/siano/smsdvb.c
+++ b/drivers/media/dvb/siano/smsdvb.c
@@ -49,9 +49,6 @@ struct smsdvb_client_t {
struct completion tune_done;
- /* todo: save freq/band ins... |
ec9ee8e2ddb11deaf2b8c8fc703a86a8f815e64f | Analyze and fix the following issue in the Linux kernel code: [media] media: ir-sony-decoder: 15bit function decode fix | Problem Details:
The raw Sony IR decoder decodes 15bit messages slightly incorrectly.
To decode the function number, it shifts the bits right by 7 so that the
function is in bits 7:1, masks with 0xFD (0b11111101), and does an 8 bit
reverse so it ends up in bits 6:0. The mask should be 0xFE to correspond
with bits 7:1 (... | ```diff
diff --git a/drivers/media/rc/ir-sony-decoder.c b/drivers/media/rc/ir-sony-decoder.c
index d5e2b50aff1f..dab98b37621a 100644
--- a/drivers/media/rc/ir-sony-decoder.c
+++ b/drivers/media/rc/ir-sony-decoder.c
@@ -130,7 +130,7 @@ static int ir_sony_decode(struct rc_dev *dev, struct ir_raw_event ev)
case 15:
... |
c5f79f6a0c70a390d07bcea4d7df6219f78e0904 | Analyze and fix the following issue in the Linux kernel code: [media] [trivial] davinci: Fix typo in dm355_ccdvc.c | Problem Details:
Correct spelling "thresold" to "threshold" in
drivers/media/video/davinci/dm355_ccdc.c
Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/video/davinci/dm355_ccdc.c b/drivers/media/video/davinci/dm355_ccdc.c
index f83baf3a52b0..5b68847d4017 100644
--- a/drivers/media/video/davinci/dm355_ccdc.c
+++ b/drivers/media/video/davinci/dm355_ccdc.c
@@ -292,7 +292,7 @@ static int validate_ccdc_param(struct ccdc_config_params_raw ... |
b3f5badaa1108f9174f068b915700a9e2f2d9ae2 | Analyze and fix the following issue in the Linux kernel code: [media] cx18-driver: fix handling of 'radio' module parameter | Problem Details:
Reverse cx18-driver part of commit
90ab5ee94171b3e28de6bb42ee30b527014e0be7 and change
module_param_array() type from bool to int to fix
compiler warning:
In function ‘__check_radio’:
113:1: warning: return from incompatible pointer type [enabled by default]
At top level:
113:1: warning: initializatio... | ```diff
diff --git a/drivers/media/video/cx18/cx18-driver.c b/drivers/media/video/cx18/cx18-driver.c
index 349bd9c2aff5..935574511ff2 100644
--- a/drivers/media/video/cx18/cx18-driver.c
+++ b/drivers/media/video/cx18/cx18-driver.c
@@ -75,7 +75,7 @@ static int radio[CX18_MAX_CARDS] = { -1, -1, -1, -1, -1, -1, -1, -1,
... |
0d47bf5585b1240141c8fb84627e5c1a54ab7a6d | Analyze and fix the following issue in the Linux kernel code: [media] ivtv: Fix build warning | Problem Details:
In driver ivtv, there is a mismatch between the type of the radio module
parameter and the storage variable, which leads to the following
warning:
CC [M] drivers/media/video/ivtv/ivtv-driver.o
drivers/media/video/ivtv/ivtv-driver.c: In function ‘__check_radio’:
drivers/media/video/ivtv/ivtv-driver.... | ```diff
diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c
index cfc4276d907e..78c44cd3fb6d 100644
--- a/drivers/media/video/ivtv/ivtv-driver.c
+++ b/drivers/media/video/ivtv/ivtv-driver.c
@@ -99,7 +99,7 @@ static int i2c_clock_period[IVTV_MAX_CARDS] = { -1, -1, -1, -1, -1, -1,... |
25fa207157102162b1a6abba339dc5fe03f6adc5 | Analyze and fix the following issue in the Linux kernel code: [media] Add support for KWorld PC150-U ATSC hybrid tuner card | Problem Details:
[mchehab@redhat.com: CodingStyle fixes]
Signed-off-by: Kyle Strickland <kyle@kyle.strickland.name>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/Documentation/dvb/cards.txt b/Documentation/dvb/cards.txt
index cc09187a5db7..97709e9a3076 100644
--- a/Documentation/dvb/cards.txt
+++ b/Documentation/dvb/cards.txt
@@ -119,4 +119,5 @@ o Cards based on the Phillips saa7134 PCI bridge:
- Compro Videomate DVB-T300
- Compro Videomate DVB-T200
... |
3b2a63061ed69465cf851f93b7028ee8badb9d9c | Analyze and fix the following issue in the Linux kernel code: [media] s2255drv: fix some endian bugs | Problem Details:
I don't have this hardware and I don't know the subsystem very well. So
please review this patch carefully. The original code definitely looks
buggy though.
Sparse complains about some endian bugs where little endian bugs are
treated as cpu endian.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle... | ```diff
diff --git a/drivers/media/video/s2255drv.c b/drivers/media/video/s2255drv.c
index 350524246ce0..4894cbb1c547 100644
--- a/drivers/media/video/s2255drv.c
+++ b/drivers/media/video/s2255drv.c
@@ -134,7 +134,7 @@
/* usb config commands */
#define IN_DATA_TOKEN cpu_to_le32(0x2255c0de)
-#define CMD_2255 cpu_to_... |
8886a881e2379565808eacbadd129120967e3539 | Analyze and fix the following issue in the Linux kernel code: [media] media: i.MX27 camera: fix compilation warning | Problem Details:
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c
index 1a8e4676c8a7..1f7e36c2116e 100644
--- a/drivers/media/video/mx2_camera.c
+++ b/drivers/media/video/mx2_camera.c
@@ -1200,7 +1200,9 @@ static struct soc_camera_host_ops mx2_soc_camera_host_ops = {
static void mx27_camera_fram... |
a654ba16fdbad8ffb5a6c0dd5098c6651bde08b5 | Analyze and fix the following issue in the Linux kernel code: [media] media: i.MX27 camera: Use list_first_entry() whenever possible | Problem Details:
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
[g.liakhovetski@gmx.de: fix one list_first_entry() instance]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c
index 32a9d76d69c8..2d1941435786 100644
--- a/drivers/media/video/mx2_camera.c
+++ b/drivers/media/video/mx2_camera.c
@@ -449,7 +449,7 @@ static void mx25_camera_frame_done(struct mx2_camera_dev *pcdev, int fb,
buf = NULL;
wr... |
d84279e6d7266e11bef19de4f624849daa70bc48 | Analyze and fix the following issue in the Linux kernel code: [media] media i.MX27 camera: handle overflows properly | Problem Details:
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c
index fc5ffe47c558..32a9d76d69c8 100644
--- a/drivers/media/video/mx2_camera.c
+++ b/drivers/media/video/mx2_camera.c
@@ -1198,7 +1198,7 @@ static struct soc_camera_host_ops mx2_soc_camera_host_ops = {
};
static void mx27_camer... |
cdc9d6f191d81aa1b1b34db9d3a33f779f5c5ec7 | Analyze and fix the following issue in the Linux kernel code: [media] media i.MX27 camera: improve discard buffer handling | Problem Details:
The way discard buffer was previously handled lead
to possible races that made a buffer that was not
yet ready to be overwritten by new video data. This
is easily detected at 25fps just adding "#define DEBUG"
to enable the "memset" check and seeing how the image
is corrupted.
A new "discard" queue and... | ```diff
diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c
index 2e232092fc10..fc5ffe47c558 100644
--- a/drivers/media/video/mx2_camera.c
+++ b/drivers/media/video/mx2_camera.c
@@ -235,7 +235,8 @@ struct mx2_buffer {
struct list_head queue;
enum mx2_buffer_state state;
- int bufnum... |
9587190107d0c0cbaccbf7bf6b0245d29095a9ae | Analyze and fix the following issue in the Linux kernel code: KVM: nVMX: Fix erroneous exception bitmap check | Problem Details:
The code which checks whether to inject a pagefault to L1 or L2 (in
nested VMX) was wrong, incorrect in how it checked the PF_VECTOR bit.
Thanks to Dan Carpenter for spotting this.
Signed-off-by: Nadav Har'El <nyh@il.ibm.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Avi Kiv... | ```diff
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 4a722a0b8e13..2c22fc788da2 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -1664,7 +1664,7 @@ static int nested_pf_handled(struct kvm_vcpu *vcpu)
struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
/* TODO: also check PFEC_MATCH/MASK, not just E... |
fac3368310765ade6bbdf07c9acdb04210e8b5b0 | Analyze and fix the following issue in the Linux kernel code: KVM: PMU: Fix raw event check | Problem Details:
If eventsel has EDGE, INV or CMASK set we should create raw counter for
it, but the check is done on a wrong variable. Fix it.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com> | ```diff
diff --git a/arch/x86/kvm/pmu.c b/arch/x86/kvm/pmu.c
index 6af9a542e541..b52a8ed283b2 100644
--- a/arch/x86/kvm/pmu.c
+++ b/arch/x86/kvm/pmu.c
@@ -223,7 +223,7 @@ static void reprogram_gp_counter(struct kvm_pmc *pmc, u64 eventsel)
event_select = eventsel & ARCH_PERFMON_EVENTSEL_EVENT;
unit_mask = (eventsel ... |
9ee73970c03edb68146ceb1ba2a7033c99a5e017 | Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Fix delayed load of shared MSRs | Problem Details:
Shared MSRs (MSR_*STAR and related) are stored in both vmx->guest_msrs
and in the CPU registers, but vmx_set_msr() only updated memory. Prior
to 46199f33c2953, this didn't matter, since we called vmx_load_host_state(),
which scheduled a vmx_save_host_state(), which re-synchronized the CPU
state, but no... | ```diff
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 124a0952a040..4a722a0b8e13 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -2210,6 +2210,9 @@ static int vmx_set_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 data)
msr = find_msr_entry(vmx, msr_index);
if (msr) {
msr->data = data;... |
3e515705a1f46beb1c942bb8043c16f8ac7b1e9e | Analyze and fix the following issue in the Linux kernel code: KVM: Ensure all vcpus are consistent with in-kernel irqchip settings | Problem Details:
If some vcpus are created before KVM_CREATE_IRQCHIP, then
irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading
to potential NULL pointer dereferences.
Fix by:
- ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called
- ensuring that a vcpu has an apic if it is installed... | ```diff
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
index d8ddbba6fe7d..f5104b7c52cd 100644
--- a/arch/ia64/kvm/kvm-ia64.c
+++ b/arch/ia64/kvm/kvm-ia64.c
@@ -1172,6 +1172,11 @@ out:
#define PALE_RESET_ENTRY 0x80000000ffffffb0UL
+bool kvm_vcpu_compatible(struct kvm_vcpu *vcpu)
+{
+ return ir... |
ea5e97e8bf1d56a4d9461c39e082b9c31a7be4ff | Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Fix CPL updates | Problem Details:
Keep CPL at 0 in real mode and at 3 in VM86. In protected/long mode, use
RPL rather than DPL of the code segment.
Signed-off-by: Kevin Wolf <kwolf@redhat.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 95cdeaf9c718..ab39d84dee00 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -1332,6 +1332,21 @@ static void svm_vcpu_put(struct kvm_vcpu *vcpu)
wrmsrl(host_save_user_msrs[i], svm->host_user_msrs[i]);
}
+static void svm_update_cpl(struct... |
7f3d35fddd173e52886d03bc34b5b5d6f5bea343 | Analyze and fix the following issue in the Linux kernel code: KVM: x86 emulator: Fix task switch privilege checks | Problem Details:
Currently, all task switches check privileges against the DPL of the
TSS. This is only correct for jmp/call to a TSS. If a task gate is used,
the DPL of this take gate is used for the check instead. Exceptions,
external interrupts and iret shouldn't perform any check.
[avi: kill kvm-kmod remnants]
Si... | ```diff
diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h
index 7b9cfc4878af..df437b68f42b 100644
--- a/arch/x86/include/asm/kvm_emulate.h
+++ b/arch/x86/include/asm/kvm_emulate.h
@@ -388,7 +388,7 @@ bool x86_page_table_writing_insn(struct x86_emulate_ctxt *ctxt);
#define EMULATION_I... |
75ca61c101601a7071d93571920be9697b3fda9b | Analyze and fix the following issue in the Linux kernel code: GFS2: Remove a __GFP_NOFAIL allocation | Problem Details:
In order to ensure that we've got enough buffer heads for flushing
the journal, the orignal code used __GFP_NOFAIL when performing
this allocation. Here we dispense with that in favour of using a
mempool. This should improve efficiency in low memory conditions
since flushing the journal is a good way t... | ```diff
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index fe369bd9e10c..87e6e0d66bb7 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -12,6 +12,7 @@
#include <linux/spinlock.h>
#include <linux/completion.h>
#include <linux/buffer_head.h>
+#include <linux/mempool.h>
#include <linux/gfs2_ondisk.h>
#include <linu... |
851755871c1f3184f4124c466e85881f17fa3226 | Analyze and fix the following issue in the Linux kernel code: KVM: s390: Sanitize fpc registers for KVM_SET_FPU | Problem Details:
commit 7eef87dc99e419b1cc051e4417c37e4744d7b661 (KVM: s390: fix
register setting) added a load of the floating point control register
to the KVM_SET_FPU path. Lets make sure that the fpc is valid.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@re... | ```diff
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 0b91679369bc..121316ef2e15 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -460,7 +460,7 @@ int kvm_arch_vcpu_ioctl_get_sregs(struct kvm_vcpu *vcpu,
int kvm_arch_vcpu_ioctl_set_fpu(struct kvm_vcpu *vcpu, struct kvm_f... |
6dbf79e7164e9a86c1e466062c48498142ae6128 | Analyze and fix the following issue in the Linux kernel code: KVM: Fix write protection race during dirty logging | Problem Details:
This patch fixes a race introduced by:
commit 95d4c16ce78cb6b7549a09159c409d52ddd18dae
KVM: Optimize dirty logging by rmap_write_protect()
During protecting pages for dirty logging, other threads may also try
to protect a page in mmu_sync_children() or kvm_mmu_get_page().
In such a case, because... | ```diff
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index e86f9b22eaca..3df0b7a140b0 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3065,6 +3065,8 @@ static void write_protect_slot(struct kvm *kvm,
unsigned long *dirty_bitmap,
unsigned long nr_dirty_pages)
{
+ spin_lock(&kv... |
b183aa580a3a09b5d79224a9022418508532c778 | Analyze and fix the following issue in the Linux kernel code: KVM: Fix last_guest_tsc / tsc_offset semantics | Problem Details:
The variable last_guest_tsc was being used as an ad-hoc indicator
that guest TSC has been initialized and recorded correctly. However,
it may not have been, it could be that guest TSC has been set to some
large value, the back to a small value (by, say, a software reboot).
This defeats the logic and ... | ```diff
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 030d495e5c78..2a59f76d96f1 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1079,6 +1079,7 @@ void kvm_write_tsc(struct kvm_vcpu *vcpu, u64 data)
vcpu->arch.hv_clock.tsc_timestamp = 0;
vcpu->arch.last_tsc_write = data;
vcpu->arch.last_... |
5d3cb0f6a8e3af018a522ae8d36f8f7d2511b5d8 | Analyze and fix the following issue in the Linux kernel code: KVM: Improve TSC offset matching | Problem Details:
There are a few improvements that can be made to the TSC offset
matching code. First, we don't need to call the 128-bit multiply
(especially on a constant number), the code works much nicer to
do computation in nanosecond units.
Second, the way everything is setup with software TSC rate scaling,
we c... | ```diff
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index ddebbe01fff9..8a34fca6c572 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -513,6 +513,7 @@ struct kvm_arch {
u64 last_tsc_nsec;
u64 last_tsc_offset;
u64 last_tsc_write;
+ u32 last_ts... |
cc578287e3224d0da196cc1d226bdae6b068faa7 | Analyze and fix the following issue in the Linux kernel code: KVM: Infrastructure for software and hardware based TSC rate scaling | Problem Details:
This requires some restructuring; rather than use 'virtual_tsc_khz'
to indicate whether hardware rate scaling is in effect, we consider
each VCPU to always have a virtual TSC rate. Instead, there is new
logic above the vendor-specific hardware scaling that decides whether
it is even necessary to use a... | ```diff
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 782d973b0719..ddebbe01fff9 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -422,10 +422,11 @@ struct kvm_vcpu_arch {
u64 last_kernel_ns;
u64 last_tsc_nsec;
u64 last_tsc_write;
- u32 v... |
34817174fca0c5512c2d5b6ea0fc37a0337ce1d8 | Analyze and fix the following issue in the Linux kernel code: [media] lgdt330x: fix signedness error in i2c_read_demod_bytes() | Problem Details:
The error handling in lgdt3303_read_status() and lgdt330x_read_ucblocks()
doesn't work, because i2c_read_demod_bytes() returns a u8 and (err < 0)
is always false.
err = i2c_read_demod_bytes(state, 0x58, buf, 1);
if (err < 0)
return err;
Change the return type of i2c_re... | ```diff
diff --git a/drivers/media/dvb/frontends/lgdt330x.c b/drivers/media/dvb/frontends/lgdt330x.c
index c990d35a13dc..e046622df0e4 100644
--- a/drivers/media/dvb/frontends/lgdt330x.c
+++ b/drivers/media/dvb/frontends/lgdt330x.c
@@ -104,8 +104,8 @@ static int i2c_write_demod_bytes (struct lgdt330x_state* state,
* t... |
bdb2c41fc12b627e0e870b141341ded5772bab70 | Analyze and fix the following issue in the Linux kernel code: [media] [trivial]: Fix typo in radio-sf16fmr2.c | Problem Details:
Correct spelling "contrls" to "controls" in
drivers/media/radio/radio-sf16fmr2.c
Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/radio/radio-sf16fmr2.c b/drivers/media/radio/radio-sf16fmr2.c
index 2dd485996ba8..7ab9afadf29b 100644
--- a/drivers/media/radio/radio-sf16fmr2.c
+++ b/drivers/media/radio/radio-sf16fmr2.c
@@ -172,7 +172,7 @@ static int fmr2_tea_ext_init(struct snd_tea575x *tea)
fmr2->volume = v4l2_... |
f8f7be019ac801950512cfb040949ccc380be301 | Analyze and fix the following issue in the Linux kernel code: [media] as102: map URB DMA addresses in the driver | Problem Details:
On a set-top-box based on the Broadcom 7405 SoC (MIPS), the Abilis as102 driver
causes a kernel oops while trying to map the URB stream buffers DMA addresses:
CPU 0 Unable to handle kernel paging request at virtual address 007b9900,
epc == 80010cc4, ra == 8039d108
Call Trace:
[<80010cc4>] mips_dma_ma... | ```diff
diff --git a/drivers/staging/media/as102/as102_usb_drv.c b/drivers/staging/media/as102/as102_usb_drv.c
index d775be0173ea..8d2c84c36a5c 100644
--- a/drivers/staging/media/as102/as102_usb_drv.c
+++ b/drivers/staging/media/as102/as102_usb_drv.c
@@ -270,6 +270,8 @@ static int as102_alloc_usb_stream_buffer(struct a... |
0c07aec31a98a63ee83f2bbad4a2fab0e0f58d33 | Analyze and fix the following issue in the Linux kernel code: [media] staging: go7007: fix mismatch in mutex lock-unlock in [read|write]_reg_fp | Problem Details:
If go7007_usb_vendor_request() fails in write_reg_fp()
or in read_reg_fp(), the usb->i2c_lock mutex left locked.
The patch moves mutex_unlock(&usb->i2c_lock) before check
for go7007_usb_vendor_request() returned value.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Ale... | ```diff
diff --git a/drivers/staging/media/go7007/s2250-board.c b/drivers/staging/media/go7007/s2250-board.c
index e7736a915530..014d38410c99 100644
--- a/drivers/staging/media/go7007/s2250-board.c
+++ b/drivers/staging/media/go7007/s2250-board.c
@@ -192,6 +192,7 @@ static int write_reg_fp(struct i2c_client *client, u1... |
06302ffbb470359c8cbcf1ee8b057d6930300f90 | Analyze and fix the following issue in the Linux kernel code: [media] cx22702: Fix signal strength | Problem Details:
The signal strength value returned is not quite correct, it decreases
when I increase the gain of my antenna, and vice versa. It also
doesn't span over the whole 0x0000-0xffff range. Compute a value which
at least increases when signal strength increases, and spans the whole
allowed range.
In practice... | ```diff
diff --git a/drivers/media/dvb/frontends/cx22702.c b/drivers/media/dvb/frontends/cx22702.c
index faba82485086..edc8eafc5c09 100644
--- a/drivers/media/dvb/frontends/cx22702.c
+++ b/drivers/media/dvb/frontends/cx22702.c
@@ -502,10 +502,26 @@ static int cx22702_read_signal_strength(struct dvb_frontend *fe,
u16 ... |
6028c3268404c1323da09b1dc5bbff56b79364a1 | Analyze and fix the following issue in the Linux kernel code: [media] gspca - zc3xx: Fix bad sensor values when changing autogain | Problem Details:
The setexposure added in commit 590f21680616 works only for the sensor hv7131r,
but it is called for all sensors when changing the autogain.
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c
index 2ff96ca2ceec..091000611528 100644
--- a/drivers/media/video/gspca/zc3xx.c
+++ b/drivers/media/video/gspca/zc3xx.c
@@ -5884,6 +5884,8 @@ static void getexposure(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *)... |
f1801904eeb79f46e7854e4d18c7107160a16093 | Analyze and fix the following issue in the Linux kernel code: [media] gspca - zc3xx: Do automatic transfer control for hv7131r and pas202b | Problem Details:
The bridge register 11 reports the current transfer status.
This value is used to know about a possible overflow and to adjust
the transfer parameters (registers 07 and 08).
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c
index c02fb31987cc..d6175f5d1056 100644
--- a/drivers/media/video/gspca/zc3xx.c
+++ b/drivers/media/video/gspca/zc3xx.c
@@ -57,6 +57,9 @@ struct sd {
struct gspca_ctrl ctrls[NCTRLS];
+ struct work_struct work;
+ struct work... |
fb6f8c0269644a19ee5e9bd6db080b364ab28ea7 | Analyze and fix the following issue in the Linux kernel code: [media] s5p-jpeg: Adapt to new controls | Problem Details:
Adapt to new controls (subsampling).
For encoding, the destination format now needs to be set to V4L2_PIX_FMT_JPEG
and the subsampling (4:2:2 or 4:2:0) needs to be set using the respective
control (V4L2_CID_JPEG_CHROMA_SUBSAMPLING). Required buffer size for
destination image during encoding is no long... | ```diff
diff --git a/drivers/media/video/s5p-jpeg/jpeg-core.c b/drivers/media/video/s5p-jpeg/jpeg-core.c
index c104aeb2455d..5a49c307f9c1 100644
--- a/drivers/media/video/s5p-jpeg/jpeg-core.c
+++ b/drivers/media/video/s5p-jpeg/jpeg-core.c
@@ -32,10 +32,9 @@
static struct s5p_jpeg_fmt formats_enc[] = {
{
- .name ... |
c7e23289a6aa95048a78b252b462f24ca6cf7f96 | Analyze and fix the following issue in the Linux kernel code: x86/32: Print control and debug registers for kerenel context | Problem Details:
While for a user mode register dump it may be reasonable to skip
those (albeit x86-64 doesn't do so), for kernel mode dumps these
should be printed to make sure all information possibly
necessary for analysis is available.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Link: http://lkml.kernel.org/r/4... | ```diff
diff --git a/arch/x86/kernel/dumpstack_32.c b/arch/x86/kernel/dumpstack_32.c
index c99f9ed013d5..88ec9129271d 100644
--- a/arch/x86/kernel/dumpstack_32.c
+++ b/arch/x86/kernel/dumpstack_32.c
@@ -87,7 +87,7 @@ void show_registers(struct pt_regs *regs)
int i;
print_modules();
- __show_regs(regs, 0);
+ __sho... |
38aa4a568ba4c3ccba83e862a01e3e60e3b811ee | Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix hdmi duallink checks | Problem Details:
All pre-SI chips are limited to 165 Mhz for single link.
Code in question will be re-enabled when SI support is added.
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=44755
https://bugzilla.kernel.org/show_bug.cgi?id=42887
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.ke... | ```diff
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index 8b3d8ed52ff6..8c9a8115b632 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -1057,7 +1057,7 @@ static int radeon_dvi_mode_valid(struct drm_connect... |
4231d47e6fe69f061f96c98c30eaf9fb4c14b96d | Analyze and fix the following issue in the Linux kernel code: net/usbnet: avoid recursive locking in usbnet_stop() | Problem Details:
|kernel BUG at kernel/rtmutex.c:724!
|[<c029599c>] (rt_spin_lock_slowlock+0x108/0x2bc) from [<c01c2330>] (defer_bh+0x1c/0xb4)
|[<c01c2330>] (defer_bh+0x1c/0xb4) from [<c01c3afc>] (rx_complete+0x14c/0x194)
|[<c01c3afc>] (rx_complete+0x14c/0x194) from [<c01cac88>] (usb_hcd_giveback_urb+0xa0/0xf0)
|[<c01c... | ```diff
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index fae0fbd8bc88..81b96e303757 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -589,6 +589,7 @@ static int unlink_urbs (struct usbnet *dev, struct sk_buff_head *q)
entry = (struct skb_data *) skb->cb;
urb = entry->u... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.