id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
06af15e086e39a5a2a2413973a64af8e10122f28 | Analyze and fix the following issue in the Linux kernel code: Blackfin arch: fix bug - BF527 0.2 silicon has different CPUID (DSPID) value | Problem Details:
BF523/5/7 == 27e0 (all revs)
BF522/4/6 == 27e4 (all revs)
Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org> | ```diff
diff --git a/arch/blackfin/mach-bf527/include/mach/bf527.h b/arch/blackfin/mach-bf527/include/mach/bf527.h
index 9ff3b61b01e1..3832aab11e9a 100644
--- a/arch/blackfin/mach-bf527/include/mach/bf527.h
+++ b/arch/blackfin/mach-bf527/include/mach/bf527.h
@@ -110,7 +110,7 @@
#ifdef CONFIG_BF527
#define CPU "BF52... |
8d8921a2243d7355d6ac3a42908c87999bf09295 | Analyze and fix the following issue in the Linux kernel code: Blackfin arch: fix bug: kernel crash when enable SDIO host driver | Problem Details:
update bfin-sdh platform data to fix this issue.
Pointed-out-by: Dominik Herwald <d.herwald@dsh-elektronik.de>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org> | ```diff
diff --git a/arch/blackfin/mach-bf548/boards/cm_bf548.c b/arch/blackfin/mach-bf548/boards/cm_bf548.c
index cd6b8a3594ef..f53ad682530b 100644
--- a/arch/blackfin/mach-bf548/boards/cm_bf548.c
+++ b/arch/blackfin/mach-bf548/boards/cm_bf548.c
@@ -43,6 +43,7 @@
#include <asm/gpio.h>
#include <asm/nand.h>
#include... |
09b7f4ad507bacd9c24d57966d23c4c715240dda | Analyze and fix the following issue in the Linux kernel code: Blackfin arch: fix typo in early printk bit size processing | Problem Details:
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org> | ```diff
diff --git a/arch/blackfin/kernel/early_printk.c b/arch/blackfin/kernel/early_printk.c
index 1f4e3d2e0901..c8ad051742e2 100644
--- a/arch/blackfin/kernel/early_printk.c
+++ b/arch/blackfin/kernel/early_printk.c
@@ -105,10 +105,10 @@ static struct console * __init earlyserial_init(char *buf)
cflag |= CS5;
... |
e062ceab35801314bfa3e08e7c76faf0045fcf79 | Analyze and fix the following issue in the Linux kernel code: Blackfin arch: fix bug - kernel stops at initial console | Problem Details:
Bug: Boot kernel in BF533-EZKIT without set ip during boot,
it stops at initial console.
Restore serial platform_device data to fix this issue.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org> | ```diff
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c
index 69abceafb4d0..08cd0969de47 100644
--- a/arch/blackfin/mach-bf533/boards/ezkit.c
+++ b/arch/blackfin/mach-bf533/boards/ezkit.c
@@ -368,6 +368,10 @@ static struct platform_device *ezkit_devices[] __initdata = {
... |
3af8e931c783d52c9c5df93604e622eb5e054ee8 | Analyze and fix the following issue in the Linux kernel code: Blackfin arch: fix bug - kernel crash after config IP for ethernet port | Problem Details:
Fix typo - kernel crash on bf533-stamp/bf533-ezkit after config IP for ethernet port
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org> | ```diff
diff --git a/arch/blackfin/mach-bf533/include/mach/gpio.h b/arch/blackfin/mach-bf533/include/mach/gpio.h
index 4d3ee4504250..e45c17077aff 100644
--- a/arch/blackfin/mach-bf533/include/mach/gpio.h
+++ b/arch/blackfin/mach-bf533/include/mach/gpio.h
@@ -10,7 +10,7 @@
#ifndef _MACH_GPIO_H_
#define _MACH_GPIO_H_
... |
6ea28f0ba24d5eb7055b83cd78f51c92a8d7f3e5 | Analyze and fix the following issue in the Linux kernel code: Blackfin arch: fix bug - kernel detects BF532 incorrectly | Problem Details:
fix this typo in this patch
Reported-by: Ben Matthews <mben12@gmail.com>
Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org> | ```diff
diff --git a/arch/blackfin/mach-bf533/include/mach/bf533.h b/arch/blackfin/mach-bf533/include/mach/bf533.h
index 6f976b2ecd71..cf4427cd3f72 100644
--- a/arch/blackfin/mach-bf533/include/mach/bf533.h
+++ b/arch/blackfin/mach-bf533/include/mach/bf533.h
@@ -145,7 +145,7 @@
#endif
#ifdef CONFIG_BF532
#define CPU... |
c250bfb93c046a789989af475ae18d08c61b4cfa | Analyze and fix the following issue in the Linux kernel code: Blackfin arch: cleanup and unify the ins functions | Problem Details:
this also fixes some errors in the ipipe merge
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org> | ```diff
diff --git a/arch/blackfin/lib/ins.S b/arch/blackfin/lib/ins.S
index 1b84b21ca7d1..1863a6ba507c 100644
--- a/arch/blackfin/lib/ins.S
+++ b/arch/blackfin/lib/ins.S
@@ -1,31 +1,9 @@
/*
- * File: arch/blackfin/lib/ins.S
- * Based on:
- * Author: Bas Vermeulen <bas@buyways.nl>
+ * arch/blackfin/lib/i... |
a0dcfb16e606ca095eb1e9e789aff5e41e9adb1a | Analyze and fix the following issue in the Linux kernel code: Blackfin arch: Fix bug - IrDA SIR build failed for BF533. | Problem Details:
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org> | ```diff
diff --git a/arch/blackfin/mach-bf533/include/mach/blackfin.h b/arch/blackfin/mach-bf533/include/mach/blackfin.h
index d80971b4e3aa..045184f81a29 100644
--- a/arch/blackfin/mach-bf533/include/mach/blackfin.h
+++ b/arch/blackfin/mach-bf533/include/mach/blackfin.h
@@ -44,6 +44,13 @@
#define BFIN_UART_NR_PORTS ... |
fea05dacdabe14d875093daa2fb6135fa4950142 | Analyze and fix the following issue in the Linux kernel code: Blackfin arch: Fix bug - wrong endpoint number and dma channels of USB | Problem Details:
Blackfin MUSB has 8 endpoints including ep0 and 8 dma channels not 7
Signed-off-by: Bryan Wu <cooloney@kernel.org> | ```diff
diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c b/arch/blackfin/mach-bf527/boards/cm_bf527.c
index c17882b43686..a2c3578f4b6c 100644
--- a/arch/blackfin/mach-bf527/boards/cm_bf527.c
+++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c
@@ -121,8 +121,8 @@ static struct musb_hdrc_config musb_config = {
.dyn... |
90fdc1356808643bb53dcd00ed372817aff734ae | Analyze and fix the following issue in the Linux kernel code: Blackfin arch: Fix typo (channel) | Problem Details:
Channnel -> Channel
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org> | ```diff
diff --git a/arch/blackfin/mach-bf537/include/mach/blackfin.h b/arch/blackfin/mach-bf537/include/mach/blackfin.h
index cffc786b2a2b..7d6069c886f1 100644
--- a/arch/blackfin/mach-bf537/include/mach/blackfin.h
+++ b/arch/blackfin/mach-bf537/include/mach/blackfin.h
@@ -82,7 +82,7 @@
#define STATUS_P1 0x02
#defin... |
bc39ac66808a49d64e6add3e01d3b0fdeaa49d22 | Analyze and fix the following issue in the Linux kernel code: Blackfin arch: Fix incorrect use of loose in cpufreq.c | Problem Details:
It should be 'lose', not 'loose'.
Signed-off-by: Nick Andrew <nick@nick-andrew.net>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org> | ```diff
diff --git a/arch/blackfin/mach-common/cpufreq.c b/arch/blackfin/mach-common/cpufreq.c
index dda5443b37ed..56f68d879b33 100644
--- a/arch/blackfin/mach-common/cpufreq.c
+++ b/arch/blackfin/mach-common/cpufreq.c
@@ -112,7 +112,7 @@ static int bfin_target(struct cpufreq_policy *policy,
bfin_write_TSCALE(tscale... |
b13120d23bf4b066a36a9414514f992eb3907e4b | Analyze and fix the following issue in the Linux kernel code: Blackfin arch: fix bug - crashes in tcp_v4_send_reset | Problem Details:
Michael says that some bugs are crashes in tcp_v4_send_reset.
There's a missing clobber of "CC" in our checksum assembly
statement; fixing this makes the generated code look much saner.
Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: Bryan Wu <cooloney@kernel.org> | ```diff
diff --git a/arch/blackfin/include/asm/checksum.h b/arch/blackfin/include/asm/checksum.h
index 6f6af2b8e9e0..f67289a0d8d2 100644
--- a/arch/blackfin/include/asm/checksum.h
+++ b/arch/blackfin/include/asm/checksum.h
@@ -78,7 +78,8 @@ csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
... |
3e706cfcce591e50163d6e979b7fc64d91ced6a0 | Analyze and fix the following issue in the Linux kernel code: Blackfin arch: fix bug - kernel build fails with undefined reference to pm_overflow_handler | Problem Details:
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org> | ```diff
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index a394957ddaf4..b58af2b1bffe 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -1018,7 +1018,7 @@ config EBIU_FCTLVAL
config HARDWARE_PM
bool "OProfile use hardware porformance monitor"
- depends on OPROFILE
+ depends on OPROFIL... |
dbc895f95500a73ebf1ff12fe85f2e2b3790f52f | Analyze and fix the following issue in the Linux kernel code: Blackfin arch: smp patch cleanup from LKML review | Problem Details:
1. Use inline get_l1_... functions instead of macro
2. Fix compile issue about smp barrier functions
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org> | ```diff
diff --git a/arch/blackfin/include/asm/mem_map.h b/arch/blackfin/include/asm/mem_map.h
index 88d04a707708..e92b31051bb7 100644
--- a/arch/blackfin/include/asm/mem_map.h
+++ b/arch/blackfin/include/asm/mem_map.h
@@ -9,4 +9,79 @@
#include <mach/mem_map.h>
+#ifndef __ASSEMBLY__
+
+#ifdef CONFIG_SMP
+static in... |
6f985294f7df30c0caa80a795ca10fb6f8466702 | Analyze and fix the following issue in the Linux kernel code: Blackfin arch: fix bugs in linker script when using upstream binutils | Problem Details:
Fix a few problems I discovered when building a kernel with upstream CVS
binutils.
We have to add the NOTES macro to our linker script, since a kernel
built with --build-id is otherwise unable to boot. Last time NOTES was
added, it broke things, but the definition of the macro has changed not
to rely... | ```diff
diff --git a/arch/blackfin/kernel/vmlinux.lds.S b/arch/blackfin/kernel/vmlinux.lds.S
index 3a1f73794aa8..4b4341da0585 100644
--- a/arch/blackfin/kernel/vmlinux.lds.S
+++ b/arch/blackfin/kernel/vmlinux.lds.S
@@ -68,6 +68,8 @@ SECTIONS
__etext = .;
}
+ NOTES
+
/* Just in case the first read only is a 32-... |
d1a853057a13e63c40c9b8715e585af15f1b141a | Analyze and fix the following issue in the Linux kernel code: Blackfin arch: Remove all traces of the relocation stack | Problem Details:
Remove all traces of the relocation stack. It's been removed from
binutils for years now.
Add a sanity overflow check to pcrel24 relocations to catch modules that
were built without -mlong-calls.
Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: Bryan Wu <cooloney@kernel.org> | ```diff
diff --git a/arch/blackfin/kernel/module.c b/arch/blackfin/kernel/module.c
index 2e14cadd4302..1bd7f2d018a8 100644
--- a/arch/blackfin/kernel/module.c
+++ b/arch/blackfin/kernel/module.c
@@ -37,111 +37,6 @@
#include <asm/dma.h>
#include <asm/cacheflush.h>
-/*
- * handle arithmetic relocations.
- * See binut... |
da8d5089da6dfd54e5fd05d0c291a63c2bcf6885 | Analyze and fix the following issue in the Linux kernel code: sched: fix possible recursive rq->lock | Problem Details:
Vaidyanathan Srinivasan reported:
> =============================================
> [ INFO: possible recursive locking detected ]
> 2.6.28-autotest-tip-sv #1
> ---------------------------------------------
> klogd/5062 is trying to acquire lock:
> (&rq->lock){++..}, at: [<ffffffff8022aca2>] tas... | ```diff
diff --git a/kernel/sched.c b/kernel/sched.c
index 2e3545f57e77..deb5ac8c12f3 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -3728,8 +3728,13 @@ redo:
}
double_unlock_balance(this_rq, busiest);
+ /*
+ * Should not call ttwu while holding a rq->lock
+ */
+ spin_unlock(&this_rq->lock);
if (a... |
51d7a1398d1851e892504e97ca20521610dfcece | Analyze and fix the following issue in the Linux kernel code: x86: fix section mismatch warnings in mcheck/mce_amd_64.c | Problem Details:
Mark the function local_allocate_threshold_blocks() with __cpuinit,
in order to remove the following section mismatch messages:
WARNING: arch/x86/kernel/cpu/mcheck/built-in.o(.text+0x1363): Section mismatch in reference from the function local_allocate_threshold_blocks() to the function .cpuinit.text:... | ```diff
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd_64.c b/arch/x86/kernel/cpu/mcheck/mce_amd_64.c
index a5a5e0530370..8ae8c4ff094d 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_amd_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_amd_64.c
@@ -462,7 +462,7 @@ out_free:
return err;
}
-static long local_allocate_threshol... |
c247ed6f5205f9feebd276c4cbe45018b10f19fa | Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix typos for AD1882 codecs | Problem Details:
Fixed typos of codec-id checks for AD1882/AD1882A.
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index 13e4d910aa10..2e7371ec2e23 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -4263,13 +4263,13 @@ static int patch_ad1882(struct hda_codec *codec)
spec->num_adc_nids = ARRAY_SIZE(ad1882_adc_nids);
sp... |
d5337debacc00591b3f81fc3c982b40af7de1ab6 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Add quirk for HP 2230s | Problem Details:
Added a quirk for HP 2230s, model=laptop, with AD1984A codec.
Reference: Novell bnc#461660
https://bugzilla.novell.com/show_bug.cgi?id=461660
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index 26247cfe749d..13e4d910aa10 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -3900,6 +3900,7 @@ static const char *ad1884a_models[AD1884A_MODELS] = {
static struct snd_pci_quirk ad1884a_cfg_tbl[] = {
... |
da4276b8299a6544dc41ac2485d3ffca5811b3fb | Analyze and fix the following issue in the Linux kernel code: x86: offer frame pointers in all build modes | Problem Details:
CONFIG_FRAME_POINTERS=y results in much better debug info for the
kernel (clear and precise backtraces), with the only drawback being
a ~1% increase in kernel size.
So offer it unconditionally and enable it by default.
Signed-off-by: Ingo Molnar <mingo@elte.hu> | ```diff
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 862adb9bf0d4..73f7fe8fd4d1 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -27,6 +27,7 @@ config X86
select HAVE_IOREMAP_PROT
select HAVE_KPROBES
select ARCH_WANT_OPTIONAL_GPIOLIB
+ select ARCH_WANT_FRAME_POINTERS
select HAVE_KRETPROBES
se... |
ff288b274a9b383046fdbda4be3067daba4d5fe8 | Analyze and fix the following issue in the Linux kernel code: tracing/ftrace: fix a memory leak in stat tracing | Problem Details:
Impact: fix memory leak
This patch fixes a memory leak inside reset_stat_list(). The freeing
loop iterated only once.
Also turn the stat_list into a simple struct list_head, which
simplify the code and avoid an unused static pointer.
Reported-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: F... | ```diff
diff --git a/kernel/trace/trace_stat.c b/kernel/trace/trace_stat.c
index 6f194a33a64a..4cb4ff27646d 100644
--- a/kernel/trace/trace_stat.c
+++ b/kernel/trace/trace_stat.c
@@ -21,7 +21,7 @@ struct trace_stat_list {
void *stat;
};
-static struct trace_stat_list stat_list;
+static LIST_HEAD(stat_list);
/*
... |
431aa3fbf5bbe3be79809c7e603c2ed2ac64b015 | Analyze and fix the following issue in the Linux kernel code: ftrace: convert unsigned index to signed | Problem Details:
Impact: fix to unsigned compared to less than zero
Roel Kluin pointed out that there is a compare of an unsigned number
to less than zero. A previous clean up had the unsigned index set
to -1 for certain cases, but never converted it to signed.
Frederic Weisbecker noticed that another index is used t... | ```diff
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 2f32969c09df..9e54a6ccdb93 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -289,7 +289,7 @@ static DEFINE_MUTEX(ftrace_regex_lock);
struct ftrace_page {
struct ftrace_page *next;
- unsigned long index;
+ int index;
stru... |
c8f554b947e80a90e1b43bbd4fd26c27765b5f96 | Analyze and fix the following issue in the Linux kernel code: GFS2: Fix typo in gfs_page_mkwrite() | Problem Details:
There is a typo in gfs2_page_mkwrite()
gfs2_write_alloc_required() expects pos to be the offset in bytes. However,
instead of the page index being shifted by by PAGE_CACHE_SHIFT, it was shifted
by (PAGE_CACHE_SIZE - inode->i_blkbits). This patch simply shifts the page
index by the proper amount.
Sig... | ```diff
diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c
index 289c5f54ba53..93fe41b67f97 100644
--- a/fs/gfs2/ops_file.c
+++ b/fs/gfs2/ops_file.c
@@ -342,7 +342,7 @@ static int gfs2_page_mkwrite(struct vm_area_struct *vma, struct page *page)
struct gfs2_inode *ip = GFS2_I(inode);
struct gfs2_sbd *sdp = GFS2_SB... |
a26ee60f90daffe1de6be0d093af86e7279b3dfd | Analyze and fix the following issue in the Linux kernel code: bzip2/lzma: fix built-in initramfs vs CONFIG_RD_GZIP | Problem Details:
Impact: Resolves build failures in some configurations
Makes it possible to disable CONFIG_RD_GZIP . In that case, the
built-in initramfs will be compressed by whatever compressor is
available (bzip2 or lzma) or left uncompressed if none is available.
It also removes a couple of warnings which occur ... | ```diff
diff --git a/init/initramfs.c b/init/initramfs.c
index 40bd4fb95788..a3ba91cdab89 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -389,7 +389,7 @@ static int __init write_buffer(char *buf, unsigned len)
return len - count;
}
-
+#if defined CONFIG_RD_GZIP || defined CONFIG_RD_BZIP2 || defined CONFIG... |
fb9a4ca9820fd4d7c4906bd393004662451e273e | Analyze and fix the following issue in the Linux kernel code: bzip2/lzma: move initrd/ramfs options out of BLK_DEV | Problem Details:
Impact: Partial resolution of build failure
Move the initrd/initramfs configuration options from
drivers/block/Kconfig to usr/Kconfig, since they do not and should not
depend on CONFIG_BLK_DEV. This fixes builds when CONFIG_BLK_DEV=n.
Signed-off-by: H. Peter Anvin <hpa@zytor.com> | ```diff
diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
index cc9fa69c1ce4..0344a8a8321d 100644
--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -358,33 +358,6 @@ config BLK_DEV_XIP
will prevent RAM block device backing store memory from being
allocated from highmem (only a problem for high... |
ede6f5aea054d3fb67c78857f7abdee602302043 | Analyze and fix the following issue in the Linux kernel code: Fix up 64-bit byte swaps for most 32-bit architectures | Problem Details:
The __SWAB_64_THRU_32__ case of a 64-bit byte swap was depending on the
no-longer-existant ___swab32() method (three underscores). We got rid
of some of the worst indirection and complexity, and now it should just
use the 32-bit swab function that was defined right above it.
Reported-and-tested-by: N... | ```diff
diff --git a/include/linux/swab.h b/include/linux/swab.h
index 9a2d33e0a98a..be5284d4a053 100644
--- a/include/linux/swab.h
+++ b/include/linux/swab.h
@@ -68,7 +68,7 @@ static inline __attribute_const__ __u64 __fswab64(__u64 val)
#elif defined(__SWAB_64_THRU_32__)
__u32 h = val >> 32;
__u32 l = val & ((1UL... |
a75f28419a7efff611a81293d41d0e2137d7591e | Analyze and fix the following issue in the Linux kernel code: drm: fix ordering of driver unload vs agp unload. | Problem Details:
For KMS drivers, we really need to cleanup the driver before disabling
the AGP subsystem.
Signed-off-by: Dave Airlie <airlied@redhat.com> | ```diff
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index febb517ee679..5ff88d952226 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -314,14 +314,14 @@ static void drm_cleanup(struct drm_device * dev)
DRM_DEBUG("mtrr_del=%d\n", retval);
}
+ if (dev->driver->unload... |
241fa85b2bb655224357d713c251077dee3585ce | Analyze and fix the following issue in the Linux kernel code: drm/i915: Respect the other stolen memory sizes we know of. | Problem Details:
fd.o bug #19336.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie> | ```diff
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 3d7082af5b72..62a4bf7b49df 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -827,6 +827,7 @@ static int i915_probe_agp(struct drm_device *dev, unsigned long *aperture_size,
struct pci_dev ... |
f59abb161c955b68fd3d473368420c5919733e09 | Analyze and fix the following issue in the Linux kernel code: parport: ieee1284: use del_timer_sync() in parport_wait_event() | Problem Details:
Use del_timer_sync() instead of del_timer() to make sure the timer won't
be running when we return from parport_wait_event(), because this would
crash due to destruction of timer_list.
This is untested and just based on a code review. Just think about the
following sequence of events:
- add_timer()
... | ```diff
diff --git a/drivers/parport/ieee1284.c b/drivers/parport/ieee1284.c
index ac2a805ac7ea..8901ecf6e037 100644
--- a/drivers/parport/ieee1284.c
+++ b/drivers/parport/ieee1284.c
@@ -84,7 +84,7 @@ int parport_wait_event (struct parport *port, signed long timeout)
add_timer (&timer);
ret = down_interruptible (... |
0bef3c2dc7d0c8238330785c8f4504761b0e370b | Analyze and fix the following issue in the Linux kernel code: dma_alloc_from_coherent(): fix fallback to generic memory | Problem Details:
If bitmap_find_free_region() fails and DMA_MEMORY_EXCLUSIVE is not set,
the function will fail to write anything to *ret and will return 1. This will cause dma_alloc_coherent() to return an uninitialised value,
crashing the kernel, perhaps via DMA to a random address.
Fix that by changing ... | ```diff
diff --git a/kernel/dma-coherent.c b/kernel/dma-coherent.c
index f013a0c2e111..4bdcea822b45 100644
--- a/kernel/dma-coherent.c
+++ b/kernel/dma-coherent.c
@@ -116,11 +116,25 @@ int dma_alloc_from_coherent(struct device *dev, ssize_t size,
int page = bitmap_find_free_region(mem->bitmap, mem->size,
... |
29d6cf26a74b8575a6416b7ad4d369a455f8d009 | Analyze and fix the following issue in the Linux kernel code: edac: fix mpc85xx and add mpc8536 mpc8560 | Problem Details:
All other compatibles that are uniquely identifying the processor use a
prefix of the form fsl,mpc85...'. We add support for it so we can
deprecate the older 'fsl,85...' that was improperly used here.
Additionally added mpc8536 & mpc8560 to the compatible lists.
This patch is based on Nate's 8572 pa... | ```diff
diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c
index 0cfcb2d075a0..853ef37ec006 100644
--- a/drivers/edac/mpc85xx_edac.c
+++ b/drivers/edac/mpc85xx_edac.c
@@ -630,27 +630,22 @@ static int mpc85xx_l2_err_remove(struct of_device *op)
}
static struct of_device_id mpc85xx_l2_err_of_match... |
281efb17d88a91dc3b879bb1d49e3a66daf48797 | Analyze and fix the following issue in the Linux kernel code: edac: struct device: replace bus_id with dev_name(), dev_set_name() | Problem Details:
This patch is part of a larger patch series which will remove the "char
bus_id[20]" name string from struct device. The device name is managed in
the kobject anyway, and without any size limitation, and just needlessly
copied into "struct device".
[akpm@linux-foundation.org: coding-style fixes]
Acked... | ```diff
diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c
index 4041e9143283..ca9113e1c106 100644
--- a/drivers/edac/edac_device.c
+++ b/drivers/edac/edac_device.c
@@ -333,7 +333,7 @@ static int add_edac_dev_to_global_list(struct edac_device_ctl_info *edac_dev)
fail0:
edac_printk(KERN_WARNING, EDA... |
cda796a3d572059d64f5429dfc1d00ca6fcbaf8d | Analyze and fix the following issue in the Linux kernel code: random: don't try to look at entropy_count outside the lock | Problem Details:
As a non-atomic value, it's only safe to look at entropy_count when the
pool lock is held, so we move the BUG_ON inside the lock for correctness.
Also remove the spurious comment. It's ok for entropy_count to
temporarily exceed POOLBITS so long as it's left in a consistent state
when the lock is rele... | ```diff
diff --git a/drivers/char/random.c b/drivers/char/random.c
index c7afc068c28d..7c13581ca9cd 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -407,7 +407,7 @@ struct entropy_store {
/* read-write data: */
spinlock_t lock;
unsigned add_ptr;
- int entropy_count; /* Must at no time exceed ->P... |
8cd3ac3aca3f2afe8570708066d64d893da468e8 | Analyze and fix the following issue in the Linux kernel code: fs/exec.c: make do_coredump() void | Problem Details:
No one cares do_coredump()'s return value, and also it seems that it
is also not necessary. So make it void.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: WANG Cong <wangcong@zeuux.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.or... | ```diff
diff --git a/fs/exec.c b/fs/exec.c
index 6b09d6fa4f7e..71a6efe5d8bd 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1686,7 +1686,7 @@ int get_dumpable(struct mm_struct *mm)
return (ret >= 2) ? 2 : ret;
}
-int do_coredump(long signr, int exit_code, struct pt_regs * regs)
+void do_coredump(long signr, int exit_co... |
bd4207c9016749f0a212faf7f7f49e5317d96d9b | Analyze and fix the following issue in the Linux kernel code: kmod: fix varargs kernel-doc | Problem Details:
Fix varargs kernel-doc format in kmod.c:
Use @... instead of @varargs.
Warning(kernel/kmod.c:67): Excess function parameter or struct member 'varargs' description in 'request_module'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: A... | ```diff
diff --git a/kernel/kmod.c b/kernel/kmod.c
index b46dbb908669..a27a5f64443d 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -51,8 +51,8 @@ char modprobe_path[KMOD_PATH_LEN] = "/sbin/modprobe";
/**
* request_module - try to load a kernel module
- * @fmt: printf style format string for the name of the ... |
d6b54841f4ddd836c886d1e6ac381cf309ee98a3 | Analyze and fix the following issue in the Linux kernel code: minix: fix add link's wrong position calculation | Problem Details:
Fix the add link method. The oosition in the directory was calculated in
wrong way - it had the incorrect shift direction.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: <stable@kernel.org> [2.6.lots]... | ```diff
diff --git a/fs/minix/dir.c b/fs/minix/dir.c
index f70433816a38..d4946c4c90e2 100644
--- a/fs/minix/dir.c
+++ b/fs/minix/dir.c
@@ -280,7 +280,7 @@ int minix_add_link(struct dentry *dentry, struct inode *inode)
return -EINVAL;
got_it:
- pos = (page->index >> PAGE_CACHE_SHIFT) + p - (char*)page_address(page)... |
4fb6de2561d5c47f3539a7b412108164d79fbb96 | Analyze and fix the following issue in the Linux kernel code: fbdev/logo: check compatibility of main and extra logos | Problem Details:
The code to draw penguin logos always uses some properties of the main logo.
This is incorrect if additional logos (CONFIG_FB_LOGO_EXTRA=y) have different
types than the main logo, which causes corrupted logo images.
http://bugzilla.kernel.org/show_bug.cgi?id=12181
Hence skip additional logos that ... | ```diff
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 3c65b0d67617..756efeb91abc 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -510,6 +510,10 @@ static int fb_prepare_extra_logos(struct fb_info *info, unsigned int height,
fb_logo_ex_num = 0;
for (i = 0; i < fb_logo_ex_num; ... |
fd002050becd888e4dab419aa59a6484afe1d00b | Analyze and fix the following issue in the Linux kernel code: intelfb: fix sparse warnings | Problem Details:
Fix this sparse warnings:
drivers/video/intelfb/intelfbdrv.c:1497:3: warning: returning void-valued expression
drivers/video/intelfb/intelfbdrv.c:1525:3: warning: returning void-valued expression
drivers/video/intelfb/intelfbdrv.c:1544:3: warning: returning void-valued expression
drivers/video... | ```diff
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c
index a09e23649357..6d8e5415c809 100644
--- a/drivers/video/intelfb/intelfbdrv.c
+++ b/drivers/video/intelfb/intelfbdrv.c
@@ -1493,8 +1493,10 @@ static void intelfb_fillrect (struct fb_info *info,
DBG_MSG("intelfb_fillrect\n"... |
4fa34cd051db53a07e1004c7ab078ed13e721f21 | Analyze and fix the following issue in the Linux kernel code: i810: fix sparse warnings | Problem Details:
Fix this sparse warnings:
drivers/video/i810/i810_accel.c:305:3: warning: returning void-valued expression
drivers/video/i810/i810_accel.c:331:3: warning: returning void-valued expression
drivers/video/i810/i810_accel.c:370:3: warning: returning void-valued expression
Signed-off-by: Hannes Eder... | ```diff
diff --git a/drivers/video/i810/i810_accel.c b/drivers/video/i810/i810_accel.c
index 76764ea3486a..f5bedee4310a 100644
--- a/drivers/video/i810/i810_accel.c
+++ b/drivers/video/i810/i810_accel.c
@@ -301,8 +301,10 @@ void i810fb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
u32 dx, dy, width, ... |
27ec937c4f455163d6b0ab2df7a7b0161367c067 | Analyze and fix the following issue in the Linux kernel code: neofb: fix sparse warnings | Problem Details:
Fix this sparse warnings:
drivers/video/neofb.c:1456:4: warning: returning void-valued expression
drivers/video/neofb.c:1464:3: warning: returning void-valued expression
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <ak... | ```diff
diff --git a/drivers/video/neofb.c b/drivers/video/neofb.c
index bfb802d26d5a..588527a254c2 100644
--- a/drivers/video/neofb.c
+++ b/drivers/video/neofb.c
@@ -1453,7 +1453,8 @@ neo2200_imageblit(struct fb_info *info, const struct fb_image *image)
* is less than 16 bits wide. This is due to insufficient
... |
7654532dbeb6cc3fb35b12449f71f1d97e26fa9a | Analyze and fix the following issue in the Linux kernel code: pm3fb: fix sparse warning | Problem Details:
Fix this sparse warning:
drivers/video/pm3fb.c:543:3: warning: returning void-valued expression
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-found... | ```diff
diff --git a/drivers/video/pm3fb.c b/drivers/video/pm3fb.c
index 68089d1456c2..6666f45a2f8c 100644
--- a/drivers/video/pm3fb.c
+++ b/drivers/video/pm3fb.c
@@ -539,8 +539,10 @@ static void pm3fb_imageblit(struct fb_info *info, const struct fb_image *image)
bgx = par->palette[image->bg_color];
break;
}
- ... |
2899bb09418786132079bb6495ba8f1ce86eb0c6 | Analyze and fix the following issue in the Linux kernel code: viafb: fix sparse warnings | Problem Details:
Fix this sparse warnings:
drivers/video/via/viafbdev.c:871:3: warning: returning void-valued expression
drivers/video/via/viafbdev.c:938:3: warning: returning void-valued expression
drivers/video/via/viafbdev.c:995:3: warning: returning void-valued expression
Signed-off-by: Hannes Eder <hannes@... | ```diff
diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c
index e21fe5b6f9ff..37b433a08ce8 100644
--- a/drivers/video/via/viafbdev.c
+++ b/drivers/video/via/viafbdev.c
@@ -870,8 +870,10 @@ static void viafb_fillrect(struct fb_info *info,
u32 col = 0, rop = 0;
int pitch;
- if (!viafb_accel)
... |
6875145940efdc9851df8aaa251453d33cda62a4 | Analyze and fix the following issue in the Linux kernel code: nvidia: fix sparse warnings | Problem Details:
Fix this sparse warnings:
drivers/video/nvidia/nv_accel.c:304:3: warning: returning void-valued expression
drivers/video/nvidia/nv_accel.c:323:3: warning: returning void-valued expression
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by:... | ```diff
diff --git a/drivers/video/nvidia/nv_accel.c b/drivers/video/nvidia/nv_accel.c
index fa4821c5572b..ad6472a894ea 100644
--- a/drivers/video/nvidia/nv_accel.c
+++ b/drivers/video/nvidia/nv_accel.c
@@ -300,8 +300,10 @@ void nvidiafb_copyarea(struct fb_info *info, const struct fb_copyarea *region)
if (info->state... |
3efbb987c1ffcb82ad1b76b67fa26ec7c0c1448a | Analyze and fix the following issue in the Linux kernel code: fbdev: fix typo in drivers/video/modedb.c | Problem Details:
When I viewed drivers/video/modedb.c, I noticed a very old typo already
contained in 2.6.0.
This typo remained unheeded at least 5 years. Clear evidence of its
importance. ;)
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton... | ```diff
diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c
index d3c3af53a290..16186240c5f2 100644
--- a/drivers/video/modedb.c
+++ b/drivers/video/modedb.c
@@ -329,7 +329,7 @@ const struct fb_videomode vesa_modes[] = {
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
FB_VMODE_NONINTERLACED, FB_MODE_IS_V... |
97a1f9532ed41fd9cf5249fc1afae23fd47d1120 | Analyze and fix the following issue in the Linux kernel code: rtc: rtc-ds1216 fixes | Problem Details:
Fixes a few issues with the rtc-ds1216 driver
- use rtc_valid_tm
- use platform_driver_probe
- fix init sequence - it was using rtc_unregister_driver where not
needed. I also added resource_size and removed an useless pointer
assignment.
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
T... | ```diff
diff --git a/drivers/rtc/rtc-ds1216.c b/drivers/rtc/rtc-ds1216.c
index 9a234a4ec06d..4aedc705518c 100644
--- a/drivers/rtc/rtc-ds1216.c
+++ b/drivers/rtc/rtc-ds1216.c
@@ -10,7 +10,7 @@
#include <linux/platform_device.h>
#include <linux/bcd.h>
-#define DRV_VERSION "0.1"
+#define DRV_VERSION "0.2"
struct d... |
f60091575d43e5a27b26f4d6fa4251cdd6b9ae8a | Analyze and fix the following issue in the Linux kernel code: rtc: rtc-ds3234 fixes | Problem Details:
- no changelogs in code
- no banners
- use local buffers
- fix probe sequence
- do not init .driver.bus
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: Dennis Aberilla <denzzzhome@yahoo.com>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.o... | ```diff
diff --git a/drivers/rtc/rtc-ds3234.c b/drivers/rtc/rtc-ds3234.c
index 45e5b106af73..c51589ede5b7 100644
--- a/drivers/rtc/rtc-ds3234.c
+++ b/drivers/rtc/rtc-ds3234.c
@@ -1,4 +1,4 @@
-/* drivers/rtc/rtc-ds3234.c
+/* rtc-ds3234.c
*
* Driver for Dallas Semiconductor (DS3234) SPI RTC with Integrated Crystal
... |
a5771c6c42826556a73b16b66f93a0936ff87d4e | Analyze and fix the following issue in the Linux kernel code: rtc: rtc-max6902 fixes | Problem Details:
- no changelogs in code
- no banners
- use local buffers
- fix probe sequence
- fixed style issues
- fix spi_write call
- removed old debug code
replaces http://patchwork.ozlabs.org/patch/9421/
and http://patchwork.ozlabs.org/patch/9455/
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Acked-by... | ```diff
diff --git a/drivers/rtc/rtc-max6902.c b/drivers/rtc/rtc-max6902.c
index 2f6507df7b49..36a8ea9ed8ba 100644
--- a/drivers/rtc/rtc-max6902.c
+++ b/drivers/rtc/rtc-max6902.c
@@ -9,14 +9,6 @@
*
* Driver for MAX6902 spi RTC
*
- * Changelog:
- *
- * 24-May-2006: Raphael Assenat <raph@8d.com>
- * ... |
ae64d16956718bfd11955217f603b27a781c0cb1 | Analyze and fix the following issue in the Linux kernel code: rtc: kconfig cleanup | Problem Details:
Remove double spaces and adds some suggestions. It also fixes the
descriptions of options that are no more available as modules.
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linu... | ```diff
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index fe1d7a2c27e4..92c2db64de9c 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -35,8 +35,8 @@ config RTC_HCTOSYS_DEVICE
default "rtc0"
help
The RTC device that will be used to (re)initialize the system
- clock, usually rtc0. Initi... |
7b9b2ef1bb7a1eb4c8cdcdc537b3e20466d2d96d | Analyze and fix the following issue in the Linux kernel code: rtc: rtc-ds1390 probe sequence and misc fixes | Problem Details:
Small fixes for the ds1390 driver
- fixed initialization of the spi device
- added missing includes
- removed printks
- removed useless wrappers for rtc ops
- removed dead code
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: Mark Jackson <mpfj@mimc.co.uk>
Cc: David Brownell <david-b@p... | ```diff
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 74bd6160dfb1..fe1d7a2c27e4 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -317,7 +317,8 @@ config RTC_DRV_DS1305
config RTC_DRV_DS1390
tristate "Dallas/Maxim DS1390/93/94"
help
- If you say yes here you get support for the DS1390... |
0417ce2ad81f719c72e948705134c3d502300d4f | Analyze and fix the following issue in the Linux kernel code: rtc: pxa27x/pxa3xx driver fixes, revised | Problem Details:
Small fixes for the pxa27x/pxa3xx driver
- use platform_driver_probe
- fixed exit paths
- fixed probe sequence
- added missing include
- using linux/io.h instead of asm/io.h
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Jonathan Cameron ... | ```diff
diff --git a/drivers/rtc/rtc-pxa.c b/drivers/rtc/rtc-pxa.c
index 074f356fd049..cc7eb8767b82 100644
--- a/drivers/rtc/rtc-pxa.c
+++ b/drivers/rtc/rtc-pxa.c
@@ -19,13 +19,13 @@
*
*/
+#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/module.h>
#include <linux/rtc.h>
#include <lin... |
2fac6674ddf3164da42a76d62f8912073d629a30 | Analyze and fix the following issue in the Linux kernel code: rtc: bunch of drivers: fix 'no irq' case handing | Problem Details:
This patch fixes a bunch of irq checking misuses. Most drivers were
getting irq via platform_get_irq(), which returns -ENXIO or r->start.
rtc-cmos.c is special. It is using PNP and platform bindings. Hopefully
nobody is using PNP IRQ 0 for RTC. So the changes should be safe.
rtc-sh.c is using pla... | ```diff
diff --git a/drivers/rtc/rtc-at32ap700x.c b/drivers/rtc/rtc-at32ap700x.c
index 90b9a6503e15..e1ec33e40e38 100644
--- a/drivers/rtc/rtc-at32ap700x.c
+++ b/drivers/rtc/rtc-at32ap700x.c
@@ -205,7 +205,7 @@ static int __init at32_rtc_probe(struct platform_device *pdev)
{
struct resource *regs;
struct rtc_at32a... |
bae8ec66554b27967f057a4b7888b09481ff1b8b | Analyze and fix the following issue in the Linux kernel code: autofs4: fix string validation check order | Problem Details:
In function validate_dev_ioctl() we check that the string we've been sent
is a valid path. The function that does this check assumes the string is
NULL terminated but our NULL termination check isn't done until after this
call. This patch changes the order of the check.
Signed-off-by: Ian Kent <rave... | ```diff
diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c
index aa3f47293bb8..025e105bffea 100644
--- a/fs/autofs4/dev-ioctl.c
+++ b/fs/autofs4/dev-ioctl.c
@@ -124,7 +124,7 @@ static inline void free_dev_ioctl(struct autofs_dev_ioctl *param)
/*
* Check sanity of parameter control fields and if a path is... |
41cfef2eb87694a8d64105c059b39f7bd6b7d4fe | Analyze and fix the following issue in the Linux kernel code: autofs4: fix var shadowed by local delaration | Problem Details:
A local definition of devid in autofs_dev_ioctl_ismountpoint() shadows
the fuction wide definition.
Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c
index 054d6d9ad9ba..0566ff8db4cd 100644
--- a/fs/autofs4/dev-ioctl.c
+++ b/fs/autofs4/dev-ioctl.c
@@ -646,17 +646,17 @@ static int autofs_dev_ioctl_ismountpoint(struct file *fp,
magic = nd.path.dentry->d_inode->i_sb->s_magic;
}
} else {
- de... |
f70f582f0072f37790d2984647198deb3e7782a3 | Analyze and fix the following issue in the Linux kernel code: fs/ecryptfs/inode.c: cleanup kerneldoc | Problem Details:
Arguments lower_dentry and ecryptfs_dentry in ecryptfs_create_underlying_file()
have been merged into dentry, now fix it.
Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linu... | ```diff
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index 7168a88cdbc1..5697899a168d 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -52,8 +52,7 @@ static void unlock_dir(struct dentry *dir)
/**
* ecryptfs_create_underlying_file
* @lower_dir_inode: inode of the parent in the lower fs of th... |
a8f12864c52f8ab8520568dc97969c1749ae60bf | Analyze and fix the following issue in the Linux kernel code: eCryptfs: Fix data types (int/size_t) | Problem Details:
Correct several format string data type specifiers. Correct filename size
data types; they should be size_t rather than int when passed as
parameters to some other functions (although note that the filenames will
never be larger than int).
Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Cc: Dust... | ```diff
diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c
index 490b129311eb..e935a2224982 100644
--- a/fs/ecryptfs/crypto.c
+++ b/fs/ecryptfs/crypto.c
@@ -2093,7 +2093,7 @@ int ecryptfs_encrypt_and_encode_filename(
filename = kzalloc(sizeof(*filename), GFP_KERNEL);
if (!filename) {
printk(KERN_ERR "%s... |
9c79f34f7ee71cd28272332b424ca64b2be006ab | Analyze and fix the following issue in the Linux kernel code: eCryptfs: Filename Encryption: Tag 70 packets | Problem Details:
This patchset implements filename encryption via a passphrase-derived
mount-wide Filename Encryption Key (FNEK) specified as a mount parameter.
Each encrypted filename has a fixed prefix indicating that eCryptfs should
try to decrypt the filename. When eCryptfs encounters this prefix, it
decodes the f... | ```diff
diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c
index 6046239465a1..485732751f09 100644
--- a/fs/ecryptfs/crypto.c
+++ b/fs/ecryptfs/crypto.c
@@ -1149,19 +1149,20 @@ ecryptfs_cipher_code_str_map[] = {
/**
* ecryptfs_code_for_cipher_string
- * @crypt_stat: The cryptographic context
+ * @cipher_name... |
49ad2fd76c97133fb396edc24ded7fe26093a578 | Analyze and fix the following issue in the Linux kernel code: kprobes: remove called_from argument | Problem Details:
Remove called_from argument from kprobes which had been used for
preventing self-refering of kernel module. However, since we don't keep
module's refcount after registering kprobe any more, there is no reason to
check that.
This patch also simplifies registering/unregistering functions because we
don... | ```diff
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index cb732a9aa55f..ddefb9fae0c8 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -644,8 +644,7 @@ static kprobe_opcode_t __kprobes *kprobe_addr(struct kprobe *p)
return (kprobe_opcode_t *)(((char *)addr) + p->offset);
}
-static int __kprobes __regist... |
e8386a0cb22f4a2d439384212c494ad0bda848fe | Analyze and fix the following issue in the Linux kernel code: kprobes: support probing module __exit function | Problem Details:
Allows kprobes to probe __exit routine. This adds flags member to struct
kprobe. When module is freed(kprobes hooks module_notifier to get this
event), kprobes which probe the functions in that module are set to "Gone"
flag to the flags member. These "Gone" probes are never be enabled.
Users can che... | ```diff
diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt
index a79633d702bf..48b3de90eb1e 100644
--- a/Documentation/kprobes.txt
+++ b/Documentation/kprobes.txt
@@ -497,7 +497,10 @@ The first column provides the kernel address where the probe is inserted.
The second column identifies the type of prob... |
8e1144050e49dd4ef19c117dc5626f212cfe73cf | Analyze and fix the following issue in the Linux kernel code: kprobes: indirectly call kprobe_target | Problem Details:
Call kprobe_target indirectly. This prevents gcc to unroll a noinline
function in caller function.
I ported patches which had been discussed on
http://sources.redhat.com/bugzilla/show_bug.cgi?id=3542
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Acked-by: Ananth N Mavinakayanahalli <ananth@i... | ```diff
diff --git a/kernel/test_kprobes.c b/kernel/test_kprobes.c
index 06b6395b45b2..9c0127ead6ab 100644
--- a/kernel/test_kprobes.c
+++ b/kernel/test_kprobes.c
@@ -22,21 +22,10 @@
static u32 rand1, preh_val, posth_val, jph_val;
static int errors, handler_errors, num_tests;
+static u32 (*target)(u32 value);
st... |
bc2f70151fe7a117dbe8347edc5a877e749572a3 | Analyze and fix the following issue in the Linux kernel code: kprobes: bugfix: try_module_get even if calling_mod is NULL | Problem Details:
When someone called register_*probe() from kernel-core code(not from
module) and that probes a kernel module, users can remove the probed
module because kprobe doesn't increment reference counter of the module.
(on the other hand, if the kernel-module calls register_*probe, kprobe
increments refcount o... | ```diff
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 9f8a3f25259a..3afd354c46f1 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -634,7 +634,7 @@ static int __kprobes __register_kprobe(struct kprobe *p,
* avoid incrementing the module refcount, so as to allow
* unloading of self probing modules... |
5ee36c989831ab720eee282521462cce0a3c4900 | Analyze and fix the following issue in the Linux kernel code: spi: atmel_spi update chipselect handling | Problem Details:
This solves several issues:
* It fixes the wrong idle clock polarity issue in a cleaner and less
expensive way.
* It handles the AT32AP7000 errata "SPI Chip Select 0 BITS field
overrides other Chip Selects". Other chips, e.g. AT91SAM9261, have
similar issues.
Currently, the AT91RM9200 ... | ```diff
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index b4f7f1c286e1..5e39bac9c51b 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -51,6 +51,12 @@ struct atmel_spi {
dma_addr_t buffer_dma;
};
+/* Controller-specific per-slave state */
+struct atmel_spi_device {
+ unsigne... |
c2bacfc44f4b8d03dbaad5d2dca2fb4161e81975 | Analyze and fix the following issue in the Linux kernel code: dmi: fix kernel-doc notation | Problem Details:
Add missing kernel-doc notation:
drivers/firmware/dmi_scan.c:475: No description found for parameter 'str'
drivers/firmware/dmi_scan.c:592: No description found for parameter 'f'
drivers/firmware/dmi_scan.c:592: No description found for parameter 'str'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle... | ```diff
diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
index 78b989d202a3..d76adfea5df7 100644
--- a/drivers/firmware/dmi_scan.c
+++ b/drivers/firmware/dmi_scan.c
@@ -468,8 +468,8 @@ const char *dmi_get_system_info(int field)
EXPORT_SYMBOL(dmi_get_system_info);
/**
- * dmi_name_in_serial - ... |
5cf0cc4e670b8da2231a3375db87ec3b6cb84432 | Analyze and fix the following issue in the Linux kernel code: binfmts.h: include list.h | Problem Details:
linux_binfmt uses list_head, so list.h is needed.
[akpm@linux-foundation.org: fix `make headerscheck']
Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
index 6cbfbe297180..0d0150b4901e 100644
--- a/include/linux/binfmts.h
+++ b/include/linux/binfmts.h
@@ -18,6 +18,7 @@ struct pt_regs;
#define BINPRM_BUF_SIZE 128
#ifdef __KERNEL__
+#include <linux/list.h>
#define CORENAME_MAX_SIZE 128
``` |
44ea9c809db6cd373448e77c4be424b534f2051f | Analyze and fix the following issue in the Linux kernel code: drivers/macintosh: Add missing of_node_put in therm_adt746x.c | Problem Details:
of_node_put is needed before discarding a value received from
of_find_node_by_name, eg in error handling code or when the device node is
no longer used.
The semantic match that catches the bug is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@r exists@
local idexpression struct device_... | ```diff
diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c
index 22bf981d393b..82607add69a9 100644
--- a/drivers/macintosh/therm_adt746x.c
+++ b/drivers/macintosh/therm_adt746x.c
@@ -554,7 +554,7 @@ thermostat_init(void)
const u32 *prop;
int i = 0, offset = 0;
int err;
-
+
np = ... |
2e75a4b7ae0dd4bf7b34e41c2c3be7ac23b8f1cc | Analyze and fix the following issue in the Linux kernel code: adt7470: fix pwm at a certain level during temperature sensor scan | Problem Details:
In the small window that it takes to read the temperature sensors, the pwm
outputs momentarily drop to 0. This causes a noticeable hiccup in fan
speed, which is slightly annoying. The solution is to manually program
the pwm output with whatever the automatic value is and then shift the
fans to manual... | ```diff
diff --git a/drivers/hwmon/adt7470.c b/drivers/hwmon/adt7470.c
index da6c9306ca5f..b7a442a80bde 100644
--- a/drivers/hwmon/adt7470.c
+++ b/drivers/hwmon/adt7470.c
@@ -74,6 +74,7 @@ I2C_CLIENT_INSMOD_1(adt7470);
#define ADT7470_REG_PWM12_CFG 0x68
#define ADT7470_PWM2_AUTO_MASK 0x40
#define ADT7470_PWM1_A... |
21caa13c02d67f755fad50370996c489c34a9b15 | Analyze and fix the following issue in the Linux kernel code: checkpatch: fix the perlcritic errors | Problem Details:
Clean up checkpatch using perlcritic.
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 94371f69122c..bd6ac90d194c 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -69,7 +69,9 @@ my $dbg_possible = 0;
my $dbg_type = 0;
my $dbg_attr = 0;
for my $key (keys %debug) {
- eval "\${dbg_$key} = '$debug{$key}';"
+ ## no cr... |
8b1b33786b06a222cf3430b1bf942a3681532104 | Analyze and fix the following issue in the Linux kernel code: checkpatch: fix continuation detection when handling spacing on operators | Problem Details:
We are miscategorising a continuation fragment following an operator
which may lead to us thinking that there is a space after it when there is
not. Fix this up.
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <t... | ```diff
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index d80b55a6f89b..67b0c9faa32d 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1793,7 +1793,7 @@ sub process {
$c = 'C' if ($elements[$n + 2] =~ /^$;/);
$c = 'B' if ($elements[$n + 2] =~ /^(\)|\]|;)/);
$c = 'O' if ... |
1e85572697b348b1a126520349a29654f2ae6a12 | Analyze and fix the following issue in the Linux kernel code: checkpatch: Add warning for p0-patches | Problem Details:
Some people work internally with -p0-patches which has the danger that one
forgets to convert them to -p1 before mainlining. Bitten myself and seen
p0-patches in mailing lists occasionally, this patch adds a warning to
checkpatch.pl in case a patch is -p0. If you really want, you can fool
this check ... | ```diff
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index f01569847969..b953c76be369 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1057,6 +1057,7 @@ sub process {
my $in_comment = 0;
my $comment_edge = 0;
my $first_line = 0;
+ my $p1_prefix = '';
my $prev_values = 'E';
@@... |
721c1cb60e0546d2e71b9aa50426c94e69c6521a | Analyze and fix the following issue in the Linux kernel code: checkpatch: comment detection may miss an implied comment on the last hunk | Problem Details:
When detecting implied comments from leading stars we may incorrectly
think we have detected an edge one way or the other when we have not if we
drop off the end of the last hunk. Fix this up.
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Si... | ```diff
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 826cdbac0114..7c17e95bf36f 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1097,8 +1097,8 @@ sub process {
$rawlines[$ln - 1] =~ /^-/);
$cnt--;
#print "RAW<$rawlines[$ln - 1]>\n";
- ($edge) = (defined $rawlin... |
94e2959e7a6a4ef0969932c30349ce6f4469a3cf | Analyze and fix the following issue in the Linux kernel code: fs: fix function param name in kernel-doc | Problem Details:
Fix function parameter name in kernel-doc:
Warning(linux-2.6.28-git5//fs/block_dev.c:1272): No description found for parameter 'pathname'
Warning(linux-2.6.28-git5//fs/block_dev.c:1272): Excess function parameter 'path' description in 'lookup_bdev'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com... | ```diff
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 349a26c10001..b957717e25ab 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -1262,7 +1262,7 @@ EXPORT_SYMBOL(ioctl_by_bdev);
/**
* lookup_bdev - lookup a struct block_device by name
- * @path: special file representing the block device
+ * @pathname: s... |
208b95ce3afbc2f4ef0a84b8cfdd7a8b94d17a5a | Analyze and fix the following issue in the Linux kernel code: sysrq: more explicit, less terse help messages | Problem Details:
Eliminate sysrq terse help mode; make sysrq help messages more meaningful
(more explicit/verbose). Make the sysrq action letter clearer by listing
it explicitly in more sysrq help messages (when it is not simple/clear).
The SysRq help message now looks like this:
SysRq : HELP : loglevel(0-9) reBoot ... | ```diff
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c
index 94966edfb44d..d41b9f6f7903 100644
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
@@ -82,7 +82,7 @@ static void sysrq_handle_loglevel(int key, struct tty_struct *tty)
}
static struct sysrq_key_op sysrq_loglevel_op = {
.handler = sysrq_hand... |
0bc02f3fa433a98631a932e77c4b1f873da35aee | Analyze and fix the following issue in the Linux kernel code: fs/inode: fix kernel-doc notation | Problem Details:
Fix kernel-doc notation:
Warning(linux-2.6.28-git3//fs/inode.c:120): No description found for parameter 'sb'
Warning(linux-2.6.28-git3//fs/inode.c:120): No description found for parameter 'inode'
Warning(linux-2.6.28-git3//fs/inode.c:588): No description found for parameter 'sb'
Warning(linux-2.6.28-g... | ```diff
diff --git a/fs/inode.c b/fs/inode.c
index a903860bc5ac..7a6e8c2ff7b1 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -110,8 +110,8 @@ static void wake_up_inode(struct inode *inode)
/**
* inode_init_always - perform inode structure intialisation
- * @sb - superblock inode belongs to.
- * @inode - inode to ini... |
8c4018884a49eb2c6c7ca90804f331b12983561c | Analyze and fix the following issue in the Linux kernel code: fs: fix name overwrite in __register_chrdev_region() | Problem Details:
It's possible to register a chrdev with a name size exactly the same as
was allocated in structure. It seems it was not intended behaviour.
At least chrdev_show does not like it.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <a... | ```diff
diff --git a/fs/char_dev.c b/fs/char_dev.c
index 700697a72618..38f71222a552 100644
--- a/fs/char_dev.c
+++ b/fs/char_dev.c
@@ -120,7 +120,7 @@ __register_chrdev_region(unsigned int major, unsigned int baseminor,
cd->major = major;
cd->baseminor = baseminor;
cd->minorct = minorct;
- strncpy(cd->name,name, ... |
ba84be2338d3a2b6020d39279335bb06fcd332e1 | Analyze and fix the following issue in the Linux kernel code: remove linux/hardirq.h from asm-generic/local.h | Problem Details:
While looking at reducing the amount of architecture namespace pollution
in the generic kernel, I found that asm/irq.h is included in the vast
majority of compilations on ARM (around 650 files.)
Since asm/irq.h includes a sub-architecture include file on ARM, this
causes a negative impact on the ccach... | ```diff
diff --git a/arch/avr32/kernel/traps.c b/arch/avr32/kernel/traps.c
index 0d987373bc01..d547c8df157d 100644
--- a/arch/avr32/kernel/traps.c
+++ b/arch/avr32/kernel/traps.c
@@ -7,6 +7,7 @@
*/
#include <linux/bug.h>
+#include <linux/hardirq.h>
#include <linux/init.h>
#include <linux/kallsyms.h>
#include <l... |
08adefd4791772d8b3fe23cc9d2554123e21dfa3 | Analyze and fix the following issue in the Linux kernel code: ioc4: automatically load sgiioc4 subordinate module | Problem Details:
Modify ioc4 to always load the sgiioc4 IDE module if the board carrying
the IOC4 hardware actually implements the IDE interface (not all boards
bring this functionality off the IOC4 chip). A drive hosted on the IDE
interface may contain the root filesystem, and sgiioc4 doesn't load
automatically as io... | ```diff
diff --git a/drivers/misc/ioc4.c b/drivers/misc/ioc4.c
index 6f76573e7c8a..60b0b1a4fb3a 100644
--- a/drivers/misc/ioc4.c
+++ b/drivers/misc/ioc4.c
@@ -269,6 +269,16 @@ ioc4_variant(struct ioc4_driver_data *idd)
return IOC4_VARIANT_PCI_RT;
}
+static void
+ioc4_load_modules(struct work_struct *work)
+{
+ /* ... |
e3d5a27d5862b6425d0879272e24abecf7245105 | Analyze and fix the following issue in the Linux kernel code: Allow times and time system calls to return small negative values | Problem Details:
At the moment, the times() system call will appear to fail for a period
shortly after boot, while the value it want to return is between -4095 and
-1. The same thing will also happen for the time() system call on 32-bit
platforms some time in 2106 or so.
On some platforms, such as x86, this is unavoi... | ```diff
diff --git a/kernel/compat.c b/kernel/compat.c
index d52e2ec1deb5..42d56544460f 100644
--- a/kernel/compat.c
+++ b/kernel/compat.c
@@ -24,6 +24,7 @@
#include <linux/migrate.h>
#include <linux/posix-timers.h>
#include <linux/times.h>
+#include <linux/ptrace.h>
#include <asm/uaccess.h>
@@ -229,6 +230,7 @@... |
af9379c7121d5543722c00bbd1adf7dcaa0b6448 | Analyze and fix the following issue in the Linux kernel code: documentation: when to BUG(), and when to not BUG() | Problem Details:
Provide some basic advice about when to use BUG()/BUG_ON(): never, unless
there's really no better option.
This matches my understanding of the standard policy ... which seems not
to be written down so far, outside of LKML messages that I haven't
bookmarked.
Signed-off-by: David Brownell <dbrownell@... | ```diff
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index 8af276361bf2..37b82cb96c89 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -28,6 +28,17 @@ struct bug_entry {
#define BUGFLAG_WARNING (1<<0)
#endif /* CONFIG_GENERIC_BUG */
+/*
+ * Don't use BUG() or BUG_ON() ... |
ff083c8372f6312bb3a8c7f7b748920aeeb210c9 | Analyze and fix the following issue in the Linux kernel code: autodetect_raid: add missing __init marking | Problem Details:
The function autodetect_raid is only used by __init functions, and it refers
to __initdata, so it needs __init markings. Fixes this error:
The function autodetect_raid() references
the variable __initdata raid_noautodetect.
This is often because autodetect_raid lacks a __initdata
annotation or the ann... | ```diff
diff --git a/init/do_mounts_md.c b/init/do_mounts_md.c
index d6da5cdd3c38..ff95e3192884 100644
--- a/init/do_mounts_md.c
+++ b/init/do_mounts_md.c
@@ -271,7 +271,7 @@ static int __init raid_setup(char *str)
__setup("raid=", raid_setup);
__setup("md=", md_setup);
-static void autodetect_raid(void)
+static vo... |
40bc1f2dbc29ab88176a650e51f2246526105093 | Analyze and fix the following issue in the Linux kernel code: lib: fix sparse shadowed variable warning | Problem Details:
pos is always set before being used, no need to declare a
second one inside the if() block.
lib/prio_heap.c:34:7: warning: symbol 'pos' shadows an earlier one
lib/prio_heap.c:30:6: originally declared here
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@l... | ```diff
diff --git a/lib/prio_heap.c b/lib/prio_heap.c
index 471944a54e23..a7af6f85eca8 100644
--- a/lib/prio_heap.c
+++ b/lib/prio_heap.c
@@ -31,7 +31,7 @@ void *heap_insert(struct ptr_heap *heap, void *p)
if (heap->size < heap->max) {
/* Heap insertion */
- int pos = heap->size++;
+ pos = heap->size++;
wh... |
f41ced8f108cc80f16509b907cd7ac93944459bc | Analyze and fix the following issue in the Linux kernel code: Check fops_get() return value | Problem Details:
Several subsystem open handlers dereference the fops_get() return value
without checking it for nullness. This opens a race condition between the
open handler and module unloading.
A module can be marked as being unloaded (MODULE_STATE_GOING) before its
exit function is called and gets the chance to ... | ```diff
diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
index 3733e36d135e..b06a53715853 100644
--- a/drivers/gpu/drm/drm_fops.c
+++ b/drivers/gpu/drm/drm_fops.c
@@ -183,6 +183,10 @@ int drm_stub_open(struct inode *inode, struct file *filp)
old_fops = filp->f_op;
filp->f_op = fops_get(&dev->d... |
f99ebf0a86de13f77bc4ee349de96db9f2f67f2e | Analyze and fix the following issue in the Linux kernel code: init: properly placing noinline keyword | Problem Details:
checkpatch warns about 'static void noinline'. It wants `static noinline
void'.
Both are permissible, but the kernel consistently uses `static inline' and
`static noinline', and consistency is good. Hence let's keep the
checkpatch warning and fix up this code site.
[akpm@linux-foundation.org: rewro... | ```diff
diff --git a/init/main.c b/init/main.c
index cd168ebc5924..90926dadc20d 100644
--- a/init/main.c
+++ b/init/main.c
@@ -447,7 +447,7 @@ static void __init setup_command_line(char *command_line)
* gcc-3.4 accidentally inlines this function, so use noinline.
*/
-static void noinline __init_refok rest_init(vo... |
73ce02e96fe34a983199a9855b2ae738f960a6ee | Analyze and fix the following issue in the Linux kernel code: mm: stop kswapd's infinite loop at high order allocation | Problem Details:
Wassim Dagash reported following kswapd infinite loop problem.
kswapd runs in some infinite loop trying to swap until order 10 of zone
highmem is OK.... kswapd will continue to try to balance order 10 of zone
highmem forever (or until someone release a very large chunk of highmem).
For non orde... | ```diff
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 5daf606e0a35..b07c48b09a93 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1867,6 +1867,23 @@ out:
try_to_freeze();
+ /*
+ * Fragmentation may mean that the system cannot be
+ * rebalanced for high-order allocations in all zones.
+ * At this point, if nr... |
901608d9045146aec6f14a7777ea4b1501c379f0 | Analyze and fix the following issue in the Linux kernel code: mm: introduce get_mm_hiwater_xxx(), fix taskstats->hiwater_xxx accounting | Problem Details:
xacct_add_tsk() relies on do_exit()->update_hiwater_xxx() and uses
mm->hiwater_xxx directly, this leads to 2 problems:
- taskstats_user_cmd() can call fill_pid()->xacct_add_tsk() at any
moment before the task exits, so we should check the current values of
rss/vm anyway.
- do_exit()->update_hiwat... | ```diff
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 38a3f4b15394..ea415136ac9e 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -386,6 +386,9 @@ extern void arch_unmap_area_topdown(struct mm_struct *, unsigned long);
(mm)->hiwater_vm = (mm)->total_vm; \
} while (0)
+#define g... |
67d58ac47d25f7e2a105248a4aea6113131ab874 | Analyze and fix the following issue in the Linux kernel code: mm: pagecache gfp flags fix | Problem Details:
Frustratingly, gfp_t is really divided into two classes of flags. One are
the context dependent ones (can we sleep? can we enter filesystem? block
subsystem? should we use some extra reserves, etc.). The other ones are
the type of memory required and depend on how the algorithm is implemented
rath... | ```diff
diff --git a/mm/filemap.c b/mm/filemap.c
index f3555fb806d3..2f55a1e2baf7 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -741,7 +741,14 @@ repeat:
page = __page_cache_alloc(gfp_mask);
if (!page)
return NULL;
- err = add_to_page_cache_lru(page, mapping, index, gfp_mask);
+ /*
+ * We want a regular... |
856bf4d717feb8c55d4e2f817b71ebb70cfbc67b | Analyze and fix the following issue in the Linux kernel code: fs: sys_sync fix | Problem Details:
s_syncing livelock avoidance was breaking data integrity guarantee of
sys_sync, by allowing sys_sync to skip writing or waiting for superblocks
if there is a concurrent sys_sync happening.
This livelock avoidance is much less important now that we don't have the
get_super_to_sync() call after every sb... | ```diff
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index a9ee474f9691..e5eaa62fd17f 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -652,18 +652,6 @@ void sync_inodes_sb(struct super_block *sb, int wait)
sync_sb_inodes(sb, &wbc);
}
-/*
- * Rather lame livelock avoidance.
- */
-static void set_sb_... |
38f21977663126fef53f5585e7f1653d8ebe55c4 | Analyze and fix the following issue in the Linux kernel code: fs: sync_sb_inodes fix | Problem Details:
Fix data integrity semantics required by sys_sync, by iterating over all
inodes and waiting for any writeback pages after the initial writeout.
Comments explain the exact problem.
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus... | ```diff
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index d99601af9e48..a9ee474f9691 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -440,6 +440,7 @@ void generic_sync_sb_inodes(struct super_block *sb,
struct writeback_control *wbc)
{
const unsigned long start = jiffies; /* livelock avoidance *... |
48b47c561e41525061b5bc0cfd67d6367fd11dc4 | Analyze and fix the following issue in the Linux kernel code: mm: direct IO starvation improvement | Problem Details:
Direct IO can invalidate and sync a lot of pagecache pages in the mapping.
A 4K direct IO will actually try to sync and/or invalidate the pagecache
of the entire file, for example (which might be many GB or TB large).
Improve this by doing range syncs. Also, memory no longer has to be
unmapped to ca... | ```diff
diff --git a/mm/filemap.c b/mm/filemap.c
index 9c5e6235cc74..f3555fb806d3 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1317,7 +1317,8 @@ generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
goto out; /* skip atime */
size = i_size_read(inode);
if (pos < size) {
- retval = filemap_w... |
48aae42556e5ea1ba0d8ddab25352706577af2ed | Analyze and fix the following issue in the Linux kernel code: mm/mmap.c: fix coding style | Problem Details:
Fix a little of the coding style in mm/mmap.c
[akpm@linux-foundation.org: cleanup]
Signed-off-by: ZhenwenXu <helight.xu@gmail.com>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/mm/mmap.c b/mm/mmap.c
index 2c778fcfd9bd..e4507b23e620 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -413,7 +413,7 @@ void __vma_link_rb(struct mm_struct *mm, struct vm_area_struct *vma,
static void __vma_link_file(struct vm_area_struct *vma)
{
- struct file * file;
+ struct file *file;
file = ... |
4779280d1ea4d361af13ae77ba55217fbcd16d4c | Analyze and fix the following issue in the Linux kernel code: mm: make get_user_pages() interruptible | Problem Details:
The initial implementation of checking TIF_MEMDIE covers the cases of OOM
killing. If the process has been OOM killed, the TIF_MEMDIE is set and it
return immediately. This patch includes:
1. add the case that the SIGKILL is sent by user processes. The
process can try to get_user_pages() unlimi... | ```diff
diff --git a/mm/internal.h b/mm/internal.h
index 1981bc9454f3..478223b73a2a 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -276,6 +276,7 @@ static inline void mminit_validate_memmodel_limits(unsigned long *start_pfn,
#define GUP_FLAGS_WRITE 0x1
#define GUP_FLAGS_FORCE 0x2
... |
1e9e63650d6cb88e6d6d2ca6cc3ee276c26de4a3 | Analyze and fix the following issue in the Linux kernel code: badpage: KERN_ALERT BUG instead of KERN_EMERG | Problem Details:
bad_page() and rmap Eeek messages have said KERN_EMERG for a few years,
which I've followed in print_bad_pte(). These are serious system errors,
on a par with BUGs, but they're not quite emergencies, and we do our best
to carry on: say KERN_ALERT "BUG: " like the x86 oops does.
And remove the "Trying... | ```diff
diff --git a/mm/memory.c b/mm/memory.c
index b12888c1b4e3..db68af8e0bc4 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -397,8 +397,8 @@ static void print_bad_pte(struct vm_area_struct *vma, unsigned long addr,
return;
}
if (nr_unshown) {
- printk(KERN_EMERG
- "Bad page map: %lu messages suppressed... |
2509ef26db4699a5d9fa876e90ddfc107afcab84 | Analyze and fix the following issue in the Linux kernel code: badpage: zap print_bad_pte on swap and file | Problem Details:
Complete zap_pte_range()'s coverage of bad pagetable entries by calling
print_bad_pte() on a pte_file in a linear vma and on a bad swap entry.
That needs free_swap_and_cache() to tell it, which will also have shown
one of those "swap_free" errors (but with much less information).
Similar checks in for... | ```diff
diff --git a/include/linux/swap.h b/include/linux/swap.h
index cbf7fbed3dfd..91dee50fe260 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -302,7 +302,7 @@ extern swp_entry_t get_swap_page_of_type(int);
extern int swap_duplicate(swp_entry_t);
extern int valid_swaphandles(swp_entry_t, unsigned l... |
3dc147414ccad81dc33edb80774b1fed12a38c08 | Analyze and fix the following issue in the Linux kernel code: badpage: replace page_remove_rmap Eeek and BUG | Problem Details:
Now that bad pages are kept out of circulation, there is no need for the
infamous page_remove_rmap() BUG() - once that page is freed, its negative
mapcount will issue a "Bad page state" message and the page won't be
freed. Removing the BUG() allows more info, on subsequent pages, to be
gathered.
We d... | ```diff
diff --git a/mm/memory.c b/mm/memory.c
index 89339c61f8e5..cda04b19f733 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -52,6 +52,9 @@
#include <linux/writeback.h>
#include <linux/memcontrol.h>
#include <linux/mmu_notifier.h>
+#include <linux/kallsyms.h>
+#include <linux/swapops.h>
+#include <linux/elf.h>
#... |
0f64415d42760379753e6088787ce3fd3e069509 | Analyze and fix the following issue in the Linux kernel code: fs: truncate blocks outside i_size after O_DIRECT write error | Problem Details:
In case of error extending write may have instantiated a few blocks
outside i_size. We need to trim these blocks. We have to do it
*regardless* to blocksize. At least ext2, ext3 and reiserfs interpret
(i_size < biggest block) condition as error. Fsck will complain about
wrong i_size. Then fsck wil... | ```diff
diff --git a/fs/direct-io.c b/fs/direct-io.c
index af0558dbe8b7..b6d43908ff7a 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -1209,6 +1209,19 @@ __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
retval = direct_io_worker(rw, iocb, inode, iov, offset,
nr_segs, blkbits, get_block, ... |
a79311c14eae4bb946a97af25f3e1b17d625985d | Analyze and fix the following issue in the Linux kernel code: vmscan: bail out of direct reclaim after swap_cluster_max pages | Problem Details:
When the VM is under pressure, it can happen that several direct reclaim
processes are in the pageout code simultaneously. It also happens that
the reclaiming processes run into mostly referenced, mapped and dirty
pages in the first round.
This results in multiple direct reclaim processes having a lo... | ```diff
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 1ef5a2eeb298..5faa7739487f 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -52,6 +52,9 @@ struct scan_control {
/* Incremented by the number of inactive pages that were scanned */
unsigned long nr_scanned;
+ /* Number of pages freed so far during a call to shrink... |
ebdd4aea8d736e3b5ce27ab0a26860c9fded341b | Analyze and fix the following issue in the Linux kernel code: hugetlb: fix sparse warnings | Problem Details:
Fix the following sparse warnings:
mm/hugetlb.c:375:3: warning: returning void-valued expression
mm/hugetlb.c:408:3: warning: returning void-valued expression
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linu... | ```diff
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 9595278b5ab4..82321da23cc3 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -400,8 +400,10 @@ static void clear_huge_page(struct page *page,
{
int i;
- if (unlikely(sz > MAX_ORDER_NR_PAGES))
- return clear_gigantic_page(page, addr, sz);
+ if (unlikely(sz > MAX... |
858a29900ea2d639759e697be901a60b759cdcfb | Analyze and fix the following issue in the Linux kernel code: swapfile: change discard pgoff_t to sector_t | Problem Details:
Change pgoff_t nr_blocks in discard_swap() and discard_swap_cluster() to
sector_t: given the constraints on swap offsets (in particular, the 5 bits
of swap type accommodated in the same unsigned long), pgoff_t was actually
safe as is, but it certainly looked worrying when shifted left.
[akpm@linux-fou... | ```diff
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 763210732b5f..6a078557306a 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -96,7 +96,7 @@ static int discard_swap(struct swap_info_struct *si)
list_for_each_entry(se, &si->extent_list, list) {
sector_t start_block = se->start_block << (PAGE_SHIFT - 9);
-... |
ee53a891f47444c53318b98dac947ede963db400 | Analyze and fix the following issue in the Linux kernel code: mm: do_sync_mapping_range integrity fix | Problem Details:
Chris Mason notices do_sync_mapping_range didn't actually ask for data
integrity writeout. Unfortunately, it is advertised as being usable for
data integrity operations.
This is a data integrity bug.
Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Dave Chinn... | ```diff
diff --git a/fs/sync.c b/fs/sync.c
index 0921d6d4b5e6..ac02b56548bc 100644
--- a/fs/sync.c
+++ b/fs/sync.c
@@ -295,7 +295,7 @@ int do_sync_mapping_range(struct address_space *mapping, loff_t offset,
if (flags & SYNC_FILE_RANGE_WRITE) {
ret = __filemap_fdatawrite_range(mapping, offset, endbyte,
- WB_... |
05fe478dd04e02fa230c305ab9b5616669821dd3 | Analyze and fix the following issue in the Linux kernel code: mm: write_cache_pages integrity fix | Problem Details:
In write_cache_pages, nr_to_write is heeded even for data-integrity syncs,
so the function will return success after writing out nr_to_write pages,
even if that was not sufficient to guarantee data integrity.
The callers tend to set it to values that could break data interity
semantics easily in pract... | ```diff
diff --git a/mm/filemap.c b/mm/filemap.c
index f9d88183f697..9c5e6235cc74 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -210,7 +210,7 @@ int __filemap_fdatawrite_range(struct address_space *mapping, loff_t start,
int ret;
struct writeback_control wbc = {
.sync_mode = sync_mode,
- .nr_to_write = mappin... |
00266770b8b3a6a77f896ca501a0613739086832 | Analyze and fix the following issue in the Linux kernel code: mm: write_cache_pages writepage error fix | Problem Details:
In write_cache_pages, if ret signals a real error, but we still have some
pages left in the pagevec, done would be set to 1, but the remaining pages
would continue to be processed and ret will be overwritten in the process.
It could easily be overwritten with success, and thus success will be
returned... | ```diff
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 01b9cb8ccf68..2e847cdcad0e 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -944,12 +944,26 @@ retry:
}
ret = (*writepage)(page, wbc, data);
-
- if (unlikely(ret == AOP_WRITEPAGE_ACTIVATE)) {
- unlock_page(page);
- ret =... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.