id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
3e8f7e35f3fd17eadef44e4679abb39a3806cf01 | Analyze and fix the following issue in the Linux kernel code: x86 VISWS: build fix | Problem Details:
the 'reboot_force' flag is a notion that non-PC subarchitectures do
not have.
also, unify the X86_BIOS_REBOOT option between 32-bit and 64-bit
and get rid of a few unnecessary Kconfig and Makefile complications
that way.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@... | ```diff
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index f70e3e3a9fa7..80303187b872 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -180,7 +180,7 @@ config X86_HT
config X86_BIOS_REBOOT
bool
- depends on X86_32 && !(X86_VISWS || X86_VOYAGER)
+ depends on !X86_VISWS && !X86_VOYAGER
default y
conf... |
ed5e233284bc4aff965df7351da8426aa188c8f9 | Analyze and fix the following issue in the Linux kernel code: x86, voyager: fix ioremap_nocache() | Problem Details:
James Bottomley reported that the following commit:
| commit 6371b495991debfd1417b17c2bc4f7d7bae05739
| Author: Ingo Molnar <mingo@elte.hu>
| Date: Wed Jan 30 13:33:40 2008 +0100
|
| x86: change ioremap() to default to uncached
broke Voyager.
James says:
" it broke a class of voyager machines... | ```diff
diff --git a/arch/x86/mach-voyager/voyager_cat.c b/arch/x86/mach-voyager/voyager_cat.c
index ecab9fff0fd1..2ad598c104af 100644
--- a/arch/x86/mach-voyager/voyager_cat.c
+++ b/arch/x86/mach-voyager/voyager_cat.c
@@ -877,7 +877,7 @@ void __init voyager_cat_init(void)
request_resource(&iomem_resource, res);
... |
fc3fbc45098e5aff59f06962dee79aba2e11430d | Analyze and fix the following issue in the Linux kernel code: hpet: fix | Problem Details:
Al Viro pointed out that there's a missing readl() of timer->hpet_config,
found by Sparse.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> | ```diff
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index 9007f9ea64ee..9b5cfcdfc426 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -137,9 +137,10 @@ static void hpet_reserve_platform_timers(unsigned long id)
hd.hd_irq[0] = HPET_LEGACY_8254;
hd.hd_irq[1] = HPET_LEGACY_RTC;
- ... |
6d3c51110819918617d9e2d1da7ff53f4b2c1187 | Analyze and fix the following issue in the Linux kernel code: [IA64] fix section mismatch in arch/ia64/kernel/topology.c | Problem Details:
This patch silences:
WARNING: vmlinux.o(.text+0x44672): Section mismatch in
reference from the function arch_register_cpu() to the
function .cpuinit.text:register_cpu()
Changes are based on codes in arch/x86/kernel/topology.c
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-of... | ```diff
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c
index abb17a613b17..26228e2d01ae 100644
--- a/arch/ia64/kernel/topology.c
+++ b/arch/ia64/kernel/topology.c
@@ -36,9 +36,11 @@ void arch_fix_phys_package_id(int num, u32 slot)
}
EXPORT_SYMBOL_GPL(arch_fix_phys_package_id);
-int arch_regi... |
9d4efae68714e24d40b628461bc4182e330969b1 | Analyze and fix the following issue in the Linux kernel code: [IA64] fix section mismatch in arch/ia64/kernel/palinfo.c | Problem Details:
This patch removes following warning:
WARNING: vmlinux.o(.exit.text+0xb1): Section mismatch in
reference from the function palinfo_exit() to the variable
.cpuinit.data:palinfo_cpu_notifier
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com> | ```diff
diff --git a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c
index 396004e8cd14..4547a2092af9 100644
--- a/arch/ia64/kernel/palinfo.c
+++ b/arch/ia64/kernel/palinfo.c
@@ -1053,7 +1053,7 @@ static int __cpuinit palinfo_cpu_callback(struct notifier_block *nfb,
return NOTIFY_OK;
}
-static struct notif... |
751fc7849d623bcd5e77fd494b01662599a8dccf | Analyze and fix the following issue in the Linux kernel code: [IA64] fix section mismatch in arch/ia64/kernel/irq.c | Problem Details:
This patch shuts up the following:
WARNING: vmlinux.o(.text+0x7102): Section mismatch in
reference from the function fixup_irqs() to the function
.devinit.text:ia64_disable_timer()
Removing ia64_disable_timer() is safe because there are no functions
calling it other than the fixup_irqs(),
Signed-... | ```diff
diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c
index 6dee579f205f..7fd18f54c056 100644
--- a/arch/ia64/kernel/irq.c
+++ b/arch/ia64/kernel/irq.c
@@ -183,10 +183,10 @@ void fixup_irqs(void)
{
unsigned int irq;
extern void ia64_process_pending_intr(void);
- extern void ia64_disable_timer(void);... |
c5b5a5993234d4db2079e57e456bda5278ef59cf | Analyze and fix the following issue in the Linux kernel code: [IA64] fix section mismatch in arch/ia64/kernel/acpi.c | Problem Details:
This patch kills:
WARNING: vmlinux.o(.text+0x1702): Section mismatch in
reference from the function acpi_register_ioapic() to the
function .devinit.text:iosapic_init()
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com> | ```diff
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index c7467f863c7a..19709a079635 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -966,7 +966,7 @@ acpi_map_iosapics (void)
fs_initcall(acpi_map_iosapics);
#endif /* CONFIG_ACPI_NUMA */
-int acpi_register_ioapic(acpi_hand... |
36a913586597cab1cd565e9bf348d037f0df955b | Analyze and fix the following issue in the Linux kernel code: ACPI: Fix acpi_processor_idle and idle= boot parameters interaction | Problem Details:
acpi_processor_idle and "idle=" boot parameter interaction is broken.
The problem is that, at boot time acpi driver is checking for "idle=" boot
option and not registering the acpi idle handler. But, when there is a CST
changed callback (typically when switching AC <-> battery or suspend-resume)
there ... | ```diff
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 836362b50faa..47b167c731a0 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -1299,6 +1299,8 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr)
{
int result = 0;
+ if (boot_option_... |
9448b0d43e5509c6b7baca02510a92ef2de6e328 | Analyze and fix the following issue in the Linux kernel code: acpi: fix section mismatch warning in pnpacpi | Problem Details:
Fix following section mismatch warning:
WARNING: vmlinux.o(.text+0x153d69): Section mismatch in reference from the function is_exclusive_device() to the variable .init.data:excluded_id_list
is_exclusive_device is only used from __init context so document
this with the __init annotation and get rid of ... | ```diff
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c
index c283a9a70d83..63e64ef39fb7 100644
--- a/drivers/pnp/pnpacpi/core.c
+++ b/drivers/pnp/pnpacpi/core.c
@@ -44,7 +44,7 @@ static struct acpi_device_id excluded_id_list[] __initdata = {
{"", 0},
};
-static inline int is_exclusive_device(... |
fd403dc84f29aee613d13bde5656ba74cdee1e7b | Analyze and fix the following issue in the Linux kernel code: [ALSA] soc - neo1973_wm8753.c add suspend and shutdown hooks for lm4857 chip | Problem Details:
Patch taken from the openmoko bugtracker
http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=781
This patch adds Suspend/Resume and Shutdown support for the lm4857 to
the driver.
Signed-off-by: Graeme Gregory <graeme@openmoko.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.c... | ```diff
diff --git a/sound/soc/s3c24xx/neo1973_wm8753.c b/sound/soc/s3c24xx/neo1973_wm8753.c
index c8caddffc42d..0e9d1c5f2484 100644
--- a/sound/soc/s3c24xx/neo1973_wm8753.c
+++ b/sound/soc/s3c24xx/neo1973_wm8753.c
@@ -616,6 +616,35 @@ static int lm4857_i2c_attach(struct i2c_adapter *adap)
return i2c_probe(adap, &add... |
854e4af258e214345d675dc406d24769e32a04c8 | Analyze and fix the following issue in the Linux kernel code: [ALSA] soc - ln2440sbc_alc650 - Fix checkpatch warnings | Problem Details:
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/soc/s3c24xx/ln2440sbc_alc650.c b/sound/soc/s3c24xx/ln2440sbc_alc650.c
index 9ed8f2e8da10..4eab2c19c454 100644
--- a/sound/soc/s3c24xx/ln2440sbc_alc650.c
+++ b/sound/soc/s3c24xx/ln2440sbc_alc650.c
@@ -1,10 +1,10 @@
/*
* SoC audio for ln2440sbc
- *
+ *
* Copyright 2007 KonekTel, a.s.
* ... |
5111c0753486fffde14de2b207e46760b9c05fd0 | Analyze and fix the following issue in the Linux kernel code: [ALSA] soc - s3c24xx-pcm - Fix checkpatch warnings | Problem Details:
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/soc/s3c24xx/s3c24xx-pcm.c b/sound/soc/s3c24xx/s3c24xx-pcm.c
index 49580fb481d5..6c70a81c730c 100644
--- a/sound/soc/s3c24xx/s3c24xx-pcm.c
+++ b/sound/soc/s3c24xx/s3c24xx-pcm.c
@@ -20,6 +20,7 @@
#include <linux/module.h>
#include <linux/init.h>
+#include <linux/io.h>
#include <linux/platf... |
ccfdd6c2b2ad3f32c02175007a66c82e2233b75c | Analyze and fix the following issue in the Linux kernel code: [ALSA] soc - s3c2443-ac97 - Fix checkpatch warnings | Problem Details:
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/soc/s3c24xx/s3c2443-ac97.c b/sound/soc/s3c24xx/s3c2443-ac97.c
index 1c1ddbf7f3c0..e81d9a6c83da 100644
--- a/sound/soc/s3c24xx/s3c2443-ac97.c
+++ b/sound/soc/s3c24xx/s3c2443-ac97.c
@@ -19,6 +19,7 @@
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
+#... |
ae3a0064e6d69068b1c9fd075095da062430bda9 | Analyze and fix the following issue in the Linux kernel code: inlining: do not allow gcc below version 4 to optimize inlining | Problem Details:
fix the condition to match intention: always use the old inlining
behavior on all gcc versions below 4.
this should solve the UML build problem.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index b2fd7547b58d..5c8351b859f0 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -29,10 +29,11 @@
BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(typeof(a), typeof(&a[0])))
/*
- * Force always-inline if... |
ca72cddfcb6afd75a808da4f027325fa63a1b856 | Analyze and fix the following issue in the Linux kernel code: fix drivers/media/common/tuners/ build bug | Problem Details:
x86.git randconfig testing found a build failure on latest -git:
drivers/built-in.o: In function `set_type':
tuner-core.c:(.text+0x2a9a26): undefined reference to `tea5761_attach'
tuner-core.c:(.text+0x2a9d05): undefined reference to `tda9887_attach'
tuner-core.c:(.text+0x2a9d51): undefined refere... | ```diff
diff --git a/drivers/media/common/Makefile b/drivers/media/common/Makefile
index 8e7448230643..351b98b9b302 100644
--- a/drivers/media/common/Makefile
+++ b/drivers/media/common/Makefile
@@ -2,6 +2,7 @@ saa7146-objs := saa7146_i2c.o saa7146_core.o
saa7146_vv-objs := saa7146_fops.o saa7146_video.o saa7146_hl... |
3a902c5f6851cd0b64c33efaa3bd57aa27a82efb | Analyze and fix the following issue in the Linux kernel code: mm: fix warning on memory offline | Problem Details:
KAMEZAWA Hiroyuki found a warning message in the buffer dirtying code that
is coming from page migration caller.
WARNING: at fs/buffer.c:720 __set_page_dirty+0x330/0x360()
Call Trace:
[<a000000100015220>] show_stack+0x80/0xa0
[<a000000100015270>] dump_stack+0x30/0x60
[<a000000100089ed0>] warn_on_sl... | ```diff
diff --git a/mm/migrate.c b/mm/migrate.c
index 4e0eccca5e26..449d77d409f5 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -383,7 +383,14 @@ static void migrate_page_copy(struct page *newpage, struct page *page)
if (PageDirty(page)) {
clear_page_dirty_for_io(page);
- set_page_dirty(newpage);
+ /*
+ * ... |
969a19f1c405a8e9d15ceb9e75e3f4a321aaf56f | Analyze and fix the following issue in the Linux kernel code: Drop the exporting of empty <linux/byteorder/generic.h> | Problem Details:
Fix up the contents of <linux/byteorder/> so that it doesn't export a
content-free generic.h to user space. This involves:
* Removing the __KERNEL__ tests from generic.h and dropping it from
Kbuild.
* Wrapping the inclusions of generic.h in both big_endian.h and
little_endian.h in __KERNEL__ test... | ```diff
diff --git a/include/linux/byteorder/Kbuild b/include/linux/byteorder/Kbuild
index 79bedddfd9ca..1133d5f9d818 100644
--- a/include/linux/byteorder/Kbuild
+++ b/include/linux/byteorder/Kbuild
@@ -1,5 +1,3 @@
-header-y += big_endian.h
-header-y += little_endian.h
-
-unifdef-y += generic.h
+unifdef-y += big_endian... |
30327acf7846c5eb97c8e31c78317a2918d3e515 | Analyze and fix the following issue in the Linux kernel code: slab: add a flag to prevent debug_free checks on a kmem_cache | Problem Details:
This is a preperatory patch for the debugobjects infrastructure. The flag
prevents debug_free checks on kmem_caches. This is necessary to avoid
resursive calls into a debug mechanism which uses a kmem_cache itself.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte... | ```diff
diff --git a/include/linux/slab.h b/include/linux/slab.h
index f62caaad94e0..6d03c954f641 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -29,6 +29,13 @@
#define SLAB_MEM_SPREAD 0x00100000UL /* Spread some memory over cpuset */
#define SLAB_TRACE 0x00200000UL /* Trace allocations and frees *... |
bdf4bbaaee3d4b8f555658333cbce1affe9070fb | Analyze and fix the following issue in the Linux kernel code: Add macros similar to min/max/min_t/max_t | Problem Details:
Also, change the variable names used in the min/max macros to avoid shadowed
variable warnings when min/max min_t/max_t are nested.
Small formatting changes to make all the macros have a similar form.
[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: fix v4l build]
Signed-of... | ```diff
diff --git a/drivers/media/video/bt8xx/bttvp.h b/drivers/media/video/bt8xx/bttvp.h
index 03816b73f847..27da7b423275 100644
--- a/drivers/media/video/bt8xx/bttvp.h
+++ b/drivers/media/video/bt8xx/bttvp.h
@@ -81,8 +81,6 @@
/* Limits scaled width, which must be a multiple of 4. */
#define MAX_HACTIVE (0x3FF & -4... |
487798df6d25e76ed6558b3e17c44cf0458cc6f3 | Analyze and fix the following issue in the Linux kernel code: hfsplus: fix warning with 64k PAGE_SIZE | Problem Details:
fs/hfsplus/btree.c: In function 'hfsplus_bmap_alloc':
fs/hfsplus/btree.c:239: warning: comparison is always false due to limited range of data type
But this might hide a real bug?
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus To... | ```diff
diff --git a/fs/hfsplus/btree.c b/fs/hfsplus/btree.c
index bb5433608a42..e49fcee1e293 100644
--- a/fs/hfsplus/btree.c
+++ b/fs/hfsplus/btree.c
@@ -184,7 +184,9 @@ struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *tree)
struct hfs_bnode *node, *next_node;
struct page **pagep;
u32 nidx, idx;
- u16 off, len... |
3e5a5097303eedb4ffae2719843eb064221b1db4 | Analyze and fix the following issue in the Linux kernel code: hfs: fix warning with 64k PAGE_SIZE | Problem Details:
fs/hfs/btree.c: In function 'hfs_bmap_alloc':
fs/hfs/btree.c:263: warning: comparison is always false due to limited range of data type
The patch makes the warning go away, but the code might actually be buggy?
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundati... | ```diff
diff --git a/fs/hfs/btree.c b/fs/hfs/btree.c
index 24cf6fc43021..f6621a785202 100644
--- a/fs/hfs/btree.c
+++ b/fs/hfs/btree.c
@@ -208,7 +208,9 @@ struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *tree)
struct hfs_bnode *node, *next_node;
struct page **pagep;
u32 nidx, idx;
- u16 off, len;
+ unsigned off... |
f735295b14ae073a8302d7b1da894bc597724557 | Analyze and fix the following issue in the Linux kernel code: printk: don't read beyond string arguments' terminating zero | Problem Details:
Fix update_console_cmdline() not to to read beyond the terminating zero of its
name argument.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/kernel/printk.c b/kernel/printk.c
index e61346faf6a5..8fb01c32aa3b 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -921,7 +921,7 @@ int update_console_cmdline(char *name, int idx, char *name_new, int idx_new, cha
if (strcmp(console_cmdline[i].name, name) == 0 &&
console_cmdline[i].in... |
f7511d5f66f01fc451747b24e79f3ada7a3af9af | Analyze and fix the following issue in the Linux kernel code: Basic braille screen reader support | Problem Details:
This adds a minimalistic braille screen reader support. This is meant to
be used by blind people e.g. on boot failures or when / cannot be mounted
etc and thus the userland screen readers can not work.
[akpm@linux-foundation.org: fix exports]
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.... | ```diff
diff --git a/Documentation/braille-console.txt b/Documentation/braille-console.txt
new file mode 100644
index 000000000000..000b0fbdc105
--- /dev/null
+++ b/Documentation/braille-console.txt
@@ -0,0 +1,34 @@
+ Linux Braille Console
+
+To get early boot messages on a braille device (before ... |
4dbf930ed6c1f8aa992937d0461f8f70d4004aad | Analyze and fix the following issue in the Linux kernel code: fuse: fix sparse warnings | Problem Details:
fs/fuse/dev.c:306:2: warning: context imbalance in 'wait_answer_interruptible' - unexpected unlock
fs/fuse/dev.c:361:2: warning: context imbalance in 'request_wait_answer' - unexpected unlock
fs/fuse/dev.c:1002:4: warning: context imbalance in 'end_io_requests' - unexpected unlock
Signed-off-by: Miklo... | ```diff
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index bba83762c484..87250b6a8682 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -299,6 +299,7 @@ static void request_end(struct fuse_conn *fc, struct fuse_req *req)
static void wait_answer_interruptible(struct fuse_conn *fc,
struct fuse_req *req)
+ __r... |
5559b8f4d1f630b8614b6c8e13b8bf6c9c45d7d7 | Analyze and fix the following issue in the Linux kernel code: fuse: fix race in llseek | Problem Details:
Fuse doesn't use i_mutex to protect setting i_size, and so
generic_file_llseek() can be racy: it doesn't use i_size_read().
So do a fuse specific llseek method, which does use i_size_read().
[akpm@linux-foundation.org: make `retval' loff_t]
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-... | ```diff
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 2d3649e42599..9ced35b00686 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1431,8 +1431,33 @@ static sector_t fuse_bmap(struct address_space *mapping, sector_t block)
return err ? 0 : outarg.block;
}
+static loff_t fuse_file_llseek(struct file *file, ... |
b48badf013018ef2aa4a46416454bdb18f77fb01 | Analyze and fix the following issue in the Linux kernel code: fuse: fix node ID type | Problem Details:
Node ID is 64bit but it is passed as unsigned long to some functions. This
breakage wasn't noticed, because libfuse uses unsigned long too.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundatio... | ```diff
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
index 934dd819a4ef..dadffa21a206 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -464,7 +464,7 @@ extern const struct file_operations fuse_dev_operations;
/**
* Get a filled in inode
*/
-struct inode *fuse_iget(struct super_block *sb, unsigned long n... |
e5d9a0df07484d6d191756878c974e4307fb24ce | Analyze and fix the following issue in the Linux kernel code: fuse: fix max i/o size calculation | Problem Details:
Fix a bug that Werner Baumann reported: fuse can send a bigger write request
than the maximum specified. This only affected direct_io operation.
In addition set a sane minimum for the max_read and max_write tunables, so I/O
always makes some progress.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>... | ```diff
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index a02418c89d4b..2d3649e42599 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -966,14 +966,15 @@ static ssize_t fuse_direct_io(struct file *file, const char __user *buf,
while (count) {
size_t nres;
- size_t nbytes = min(count, nmax);
- int err = fuse... |
3be5a52b30aa5cf9d795b7634f728f612197b1c4 | Analyze and fix the following issue in the Linux kernel code: fuse: support writable mmap | Problem Details:
Quoting Linus (3 years ago, FUSE inclusion discussions):
"User-space filesystems are hard to get right. I'd claim that they
are almost impossible, unless you limit them somehow (shared
writable mappings are the nastiest part - if you don't have those,
you can reasonably limit your problems ... | ```diff
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index af639807524e..bba83762c484 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -47,6 +47,14 @@ struct fuse_req *fuse_request_alloc(void)
return req;
}
+struct fuse_req *fuse_request_alloc_nofs(void)
+{
+ struct fuse_req *req = kmem_cache_alloc(fuse_req_cachep,... |
b88473f73e6d7b6af9cfc4ecc349d82c75d9a6af | Analyze and fix the following issue in the Linux kernel code: mm: document missing fields for /proc/meminfo | Problem Details:
A few fields in /proc/meminfo were not documented. Fix.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index 2a99116edc47..dbc3c6a3650f 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -463,11 +463,17 @@ SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 968 kB
Wr... |
76f1418b485da2707531178e517bbb5cf06b3c76 | Analyze and fix the following issue in the Linux kernel code: mm: bdi: move statistics to debugfs | Problem Details:
Move BDI statistics to debugfs:
/sys/kernel/debug/bdi/<bdi>/stats
Use postcore_initcall() to initialize the sysfs class and debugfs,
because debugfs is initialized in core_initcall().
Update descriptions in ABI documentation.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Andrew... | ```diff
diff --git a/Documentation/ABI/testing/sysfs-class-bdi b/Documentation/ABI/testing/sysfs-class-bdi
index c55e811ca180..5ac1e01bbd48 100644
--- a/Documentation/ABI/testing/sysfs-class-bdi
+++ b/Documentation/ABI/testing/sysfs-class-bdi
@@ -3,8 +3,8 @@ Date: January 2008
Contact: Peter Zijlstra <a.p.zijlstra@ch... |
a42dde04152750426cc620fd277e80fffae2f65a | Analyze and fix the following issue in the Linux kernel code: mm: bdi: allow setting a maximum for the bdi dirty limit | Problem Details:
Add "max_ratio" to /sys/class/bdi. This indicates the maximum percentage of
the global dirty threshold allocated to this bdi.
[mszeredi@suse.cz]
- fix parsing in max_ratio_store().
- export bdi_set_max_ratio() to modules
- limit bdi_dirty with bdi->max_ratio
- document new sysfs attribute
Signe... | ```diff
diff --git a/Documentation/ABI/testing/sysfs-class-bdi b/Documentation/ABI/testing/sysfs-class-bdi
index b9e8a9368dc6..c55e811ca180 100644
--- a/Documentation/ABI/testing/sysfs-class-bdi
+++ b/Documentation/ABI/testing/sysfs-class-bdi
@@ -49,4 +49,11 @@ min_ratio (read-write)
Minimal percentage of global dirt... |
189d3c4a94ef19fca2a71a6a336e9fda900e25e7 | Analyze and fix the following issue in the Linux kernel code: mm: bdi: allow setting a minimum for the bdi dirty limit | Problem Details:
Under normal circumstances each device is given a part of the total write-back
cache that relates to its current avg writeout speed in relation to the other
devices.
min_ratio - allows one to assign a minimum portion of the write-back cache to
a particular device. This is useful in situations where y... | ```diff
diff --git a/Documentation/ABI/testing/sysfs-class-bdi b/Documentation/ABI/testing/sysfs-class-bdi
index b800cdda40bb..b9e8a9368dc6 100644
--- a/Documentation/ABI/testing/sysfs-class-bdi
+++ b/Documentation/ABI/testing/sysfs-class-bdi
@@ -44,3 +44,9 @@ bdi_dirty_kb (read-only)
Current threshold on this BDI fo... |
cf0ca9fe5dd9e3693d935757a7b2fc50fc576554 | Analyze and fix the following issue in the Linux kernel code: mm: bdi: export BDI attributes in sysfs | Problem Details:
Provide a place in sysfs (/sys/class/bdi) for the backing_dev_info object.
This allows us to see and set the various BDI specific variables.
In particular this properly exposes the read-ahead window for all relevant
users and /sys/block/<block>/queue/read_ahead_kb should be deprecated.
With patient h... | ```diff
diff --git a/Documentation/ABI/testing/sysfs-class-bdi b/Documentation/ABI/testing/sysfs-class-bdi
new file mode 100644
index 000000000000..b800cdda40bb
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-bdi
@@ -0,0 +1,46 @@
+What: /sys/class/bdi/<bdi>/
+Date: January 2008
+Contact: Peter Zijlstra <a.p... |
ab883af53ec1b87add43b32a28d8347f17d5155b | Analyze and fix the following issue in the Linux kernel code: make marker_debug static | Problem Details:
With the needlessly global marker_debug being static gcc can optimize the
unused code away.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Li... | ```diff
diff --git a/kernel/marker.c b/kernel/marker.c
index 139260e5460c..b5a9fe1d50d5 100644
--- a/kernel/marker.c
+++ b/kernel/marker.c
@@ -29,7 +29,7 @@ extern struct marker __start___markers[];
extern struct marker __stop___markers[];
/* Set to 1 to enable marker debug output */
-const int marker_debug;
+stati... |
12a3de0a965826096d8adc593bcf4392a7d5b459 | Analyze and fix the following issue in the Linux kernel code: pids: sys_getpgid: fix unsafe *pid usage, s/tasklist/rcu/ | Problem Details:
1. sys_getpgid() needs rcu_read_lock() to derive the pgrp _nr, even if
the task is current, otherwise we can race with another thread which
does sys_setpgid().
2. Use rcu_read_lock() instead of tasklist_lock when pid != 0, make sure
that we don't use the NULL pid if the task exits right after... | ```diff
diff --git a/kernel/sys.c b/kernel/sys.c
index ddd28e261f3a..895d2d4c9493 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -991,31 +991,37 @@ out:
asmlinkage long sys_getpgid(pid_t pid)
{
+ struct task_struct *p;
+ struct pid *grp;
+ int retval;
+
+ rcu_read_lock();
if (!pid)
- return task_pgrp_vnr(curren... |
1dd768c0815334d2319d6377f0750ace075b6142 | Analyze and fix the following issue in the Linux kernel code: pids: sys_getsid: fix unsafe *pid usage, fix possible 0 instead of -ESRCH | Problem Details:
1. sys_getsid() needs rcu_read_lock() to derive the session _nr, even if
the task is current, otherwise we can race with another thread which
does sys_setsid().
2. The task can exit between find_task_by_vpid() and task_session_vnr(),
in that unlikely case sys_getsid() returns 0 instead of -ES... | ```diff
diff --git a/kernel/sys.c b/kernel/sys.c
index 5d0b44cd435c..ddd28e261f3a 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -1022,23 +1022,30 @@ asmlinkage long sys_getpgrp(void)
asmlinkage long sys_getsid(pid_t pid)
{
+ struct task_struct *p;
+ struct pid *sid;
+ int retval;
+
+ rcu_read_lock();
if (!pid)
... |
5cd204550b1a006f2b0c986b0e0f53220ebfd391 | Analyze and fix the following issue in the Linux kernel code: Deprecate find_task_by_pid() | Problem Details:
There are some places that are known to operate on tasks'
global pids only:
* the rest_init() call (called on boot)
* the kgdb's getthread
* the create_kthread() (since the kthread is run in init ns)
So use the find_task_by_pid_ns(..., &init_pid_ns) there
and schedule the find_task_by_pid for removal... | ```diff
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 599fe55bf297..3c35d452b1a9 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -138,6 +138,24 @@ Who: Kay Sievers <kay.sievers@suse.de>
----------... |
cb41d6d068716b2b3666925da34d3d7e658bf4f3 | Analyze and fix the following issue in the Linux kernel code: Use find_task_by_vpid in taskstats | Problem Details:
The pid to lookup a task by is passed inside taskstats code via genetlink
message.
Since netlink packets are now processed in the context of the sending task,
this is correct to lookup the task with find_task_by_vpid() here.
Besides, I fix the call to fill_pid() from taskstats_exit(), since the
tsk->... | ```diff
diff --git a/kernel/taskstats.c b/kernel/taskstats.c
index 07e86a828073..4a23517169a6 100644
--- a/kernel/taskstats.c
+++ b/kernel/taskstats.c
@@ -183,7 +183,7 @@ static int fill_pid(pid_t pid, struct task_struct *tsk,
if (!tsk) {
rcu_read_lock();
- tsk = find_task_by_pid(pid);
+ tsk = find_task_by_vpi... |
86a96538178f923aa1aa43c1e7cfec5951df7f8a | Analyze and fix the following issue in the Linux kernel code: tty: fix routine name in ptmx_open() | Problem Details:
At ptmx_open(), the 2nd parameter for check_tty_count() should
be "ptmx_open".
Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index f69fb8d7a680..ddfa529936e8 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -2842,7 +2842,7 @@ static int ptmx_open(struct inode *inode, struct file *filp)
if (devpts_pty_new(tty->link))
goto out1;
- check_tty_count(tty, "t... |
24cb233520f01971d6d873cb52c64bbbb0665ac0 | Analyze and fix the following issue in the Linux kernel code: char serial: switch drivers to ioremap_nocache | Problem Details:
Simple search/replace except for synclink.c where I noticed a real bug and
fixed it too. It was doing NULL + offset, then checking for NULL if the remap
failed.
Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Paul Fulghum <paulkf@microgate.com>
Acked-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Ingo Molnar... | ```diff
diff --git a/drivers/char/applicom.c b/drivers/char/applicom.c
index a7c4990b5b6b..31d08b641f5b 100644
--- a/drivers/char/applicom.c
+++ b/drivers/char/applicom.c
@@ -199,7 +199,7 @@ static int __init applicom_init(void)
if (pci_enable_device(dev))
return -EIO;
- RamIO = ioremap(pci_resource_start(dev... |
8cd64518a3d166a21f5c69ac7860b3add0369dd0 | Analyze and fix the following issue in the Linux kernel code: isicom: fix buffer allocation | Problem Details:
Fix the rather strange buffer management on open that turned up while auditing
for BKL dependencies.
Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c
index 9c6be8da220c..4f3cefa8eb0e 100644
--- a/drivers/char/isicom.c
+++ b/drivers/char/isicom.c
@@ -813,15 +813,13 @@ static int isicom_setup_port(struct isi_port *port)
return 0;
if (!port->xmit_buf) {
/* Relies on BKL */
- void *xmit_buf = (v... |
8e8bcf16c2b2f949dfafa3e8e94a51fd37bfc3ef | Analyze and fix the following issue in the Linux kernel code: strip: Fix up strip for the new order | Problem Details:
- Use the tty baud functions
- Call driver termios methods directly holding the right locking
- Check for a write method
Signed-off-by: Alan Cox <alan@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: ... | ```diff
diff --git a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c
index bced3fe1cf8a..5dd23c93497d 100644
--- a/drivers/net/wireless/strip.c
+++ b/drivers/net/wireless/strip.c
@@ -767,42 +767,18 @@ static __u8 *UnStuffData(__u8 * src, __u8 * end, __u8 * dst,
/********************************************... |
251b8dd7eee30fda089a1dc088abf4fc9a0dee9c | Analyze and fix the following issue in the Linux kernel code: isicom: bring into coding style | Problem Details:
[akpm@linux-foundation.org: fix arm, cleanups]
Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c
index 6812fda20953..57b115272aaa 100644
--- a/drivers/char/isicom.c
+++ b/drivers/char/isicom.c
@@ -126,8 +126,8 @@
#include <linux/delay.h>
#include <linux/ioport.h>
-#include <asm/uaccess.h>
-#include <asm/io.h>
+#include <linux/uaccess.h>
+#inclu... |
11fb09bfabd699a94555b69d6e6c4fa6c3febde8 | Analyze and fix the following issue in the Linux kernel code: epca.c: static functions and integer as NULL pointer fixes | Problem Details:
drivers/char/epca.c:926:28: warning: Using plain integer as NULL pointer
drivers/char/epca.c:1841:2: warning: Using plain integer as NULL pointer
Forward declarations were already marked static, mark the definitions too.
drivers/char/epca.c:2493:6: warning: symbol 'digi_send_break' was not declared. S... | ```diff
diff --git a/drivers/char/epca.c b/drivers/char/epca.c
index 9a682851283e..37d4dca5a5d4 100644
--- a/drivers/char/epca.c
+++ b/drivers/char/epca.c
@@ -923,7 +923,8 @@ static int pc_open(struct tty_struct *tty, struct file * filp)
return(-ENODEV);
}
- if ((bc = ch->brdchan) == 0) {
+ bc = ch->brdchan;
+ i... |
1a4e2351e7fcf2d10bb5524b0ace7797ffad4d98 | Analyze and fix the following issue in the Linux kernel code: cyclades.c: fix sparse shadowed variable warnings | Problem Details:
Nested min() macros.
drivers/char/cyclades.c:2750:7: warning: symbol '_x' shadows an earlier one
drivers/char/cyclades.c:2750:7: originally declared here
drivers/char/cyclades.c:2750:7: warning: symbol '_x' shadows an earlier one
drivers/char/cyclades.c:2750:7: originally declared here
drivers/char/cyc... | ```diff
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index 23312f244545..028db1b8fc4e 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -2747,8 +2747,8 @@ static int cy_write(struct tty_struct *tty, const unsigned char *buf, int count)
spin_lock_irqsave(&info->card->card_lock, ... |
709107fcd3c4ad82ff7c8137c27aa951d671706f | Analyze and fix the following issue in the Linux kernel code: char: rocket.c: fix sparse variable shadowing and int as NULL pointer | Problem Details:
Nested min() macros shadow _x, separate into two lines.
drivers/char/rocket.c:451:7: warning: symbol '_x' shadows an earlier one
drivers/char/rocket.c:451:7: originally declared here
drivers/char/rocket.c:451:7: warning: symbol '_x' shadows an earlier one
drivers/char/rocket.c:451:7: originally declare... | ```diff
diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c
index 1b3fc6fd358e..32fe8dca24b6 100644
--- a/drivers/char/rocket.c
+++ b/drivers/char/rocket.c
@@ -449,7 +449,8 @@ static void rp_do_transmit(struct r_port *info)
while (1) {
if (tty->stopped || tty->hw_stopped)
break;
- c = min(info->xmit_fi... |
d3ceb6562bfbe8f27fa32d1e24eea0e2d4de0347 | Analyze and fix the following issue in the Linux kernel code: char: esp.c: fix possible double-unlock | Problem Details:
Hitting either of the break statements in the while loop would cause a
double-unlock of info->lock.
[Jiri Slaby suggested simply returning is safe here, rather than a goto]
Noticed by sparse:
drivers/char/esp.c:2042:2: warning: context imbalance in 'rs_wait_until_sent' - unexpected unlock
Signed-off... | ```diff
diff --git a/drivers/char/esp.c b/drivers/char/esp.c
index 763d6d2e4b62..662e9cfdcc96 100644
--- a/drivers/char/esp.c
+++ b/drivers/char/esp.c
@@ -2040,10 +2040,10 @@ static void rs_wait_until_sent(struct tty_struct *tty, int timeout)
msleep_interruptible(jiffies_to_msecs(char_time));
if (signal_pending... |
f5592268a5aa5e02f36f396de47c94a1506e3678 | Analyze and fix the following issue in the Linux kernel code: char: fix sparse shadowed variable warnings in esp.c | Problem Details:
flags only use was in spin_lock_irqsave/spin_lock_irgrestore pairs, no
need to redeclare for each one.
drivers/char/esp.c:1599:17: warning: symbol 'flags' shadows an earlier one
drivers/char/esp.c:1517:16: originally declared here
drivers/char/esp.c:1615:17: warning: symbol 'flags' shadows an earlier ... | ```diff
diff --git a/drivers/char/esp.c b/drivers/char/esp.c
index 5ad11a6716c7..763d6d2e4b62 100644
--- a/drivers/char/esp.c
+++ b/drivers/char/esp.c
@@ -1600,8 +1600,6 @@ static int set_esp_config(struct esp_struct * info,
if ((new_config.flow_off != info->config.flow_off) ||
(new_config.flow_on != info->co... |
ec09cd562135158dcb8a6c08e5a9efa36febedb1 | Analyze and fix the following issue in the Linux kernel code: Char: moxa, add firmware loading fix | Problem Details:
Be more verbose on fw load fail as noted by Oyvind.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Oyvind Aabling <Oyvind.Aabling@uni-c.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c
index 6757b1922f4f..1ab9517c24c5 100644
--- a/drivers/char/moxa.c
+++ b/drivers/char/moxa.c
@@ -846,7 +846,10 @@ static int moxa_init_board(struct moxa_board_conf *brd, struct device *dev)
ret = request_firmware(&fw, file, dev);
if (ret) {
- printk(K... |
74d7d97b9e2a090a4b1812b5074ac6c539234ebb | Analyze and fix the following issue in the Linux kernel code: Char: moxa, ioctl cleanup | Problem Details:
- allow stats only for sys_admin
- move TCSBRK* processing to .break_ctl tty op
- let TIOCGSOFTCAR and TIOCSSOFTCAR be processed by ldisc
- remove MOXA_GET_MAJOR, MOXA_GET_CUMAJOR
- fix jiffies subtraction by time_after
- move moxa ioctl numbers into the header; still not exported to userspace,
needs... | ```diff
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c
index fdfa7783e992..f737fbb8598c 100644
--- a/drivers/char/moxa.c
+++ b/drivers/char/moxa.c
@@ -150,6 +150,12 @@ struct moxa_port {
ushort breakCnt;
};
+struct mon_str {
+ int tick;
+ int rxcnt[MAX_PORTS];
+ int txcnt[MAX_PORTS];
+};
+
/* statusflags ... |
810ab09b2f3a4e9a6f553e3d1e84a27f4074de9c | Analyze and fix the following issue in the Linux kernel code: Char: moxa, centralize board readiness | Problem Details:
The only relevant sign of port being ready is its board->ready since now.
Remove all other flags for this purpose which are set almost on the same
place. Move ports inside the board to be sure that nobody will grab reference
to the port without being sure that it exists.
[jirislaby@gmail.com: fix unu... | ```diff
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c
index c440ec542686..b2f3de0195c9 100644
--- a/drivers/char/moxa.c
+++ b/drivers/char/moxa.c
@@ -104,7 +104,7 @@ static struct moxa_board_conf {
int numPorts;
int busType;
- int loadstat;
+ unsigned int ready;
struct moxa_port *ports;
@@ -142,7 +... |
9e9fc313ffa3cb92f7f81a8e076566bc9d582351 | Analyze and fix the following issue in the Linux kernel code: Char: moxa, fix TIOC(G/S)SOFTCAR param | Problem Details:
according to ioctl_list, both have int * as a param, not ulong *.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Tested-by: Oyvind Aabling <Oyvind.Aabling@uni-c.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c
index f841b1f74bfc..428c1380b771 100644
--- a/drivers/char/moxa.c
+++ b/drivers/char/moxa.c
@@ -741,9 +741,9 @@ static int moxa_ioctl(struct tty_struct *tty, struct file *file,
MoxaPortSendBreak(ch->port, arg);
return (0);
case TIOCGSOFTCAR:
- retu... |
37794952a685538f20ac9792e98f1c9b161dbdfe | Analyze and fix the following issue in the Linux kernel code: Char: moxa, remove static isa support | Problem Details:
Static ISA field is empty and probably will never be filled in, remove it.
The driver still supports ISA cards passed through module parameter. This
actually fixes one bug inside the initialization of module-param passed cards
initialization.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Tested-by:... | ```diff
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c
index 64b7b2b18352..7f4d1ec4b03d 100644
--- a/drivers/char/moxa.c
+++ b/drivers/char/moxa.c
@@ -92,17 +92,6 @@ static struct pci_device_id moxa_pcibrds[] = {
MODULE_DEVICE_TABLE(pci, moxa_pcibrds);
#endif /* CONFIG_PCI */
-struct moxa_isa_board_conf {
-... |
cbacdd9572285c86848dd323dc764abb3681ddbc | Analyze and fix the following issue in the Linux kernel code: SGI Altix mmtimer: allow larger number of timers per node | Problem Details:
The purpose of this patch to the SGI Altix specific mmtimer (posix timer)
driver is to allow a virtually infinite number of timers to be set per
node.
Timers will now be kept on a sorted per-node list and a single node-based
hardware comparator is used to trigger the next timer.
[akpm@linux-foundatio... | ```diff
diff --git a/drivers/char/mmtimer.c b/drivers/char/mmtimer.c
index e60a74c66e3d..d83db5d880e0 100644
--- a/drivers/char/mmtimer.c
+++ b/drivers/char/mmtimer.c
@@ -74,9 +74,8 @@ static const struct file_operations mmtimer_fops = {
* We only have comparison registers RTC1-4 currently available per
* node. RT... |
1c2630ccf922b7ea2c54c184243d4fb2bd2cf3c6 | Analyze and fix the following issue in the Linux kernel code: tty_ioctl: soft carrier handling | Problem Details:
First cut at moving the soft carrier handling knowledge entirely into the core
code. One or two drivers still needed to snoop these functions to track
CLOCAL internally. Instead make TIOCSSOFTCAR generate the same driver calls
as other termios ioctls changing the clocal flag. This allows us to remov... | ```diff
diff --git a/drivers/char/tty_ioctl.c b/drivers/char/tty_ioctl.c
index 851cfcd2702a..d769e43f73fb 100644
--- a/drivers/char/tty_ioctl.c
+++ b/drivers/char/tty_ioctl.c
@@ -755,6 +755,32 @@ static int send_prio_char(struct tty_struct *tty, char ch)
return 0;
}
+/**
+ * tty_change_softcar - carrier change ioc... |
5d0fdf1e01899805b6c2c0b789a707dcb731b1ea | Analyze and fix the following issue in the Linux kernel code: tty_io: fix remaining pid struct locking | Problem Details:
This fixes the last couple of pid struct locking failures I know about.
[oleg@tv-sign.ru: clean up do_task_stat()]
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@l... | ```diff
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index c8aa318eaa18..2460c4c76161 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -3173,6 +3173,27 @@ unlock:
return ret;
}
+/**
+ * tty_get_pgrp - return a ref counted pgrp pid
+ * @tty: tty to read
+ *
+ * Returns a refcounted in... |
575537b3248ee9b7578a3bb3df33fcdda2bfc4d5 | Analyze and fix the following issue in the Linux kernel code: Resume TTY on SUSP and fix CRNL order in N_TTY line discipline | Problem Details:
Refine these behaviors in the N_TTY line discipline:
1) Handle the signal characters consistently when received in a stopped TTY
so that SUSP (typically ctrl-Z) behaves like INTR and QUIT in resuming a
stopped TTY.
2) Adjust the order in which the IGNCR/ICRNL/INLCR processing is applied to
b... | ```diff
diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c
index 001d9d875387..e1518e17e09d 100644
--- a/drivers/char/n_tty.c
+++ b/drivers/char/n_tty.c
@@ -708,7 +708,7 @@ static inline void n_tty_receive_char(struct tty_struct *tty, unsigned char c)
if (tty->stopped && !tty->flow_stopped && I_IXON(tty) &&
... |
04f378b198da233ca0aca341b113dc6579d46123 | Analyze and fix the following issue in the Linux kernel code: tty: BKL pushdown | Problem Details:
- Push the BKL down into the line disciplines
- Switch the tty layer to unlocked_ioctl
- Introduce a new ctrl_lock spin lock for the control bits
- Eliminate much of the lock_kernel use in n_tty
- Prepare to (but don't yet) call the drivers with the lock dropped
on the paths that historically held th... | ```diff
diff --git a/drivers/char/n_hdlc.c b/drivers/char/n_hdlc.c
index 06803ed5568c..a07c0af4819e 100644
--- a/drivers/char/n_hdlc.c
+++ b/drivers/char/n_hdlc.c
@@ -578,26 +578,36 @@ static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
return -EFAULT;
}
+ lock_kernel();
+
for (;;) {
- i... |
e52384426064bca0669a954736206adca7595d48 | Analyze and fix the following issue in the Linux kernel code: serial_core: Prepare for BKL push down | Problem Details:
Instead of checking for the BKL in these methods, take it ourselves. That
avoids propogating it into the serial drivers and we can then fix them later
on.
Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-... | ```diff
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 977ce820ce30..f7263e104d81 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -914,14 +914,14 @@ static void uart_break_ctl(struct tty_struct *tty, int break_state)
struct uart_state *state = tty->drive... |
00cd5c37afd5f431ac186dd131705048c0a11fdb | Analyze and fix the following issue in the Linux kernel code: ptrace: permit ptracing of /sbin/init | Problem Details:
Afaics, currently there are no kernel problems with ptracing init, it can't
lose SIGNAL_UNKILLABLE flag and be killed/stopped by accident.
The ability to strace/debug init can be very useful if you try to figure out
why it does not work as expected.
However, admin should know what he does, "gdb /sbin... | ```diff
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index 5f8d452e8111..dcc199c43a12 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -168,8 +168,6 @@ int ptrace_attach(struct task_struct *task)
audit_ptrace(task);
retval = -EPERM;
- if (task->pid <= 1)
- goto out;
if (same_thread_group(task, current))... |
fae5fa44f1fd079ffbed8e0add929dd7bbd1347f | Analyze and fix the following issue in the Linux kernel code: signals: fix /sbin/init protection from unwanted signals | Problem Details:
The global init has a lot of long standing problems with the unhandled fatal
signals.
- The "is_global_init(current)" check in get_signal_to_deliver()
protects only the main thread. Sub-thread can dequee the fatal
signal and shutdown the whole thread group except the main thread.
If it deque... | ```diff
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 0917b3df12d5..fe970cdca83c 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -561,6 +561,8 @@ struct signal_struct {
#define SIGNAL_CLD_CONTINUED 0x00000020
#define SIGNAL_CLD_MASK (SIGNAL_CLD_STOPPED|SIGNAL_CLD_CONTINUED)
+#d... |
2e2ba22ea4fd4bb85f0fa37c521066db6775cbef | Analyze and fix the following issue in the Linux kernel code: signals: check_kill_permission: check session under tasklist_lock | Problem Details:
This wasn't documented, but as Atsushi Tsuji pointed out
check_kill_permission() needs tasklist_lock for task_session_nr(). I missed
this fact when removed tasklist from the callers.
Change check_kill_permission() to take tasklist_lock for the SIGCONT case.
Re-order security checks so that we take ta... | ```diff
diff --git a/kernel/signal.c b/kernel/signal.c
index 251cc13720bd..24be82c0aae3 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -533,6 +533,7 @@ static int rm_from_queue(unsigned long mask, struct sigpending *s)
static int check_kill_permission(int sig, struct siginfo *info,
struct task_struct *t)
... |
7e695a5ef5c1c768d7feb75cc61e42f13d763623 | Analyze and fix the following issue in the Linux kernel code: signals: fold sig_ignored() into handle_stop_signal() | Problem Details:
Rename handle_stop_signal() to prepare_signal(), make it return a boolean, and
move the callsites of sig_ignored() into it.
No functional changes for now. But it would be nice to factor out the "should
we drop this signal" checks as much as possible, before we try to fix the bugs
with the sub-namespa... | ```diff
diff --git a/kernel/signal.c b/kernel/signal.c
index 0db1d93c4d68..359c4de7c772 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -558,24 +558,25 @@ static int check_kill_permission(int sig, struct siginfo *info,
static void do_notify_parent_cldstop(struct task_struct *tsk, int why);
/*
- * Handle magic... |
5fcd835bf8c2cde06404559b1904e2f1dfcb4567 | Analyze and fix the following issue in the Linux kernel code: signals: use __group_complete_signal() for the specific signals too | Problem Details:
Based on Pavel Emelyanov's suggestion.
Rename __group_complete_signal() to complete_signal() and use it to process
the specific signals too. To do this we simply add the "int group" argument.
This allows us to greatly simply the signal-sending code and adds a useful
behaviour change. We can avoid t... | ```diff
diff --git a/kernel/signal.c b/kernel/signal.c
index f2fc3a9ea8fc..fc1cb03c241c 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -673,8 +673,7 @@ static inline int wants_signal(int sig, struct task_struct *p)
return task_curr(p) || !signal_pending(p);
}
-static void
-__group_complete_signal(int sig, s... |
5fc894bb4fb1de8373d1d5fb6db19204a16859e8 | Analyze and fix the following issue in the Linux kernel code: signals: send_sigqueue: don't forget about handle_stop_signal() | Problem Details:
send_group_sigqueue() calls handle_stop_signal(), send_sigqueue() doesn't.
This is not consistent and in fact I'd say this is (minor) bug.
Move handle_stop_signal() from send_group_sigqueue() to do_send_sigqueue(),
the latter is called by send_sigqueue() too.
Signed-off-by: Oleg Nesterov <oleg@tv-sig... | ```diff
diff --git a/kernel/signal.c b/kernel/signal.c
index 0a8b0aece80d..8259262eaa60 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1274,8 +1274,10 @@ void sigqueue_free(struct sigqueue *q)
}
static int do_send_sigqueue(int sig, struct sigqueue *q, struct task_struct *t,
- struct sigpending *pending)
+ ... |
2deb1acc653cbd5384b107d050d2deba089db2bd | Analyze and fix the following issue in the Linux kernel code: isofs: fix access to unallocated memory when reading corrupted filesystem | Problem Details:
When a directory on isofs is corrupted, we did not check whether length of the
name in a directory entry and the length of the directory entry itself are
consistent. This could lead to possible access beyond the end of buffer when
the length of the name was too big. Add this sanity check to directory... | ```diff
diff --git a/fs/isofs/dir.c b/fs/isofs/dir.c
index 1ba407c64df1..2f0dc5a14633 100644
--- a/fs/isofs/dir.c
+++ b/fs/isofs/dir.c
@@ -145,6 +145,14 @@ static int do_isofs_readdir(struct inode *inode, struct file *filp,
}
de = tmpde;
}
+ /* Basic sanity check, whether name doesn't exceed dir entry */
+ ... |
648b629ed406233b0a607a3cf29d8a169876131f | Analyze and fix the following issue in the Linux kernel code: md: fix up switching md arrays between read-only and read-write | Problem Details:
When setting an array to 'readonly' or to 'active' via sysfs, we must make the
appropriate set_disk_ro call too.
Also when switching to "read_auto" (which is like readonly, but blocks on the
first write so that metadata can be marked 'dirty') we need to be more careful
about what state we are changing... | ```diff
diff --git a/drivers/md/md.c b/drivers/md/md.c
index ff9fef389608..32b2ad88a2f9 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -2594,15 +2594,20 @@ array_state_store(mddev_t *mddev, const char *buf, size_t len)
err = do_md_stop(mddev, 1);
else {
mddev->ro = 1;
+ set_disk_ro(mddev->gendisk, 1... |
31a59e3425d32743738e043c1df1668e0f22bbab | Analyze and fix the following issue in the Linux kernel code: md: fix 'safemode' handling for external metadata. | Problem Details:
'safemode' relates to marking an array as 'clean' if there has been no write
traffic for a while (a couple of seconds), to reduce the chance of the array
being found dirty on reboot.
->safemode is set to '1' when there have been no write for a while, and it
gets set to '0' when the superblock is updat... | ```diff
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 7a44c81ae3cd..ff9fef389608 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -2615,6 +2615,8 @@ array_state_store(mddev_t *mddev, const char *buf, size_t len)
if (atomic_read(&mddev->writes_pending) == 0) {
if (mddev->in_sync == 0) {
mddev-... |
6a51830e14529063cb2685921e1177d9af50e49a | Analyze and fix the following issue in the Linux kernel code: md: fix use after free when removing rdev via sysfs | Problem Details:
rdev->mddev is no longer valid upon return from entry->store() when the
'remove' command is given.
Cc: <stable@kernel.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torv... | ```diff
diff --git a/drivers/md/md.c b/drivers/md/md.c
index bb3e4b1cb773..11457a28a14c 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -2097,7 +2097,7 @@ rdev_attr_store(struct kobject *kobj, struct attribute *attr,
rv = -EBUSY;
else
rv = entry->store(rdev, page, length);
- mddev_unlock(rdev->mddev);... |
ded245b67f0a412b75052a285a0b0d1798650a63 | Analyze and fix the following issue in the Linux kernel code: pxafb: purge unnecessary pr_debug and comments from pxafb | Problem Details:
Signed-off-by: eric miao <eric.miao@marvell.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index 6e6128c51d03..9c87a9c2566d 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -355,7 +355,6 @@ static int pxafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
static inline void pxafb_set_truecolor(u_int is_true_c... |
b0086efba5ad4905090b1e2e62a7e84d9473287f | Analyze and fix the following issue in the Linux kernel code: pxafb: fix various coding style issues for pxafb | Problem Details:
Signed-off-by: eric miao <eric.miao@marvell.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index 02787a43002f..6e6128c51d03 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -57,13 +57,18 @@
#include "pxafb.h"
/* Bits which should not be set in machine configuration structures */
-#define LCCR0_INVALID_CONFIG_MASK (LCCR0_O... |
592e7bf80566bf5ac3ed073d4e198dd5b0824c04 | Analyze and fix the following issue in the Linux kernel code: atmel_spi: clean up baud rate divisor calculation | Problem Details:
Make the baud rate divisor calculation code a bit more readable and add a
few comments.
Also fix wrong debug information being displayed when !new_1 and
max_speed_hz == 0.
[david-b@pacbell.net: fix it]
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Cc: "Janesh Ramakrishnan" <jramakr... | ```diff
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index 02c8e305b14f..e81d59d78910 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -497,7 +497,7 @@ static int atmel_spi_setup(struct spi_device *spi)
struct atmel_spi *as;
u32 scbr, csr;
unsigned int bits = spi->bits_pe... |
41b25a3784c137ad52c71619c73b925860b1b3a2 | Analyze and fix the following issue in the Linux kernel code: /proc/pagetypeinfo: fix output for memoryless nodes | Problem Details:
on memoryless node, /proc/pagetypeinfo is displayed slightly funny output.
this patch fix it.
output example (header is outputed, but no data is outputed)
--------------------------------------------------------------
Page block order: 14
Pages per block: 16384
Free pages count per migrate type at o... | ```diff
diff --git a/mm/vmstat.c b/mm/vmstat.c
index ec6035eda933..280a7ed549f2 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -548,6 +548,10 @@ static int pagetypeinfo_show(struct seq_file *m, void *arg)
{
pg_data_t *pgdat = (pg_data_t *)arg;
+ /* check memoryless node */
+ if (!node_state(pgdat->node_id, N_HIGH_M... |
64275ea4f33636de198da5c78d0dbe31522555b0 | Analyze and fix the following issue in the Linux kernel code: [XFS] Include linux/random.h in all builds, not just debug. | Problem Details:
Noted-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Dave Chinner <dgc@sgi.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/fs/xfs/linux-2.6/xfs_linux.h b/fs/xfs/linux-2.6/xfs_linux.h
index 1bc9f600365f..4edc46915b57 100644
--- a/fs/xfs/linux-2.6/xfs_linux.h
+++ b/fs/xfs/linux-2.6/xfs_linux.h
@@ -75,6 +75,7 @@
#include <linux/delay.h>
#include <linux/log2.h>
#include <linux/spinlock.h>
+#include <linux/random.h>
#... |
17f345808563d2f425b2b15d60c4a5b00112e9eb | Analyze and fix the following issue in the Linux kernel code: [S390] Convert to SPARSEMEM & SPARSEMEM_VMEMMAP | Problem Details:
Convert s390 to SPARSEMEM and SPARSEMEM_VMEMMAP. We do a select
of SPARSEMEM_VMEMMAP since it is configurable. This is because
SPARSEMEM without SPARSEMEM_VMEMMAP gives us a hell of broken
include dependencies that I don't want to fix.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-o... | ```diff
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 8f5f02160ffc..29a7940f284f 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -300,6 +300,14 @@ comment "Kernel preemption"
source "kernel/Kconfig.preempt"
+config ARCH_SPARSEMEM_ENABLE
+ def_bool y
+ select SPARSEMEM_VMEMMAP_ENABLE
+ select S... |
fd781fa25c9e9c6fd1599df060b05e7c4ad724e5 | Analyze and fix the following issue in the Linux kernel code: [S390] cpu topology: Fix possible deadlock. | Problem Details:
When we get a notification that cpu topology changed, we schedule a
work struct which just calls arch_reinit_sched_domains. This function
in turn calls get_online_cpus() which results int the lockdep warning
below.
After all it turnded out that it's not legal to call get_online_cpus()
from the context... | ```diff
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c
index 0becefcf19b9..661a07217057 100644
--- a/arch/s390/kernel/topology.c
+++ b/arch/s390/kernel/topology.c
@@ -9,6 +9,7 @@
#include <linux/device.h>
#include <linux/bootmem.h>
#include <linux/sched.h>
+#include <linux/kthread.h>
#includ... |
0b18d318b80a7f350648ca8f7cc00a2f688104cb | Analyze and fix the following issue in the Linux kernel code: [S390] smp: Fix locking order. | Problem Details:
On some smp sysfs store attributes get_online_cpus() may block on
cpu_hotplug.lock, but we hold already smp_cpu_state_mutex. Since the
locking order on cpu hotplug via arch_update_cpu_topology is inverse
this might lead to deadlocks.
So make sure locking order is always the same.
Signed-off-by: Heiko ... | ```diff
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 0dfa988c1b26..6bb5c050640f 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -890,8 +890,8 @@ static ssize_t cpu_configure_store(struct sys_device *dev, const char *buf,
if (val != 0 && val != 1)
return -EINVAL;
- mutex_... |
aecb2b6eac6ee596f34a54fb164138756895c78a | Analyze and fix the following issue in the Linux kernel code: [POWERPC] 86xx: Fix the wrong serial1 interrupt for 8610 board | Problem Details:
Signed-off-by: Jason Jin <Jason.jin@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org> | ```diff
diff --git a/arch/powerpc/boot/dts/mpc8610_hpcd.dts b/arch/powerpc/boot/dts/mpc8610_hpcd.dts
index 1f2f1e0a5571..255dfefc2d6d 100644
--- a/arch/powerpc/boot/dts/mpc8610_hpcd.dts
+++ b/arch/powerpc/boot/dts/mpc8610_hpcd.dts
@@ -105,7 +105,7 @@
compatible = "ns16550";
reg = <0x4600 0x100>;
clock-frequ... |
eabd90944b3a00766e84da3d117ea0f3e0a3b1a3 | Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix crashkernel= handling when no crashkernel= specified | Problem Details:
Commit edd8ce67436851a62f99f1d9707b40ea6a8e5323 (Use extended crashkernel
command line on ppc64), changed the logic in reserve_crashkernel()
which deals with the crashkernel= command line option.
This introduced a bug in the case when there is no crashkernel= option,
or it is incorrect. We would fall... | ```diff
diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c
index 2d202f274e73..29a0e039d436 100644
--- a/arch/powerpc/kernel/machine_kexec.c
+++ b/arch/powerpc/kernel/machine_kexec.c
@@ -74,20 +74,20 @@ void __init reserve_crashkernel(void)
ret = parse_crashkernel(boot_command_line... |
a94477da38e0b261a7ecea71f4c95a3bcd5be69c | Analyze and fix the following issue in the Linux kernel code: [XFS] Include linux/random.h in all builds, not just debug builds. | Problem Details:
SGI-PV: 979416
SGI-Modid: xfs-linux-melb:xfs-kern:31008a
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com> | ```diff
diff --git a/fs/xfs/linux-2.6/xfs_linux.h b/fs/xfs/linux-2.6/xfs_linux.h
index 1bc9f600365f..4edc46915b57 100644
--- a/fs/xfs/linux-2.6/xfs_linux.h
+++ b/fs/xfs/linux-2.6/xfs_linux.h
@@ -75,6 +75,7 @@
#include <linux/delay.h>
#include <linux/log2.h>
#include <linux/spinlock.h>
+#include <linux/random.h>
#... |
159131149c2f56c1da5ae5e23ab9d5acef4916d1 | Analyze and fix the following issue in the Linux kernel code: tcp: Overflow bug in Vegas | Problem Details:
From: Lachlan Andrew <lachlan.andrew@gmail.com>
There is an overflow bug in net/ipv4/tcp_vegas.c for large BDPs
(e.g. 400Mbit/s, 400ms). The multiplication (old_wnd *
vegas->baseRTT) << V_PARAM_SHIFT overflows a u32.
[ Fix tcp_veno.c too, it has similar calculations. -DaveM ]
Signed-off-by: David S... | ```diff
diff --git a/net/ipv4/tcp_vegas.c b/net/ipv4/tcp_vegas.c
index be24d6ee34bd..0e1a8c91f78e 100644
--- a/net/ipv4/tcp_vegas.c
+++ b/net/ipv4/tcp_vegas.c
@@ -229,7 +229,8 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 in_flight)
*/
tcp_reno_cong_avoid(sk, ack, in_flight);
} else {
- ... |
3a8209d19dd791aaac3668be2fa51a9b42113efd | Analyze and fix the following issue in the Linux kernel code: iwlwifi: move the selects to the tristate drivers | Problem Details:
This patch moves the following select's:
- RFKILL : IWLWIFI_RFKILL -> IWLCORE
- RFKILL_INPUT : IWLWIFI_RFKILL -> IWLCORE
- MAC80211_LEDS : IWL4965_LEDS -> IWLCORE
- LEDS_CLASS : IWL4965_LEDS -> IWLCORE
- MAC80211_LEDS : IWL3945_LEDS -> IWL3945
- LEDS_CLASS : IWL3945_LEDS -> IWL394... | ```diff
diff --git a/drivers/net/wireless/iwlwifi/Kconfig b/drivers/net/wireless/iwlwifi/Kconfig
index 9a25f550fd16..d5b7a76fcaad 100644
--- a/drivers/net/wireless/iwlwifi/Kconfig
+++ b/drivers/net/wireless/iwlwifi/Kconfig
@@ -6,6 +6,10 @@ config IWLCORE
tristate "Intel Wireless Wifi Core"
depends on PCI && MAC8021... |
3734dfc68b64d8ca202c799280daf28c2424659d | Analyze and fix the following issue in the Linux kernel code: [POWERPC] spufs: trace spu_acquire_saved events | Problem Details:
The sputrace module contained a trace entry for spu_acquire_saved, but
this marker was not placed anywhere. Fix this by adding a marker to the
routine.
Signed-off-by: Julio M. Merino Vidal <jmerino@ac.upc.edu>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org> | ```diff
diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c
index 5c5010078042..177735f79317 100644
--- a/arch/powerpc/platforms/cell/spufs/context.c
+++ b/arch/powerpc/platforms/cell/spufs/context.c
@@ -152,6 +152,8 @@ int spu_acquire_saved(struct spu_context *ctx)
{... |
8a476d49555cb7e8d4222782f695048b46692731 | Analyze and fix the following issue in the Linux kernel code: [POWERPC] spufs: fix marker name for find_victim | Problem Details:
Fix a typo in the marker for the find_victim function, which prevented
it from being traced. It previously read find_vitim.
Signed-off-by: Julio M. Merino Vidal <jmerino@ac.upc.edu>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org> | ```diff
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index 31e9d85761c2..62280c292aac 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -593,7 +593,7 @@ static struct spu *find_victim(struct spu_context *ctx)
... |
534578816f028b0dc675fdcc3314016d98588327 | Analyze and fix the following issue in the Linux kernel code: [POWERPC] spufs: add marker for destroy_spu_context | Problem Details:
The sputrace module contained a reference to a marker for
destroy_spu_context, but this marker did not appear in the code. Fix
this by adding a marker in the function.
Signed-off-by: Julio M. Merino Vidal <jmerino@ac.upc.edu>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org> | ```diff
diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c
index 91f2d4d9aefd..5c5010078042 100644
--- a/arch/powerpc/platforms/cell/spufs/context.c
+++ b/arch/powerpc/platforms/cell/spufs/context.c
@@ -78,6 +78,7 @@ void destroy_spu_context(struct kref *kref)
{
st... |
957d33fc1a3793e9ca8c24c6400271b924e46e19 | Analyze and fix the following issue in the Linux kernel code: docbook: fix fatal rapidio yet again (and more to come) | Problem Details:
Don't refer to file that no longer exists:
docproc: linux-2.6.25-git14/arch/powerpc/kernel/rio.c: No such file or directory
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/Documentation/DocBook/rapidio.tmpl b/Documentation/DocBook/rapidio.tmpl
index b9e143e28c64..54eb26b57372 100644
--- a/Documentation/DocBook/rapidio.tmpl
+++ b/Documentation/DocBook/rapidio.tmpl
@@ -133,7 +133,6 @@
!Idrivers/rapidio/rio-sysfs.c
</sect1>
<sect1 id="PPC32_support"><title>... |
c17bf5db76f19211eaed4d01614414f179a06554 | Analyze and fix the following issue in the Linux kernel code: V4L/DVB (7794): cx88: Fix a warning | Problem Details:
drivers/media/video/cx88/cx88-i2c.c: In function 'attach_inform':
drivers/media/video/cx88/cx88-i2c.c:102: warning: unused variable 'tun_setup'
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> | ```diff
diff --git a/drivers/media/video/cx88/cx88-i2c.c b/drivers/media/video/cx88/cx88-i2c.c
index 00aa7a3f1105..cb6a096069c7 100644
--- a/drivers/media/video/cx88/cx88-i2c.c
+++ b/drivers/media/video/cx88/cx88-i2c.c
@@ -99,7 +99,6 @@ static int cx8800_bit_getsda(void *data)
static int attach_inform(struct i2c_cli... |
a94a630a4c69430bb4562ab8252104449bba9a67 | Analyze and fix the following issue in the Linux kernel code: pasemi_edac needs to include linux/edac.h | Problem Details:
Commit c3c52bce6993c6d37af2c2de9b482a7013d646a7 ("edac: fix module
initialization on several modules 2nd time") added a call to opstate_init
but did not include linux/edac.h that declares it.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by... | ```diff
diff --git a/drivers/edac/pasemi_edac.c b/drivers/edac/pasemi_edac.c
index 3fd65a563848..8e6b91bd2e99 100644
--- a/drivers/edac/pasemi_edac.c
+++ b/drivers/edac/pasemi_edac.c
@@ -26,6 +26,7 @@
#include <linux/pci.h>
#include <linux/pci_ids.h>
#include <linux/slab.h>
+#include <linux/edac.h>
#include "edac_c... |
ff138171ec6f84f311fe8c0395ad7f9e6d04feec | Analyze and fix the following issue in the Linux kernel code: V4L/DVB (7789b): Fix merge conflicts | Problem Details:
Some Kconfig names were changed. This patch reapplies the rename script,
fixing for those drivers merged after the patch that renamed those
items.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> | ```diff
diff --git a/drivers/media/video/cx18/Kconfig b/drivers/media/video/cx18/Kconfig
index be654a27bd3c..acc4b47f1d1d 100644
--- a/drivers/media/video/cx18/Kconfig
+++ b/drivers/media/video/cx18/Kconfig
@@ -4,7 +4,7 @@ config VIDEO_CX18
select I2C_ALGOBIT
select FW_LOADER
select VIDEO_IR
- select VIDEO_TUNER
... |
f1fa3342e271029f93d323ca664809b94594fe04 | Analyze and fix the following issue in the Linux kernel code: ext4: fix hot spins in mballoc after err_freebuddy and err_freemeta | Problem Details:
In ext4_mb_init_backend() 'i' is of type ext4_group_t. Since unsigned, i
>= 0 is always true, so fix hot spins after err_freebuddy: and -meta:
and prevent decrements when zero.
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tyt... | ```diff
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 11e1fd59acbd..fbec2ef93797 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2272,13 +2272,13 @@ static int ext4_mb_init_backend(struct super_block *sb)
meta_group_info[j] = kzalloc(len, GFP_KERNEL);
if (meta_group_info[j] == NULL) {
pr... |
f8a87d89304c1eea8e4a8dc02d134f57590913c6 | Analyze and fix the following issue in the Linux kernel code: ext4: fix test ext_generic_write_end() copied return value | Problem Details:
'copied' is unsigned, whereas 'ret2' is not. The test (copied < 0) fails
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> | ```diff
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 0c94db462c2f..8d9707746413 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1311,10 +1311,11 @@ static int ext4_ordered_write_end(struct file *file,
new_i_size = pos + copied;
if (new_i_size > EXT4_I(inode)->i_disksize)
EXT4_I(inode)->i_disksi... |
7c2f3d6f89aab04c5c66a0a757888d3a77a5e899 | Analyze and fix the following issue in the Linux kernel code: ext3: fix test ext_generic_write_end() copied return value | Problem Details:
'copied' is unsigned, whereas 'ret2' is not. The test (copied < 0) fails
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> | ```diff
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
index cc47b76091bf..6ae4ecf3ce40 100644
--- a/fs/ext3/inode.c
+++ b/fs/ext3/inode.c
@@ -1261,10 +1261,11 @@ static int ext3_ordered_write_end(struct file *file,
new_i_size = pos + copied;
if (new_i_size > EXT3_I(inode)->i_disksize)
EXT3_I(inode)->i_disksi... |
60bd63d1928c65abd71d8b9b45672cf6e3101845 | Analyze and fix the following issue in the Linux kernel code: ext4: cleanup for compiling mballoc with verification and debugging #defines | Problem Details:
This patch allows compiling mballoc with:
#define AGGRESSIVE_CHECK
#define DOUBLE_CHECK
#define MB_DEBUG
It fixes:
Compilation errors:
fs/ext4/mballoc.c: In function '__mb_check_buddy':
fs/ext4/mballoc.c:605: error: 'struct ext4_prealloc_space' has no member named 'group_list'
fs/ext4/mballoc.c:606: e... | ```diff
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index d2f0b9661fb9..d4ae948606e8 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -896,10 +896,10 @@ static int __mb_check_buddy(struct ext4_buddy *e4b, char *file,
list_for_each(cur, &grp->bb_prealloc_list) {
ext4_group_t groupnr;
struct ext4_... |
c83617db76353ff30e825874be2c15c185b95759 | Analyze and fix the following issue in the Linux kernel code: ext4: Don't do GFP_NOFS allocations after taking ext4_lock_group | Problem Details:
We can't do GFP_NOFS allocation after taking ext4_lock_group
BUG: sleeping function called from invalid context at mm/slab.c:3054
in_atomic():1, irqs_disabled():0
1 lock held by vi/2426:
#0: (&ei->i_data_sem){----}, at: [<c01cf665>] ext4_release_file+0x23/0x66
Pid: 2426, comm: vi Not tainted 2.6.25-r... | ```diff
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index f87471de3af7..d2f0b9661fb9 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -3730,9 +3730,9 @@ static int ext4_mb_new_preallocation(struct ext4_allocation_context *ac)
*/
static noinline_for_stack int
ext4_mb_release_inode_pa(struct ext4_budd... |
61d7416a286e840d905c18b1e6b0977c036c8656 | Analyze and fix the following issue in the Linux kernel code: [SCSI] bug fix for free list handling | Problem Details:
commit:
commit 542bd1377a963070bc4a03ff7d2690ddf3920596
Author: James Bottomley <James.Bottomley@HansenPartnership.com>
Date: Mon Apr 21 10:57:20 2008 -0500
[SCSI] fix SLUB WARN_ON
Fixed another problem in free list handling by moving list allocation
from scsi_host_alloc() to scsi_add_host(). ... | ```diff
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 12d69d7c8577..749c9c7fc2e1 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -469,6 +469,7 @@ int scsi_setup_command_freelist(struct Scsi_Host *shost)
cmd = scsi_pool_alloc_command(shost->cmd_pool, gfp_mask);
if (!cmd) {
scsi_put_ho... |
69cd39e94669e2994277a29249b6ef93b088ddbb | Analyze and fix the following issue in the Linux kernel code: [SCSI] megaraid_mbox: fix Dell CERC firmware problem | Problem Details:
Newer Dell CERC firmware (>= 6.62) implement a random deletion handling
compatible with the legacy megaraid driver. The legacy handling shifted
the target ID by 0x80 only for I/O commands (READ/WRITE/etc), whereas
megaraid_mbox shifts the target ID always if random deletion is supported.
The resulted ... | ```diff
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
index 820f91fb63ba..70a0f11f48b2 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.c
+++ b/drivers/scsi/megaraid/megaraid_mbox.c
@@ -3168,6 +3168,23 @@ megaraid_mbox_support_random_del(adapter_t *adapter)
uint8_t raw_mb... |
216553c4b7f3e3e2beb4981cddca9b2027523928 | Analyze and fix the following issue in the Linux kernel code: ext4: fix wrong gfp type under transaction | Problem Details:
This fixes the allocations with GFP_KERNEL while under a transaction problems
in ext4. This patch is the same as its ext3 counterpart, just switches these
to GFP_NOFS.
Signed-off-by: Josef Bacik <jbacik@redhat.com>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.o... | ```diff
diff --git a/fs/ext4/acl.c b/fs/ext4/acl.c
index a8bae8cd1d5d..cc92624a46a2 100644
--- a/fs/ext4/acl.c
+++ b/fs/ext4/acl.c
@@ -37,7 +37,7 @@ ext4_acl_from_disk(const void *value, size_t size)
return ERR_PTR(-EINVAL);
if (count == 0)
return NULL;
- acl = posix_acl_alloc(count, GFP_KERNEL);
+ acl = posix_... |
2887df139c40512cdc147d1a84d95d4f3d261bd1 | Analyze and fix the following issue in the Linux kernel code: ext4: Fix hang on umount with quotas when journal is aborted | Problem Details:
Call dquot_drop() from ext4_dquot_drop() even if we fail to start a
transaction. Otherwise we never get to dropping references to quota structures
from the inode and umount will hang indefinitely. Thanks to Payphone LIOU for
spotting the problem.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: ... | ```diff
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 93a7e746f425..e3b3483b600d 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3040,8 +3040,14 @@ static int ext4_dquot_drop(struct inode *inode)
/* We may delete quota structure so we need to reserve enough blocks */
handle = ext4_journal_start(inod... |
53b7e9f6807c1274eee19201396b4c2b5f721553 | Analyze and fix the following issue in the Linux kernel code: ext4: Fix update of mtime and ctime on rename | Problem Details:
The patch below makes ext4 update mtime and ctime of the directory
into which we move file even if the directory entry already exists.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> | ```diff
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 02cdaec39e21..7fc1bc1c16d1 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -2354,6 +2354,9 @@ static int ext4_rename (struct inode * old_dir, struct dentry *old_dentry,
EXT4_FEATURE_INCOMPAT_FILETYPE))
new_de->file_type = old_de->file_ty... |
22b5e7a74280deae560c20ee1a9b502b35181327 | Analyze and fix the following issue in the Linux kernel code: ahci: SB600 ahci can't do MSI, blacklist that capability | Problem Details:
This fixes bz#10507.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Shane Huang <Shane.Huang@amd.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com> | ```diff
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 7c4f886f1f16..8cace9aa9c03 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -358,7 +358,7 @@ static const struct ata_port_info ahci_port_info[] = {
/* board_ahci_sb600 */
{
AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL |
- AHCI_HFLAG_3... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.