id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
c5cacb3bf91b0841e5a721ca303658a407d5c34f | Analyze and fix the following issue in the Linux kernel code: ethoc: fix library build errors | Problem Details:
ethoc indirectly uses crc32_le() and bitrev32(), so select
those library functions to be built.
drivers/built-in.o: In function `ethoc_set_multicast_list':
ethoc.c:(.text+0x6226f): undefined reference to `crc32_le'
ethoc.c:(.text+0x62276): undefined reference to `bitrev32'
Signed-off-by: Randy Dunlap... | ```diff
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 9e7baec45720..78585fb3bdb5 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -977,6 +977,8 @@ config ETHOC
depends on NET_ETHERNET && HAS_IOMEM
select MII
select PHYLIB
+ select CRC32
+ select BITREVERSE
help
Say Y here if you ... |
c56c81abe7e684bc6203632d807303eb765690dc | Analyze and fix the following issue in the Linux kernel code: dmatest: fix max channels handling | Problem Details:
The check for reaching max_channels is short circuited by 'continuing'
after successfully adding a channel.
[ Impact: make the 'max_channels' module parameter actually have an effect ]
Cc: <stable@kernel.org>
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Dan Williams <dan.j.williams@i... | ```diff
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index a27c0fb1bc11..fb7da5141e96 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -531,9 +531,7 @@ static int __init dmatest_init(void)
chan = dma_request_channel(mask, filter, NULL);
if (chan) {
err = dmatest_add_channel(chan... |
1b9493248cf5e9f1ecc045488100cbf3ccd91be1 | Analyze and fix the following issue in the Linux kernel code: RDMA/nes: Fix SFP+ PHY initialization | Problem Details:
SFP+ PHY initialization has very long delays, incorrect settings for
direct attach copper cables, and inconsistent link detection.
Adjust delays to the minimum required by the PHY. Worst case is now
less than 4 seconds. Add new register settings for direct attach
cables. Change link detection logic... | ```diff
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c
index 52e734042b8e..466c730e6297 100644
--- a/drivers/infiniband/hw/nes/nes_hw.c
+++ b/drivers/infiniband/hw/nes/nes_hw.c
@@ -757,6 +757,10 @@ static int nes_init_serdes(struct nes_device *nesdev, u8 hw_rev, u8 port_count,
... |
9a5a2cac9f99c98d9d15cec17b1904f29d0e8009 | Analyze and fix the following issue in the Linux kernel code: xen: resume interrupts before system devices. | Problem Details:
Impact: bugfix Xen domain restore
Otherwise the first timer interrupt after resume is missed and we never
get another.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | ```diff
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
index 0d61db1e7b49..4b5b84837ee1 100644
--- a/drivers/xen/manage.c
+++ b/drivers/xen/manage.c
@@ -62,14 +62,15 @@ static int xen_suspend(void *data)
gnttab_resume();
xen_mm_unpin_all();
- sysdev_resume();
-
if (!*cancelled) {
xen_irq_resume();
... |
e3f8a74e3a884b91a4390c66ed8175ef74db7067 | Analyze and fix the following issue in the Linux kernel code: xen/mmu: weaken flush_tlb_other test | Problem Details:
Impact: fixes crashing bug
There's no particular problem with getting an empty cpu mask,
so just shortcut-return if we get one.
Avoids crash reported by Christophe Saout <christophe@saout.de>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | ```diff
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index 4db24e1393a2..7ef880c51dca 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -1302,8 +1302,8 @@ static void xen_flush_tlb_others(const struct cpumask *cpus,
} *args;
struct multicall_space mcs;
- BUG_ON(cpumask_empty(cpus));
- BUG_ON(!mm... |
5962c2c8036b4dcf10ec6c481be656ae4700b664 | Analyze and fix the following issue in the Linux kernel code: RDMA/nes: Fix nes_nic_cm_xmit() error handling | Problem Details:
We are getting crash or hung situation when we are running network
cable pull tests during RDMA traffic.
In schedule_nes_timer(), we return an error if nes_nic_cm_xmit()
returns failure. This is changed to success as skb is being put on
the timer routines to be processed later. In send_syn() case, w... | ```diff
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
index a09caf5b387d..dbd9a75474e3 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -446,8 +446,8 @@ int schedule_nes_timer(struct nes_cm_node *cm_node, struct sk_buff *skb,
if (ret !... |
79fc3d7410c861c8ced5b81a5c3759f6bbf891dc | Analyze and fix the following issue in the Linux kernel code: RDMA/nes: Fix error handling issues | Problem Details:
Fix issues found by static code analysis:
(1) Check if cm_node was successfully created for loopback connection.
(2) schedule_nes_timer() does not free up allocated memory after
encountering an error. There is a WARN_ON() for this condition.
(3) there is a cm_node->freed flag which is set but n... | ```diff
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
index 7c942470b980..a09caf5b387d 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -426,6 +426,7 @@ int schedule_nes_timer(struct nes_cm_node *cm_node, struct sk_buff *skb,
if (type =... |
7a5efb62f6ae366cefac6be475434906c5061e15 | Analyze and fix the following issue in the Linux kernel code: RDMA/nes: Fix incorrect casts on 32-bit architectures | Problem Details:
The were some incorrect casts to unsigned long that caused 64-bit values
to be truncated on 32-bit architectures and made the driver pass invalid
adresses and lengths to the hardware. The problems were primarily seen
with kernels with highmem configured but some could show up in
non-highmem kernels, t... | ```diff
diff --git a/drivers/infiniband/hw/nes/nes.h b/drivers/infiniband/hw/nes/nes.h
index 04b12ad23390..17621de54a9f 100644
--- a/drivers/infiniband/hw/nes/nes.h
+++ b/drivers/infiniband/hw/nes/nes.h
@@ -289,8 +289,8 @@ static inline __le32 get_crc_value(struct nes_v4_quad *nes_quad)
static inline void
set_wqe_64b... |
d2ca39f262806aa2f035f680a14aa55ff9e3d889 | Analyze and fix the following issue in the Linux kernel code: RDMA/cma: Create cm id even when IB port is down | Problem Details:
When doing rdma_resolve_addr(), if the relevant IB port is down, the
function fails and the cm_id is not bound to the correct device.
Therefore, application does not have a device handle and cannot wait
for the port to become active. The function fails because the
underlying IPoIB interface is not joi... | ```diff
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 3f9c03a36571..851de83ff455 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -297,21 +297,25 @@ static void cma_detach_from_dev(struct rdma_id_private *id_priv)
id_priv->cma_dev = NULL;
}
-stati... |
1207cf8eb99d8c699919e352292bdf1f519fbba5 | Analyze and fix the following issue in the Linux kernel code: NULL noise: arch/x86/xen/smp.c | Problem Details:
Fix this sparse warnings:
arch/x86/xen/smp.c:316:52: warning: Using plain integer as NULL pointer
arch/x86/xen/smp.c:421:60: warning: Using plain integer as NULL pointer
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | ```diff
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
index 585a6e330837..429834ec1687 100644
--- a/arch/x86/xen/smp.c
+++ b/arch/x86/xen/smp.c
@@ -317,7 +317,7 @@ static int __cpuinit xen_cpu_up(unsigned int cpu)
BUG_ON(rc);
while(per_cpu(cpu_state, cpu) != CPU_ONLINE) {
- HYPERVISOR_sched_op(SCHEDOP_yie... |
c667d5d6a77a5f33f9181bcf92a04fdc69712a2b | Analyze and fix the following issue in the Linux kernel code: xen: remove xen_load_gdt debug | Problem Details:
Don't need the noise.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | ```diff
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 334d2ffc4e2a..5d9a1c37c515 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -310,9 +310,6 @@ static void xen_load_gdt(const struct desc_ptr *dtr)
frames[f] = mfn;
- printk("xen_load_gdt: %d va=%p mfn=%lx pfn=%l... |
a8fe29d8bcdfbf85ba26c7f3522c4bdfbc83e71d | Analyze and fix the following issue in the Linux kernel code: omap_hsmmc: Do not expect cmd/data to be non-null when CC/TC occurs | Problem Details:
With spurious interrupt cmd can be null even when we have CC
set in irq status.
Fixes: NB#106295 - prevent potential kernel crash in the MMC driver
Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>
Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Pierre Ossman <pierre@ossm... | ```diff
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index d765df29ee15..e62a22a7f00c 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -493,7 +493,7 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id)
/* Flush posted write */
OMAP_HSMMC_READ(host-... |
d31f65e8464927f2cfdee6b0b01b9e3a8ce5db9c | Analyze and fix the following issue in the Linux kernel code: mmc: Fix compile for omap_hsmmc.c | Problem Details:
This fixes the issue noted by Russell King:
drivers/mmc/host/omap_hsmmc.c: In function 'mmc_omap_xfer_done':
drivers/mmc/host/omap_hsmmc.c:301: error: implicit declaration of function 'mmc_omap_fclk_lazy_disable'
This got broken by 4a694dc915c9a223044ce21fc0d99e63facd1d64.
Signed-off-by: Tony Lindgr... | ```diff
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index a752788fa4e9..d765df29ee15 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -298,7 +298,6 @@ mmc_omap_xfer_done(struct mmc_omap_host *host, struct mmc_data *data)
struct mmc_request *mrq = host->... |
3a709703538c471530405556dda136fd0d82b0dc | Analyze and fix the following issue in the Linux kernel code: ptrace: some checkpatch fixes | Problem Details:
This fixes all the checkpatch --file complaints about kernel/ptrace.c
and also removes an unused #include. I've verified that there are no
changes to the compiled code on x86_64.
Signed-off-by: Roland McGrath <roland@redhat.com>
[ Removed the parts that just split a line - Linus ]
Signed-off-by: Lin... | ```diff
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index aaad0ec34194..64191fa09b7e 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -21,9 +21,7 @@
#include <linux/audit.h>
#include <linux/pid_namespace.h>
#include <linux/syscalls.h>
-
-#include <asm/pgtable.h>
-#include <asm/uaccess.h>
+#include <linux/uac... |
4c967291fc875a53de7126d256ad5e48f42a6521 | Analyze and fix the following issue in the Linux kernel code: nommu: fix typo vma->pg_off to vma->vm_pgoff | Problem Details:
6260a4b0521a41189b2c2a8119096c1e21dbdf2c ("/proc/pid/maps: don't show
pgoff of pure ANON VMAs" had a typo.
fs/proc/task_nommu.c:138: error: 'struct vm_area_struct' has no member named 'pg_off'
distcc[21484] ERROR: compile fs/proc/task_nommu.c on sprygo/32 failed
Signed-off-by: Nobuhiro Iwamatsu <iwam... | ```diff
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
index 12c20377772d..64a72e2e7650 100644
--- a/fs/proc/task_nommu.c
+++ b/fs/proc/task_nommu.c
@@ -135,7 +135,7 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma)
struct inode *inode = vma->vm_file->f_path.dentry->d_inode;
d... |
2b3fffefea993a94c386b2d96de2d09469c343d1 | Analyze and fix the following issue in the Linux kernel code: befs: fix build on parisc | Problem Details:
fs/befs/super.c:85: error: 'PAGE_SIZE' undeclared
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/fs/befs/super.c b/fs/befs/super.c
index 41f2b4d0093e..ca40f828f64d 100644
--- a/fs/befs/super.c
+++ b/fs/befs/super.c
@@ -8,6 +8,7 @@
*/
#include <linux/fs.h>
+#include <asm/page.h> /* for PAGE_SIZE */
#include "befs.h"
#include "super.h"
``` |
2bc43b5cf5158a26fa1328234795abed2dff5275 | Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix use of uninitialized var in 40a5f0de | Problem Details:
i915_gem_put_relocs_to_user returned an uninitialized value which
got returned to userspace. This caused libdrm in my setup to never
get out of a do{}while() loop retrying i915_gem_execbuffer.
result was hanging X, overheating of cpu and 2-3gb of logfile-spam.
This patch adresses the issue by
1. ini... | ```diff
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 33ab07b0d712..6f7d0e27036f 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -141,15 +141,18 @@ fast_shmem_read(struct page **pages,
int length)
{
char __iomem *vaddr;
- int ret;
+ int ... |
6115707be0e85a9b825f10e95143cb705b87fef8 | Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix a mismerge of the IGD patch (new .find_pll hooks missed) | Problem Details:
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net> | ```diff
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 64773ce52964..c2c8e95ff14d 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -367,6 +367,7 @@ static const intel_limit_t intel_limits[] = {
.p1 = { .min = I9XX_P... |
808382b33bb4c60df6379ec2db39f332cc56b82a | Analyze and fix the following issue in the Linux kernel code: perf_counter: kerneltop: keep up with ABI changes | Problem Details:
Update kerneltop to use PERF_EVENT_MISC_OVERFLOW
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
LKML-Reference: <20090408130408.947197470@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu> | ```diff
diff --git a/Documentation/perf_counter/kerneltop.c b/Documentation/perf_counter/kerneltop.c
index 15f3a5f90198..042c1b83a872 100644
--- a/Documentation/perf_counter/kerneltop.c
+++ b/Documentation/perf_counter/kerneltop.c
@@ -1277,22 +1277,22 @@ static void mmap_read(struct mmap_data *md)
old += size;
-... |
6b6e5486b3a168f0328c82a8d4376caf901472b1 | Analyze and fix the following issue in the Linux kernel code: perf_counter: use misc field to widen type | Problem Details:
Push the PERF_EVENT_COUNTER_OVERFLOW bit into the misc field so that
we can have the full 32bit for PERF_RECORD_ bits.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
LKML-Reference: <20090408130408.891867663@... | ```diff
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h
index 5bd8817b12d4..4809ae18a940 100644
--- a/include/linux/perf_counter.h
+++ b/include/linux/perf_counter.h
@@ -201,8 +201,9 @@ struct perf_counter_mmap_page {
__u32 data_head; /* head in the data section */
};
-#define PERF_EVEN... |
e30e08f65c7ef6c230424264f09c3d53f117f58b | Analyze and fix the following issue in the Linux kernel code: perf_counter: fix NMI race in task clock | Problem Details:
We should not be updating ctx->time from NMI context, work around that.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
LKML-Reference: <20090408130408.681326666@chello.nl>
Signed-off-by: Ingo Molnar <mingo@el... | ```diff
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c
index 863703b3158f..84a39081344c 100644
--- a/kernel/perf_counter.c
+++ b/kernel/perf_counter.c
@@ -319,8 +319,6 @@ static void __perf_counter_disable(void *info)
spin_lock_irqsave(&ctx->lock, flags);
- update_context_time(ctx);
-
/*
* If the... |
c5da9a2bb24a7928c39495cdabf98d3f7931bde5 | Analyze and fix the following issue in the Linux kernel code: x86: DMI match for the Dell DXP061 as it needs BIOS reboot | Problem Details:
Closes http://bugzilla.kernel.org/show_bug.cgi?12901
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
LKML-Reference: <20090326204524.4454.8776.stgit@localhost.localdomain>
Signed-off-by: Ingo Molnar <mingo@elte.hu> | ```diff
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 2aef36d8aca2..1340dad417f4 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -224,6 +224,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "Dell XPS710"),
},
},
+ {... |
8f2e586567b1bad72dac7c3810fe9a2ef7117506 | Analyze and fix the following issue in the Linux kernel code: posix-timers: fix RLIMIT_CPU && setitimer(CPUCLOCK_PROF) | Problem Details:
update_rlimit_cpu() tries to optimize out set_process_cpu_timer() in case
when we already have CPUCLOCK_PROF timer which should expire first. But it
uses cputime_lt() instead of cputime_gt().
Test case:
int main(void)
{
struct itimerval it = {
.it_value = { .tv_sec = 1000 },
};
assert(!se... | ```diff
diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c
index 8e5d9a68b022..bb53185d8c78 100644
--- a/kernel/posix-cpu-timers.c
+++ b/kernel/posix-cpu-timers.c
@@ -18,7 +18,7 @@ void update_rlimit_cpu(unsigned long rlim_new)
cputime = secs_to_cputime(rlim_new);
if (cputime_eq(current->signal->i... |
6279a751fe096a21dc7704e918d570d3ff06e769 | Analyze and fix the following issue in the Linux kernel code: posix-timers: fix RLIMIT_CPU && fork() | Problem Details:
See http://bugzilla.kernel.org/show_bug.cgi?id=12911
copy_signal() copies signal->rlim, but RLIMIT_CPU is "lost". Because
posix_cpu_timers_init_group() sets cputime_expires.prof_exp = 0 and thus
fastpath_timer_check() returns false unless we have other expired cpu timers.
Change copy_signal() to set ... | ```diff
diff --git a/kernel/fork.c b/kernel/fork.c
index 4854c2c4a82e..9b51a1b190d4 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -808,6 +808,12 @@ static void posix_cpu_timers_init_group(struct signal_struct *sig)
sig->cputime_expires.virt_exp = cputime_zero;
sig->cputime_expires.sched_exp = 0;
+ if (sig->rl... |
022624a758dc9489388a99ad29577b4c8c09237c | Analyze and fix the following issue in the Linux kernel code: printk: fix wrong format string iter for printk | Problem Details:
printk("%Q");
Output before patch: %QQ
Output after patch: %Q
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Acked-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: torvalds@linux-foundation.org
Cc: Steven Rostedt <rostedt@goodmis.org>
LKML-Referen... | ```diff
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index be3001f912e4..7536acea135b 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -1051,13 +1051,6 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
if (str < end)
*str = '%';
++str;
- if (*fmt) {
- if (str < end)
- *str... |
dd6b02fe427f30520d0adc94aa52352367227873 | Analyze and fix the following issue in the Linux kernel code: swiotlb: map_page fix for highmem systems | Problem Details:
The current code calls virt_to_phys() on address that might
be in highmem, which is bad. This wasn't needed, anyway, because
we already have the physical address we need.
Get rid of the now-unused virtual address as well.
Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
Acked-by: FUJITA Tomon... | ```diff
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 4fd6a76e728c..e8a47c8cf77e 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -640,7 +640,6 @@ dma_addr_t swiotlb_map_page(struct device *dev, struct page *page,
struct dma_attrs *attrs)
{
phys_addr_t phys = page_to_phys(page) + offset;
- void *ptr = pa... |
67131ad0514d7105b55003a0506209cf1bba3f00 | Analyze and fix the following issue in the Linux kernel code: swiotlb: fix compile warning | Problem Details:
Squash a build warning seen on 32-bit powerpc caused by
calling min() with 2 different types. Use min_t() instead.
Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Cc: jeremy@goop.org... | ```diff
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 170cf56af6a9..4fd6a76e728c 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -341,7 +341,7 @@ static void swiotlb_bounce(phys_addr_t phys, char *dma_addr, size_t size,
unsigned long flags;
while (size) {
- sz = min(PAGE_SIZE - offset, size);
+ sz = mi... |
ceb5ac3264686e75e6951de6a18d4baa9bdecb92 | Analyze and fix the following issue in the Linux kernel code: swiotlb: comment corrections | Problem Details:
Impact: cleanup
swiotlb_map/unmap_single are now swiotlb_map/unmap_page;
trivially change all the comments to reference new names.
Also, there were some comments that should have been
referring to just plain old map_single, not swiotlb_map_single;
fix those as well.
Also change a use of the word "po... | ```diff
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 2b0b5a7d2ced..170cf56af6a9 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -60,8 +60,8 @@ enum dma_sync_target {
int swiotlb_force;
/*
- * Used to do a quick range check in swiotlb_unmap_single and
- * swiotlb_sync_single_*, to see if the memory was in fact... |
ac15e95090c2588ada4904c8c4ae8edd347acdf0 | Analyze and fix the following issue in the Linux kernel code: leds: just ignore invalid GPIOs in leds-gpio | Problem Details:
Fix build problems with leds-gpio:
CC drivers/leds/leds-gpio.o
drivers/leds/leds-gpio.c: In function 'create_gpio_led':
drivers/leds/leds-gpio.c:85: warning: 'return' with no value, in function returning non-void
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Ri... | ```diff
diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
index 102ef4a14c5f..d2109054de85 100644
--- a/drivers/leds/leds-gpio.c
+++ b/drivers/leds/leds-gpio.c
@@ -82,7 +82,7 @@ static int __devinit create_gpio_led(const struct gpio_led *template,
if (!gpio_is_valid(template->gpio)) {
printk(KERN_IN... |
54c28d294c658abb6d6430a49fda230fdfd601c8 | Analyze and fix the following issue in the Linux kernel code: x86, uv: add Kconfig dependency on NUMA for UV systems | Problem Details:
Impact: build fix
Add Kconfig dependency on NUMA for enabling UV. Although it might
be possible to configure non-NUMA UV systems, they are unsupported
and not interesting. Much of the infrastructure for UV requires
NUMA support.
Signed-off-by: Jack Steiner <steiner@sgi.com>
LKML-Reference: <200904032... | ```diff
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 748e50a1a152..2817ab5a1204 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -354,6 +354,7 @@ config X86_UV
bool "SGI Ultraviolet"
depends on X86_64
depends on X86_EXTENDED_PLATFORM
+ depends on NUMA
select X86_X2APIC
---help---
This opt... |
f0edef8c8b35f04b89311590dd6f1249f07fab3a | Analyze and fix the following issue in the Linux kernel code: xsysace: Fix dereferencing of cf_id after hd_driveid removal | Problem Details:
Commit 4aaf2fec718f6fbf38668edf733a0ab09a49cab1 (xsysace: make it
'struct hd_driveid'-free) converted the cf_id member of 'struct
ace_device' from a 'struct hd_driveid' to a u16 array. However,
references to the base of the structure were still using the '&'
operator. When the address was used with t... | ```diff
diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c
index 6cccdc3f5220..4aecf5dc6a93 100644
--- a/drivers/block/xsysace.c
+++ b/drivers/block/xsysace.c
@@ -563,7 +563,7 @@ static void ace_fsm_dostate(struct ace_device *ace)
case ACE_FSM_STATE_IDENTIFY_PREPARE:
/* Send identify command */
ace-... |
4109d19af73826aa6fee1a1b951670381be88f8b | Analyze and fix the following issue in the Linux kernel code: ide: move common code out of tf_load() method | Problem Details:
Move device register masking (and setting drive->select) out of tf_load() method
and into the only function that needs to use this code, do_rw_taskfile()...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
[bart: fix whitespace error]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.co... | ```diff
diff --git a/drivers/ide/ide-io-std.c b/drivers/ide/ide-io-std.c
index 45a424b60c85..7950b3bb4312 100644
--- a/drivers/ide/ide-io-std.c
+++ b/drivers/ide/ide-io-std.c
@@ -93,16 +93,12 @@ void ide_tf_load(ide_drive_t *drive, struct ide_cmd *cmd)
void (*tf_outb)(u8 addr, unsigned long port);
u8 valid = cmd->v... |
745483f10c6cefb303007c6873e2bfce54efa8ed | Analyze and fix the following issue in the Linux kernel code: ide: simplify 'struct ide_taskfile' | Problem Details:
Make 'struct ide_taskfile' cover only 8 register values and thus put two such
fields ('tf' and 'hob') into 'struct ide_cmd', dropping unnecessary 'tf_array'
field from it.
This required changing the prototype of ide_get_lba_addr() and ide_tf_dump().
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista... | ```diff
diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c
index f0db4d349c60..77f79d26b264 100644
--- a/drivers/ide/ide-acpi.c
+++ b/drivers/ide/ide-acpi.c
@@ -318,7 +318,7 @@ static int do_drive_set_taskfiles(ide_drive_t *drive,
/* convert GTF to taskfile */
memset(&cmd, 0, sizeof(cmd));
- memcpy(&... |
674f0ea111bc9bff1b4e4841d7da38933c5e3b59 | Analyze and fix the following issue in the Linux kernel code: ide-cd: fix intendation in cdrom_decode_status() | Problem Details:
Based on earlier work by Borislav Petkov.
Fix intendation in cdrom_decode_status(), no real code changes.
While at it:
- beautify comments
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Borislav Petkov <petkov... | ```diff
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index ffbaa6d578ff..3ce1eafef5e4 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -311,7 +311,7 @@ static int cdrom_decode_status(ide_drive_t *drive, u8 stat)
{
ide_hwif_t *hwif = drive->hwif;
struct request *rq = hwif->rq;
- int err, ... |
aa24d9783d1dcba1a25451dadb6fb0ee092bd8df | Analyze and fix the following issue in the Linux kernel code: tx4939ide: Fix tx4939ide_{in,out}put_data_swap argument | Problem Details:
The commit adb1af9 ("ide: pass command instead of request to
ide_pio_datablock()") missed tx4939ide driver.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | ```diff
diff --git a/drivers/ide/tx4939ide.c b/drivers/ide/tx4939ide.c
index f9b68783d393..bee9461f13b3 100644
--- a/drivers/ide/tx4939ide.c
+++ b/drivers/ide/tx4939ide.c
@@ -445,7 +445,7 @@ static void tx4939ide_tf_load(ide_drive_t *drive, struct ide_cmd *cmd)
#ifdef __BIG_ENDIAN
/* custom iops (independent from S... |
aa07573b2bd0fee5a7537cb663fbb2de60278801 | Analyze and fix the following issue in the Linux kernel code: ide: Fix host drivers that need IRQF_SHARED | Problem Details:
commit 255115fb35f80735c21a1cbe9809e9795a3af26e ("ide: allow host drivers to
specify IRQ flags") added irq_flags fields to struct ide_port_info and struct
ide_host. Drivers can now set ide_port_info.irq_flags = IRQF_SHARED, while
init_irq() passes ide_host.irq_flags to request_irq().
Unfortunately id... | ```diff
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index d8c1c3e735bb..c1ef8c8c785e 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1314,6 +1314,7 @@ struct ide_host *ide_host_alloc(const struct ide_port_info *d, hw_regs_t **hws)
host->get_lock = d->get_lock;
host->r... |
4ecf458492c2d97b3f9d850a5f92d79792e0a7e7 | Analyze and fix the following issue in the Linux kernel code: x86_64: fix incorrect comments | Problem Details:
Impact: cleanup
The comments which fxrstor_checking and fxsave_uset refer to is
now in fxsave. Change the comments appropriately.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
LKML-Reference: <1239190320-23952-3-git-send-email-jirislaby@gmail.com>
Signed-off-by:... | ```diff
diff --git a/arch/x86/include/asm/i387.h b/arch/x86/include/asm/i387.h
index 7a6f21d95cf4..63d185087d91 100644
--- a/arch/x86/include/asm/i387.h
+++ b/arch/x86/include/asm/i387.h
@@ -67,7 +67,7 @@ static inline int fxrstor_checking(struct i387_fxsave_struct *fx)
".previous\n"
_ASM_EXTABLE(1b, 3b... |
dc66270b51a62b1a6888d5309229e638a305c47b | Analyze and fix the following issue in the Linux kernel code: perf_counter: fix powerpc build | Problem Details:
Commit 4af4998b ("perf_counter: rework context time") changed struct
perf_counter_context to have a 'time' field instead of a 'time_now'
field, but neglected to fix the place in the powerpc perf_counter.c
where the time_now field was accessed. This fixes it.
Signed-off-by: Paul Mackerras <paulus@samb... | ```diff
diff --git a/arch/powerpc/kernel/perf_counter.c b/arch/powerpc/kernel/perf_counter.c
index f88c35d0710a..0e5651385ddc 100644
--- a/arch/powerpc/kernel/perf_counter.c
+++ b/arch/powerpc/kernel/perf_counter.c
@@ -457,8 +457,7 @@ static void counter_sched_in(struct perf_counter *counter, int cpu)
{
counter->sta... |
7816238a539bf56311f04e7ff17076f66d5c902a | Analyze and fix the following issue in the Linux kernel code: sparc: Fix section mismatch warnings in cs4231 sound driver. | Problem Details:
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c
index 7d93fa705ccf..8d13d933087d 100644
--- a/sound/sparc/cs4231.c
+++ b/sound/sparc/cs4231.c
@@ -703,7 +703,7 @@ static int snd_cs4231_timer_stop(struct snd_timer *timer)
return 0;
}
-static void __init snd_cs4231_init(struct snd_cs4231 *chip)
+stat... |
9a2ed5cc9ef6cb60abd3ea66d7be549d8023581a | Analyze and fix the following issue in the Linux kernel code: sparc64: Fix section mismatch warnings in PCI controller drivers. | Problem Details:
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/arch/sparc/kernel/pci_fire.c b/arch/sparc/kernel/pci_fire.c
index 9462b68f4894..d53f45bc7dda 100644
--- a/arch/sparc/kernel/pci_fire.c
+++ b/arch/sparc/kernel/pci_fire.c
@@ -409,8 +409,8 @@ static void pci_fire_hw_init(struct pci_pbm_info *pbm)
upa_writeq(~(u64)0, pbm->pbm_regs + FIRE_PEC_IENAB);... |
19ab6db66ce1b32de54ecb474f16ade3247f8323 | Analyze and fix the following issue in the Linux kernel code: sparc64: Fix section mismatch warnings in power driver. | Problem Details:
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/arch/sparc/kernel/power.c b/arch/sparc/kernel/power.c
index ae88f06a7ec4..e2a045c235a1 100644
--- a/arch/sparc/kernel/power.c
+++ b/arch/sparc/kernel/power.c
@@ -23,7 +23,7 @@ static irqreturn_t power_handler(int irq, void *dev_id)
return IRQ_HANDLED;
}
-static int __init has_button_interrupt(... |
0ce49d6da993adf8b17b7f3ed9805ade14a6a6f3 | Analyze and fix the following issue in the Linux kernel code: qla1280: Fix off-by-some error in firmware loading. | Problem Details:
We were calculating the wrong address for the start of the data.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Tested-by: Jeremy Higdon <jeremy@sgi.com> | ```diff
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
index 351b56ced925..d030db93d55b 100644
--- a/drivers/scsi/qla1280.c
+++ b/drivers/scsi/qla1280.c
@@ -1663,7 +1663,7 @@ qla1280_load_firmware_pio(struct scsi_qla_host *ha)
/* Load RISC code. */
risc_address = ha->fwstart;
- fw_data = (const __le... |
fc8a9d830fdbc72545187a42f8d71b9fa95764dd | Analyze and fix the following issue in the Linux kernel code: [WATCHDOG] i6300esb.c: Restructure initialization of the device | Problem Details:
The i6300ESB watchdog should be stopped before userspace has access to the
watchdog. So fix this and restructure the initialization sequence into:
* See if we have a i6300 device
* make sure that we have valid module parameters
* Initialize the device
* register the /dev/watchdog device so that use... | ```diff
diff --git a/drivers/watchdog/i6300esb.c b/drivers/watchdog/i6300esb.c
index 8a0ef65a0691..7ba0b11ec525 100644
--- a/drivers/watchdog/i6300esb.c
+++ b/drivers/watchdog/i6300esb.c
@@ -123,7 +123,7 @@ static int esb_timer_start(void)
esb_unlock_registers();
writew(ESB_WDT_RELOAD, ESB_RELOAD_REG);
/* Enable ... |
31838d9dac17dce6d68d985fd28c10d7a756dc4d | Analyze and fix the following issue in the Linux kernel code: [WATCHDOG] i6300esb.c: Fix the GETSTATUS and GETBOOTSTATUS ioctls. | Problem Details:
The WDIOC_GETSTATUS and WDIOC_GETBOOTSTATUS should return WDIOF_* flags
(and not counter values, ...)
Signed-off-by: Wim Van Sebroeck <wim@iguana.be> | ```diff
diff --git a/drivers/watchdog/i6300esb.c b/drivers/watchdog/i6300esb.c
index cfbb01c43163..8a0ef65a0691 100644
--- a/drivers/watchdog/i6300esb.c
+++ b/drivers/watchdog/i6300esb.c
@@ -68,6 +68,7 @@
#define ESB_WDT_INTTYPE (0x11 << 0) /* Interrupt type on timer1 timeout */
/* Reload register bits */
+#defi... |
52ce67f157f8c5623524dc6c5b2ddd6a0d2aa774 | Analyze and fix the following issue in the Linux kernel code: powerpc/mm: Fix compile warning | Problem Details:
arch/powerpc/mm/tlb_nohash.c: In function 'flush_tlb_mm':
arch/powerpc/mm/tlb_nohash.c:128: warning: unused variable 'cpu_mask'
Signed-off-by: Kumar Gala <galak@kernel.crashing.org> | ```diff
diff --git a/arch/powerpc/mm/tlb_nohash.c b/arch/powerpc/mm/tlb_nohash.c
index 7af72970faed..ad2eb4d34dd4 100644
--- a/arch/powerpc/mm/tlb_nohash.c
+++ b/arch/powerpc/mm/tlb_nohash.c
@@ -125,7 +125,6 @@ static void do_flush_tlb_page_ipi(void *param)
void flush_tlb_mm(struct mm_struct *mm)
{
- cpumask_t cpu_... |
b35346fd25f3c8c0b6afeb778f8c4f41c5703c84 | Analyze and fix the following issue in the Linux kernel code: sh: Provide cpumask_of_pcibus() to fix NUMA build. | Problem Details:
Signed-off-by: Paul Mundt <lethal@linux-sh.org> | ```diff
diff --git a/arch/sh/include/asm/topology.h b/arch/sh/include/asm/topology.h
index a3f239545897..8489a0905a87 100644
--- a/arch/sh/include/asm/topology.h
+++ b/arch/sh/include/asm/topology.h
@@ -37,8 +37,11 @@
#define pcibus_to_node(bus) ((void)(bus), -1)
#define pcibus_to_cpumask(bus) (pcibus_to_node(bus) ==... |
fdbdc7fc79c02ae4ede869d514179a2c65633d28 | Analyze and fix the following issue in the Linux kernel code: ACPICA: delete check for AML access to port 0x81-83 | Problem Details:
Sony laptops apparently write 4-bytes (rather than 1 byte)
to debug port 0x80, which spews error messages:
Denied AML access to port 0x00000080/4 (DMA1 0x0081-0x0083) [20090320]
http://bugzilla.kernel.org/show_bug.cgi?id=13036
Signed-off-by: Len Brown <len.brown@intel.com> | ```diff
diff --git a/drivers/acpi/acpica/hwvalid.c b/drivers/acpi/acpica/hwvalid.c
index bd3c937b0ac0..7737afb157c3 100644
--- a/drivers/acpi/acpica/hwvalid.c
+++ b/drivers/acpi/acpica/hwvalid.c
@@ -90,7 +90,6 @@ static const struct acpi_port_info acpi_protected_ports[] = {
{"PIT2", 0x0048, 0x004B, ACPI_OSI_WIN_XP},
... |
2b2ec7554cf7ec5e4412f89a5af6abe8ce950700 | Analyze and fix the following issue in the Linux kernel code: NFS: Fix the return value in nfs_page_mkwrite() | Problem Details:
Commit c2ec175c39f62949438354f603f4aa170846aabb ("mm: page_mkwrite
change prototype to match fault") exposed a bug in the NFS
implementation of page_mkwrite. We should be returning 0 on success...
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linu... | ```diff
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 3523b895eb4b..5a97bcfe03e5 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -516,8 +516,6 @@ static int nfs_vm_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
goto out_unlock;
ret = nfs_updatepage(filp, page, 0, pagelen);
- if (ret == 0)
- ... |
5d38258ec026921a7b266f4047ebeaa75db358e5 | Analyze and fix the following issue in the Linux kernel code: ACPI battery: fix async boot oops | Problem Details:
> BUG: unable to handle kernel NULL pointer dereference at (null)
What happens is that the battery module's init sections are being freed
before the async callback (which was marked __init) has run. This theory
is supported by the fact that the bad RIP value is a vmalloc address.
The immediate fix is... | ```diff
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index b0de6312919a..3c7d8942f23b 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -903,7 +903,7 @@ static struct acpi_driver acpi_battery_driver = {
},
};
-static void __init acpi_battery_init_async(void *unused, async_cookie_... |
1e274a582710e95d93b86e8d47e9fcce4ca09d01 | Analyze and fix the following issue in the Linux kernel code: x86, setup: un-resequence mode setting for VGA 80x34 and 80x60 modes | Problem Details:
Impact: Fixes these modes on at least one system
The rewrite of the setup code into C resequenced the font setting and
register reprogramming phases of configuring nonstandard VGA modes
which use 480 scan lines in text mode. However, there exists at least
one board (Micro-Star MS-7383 version 2.0) on... | ```diff
diff --git a/arch/x86/boot/video-vga.c b/arch/x86/boot/video-vga.c
index 95d86ce0421c..9e0587a37768 100644
--- a/arch/x86/boot/video-vga.c
+++ b/arch/x86/boot/video-vga.c
@@ -129,22 +129,18 @@ u16 vga_crtc(void)
return (inb(0x3cc) & 1) ? 0x3d4 : 0x3b4;
}
-static void vga_set_480_scanlines(int lines)
+stati... |
aeeae86859f4319de0a4946b44771d9926eeed54 | Analyze and fix the following issue in the Linux kernel code: Fix build errors due to CONFIG_BRANCH_TRACER=y | Problem Details:
The code that enables branch tracing for all (non-constant) branches
plays games with the preprocessor and #define's the C 'if ()' construct
to do tracing.
That's all fine, but it fails for some unusual but valid C code that is
sometimes used in macros, notably by the intel-iommu code:
if (i=drhd->i... | ```diff
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 6faa7e549de4..cebfdcd3dbdd 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -114,7 +114,9 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
* "Define 'is'", Bill Clinton
* "Define 'if... |
7bfac9ecf0585962fe13584f5cf526d8c8e76f17 | Analyze and fix the following issue in the Linux kernel code: splice: fix deadlock in splicing to file | Problem Details:
There's a possible deadlock in generic_file_splice_write(),
splice_from_pipe() and ocfs2_file_splice_write():
- task A calls generic_file_splice_write()
- this calls inode_double_lock(), which locks i_mutex on both
pipe->inode and target inode
- ordering depends on inode pointers, can happen tha... | ```diff
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index a5887df2cd8a..8672b9536039 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -1926,7 +1926,7 @@ static ssize_t ocfs2_file_splice_write(struct pipe_inode_info *pipe,
out->f_path.dentry->d_name.len,
out->f_path.dentry->d_name.name);
- inode_do... |
e62687468588f47c32256e3c8c36157c40111b6e | Analyze and fix the following issue in the Linux kernel code: nilfs2: super block operations fix endian bug | Problem Details:
This adds a missing endian conversion of checksum field in the super
block. This fixes compatibility issue on big endian machines which will
come to surface after supporting recovery of super block.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: Andrew Morton <akpm@linu... | ```diff
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c
index d0639a6aae9e..b7519c327ba7 100644
--- a/fs/nilfs2/super.c
+++ b/fs/nilfs2/super.c
@@ -287,9 +287,9 @@ int nilfs_commit_super(struct nilfs_sb_info *sbi)
sbp->s_free_blocks_count = cpu_to_le64(nfreeblocks);
sbp->s_wtime = cpu_to_le64(get_seconds());
s... |
dc498d09be28172846cacded35ca2378222a8c7b | Analyze and fix the following issue in the Linux kernel code: nilfs2: use fixed sized types for ioctl structures | Problem Details:
Nilfs ioctl had structures not having fixed sized types such as:
struct nilfs_argv {
void *v_base;
size_t v_nmembs;
size_t v_size;
int v_index;
int v_flags;
};
Further, some of them are wrongly aligned:
e.g.
struct nilfs_cpmode {
__u64 cm... | ```diff
diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c
index 85a291ccc1be..7fbd9fe1d035 100644
--- a/fs/nilfs2/ioctl.c
+++ b/fs/nilfs2/ioctl.c
@@ -41,6 +41,7 @@ static int nilfs_ioctl_wrap_copy(struct the_nilfs *nilfs,
void *, size_t, size_t))
{
void *buf;
+ void __user *base = (void __user *)(unsigned... |
76068c4ff1cc03d9d24d17fd9e6a1475bc2f6730 | Analyze and fix the following issue in the Linux kernel code: nilfs2: fix buggy behavior seen in enumerating checkpoints | Problem Details:
This will fix the weird behavior of lscp command in listing continuously
created checkpoints; the output of lscp is rewinded regularly for the
recent nilfs. As a result of debugging, a defect was found in
nilfs_cpfile_do_get_cpinfo() function.
Though the function can be repeatedly called to enumerate... | ```diff
diff --git a/fs/nilfs2/cpfile.c b/fs/nilfs2/cpfile.c
index 50dff147744f..218b34418508 100644
--- a/fs/nilfs2/cpfile.c
+++ b/fs/nilfs2/cpfile.c
@@ -382,13 +382,13 @@ static void nilfs_cpfile_checkpoint_to_cpinfo(struct inode *cpfile,
ci->ci_next = le64_to_cpu(cp->cp_snapshot_list.ssl_next);
}
-static ssize_... |
7fa10d20012296300dfe645cb3e628a4e9a0d5ef | Analyze and fix the following issue in the Linux kernel code: nilfs2: fix improper return values of nilfs_get_cpinfo ioctl | Problem Details:
A few tool developers gave me requests for fixing inconvenient return
value of nilfs_get_cpinfo() ioctl; if the requested mode is NILFS_SNAPSHOT
and the specified start entry is not a snapshot, the ioctl unnaturally
returns one as the number of acquired snapshot item.
In addition, the ioctl function r... | ```diff
diff --git a/fs/nilfs2/cpfile.c b/fs/nilfs2/cpfile.c
index a4c9550fd774..50dff147744f 100644
--- a/fs/nilfs2/cpfile.c
+++ b/fs/nilfs2/cpfile.c
@@ -431,7 +431,7 @@ static ssize_t nilfs_cpfile_do_get_ssinfo(struct inode *cpfile, __u64 *cnop,
__u64 curr = *cnop, next;
unsigned long curr_blkoff, next_blkoff;
... |
b028fcfc4cd198a6aa1ffcfb872073ccc1db3459 | Analyze and fix the following issue in the Linux kernel code: nilfs2: fix gc failure on volumes keeping numerous snapshots | Problem Details:
This resolves the following failure of nilfs2 cleaner daemon:
nilfs_cleanerd[20670]: cannot clean segments: No such file or directory
nilfs_cleanerd[20670]: shutdown
When creating thousands of snapshots, the cleaner daemon had rarely died
as above due to an error returned from the kernel code.
Aft... | ```diff
diff --git a/fs/nilfs2/cpfile.c b/fs/nilfs2/cpfile.c
index 82462acd06ee..a4c9550fd774 100644
--- a/fs/nilfs2/cpfile.c
+++ b/fs/nilfs2/cpfile.c
@@ -422,20 +422,20 @@ static ssize_t nilfs_cpfile_do_get_cpinfo(struct inode *cpfile, __u64 cno,
return ret;
}
-static ssize_t nilfs_cpfile_do_get_ssinfo(struct ino... |
3358b4aaa84fd4c1cdd64391875e92cbb8afeb29 | Analyze and fix the following issue in the Linux kernel code: nilfs2: fix problems of memory allocation in ioctl | Problem Details:
This is another patch for fixing the following problems of a memory
copy function in nilfs2 ioctl:
(1) It tries to allocate 128KB size of memory even for small objects.
(2) Though the function repeatedly tries large memory allocations
while reducing the size, GFP_NOWAIT flag is not specified.
... | ```diff
diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c
index 35ba60ea9617..02e91e167ca2 100644
--- a/fs/nilfs2/ioctl.c
+++ b/fs/nilfs2/ioctl.c
@@ -34,9 +34,6 @@
#include "dat.h"
-#define KMALLOC_SIZE_MIN 4096 /* 4KB */
-#define KMALLOC_SIZE_MAX 131072 /* 128 KB */
-
static int nilfs_ioctl_wrap_copy(struct the... |
f30bf3e40f80ef50c17f55271deae3abc03e793e | Analyze and fix the following issue in the Linux kernel code: nilfs2: fix missed-sync issue for do_sync_mapping_range() | Problem Details:
Chris Mason pointed out that there is a missed sync issue in
nilfs_writepages():
On Wed, 17 Dec 2008 21:52:55 -0500, Chris Mason wrote:
> It looks like nilfs_writepage ignores WB_SYNC_NONE, which is used by
> do_sync_mapping_range().
where WB_SYNC_NONE in do_sync_mapping_range() was replaced with
WB_... | ```diff
diff --git a/fs/nilfs2/file.c b/fs/nilfs2/file.c
index 8031086db8d5..cd38124372f3 100644
--- a/fs/nilfs2/file.c
+++ b/fs/nilfs2/file.c
@@ -44,35 +44,14 @@ int nilfs_sync_file(struct file *file, struct dentry *dentry, int datasync)
return 0;
if (datasync)
- err = nilfs_construct_dsync_segment(inode->i_sb... |
6c98cd4ecb0ae35f0368c5c2190712689c2064aa | Analyze and fix the following issue in the Linux kernel code: nilfs2: segment usage file | Problem Details:
This adds a meta data file which stores the allocation state of segments.
[konishi.ryusuke@lab.ntt.co.jp: fix wrong counting of checkpoints and dirty segments]
Signed-off-by: Koji Sato <sato.koji@lab.ntt.co.jp>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: Andrew Morton... | ```diff
diff --git a/fs/nilfs2/cpfile.c b/fs/nilfs2/cpfile.c
index 991633aad1d8..82462acd06ee 100644
--- a/fs/nilfs2/cpfile.c
+++ b/fs/nilfs2/cpfile.c
@@ -357,7 +357,7 @@ int nilfs_cpfile_delete_checkpoints(struct inode *cpfile,
kaddr = kmap_atomic(header_bh->b_page, KM_USER0);
header = nilfs_cpfile_block_get_hea... |
0bd49f9446130a6a3914eb07b54db489e3222b34 | Analyze and fix the following issue in the Linux kernel code: nilfs2: buffer and page operations | Problem Details:
This adds common routines for buffer/page operations used in B-tree
node caches, meta data files, or segment constructor (log writer).
NILFS uses copy functions for buffers and pages due to the following
reasons:
1) Relocation required for COW
Since NILFS changes address of on-disk blocks, movin... | ```diff
diff --git a/fs/nilfs2/page.c b/fs/nilfs2/page.c
new file mode 100644
index 000000000000..7b18be8cd47a
--- /dev/null
+++ b/fs/nilfs2/page.c
@@ -0,0 +1,542 @@
+/*
+ * page.c - buffer/page management specific to NILFS
+ *
+ * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
+ *
+ * This program... |
bdc8e5f85f9abe2e7c78dcf39d81f9a97178788b | Analyze and fix the following issue in the Linux kernel code: namespaces: mqueue namespace: adapt sysctl | Problem Details:
Largely inspired from ipc/ipc_sysctl.c. This patch isolates the mqueue
sysctl stuff in its own file.
[akpm@linux-foundation.org: build fix]
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Nadia Derbey <Nadia.Derbey@bull.net>
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Cc: Alexey... | ```diff
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h
index 3392d50de351..3bf40e246a80 100644
--- a/include/linux/ipc_namespace.h
+++ b/include/linux/ipc_namespace.h
@@ -128,4 +128,18 @@ static inline void put_ipc_ns(struct ipc_namespace *ns)
{
}
#endif
+
+#ifdef CONFIG_POSIX_MQUEUE_SYSC... |
d88ca815b5b3534ed2dae123ba0bf366861f850c | Analyze and fix the following issue in the Linux kernel code: fbdev: i.MX31: fix panning, error handling, clean up | Problem Details:
1. check for errors returned from clk_get()
2. fix "Unbalanced enable for IRQ 160"
3. fix transmit descriptor handling in panning
4. clean frame buffer on blank - useful for OLED displays
5. formatting clean up
Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Cc: Dan Williams <dan.j.williams@intel.co... | ```diff
diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c
index fa1a512ce030..21b3692092f2 100644
--- a/drivers/video/mx3fb.c
+++ b/drivers/video/mx3fb.c
@@ -400,12 +400,12 @@ static void sdc_disable_channel(struct mx3fb_info *mx3_fbi)
static int sdc_set_window_pos(struct mx3fb_data *mx3fb, enum ipu_channel c... |
cc00e9cfe0e5c4c31057c722e49fdf2c76dd5953 | Analyze and fix the following issue in the Linux kernel code: kprobes: cleanup comment style in kprobes.h | Problem Details:
Fix comment style in kprobes.h.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Si... | ```diff
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index 2ec6cc14a114..39826a678364 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -94,12 +94,16 @@ struct kprobe {
/* Called after addr is executed, unless... */
kprobe_post_handler_t post_handler;
- /* ... called if execu... |
c8fc657e6a114fadf78fdf8103e289a169c91c5d | Analyze and fix the following issue in the Linux kernel code: spi: limit reaches -1, tested 0 | Problem Details:
With a postfix decrement limit will reach -1 rather than 0, so the warning
will not be issued.
Also, add a cpu_relax() into the busy-wait loop.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Mariusz Ceier <mceier@gmail.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-b... | ```diff
diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c
index 0480d8bb19d3..014af69fc1bb 100644
--- a/drivers/spi/spi_imx.c
+++ b/drivers/spi/spi_imx.c
@@ -779,7 +779,8 @@ static irqreturn_t interrupt_transfer(struct driver_data *drv_data)
/* Read trailing bytes */
limit = loops_per_jiffy << 1;
- ... |
e7d02e3c9577f070bc77354763bed7f24713dc53 | Analyze and fix the following issue in the Linux kernel code: Blackfin SPI Driver: fix NULL pointer crash | Problem Details:
Fix NULL pointer crash when cleaning up from invalid platform resources
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <to... | ```diff
diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c
index d1ff34f3f6bd..53819c961a31 100644
--- a/drivers/spi/spi_bfin5xx.c
+++ b/drivers/spi/spi_bfin5xx.c
@@ -1178,6 +1178,9 @@ static void bfin_spi_cleanup(struct spi_device *spi)
{
struct chip_data *chip = spi_get_ctldata(spi);
+ if (!chip)... |
138f97cd06deddd53ad496ac1656917a7b486d24 | Analyze and fix the following issue in the Linux kernel code: Blackfin SPI Driver: use bfin_spi_ prefix on all functions | Problem Details:
Do this because when things crash, we get simple names like "setup" and
"start_queue" which is pretty difficult to trace back to the real thing:
the spi driver
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Cc: David Brownell <david-b@pacbell.net>
Si... | ```diff
diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c
index bdad0bbd0a43..d1ff34f3f6bd 100644
--- a/drivers/spi/spi_bfin5xx.c
+++ b/drivers/spi/spi_bfin5xx.c
@@ -29,7 +29,7 @@
#define DRV_NAME "bfin-spi"
#define DRV_AUTHOR "Bryan Wu, Luke Yang"
-#define DRV_DESC "Blackfin BF5xx on-chip SPI Cont... |
b9b2a76a4391cadb6d42da2ccf5e956c459acb72 | Analyze and fix the following issue in the Linux kernel code: Blackfin SPI Driver: fix bug - correct usage of struct spi_transfer.cs_change | Problem Details:
According to comments in linux/spi/spi.h:
* All SPI transfers start with the relevant chipselect active. Normally
* it stays selected until after the last transfer in a message. Drivers
* can affect the chipselect signal using cs_change.
*
* (i) If the transfer isn't the last one in the message,... | ```diff
diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c
index 122292557bf3..bdad0bbd0a43 100644
--- a/drivers/spi/spi_bfin5xx.c
+++ b/drivers/spi/spi_bfin5xx.c
@@ -540,15 +540,13 @@ static void giveback(struct driver_data *drv_data)
msg->state = NULL;
- /* disable chip select signal. And not st... |
2cf3683472f043e6748c48228df6d8a35a47ecc2 | Analyze and fix the following issue in the Linux kernel code: Blackfin SPI Driver: fix bug - spi controller driver does not assert/deassert CS correctly | Problem Details:
This bug can be observed when two SPI devices are sharing the spi bus: One
device is set as SPI CS 7, another one is using SPI CS 4.
In spi_bfin5xx.c: cs_active(), cs_deactive() are used to control SPI_FLG
register. From the debug bellow:
cs_active: flag: 0x7f91, chip->flag: 0x7f80, cs: 7
cs_active:... | ```diff
diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c
index 317731a9cd6d..122292557bf3 100644
--- a/drivers/spi/spi_bfin5xx.c
+++ b/drivers/spi/spi_bfin5xx.c
@@ -189,6 +189,7 @@ static void cs_deactive(struct driver_data *drv_data, struct chip_data *chip)
{
u16 flag = read_FLAG(drv_data);
+ fl... |
d24bd1d0dc850e7aa68c27ec288eb699d41a5916 | Analyze and fix the following issue in the Linux kernel code: Blackfin SPI Driver: add a few more DMA debug messages | Problem Details:
Because of DMA hardware issue, we were trying to use software workaround.
This patch add some useful debug messages to help us debugging the DMA
code.
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-... | ```diff
diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c
index 0bbe19eafc26..5acec9ff0175 100644
--- a/drivers/spi/spi_bfin5xx.c
+++ b/drivers/spi/spi_bfin5xx.c
@@ -559,9 +559,13 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id)
struct driver_data *drv_data = dev_id;
struct chip_data *c... |
04b95d2f7453d64f89ca1d8c3e70bcc7cc38320f | Analyze and fix the following issue in the Linux kernel code: Blackfin SPI Driver: pass DMA overflow error to the higher level | Problem Details:
If the SPI bus registers a receive overflow error, pass the result back up
to the higher levels.
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: David Brownell <david-b@pacbell.net>
Signed... | ```diff
diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c
index 6d3f6064871e..2e0c024bbde7 100644
--- a/drivers/spi/spi_bfin5xx.c
+++ b/drivers/spi/spi_bfin5xx.c
@@ -559,6 +559,7 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id)
struct driver_data *drv_data = dev_id;
struct chip_data *ch... |
7513e006c64fbe2f43aef2139c8c1f2b1a9cb6b9 | Analyze and fix the following issue in the Linux kernel code: Blackfin SPI Driver: Fix erroneous SPI Clock divisor calculation | Problem Details:
Fix erroneous SPI Clock divisor calculation. Make sure SPI_BAUD is always
>= 2. Writing a value of 0 or 1 to the SPI_BAUD register disables the
serial clock.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Acked-by: David Brownell <dbrown... | ```diff
diff --git a/arch/blackfin/include/asm/bfin5xx_spi.h b/arch/blackfin/include/asm/bfin5xx_spi.h
index 0292d58f9362..ea2d24af9542 100644
--- a/arch/blackfin/include/asm/bfin5xx_spi.h
+++ b/arch/blackfin/include/asm/bfin5xx_spi.h
@@ -11,6 +11,8 @@
#ifndef _SPI_CHANNEL_H_
#define _SPI_CHANNEL_H_
+#define MIN_SP... |
6260a4b0521a41189b2c2a8119096c1e21dbdf2c | Analyze and fix the following issue in the Linux kernel code: /proc/pid/maps: don't show pgoff of pure ANON VMAs | Problem Details:
Recently, it's argued that what proc/pid/maps shows is ugly when a 32bit
binary runs on 64bit host.
/proc/pid/maps outputs vma's pgoff member but vma->pgoff is of no use
information is the vma is for ANON. With this patch, /proc/pid/maps shows
just 0 if no file backing store.
[akpm@linux-foundation.... | ```diff
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index b0ae0be4801f..39e4ad4f59f4 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -204,6 +204,7 @@ static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
struct file *file = vma->vm_file;
int flags = vma->vm_flags;
unsigned ... |
fafd688e4c0c34da0f3de909881117d374e4c7af | Analyze and fix the following issue in the Linux kernel code: mm: add /proc controls for pdflush threads | Problem Details:
Add /proc entries to give the admin the ability to control the minimum and
maximum number of pdflush threads. This allows finer control of pdflush
on both large and small machines.
The rationale is simply one size does not fit all. Admins on large and/or
small systems may want to tune the min/max pd... | ```diff
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
index 3197fc83bc51..97c4b3284329 100644
--- a/Documentation/sysctl/vm.txt
+++ b/Documentation/sysctl/vm.txt
@@ -39,6 +39,8 @@ Currently, these files are in /proc/sys/vm:
- nr_hugepages
- nr_overcommit_hugepages
- nr_pdflush_threads
+- nr_... |
a56ed663047fc9927ec8b35750d23ece54f85dc7 | Analyze and fix the following issue in the Linux kernel code: mm: fix pdflush thread creation upper bound | Problem Details:
Fix a race on creating pdflush threads. Without the patch, it is possible
to create more than MAX_PDFLUSH_THREADS threads, and this has been
observed in practice on IO loaded SMP machines.
The fix involves moving the lock around to protect the check against the
thread count and correctly dealing with... | ```diff
diff --git a/mm/pdflush.c b/mm/pdflush.c
index 118905e3d788..235ac440c44e 100644
--- a/mm/pdflush.c
+++ b/mm/pdflush.c
@@ -98,7 +98,6 @@ static int __pdflush(struct pdflush_work *my_work)
INIT_LIST_HEAD(&my_work->list);
spin_lock_irq(&pdflush_lock);
- nr_pdflush_threads++;
for ( ; ; ) {
struct pdflus... |
9133df726fdd3df0ca9efcaaae22442198851d65 | Analyze and fix the following issue in the Linux kernel code: esp: fix section mismatch warning | Problem Details:
Not critical.
WARNING: drivers/char/esp.o(.text+0x278): Section mismatch in reference from the function show_serial_version() to the variable .init.data:serial_version
The function show_serial_version() references
the variable __initdata serial_version.
This is often because show_serial_versio... | ```diff
diff --git a/drivers/char/esp.c b/drivers/char/esp.c
index 45ec263ec012..a5c59fc2b0ff 100644
--- a/drivers/char/esp.c
+++ b/drivers/char/esp.c
@@ -2258,7 +2258,7 @@ static int esp_open(struct tty_struct *tty, struct file *filp)
* driver.
*/
-static void show_serial_version(void)
+static void __init show_s... |
ab3c9c686e22ab264269337ce7b75d9760211198 | Analyze and fix the following issue in the Linux kernel code: branch tracer, intel-iommu: fix build with CONFIG_BRANCH_TRACER=y | Problem Details:
Fix the branch tracer barfing on comma statements within if ()
statements.
Signed-off-by: Ingo Molnar <mingo@elte.hu> | ```diff
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 8872ad6dd89b..37bcb50a4d7c 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -115,7 +115,9 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
* "Define 'is'", Bill Clinton
* "Define 'if... |
d9ad8bc0ca823705413f75b50c442a88cc518b35 | Analyze and fix the following issue in the Linux kernel code: branch tracer: Fix for enabling branch profiling makes sparse unusable | Problem Details:
One of the changes between kernels 2.6.28 and 2.6.29 is that a branch profiler
has been added for if() statements. Unfortunately this patch makes the sparse
output unusable with CONFIG_TRACE_BRANCH_PROFILING=y: when branch profiling is
enabled, sparse prints so much false positives that the real issues... | ```diff
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 6faa7e549de4..8872ad6dd89b 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -76,7 +76,8 @@ struct ftrace_branch_data {
* Note: DISABLE_BRANCH_PROFILING can be used by special lowlevel code
* to disable branch traci... |
d407e32efe060afa2b9a797a91376ebc65b4ce11 | Analyze and fix the following issue in the Linux kernel code: PCI: Fix oops in pci_vpd_truncate | Problem Details:
pci_vpd_truncate() should check for dev->vpd->attr, otherwise this might
happen:
sky2 driver version 1.22
Unable to handle kernel paging request for data at address 0x0000000c
Faulting instruction address: 0xc01836fc
Oops: Kernel access of bad area, sig: 11 [#1]
[...]
NIP [c01836fc] pci_vp... | ```diff
diff --git a/drivers/pci/access.c b/drivers/pci/access.c
index 381444794778..64dd7df90e62 100644
--- a/drivers/pci/access.c
+++ b/drivers/pci/access.c
@@ -356,7 +356,8 @@ int pci_vpd_truncate(struct pci_dev *dev, size_t size)
return -EINVAL;
dev->vpd->len = size;
- dev->vpd->attr->size = size;
+ if (dev-... |
f8201abcb2badce7eaa6a3715f9a228cfd88a453 | Analyze and fix the following issue in the Linux kernel code: ramfs: fix double freeing s_fs_info on failed mount | Problem Details:
If ramfs mount fails, s_fs_info will be freed twice in ramfs_fill_super()
and ramfs_kill_sb(), leading to kernel oops.
Consolidate and beautify the code.
Make sure s_fs_info and s_root are in known good states.
Acked-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>... | ```diff
diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c
index a404fb88e456..3a6b193d8444 100644
--- a/fs/ramfs/inode.c
+++ b/fs/ramfs/inode.c
@@ -221,22 +221,23 @@ static int ramfs_fill_super(struct super_block * sb, void * data, int silent)
save_mount_options(sb, data);
fsi = kzalloc(sizeof(struct ramfs_fs_info... |
38089c658bf372adc2bd7b3597fceac0c7cecca6 | Analyze and fix the following issue in the Linux kernel code: HID: hidraw -- fix missing unlocks in unlocked_ioctl | Problem Details:
There were 2 places that returned directly instead of releasing their
locks. I sent a fix for this file earlier but ended up missing these
spots. I think what happened is that I have improved my checker script
since then... Or maybe I just screwed up.
Signed-off-by: Dan Carpenter <error27@gmail.com... | ```diff
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c
index e263d4731179..00ccf4b1985d 100644
--- a/drivers/hid/hidraw.c
+++ b/drivers/hid/hidraw.c
@@ -285,8 +285,10 @@ static long hidraw_ioctl(struct file *file, unsigned int cmd,
if (_IOC_NR(cmd) == _IOC_NR(HIDIOCGRAWNAME(0))) {
int len;
- ... |
2c03d07ad54db03b813bb98c469790c07ca9f5dd | Analyze and fix the following issue in the Linux kernel code: hwmon: Add Asus ATK0110 support | Problem Details:
Asus boards have an ACPI interface for interacting with the hwmon (fan,
temperatures, voltages) subsystem; this driver exposes the relevant
information via the standard sysfs interface.
There are two different ACPI interfaces:
- an old one (based on RVLT/RFAN/RTMP)
- a new one (GGRP/GITM)
Both may be ... | ```diff
diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c
index 045054037c2d..daf4ad37896d 100644
--- a/drivers/acpi/acpica/nsxfeval.c
+++ b/drivers/acpi/acpica/nsxfeval.c
@@ -53,7 +53,6 @@ ACPI_MODULE_NAME("nsxfeval")
/* Local prototypes */
static void acpi_ns_resolve_references(struct acp... |
9c83633ad38138855181af6936e8ac570ef7e2cb | Analyze and fix the following issue in the Linux kernel code: missing unlock in jfs_quota_write() | Problem Details:
We should unlock &inode->i_mutex on the error path. This bug was
in ext2_quota_write(). I sent a patch to them today as well.
Found by smatch (http://repo.or.cz/w/smatch.git). Compile tested.
regards,
dan carpenter
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Dave Kleikamp <sha... | ```diff
diff --git a/fs/jfs/super.c b/fs/jfs/super.c
index 6f21adf9479a..d9b0e92b3602 100644
--- a/fs/jfs/super.c
+++ b/fs/jfs/super.c
@@ -720,8 +720,10 @@ static ssize_t jfs_quota_write(struct super_block *sb, int type,
blk++;
}
out:
- if (len == towrite)
+ if (len == towrite) {
+ mutex_unlock(&inode->i_mutex);... |
bc2b6871c17b3aff79fb14e1a1c06c5f5a187f76 | Analyze and fix the following issue in the Linux kernel code: Update /debug/tracing/README | Problem Details:
Some of the tracers have been renamed, which was not updated in the in-kernel
run-time README file. Update it.
Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>
LKML-Reference: <200903231158.32151.knikanth@suse.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <min... | ```diff
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index fc8c7d66832b..9d28476a9851 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2369,9 +2369,9 @@ static const char readme_msg[] =
"# mkdir /debug\n"
"# mount -t debugfs nodev /debug\n\n"
"# cat /debug/tracing/available_tracers\n"
... |
b0dfa978c7a1699fb3506fbfcba0b6a5c4bd17ae | Analyze and fix the following issue in the Linux kernel code: tracing/ftrace: alloc the started cpumask for the trace file | Problem Details:
Impact: fix a crash while cat trace file
Currently we are using a cpumask to remind each cpu where a
trace occured. It lets us notice the user that a cpu just had
its first trace.
But on latest -tip we have the following crash once we cat the trace
file:
IP: [<c0270c4a>] print_trace_fmt+0x45/0xe7
*p... | ```diff
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 2230b46f9e1c..fc8c7d66832b 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1632,7 +1632,11 @@ static void test_cpu_buff_start(struct trace_iterator *iter)
return;
cpumask_set_cpu(iter->cpu, iter->started);
- trace_seq_printf(... |
5ac9f62267dc92c7735c642a5942d9e6c1190308 | Analyze and fix the following issue in the Linux kernel code: function-graph: add proper initialization for init task | Problem Details:
Impact: fix to crash going to kexec
The init task did not properly initialize the function graph pointers.
Altough these pointers are NULL, they can not be assumed to be NULL
for the init task, and must still be properly initialize.
This usually is not an issue since a problem only arises when a task... | ```diff
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 015a3d22cf74..da5405dce347 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -356,6 +356,9 @@ struct ftrace_graph_ret {
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
+/* for init task */
+#define INIT_FTRACE_GRAPH .ret_stack = NULL... |
5f0c6c03c5fee91c02c696bc9bf4c0d41392abe7 | Analyze and fix the following issue in the Linux kernel code: tracing/ftrace: fix missing include string.h | Problem Details:
Building a kernel with tracing can raise the following warning on
tip/master:
kernel/trace/trace.c:1249: error: implicit declaration of function 'vbin_printf'
We are missing an include to string.h
Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
LKML-R... | ```diff
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 457dd8c97e0d..2230b46f9e1c 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -30,6 +30,7 @@
#include <linux/percpu.h>
#include <linux/splice.h>
#include <linux/kdebug.h>
+#include <linux/string.h>
#include <linux/ctype.h>
#include... |
cf8e3474654f20433aab9aa35826d43b5f245008 | Analyze and fix the following issue in the Linux kernel code: tracing: fix incorrect return type of ns2usecs() | Problem Details:
Impact: fix time output bug in 32bits system
ns2usecs() returns 'long', it's incorrect.
(In i386)
...
<idle>-0 [000] 521.442100: _spin_lock <-tick_do_update_jiffies64
<idle>-0 [000] 521.442101: do_timer <-tick_do_update_jiffies64
<idle>-0 [000] 521.4421... | ```diff
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index a0174a40c563..457dd8c97e0d 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -147,8 +147,7 @@ static int __init set_ftrace_dump_on_oops(char *str)
}
__setup("ftrace_dump_on_oops", set_ftrace_dump_on_oops);
-long
-ns2usecs(cycle_t n... |
017bc617657c928cb9a0c45a7a7e9f4e66695347 | Analyze and fix the following issue in the Linux kernel code: x86, ds: support Core i7 | Problem Details:
Add debug store support for Core i7.
Core i7 adds a reset value for each performance counter and a new
PEBS record format.
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Cc: roland@redhat.com
Cc: eranian@googlemail.com
Cc: oleg@redhat.com
Cc: juan.villacis@intel.com
Cc: ak@linux.jf.intel.... | ```diff
diff --git a/arch/x86/include/asm/ds.h b/arch/x86/include/asm/ds.h
index 149e5208e967..70dac199b093 100644
--- a/arch/x86/include/asm/ds.h
+++ b/arch/x86/include/asm/ds.h
@@ -234,8 +234,12 @@ struct bts_trace {
struct pebs_trace {
struct ds_trace ds;
- /* the PEBS reset value */
- unsigned long long reset_... |
150f5164c1258e05b7dea16f29e592f354c48f34 | Analyze and fix the following issue in the Linux kernel code: x86, ds: allow small debug store buffers | Problem Details:
Check the buffer size more precisely to allow buffers for exactly
one element provided the base address is already properly aligned.
Add a debug store selftest.
Reported-by: Stephane Eranian <eranian@googlemail.com>
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Cc: roland@redhat.com
Cc: ... | ```diff
diff --git a/arch/x86/kernel/ds.c b/arch/x86/kernel/ds.c
index ebfb0fde8e6f..4e05157506aa 100644
--- a/arch/x86/kernel/ds.c
+++ b/arch/x86/kernel/ds.c
@@ -656,6 +656,7 @@ static int ds_request(struct ds_tracer *tracer, struct ds_trace *trace,
{
struct ds_context *context;
int error;
+ size_t req_size;
... |
608780a9048efa3e85fbc4d8649b26805cc588aa | Analyze and fix the following issue in the Linux kernel code: x86, ds: fix bad ds_reset_pebs() | Problem Details:
Ds_reset_pebs() passed the wrong qualifier to a shared function resulting
in a reset of bts, rather than pebs.
Reported-by: Stephane Eranian <eranian@googlemail.com>
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Cc: roland@redhat.com
Cc: eranian@googlemail.com
Cc: oleg@redhat.com
Cc: juan... | ```diff
diff --git a/arch/x86/kernel/ds.c b/arch/x86/kernel/ds.c
index cab28320dac7..ebfb0fde8e6f 100644
--- a/arch/x86/kernel/ds.c
+++ b/arch/x86/kernel/ds.c
@@ -1186,7 +1186,7 @@ int ds_reset_pebs(struct pebs_tracer *tracer)
tracer->trace.ds.top = tracer->trace.ds.begin;
- ds_set(tracer->ds.context->ds, ds_bts,... |
6047550d3d26fed88b18a208b31f8b90b5ef3e9b | Analyze and fix the following issue in the Linux kernel code: x86, ds: dont use TIF_DEBUGCTLMSR | Problem Details:
Debug store already uses TIF_DS_AREA_MSR to trigger debug store context
switch handling. No need to use TIF_DEBUGCTLMSR, as well.
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Cc: roland@redhat.com
Cc: eranian@googlemail.com
Cc: oleg@redhat.com
Cc: juan.villacis@intel.com
Cc: ak@linux.jf.... | ```diff
diff --git a/arch/x86/kernel/ds.c b/arch/x86/kernel/ds.c
index 443f415441da..cab28320dac7 100644
--- a/arch/x86/kernel/ds.c
+++ b/arch/x86/kernel/ds.c
@@ -925,11 +925,6 @@ static void update_task_debugctlmsr(struct task_struct *task,
get_cpu();
if (task == current)
update_debugctlmsr(debugctlmsr);
-
- if... |
ee811517a5604aa63fae803b7c044712699e1303 | Analyze and fix the following issue in the Linux kernel code: x86, ds: use single debug store cpu configuration | Problem Details:
Use a single configuration for all cpus.
Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Cc: roland@redhat.com
Cc: eranian@googlemail.com
Cc: oleg@redhat.com
Cc: juan.villacis@intel.com
Cc: ak@linux.jf.intel.com
LKML-Reference: <20090403144602.191165... | ```diff
diff --git a/arch/x86/kernel/ds.c b/arch/x86/kernel/ds.c
index 71cab3b62dce..443f415441da 100644
--- a/arch/x86/kernel/ds.c
+++ b/arch/x86/kernel/ds.c
@@ -47,9 +47,8 @@ struct ds_configuration {
/* Control bit-masks indexed by enum ds_feature: */
unsigned long ctl[dsf_ctl_max];
};
-static DEFINE_PER_CPU(s... |
2311f0de21c17b2a8b960677a9cccfbfa52beb35 | Analyze and fix the following issue in the Linux kernel code: x86, ds: add leakage warning | Problem Details:
Add a warning in case a debug store context is not removed before
the task it is attached to is freed.
Remove the old warning at thread exit. It is too early.
Declare the debug store context field in thread_struct unconditionally.
Remove ds_copy_thread() and ds_exit_thread() and do the work directly... | ```diff
diff --git a/arch/x86/include/asm/ds.h b/arch/x86/include/asm/ds.h
index 413e127e567d..149e5208e967 100644
--- a/arch/x86/include/asm/ds.h
+++ b/arch/x86/include/asm/ds.h
@@ -285,21 +285,12 @@ extern void __cpuinit ds_init_intel(struct cpuinfo_x86 *);
*/
extern void ds_switch_to(struct task_struct *prev, str... |
01f6569ece6915616f6cae1d7d8b46ab8da9c1bd | Analyze and fix the following issue in the Linux kernel code: x86, ds: selftest each cpu | Problem Details:
Perform debug store selftests on each cpu.
Cover both the normal and the _noirq variant of the debug store interface.
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Cc: roland@redhat.com
Cc: eranian@googlemail.com
Cc: oleg@redhat.com
Cc: juan.villacis@intel.com
Cc: ak@linux.jf.intel.com
L... | ```diff
diff --git a/arch/x86/kernel/ds_selftest.c b/arch/x86/kernel/ds_selftest.c
index cccc19a38f6d..599a96300628 100644
--- a/arch/x86/kernel/ds_selftest.c
+++ b/arch/x86/kernel/ds_selftest.c
@@ -11,13 +11,21 @@
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/smp.h>
+#include <linux/cpu.h>
... |
84f201139245c30777ff858e71b8d7e134b8c3ed | Analyze and fix the following issue in the Linux kernel code: x86, ds: fix bounds check in ds selftest | Problem Details:
Fix a bad bounds check in the debug store selftest.
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Cc: roland@redhat.com
Cc: eranian@googlemail.com
Cc: oleg@redhat.com
Cc: juan.villacis@intel.com
Cc: ak@linux.jf.intel.com
LKML-Reference: <20090403144558.450027000@intel.com>
Signed-off-by: ... | ```diff
diff --git a/arch/x86/kernel/ds_selftest.c b/arch/x86/kernel/ds_selftest.c
index e1ba5101b576..cccc19a38f6d 100644
--- a/arch/x86/kernel/ds_selftest.c
+++ b/arch/x86/kernel/ds_selftest.c
@@ -47,8 +47,13 @@ static int ds_selftest_bts_consistency(const struct bts_trace *trace)
printk(KERN_CONT "bad bts buffer ... |
353afeea24cc51aafc0ff21a72ec740b6f0af50c | Analyze and fix the following issue in the Linux kernel code: x86, ds: fix compiler warning | Problem Details:
Size_t is defined differently on i386 and x86_64.
Change type to avoid compiler warning.
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Cc: roland@redhat.com
Cc: eranian@googlemail.com
Cc: oleg@redhat.com
Cc: juan.villacis@intel.com
Cc: ak@linux.jf.intel.com
LKML-Reference: <20090403144557... | ```diff
diff --git a/arch/x86/kernel/ds_selftest.c b/arch/x86/kernel/ds_selftest.c
index e5a263c8a14c..e1ba5101b576 100644
--- a/arch/x86/kernel/ds_selftest.c
+++ b/arch/x86/kernel/ds_selftest.c
@@ -87,7 +87,7 @@ static int ds_selftest_bts_read(struct bts_tracer *tracer,
/* Now to the test itself. */
for (at = from... |
38f801129ad07b9afa7f9bd3779f61b805416d8c | Analyze and fix the following issue in the Linux kernel code: x86, bts: fix race between per-task and per-cpu branch tracing | Problem Details:
Per-task branch tracing installs a debug store context with the traced
task. This immediately results in the branch trace control bits to be
cleared for the next context switch of that task, if not set before.
Either per-cpu or per-task tracing are allowed at the same time.
An active per-cpu tracing ... | ```diff
diff --git a/arch/x86/kernel/ds.c b/arch/x86/kernel/ds.c
index 5cd137ab2672..f03f117eff8c 100644
--- a/arch/x86/kernel/ds.c
+++ b/arch/x86/kernel/ds.c
@@ -193,12 +193,28 @@ static DEFINE_SPINLOCK(ds_lock);
*/
static atomic_t tracers = ATOMIC_INIT(0);
-static inline void get_tracer(struct task_struct *task)... |
8d99b3ac2726e5edd97ad147fa5c1f2acb63a745 | Analyze and fix the following issue in the Linux kernel code: x86, bts: wait until traced task has been scheduled out | Problem Details:
In order to stop branch tracing for a running task, we need to first
clear the branch tracing control bits before we may free the tracing
buffer.
If the traced task is running, the cpu might still trace that task
after the branch trace control bits have cleared.
Wait until the traced task has been sc... | ```diff
diff --git a/arch/x86/kernel/ds.c b/arch/x86/kernel/ds.c
index c730155bf54d..5cd137ab2672 100644
--- a/arch/x86/kernel/ds.c
+++ b/arch/x86/kernel/ds.c
@@ -299,6 +299,7 @@ static inline struct ds_context *ds_get_context(struct task_struct *task)
static inline void ds_put_context(struct ds_context *context)
{... |
cac94f979326212831c0ea44ed9ea1622b4f4e93 | Analyze and fix the following issue in the Linux kernel code: x86, bts: fix race when bts tracer is removed | Problem Details:
When the bts tracer is removed while the traced task is running,
the write to clear the bts tracer pointer races with context switch code.
Read the tracer once during a context switch.
When a new tracer is installed, the bts tracer is set in the ds context
before the tracer is initialized in order to... | ```diff
diff --git a/arch/x86/kernel/ds.c b/arch/x86/kernel/ds.c
index b1d6e1f502fa..c730155bf54d 100644
--- a/arch/x86/kernel/ds.c
+++ b/arch/x86/kernel/ds.c
@@ -89,6 +89,9 @@ struct bts_tracer {
/* Buffer overflow notification function: */
bts_ovfl_callback_t ovfl;
+
+ /* Active flags affecting trace collection... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.