id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
99219a3fbc2dcf2eaa954f7b2ac27299fd7894cd | Analyze and fix the following issue in the Linux kernel code: [PATCH] kretprobe spinlock deadlock patch | Problem Details:
kprobe_flush_task() possibly calls kfree function during holding
kretprobe_lock spinlock, if kfree function is probed by kretprobe that will
incur spinlock deadlock. This patch moves kfree function out scope of
kretprobe_lock.
Signed-off-by: bibo, mao <bibo.mao@intel.com>
Signed-off-by: Ananth N Mavi... | ```diff
diff --git a/arch/i386/kernel/kprobes.c b/arch/i386/kernel/kprobes.c
index 7a97544f15a0..d98e44b16fe2 100644
--- a/arch/i386/kernel/kprobes.c
+++ b/arch/i386/kernel/kprobes.c
@@ -396,11 +396,12 @@ no_kprobe:
fastcall void *__kprobes trampoline_handler(struct pt_regs *regs)
{
struct kretprobe_instance *ri = ... |
f40f50d3bb33b52dfd550ca80be7daaddad21883 | Analyze and fix the following issue in the Linux kernel code: [PATCH] Use struct pspace in next_pidmap and find_ge_pid | Problem Details:
This updates my proc: readdir race fix (take 3) patch
to account for the changes made by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
to introduce struct pspace.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <a... | ```diff
diff --git a/kernel/pid.c b/kernel/pid.c
index 89107b7481af..e4779bbb2058 100644
--- a/kernel/pid.c
+++ b/kernel/pid.c
@@ -149,19 +149,20 @@ static int alloc_pidmap(struct pspace *pspace)
return -1;
}
-static int next_pidmap(int last)
+static int next_pidmap(struct pspace *pspace, int last)
{
int offset... |
c88be3eb2e01bbb21c9ccdc3805f0d3546c1898c | Analyze and fix the following issue in the Linux kernel code: [PATCH] pids coding style use struct pidmap in next_pidmap | Problem Details:
Use struct pidmap instead of pidmap_t.
This updates my proc: readdir race fix (take 3) patch
to account for the changes made by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
to kill pidmap_t.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
S... | ```diff
diff --git a/kernel/pid.c b/kernel/pid.c
index 0a45de2918e2..373639a10d84 100644
--- a/kernel/pid.c
+++ b/kernel/pid.c
@@ -148,7 +148,7 @@ static int alloc_pidmap(void)
static int next_pidmap(int last)
{
int offset;
- pidmap_t *map;
+ struct pidmap *map;
offset = (last + 1) & BITS_PER_PAGE_MASK;
map =... |
0804ef4b0de7121261f77c565b20a11ac694e877 | Analyze and fix the following issue in the Linux kernel code: [PATCH] proc: readdir race fix (take 3) | Problem Details:
The problem: An opendir, readdir, closedir sequence can fail to report
process ids that are continually in use throughout the sequence of system
calls. For this race to trigger the process that proc_pid_readdir stops at
must exit before readdir is called again.
This can cause ps to fail to report pro... | ```diff
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 89c20d9d50bf..b18f3773dd43 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -2142,72 +2142,43 @@ out_no_task:
}
/*
- * Find the first tgid to return to user space.
+ * Find the first task with tgid >= tgid
*
- * Usually this is just whatever follows &i... |
2bc2d61a9638dab670d8361e928d1a5a291173ef | Analyze and fix the following issue in the Linux kernel code: [PATCH] list module taint flags in Oops/panic | Problem Details:
When listing loaded modules during an oops or panic, also list each
module's Tainted flags if non-zero (P: Proprietary or F: Forced load only).
If a module is did not taint the kernel, it is just listed like
usbcore
but if it did taint the kernel, it is listed like
wizmodem(PF)
Example:
[ 3260.1217... | ```diff
diff --git a/include/linux/module.h b/include/linux/module.h
index 2c599175c583..4b2d8091a410 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -320,6 +320,8 @@ struct module
/* Am I GPL-compatible */
int license_gplok;
+ unsigned int taints; /* same bits as kernel:tainted */
+
#ifdef C... |
d00223f1693173c7b51f867dd52049955a92d0ed | Analyze and fix the following issue in the Linux kernel code: [GFS2] Fix code style/indent in ops_file.c | Problem Details:
Fix a couple of minor issues.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> | ```diff
diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c
index f2d0bd80a1c7..fafa48b9105e 100644
--- a/fs/gfs2/ops_file.c
+++ b/fs/gfs2/ops_file.c
@@ -606,15 +606,16 @@ static int gfs2_flock(struct file *file, int cmd, struct file_lock *fl)
if (fl->fl_type == F_UNLCK) {
do_unflock(file, fl);
return 0;
- } e... |
930cc237d67dc62464fe71529631d16f51d7aee3 | Analyze and fix the following issue in the Linux kernel code: [GFS2] streamline-generic_file_-interfaces-and-filemap gfs fix | Problem Details:
Fix GFS for streamline-generic_file_-interfaces-and-filemap.patch
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> | ```diff
diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c
index a05b75a7ed8e..f2d0bd80a1c7 100644
--- a/fs/gfs2/ops_file.c
+++ b/fs/gfs2/ops_file.c
@@ -612,9 +612,9 @@ static int gfs2_flock(struct file *file, int cmd, struct file_lock *fl)
const struct file_operations gfs2_file_fops = {
.llseek = gfs2_llseek,
... |
5e980823581682d1566e7b5089cf827ddd5f3c94 | Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix rheap alignment problem | Problem Details:
Honor alignment parameter in the rheap allocator. This is needed by
qe_lib.
Remove compile warning.
Signed-off-by: Pantelis Antoniou <pantelis@embeddedalley.com>
Signed-off-by: Li Yang <leoli@freescale.com>
Acked-by: Kumar Galak <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.... | ```diff
diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
index 8030f6245d82..a0360ae10d0c 100644
--- a/arch/powerpc/lib/Makefile
+++ b/arch/powerpc/lib/Makefile
@@ -14,6 +14,7 @@ endif
obj-$(CONFIG_PPC64) += checksum_64.o copypage_64.o copyuser_64.o \
memcpy_64.o usercopy_64.o mem_64.o string.... |
61e37ca22b717a9edc3e5e7c7f3603fad464c76d | Analyze and fix the following issue in the Linux kernel code: [POWERPC] Avoid NULL pointer in gpio1_interrupt | Problem Details:
gpio1_interrupt() may dereference a NULL pointer if ioremap() fails.
But, maybe no gpio interrupt happens in the first place?
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Paul Mackerras <paulus@samba.org> | ```diff
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index dda03985dcf5..5710e01cef10 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -336,8 +336,10 @@ int __init find_via_pmu(void)
if (gaddr != OF_BAD_ADDR)
gpio_reg = ioremap(gaddr, 0x10);
}
- if (gp... |
553a8012088b3452c7d66ff60d2d06ad0c9bea00 | Analyze and fix the following issue in the Linux kernel code: [MTD] fix nftl_write warning | Problem Details:
Building 2.6.18-mm2 issues the following warning if CONFIG_NFTL_RW is not set:
CC [M] drivers/mtd/nftlcore.o
drivers/mtd/nftlcore.c:183: warning: 'nftl_write' defined but not used
The following patch only compiles nftl_write if CONFIG_NFTL_RW is set.
Signed-off-by: Frederik Deweerdt <frederik.dewe... | ```diff
diff --git a/drivers/mtd/nftlcore.c b/drivers/mtd/nftlcore.c
index dd5cea8b4a7a..b5a5f8da4722 100644
--- a/drivers/mtd/nftlcore.c
+++ b/drivers/mtd/nftlcore.c
@@ -175,6 +175,8 @@ int nftl_write_oob(struct mtd_info *mtd, loff_t offs, size_t len,
return res;
}
+#ifdef CONFIG_NFTL_RW
+
/*
* Write data and ... |
1a70d6529ad9f5978af846440f8a809784d6e813 | Analyze and fix the following issue in the Linux kernel code: [CIFS] Fix compiler warning with previous patch | Problem Details:
Signed-off-by: Steve French <sfrench@us.ibm.com> | ```diff
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 005fb315477c..79a01d35a783 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -477,7 +477,7 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)
server->capabilities = CAP_MPX_MODE;
}
tmp = (__s16)le16_to_cpu(rsp->ServerTimeZone... |
947a50679570ef7a66e3e3107e95943a1cb14d08 | Analyze and fix the following issue in the Linux kernel code: [CIFS] Fix typo | Problem Details:
Signed-off-by: Steve French <sfrench@us.ibm.com> | ```diff
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 8d30a5c4f244..005fb315477c 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -495,7 +495,7 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)
(int)(utc.tv_sec - ts.tv_sec)));
val = (int)(utc.tv_sec - ts.tv_sec);
seconds = ... |
cde45f19ca0d2ff1ede01528a7629388d4139309 | Analyze and fix the following issue in the Linux kernel code: Input: wistron - fix setting up special buttons | Problem Details:
If either wifi or bluetooth button has been detected, the code
would break off the loop. But there are laptops that have both
types of buttons, so the loop has to continue checking.
Signed-off-by: Reiner Herrmann <reiner@reiner-h.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru> | ```diff
diff --git a/drivers/input/misc/wistron_btns.c b/drivers/input/misc/wistron_btns.c
index de0f46dd9692..a172ea1dc97b 100644
--- a/drivers/input/misc/wistron_btns.c
+++ b/drivers/input/misc/wistron_btns.c
@@ -248,13 +248,10 @@ static int __init dmi_matched(struct dmi_system_id *dmi)
keymap = dmi->driver_data;... |
23126692e30ec22760e0ef932c3c2fff00d440bb | Analyze and fix the following issue in the Linux kernel code: [MIPS] Stacktrace build-fix and improvement | Problem Details:
Fix build error due to stacktrace API change. Now save_stack_trace()
tries to save all kernel context, including interrupts and exception.
Also some asm code are changed a bit so that we can detect the end of
current context easily.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: R... | ```diff
diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S
index 37fda3dcdfc5..af6ef2fd8300 100644
--- a/arch/mips/kernel/genex.S
+++ b/arch/mips/kernel/genex.S
@@ -220,8 +220,8 @@ NESTED(except_vec_vi_handler, 0, sp)
CLI
TRACE_IRQS_OFF
move a0, sp
- jalr v0
- j ret_from_irq
+ PTR_LA ra, ret_from_ir... |
eae6c0da9df81300895949897c0451423340ac40 | Analyze and fix the following issue in the Linux kernel code: [MIPS] lockdep: fix TRACE_IRQFLAGS_SUPPORT | Problem Details:
In handle_sys and its variants, we must reload some registers which
might be clobbered by trace_hardirqs_on().
Also we must make sure trace_hardirqs_on() called in kernel level (not
exception level).
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org> | ```diff
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S
index e71785102206..61362e6fa9ec 100644
--- a/arch/mips/kernel/scall32-o32.S
+++ b/arch/mips/kernel/scall32-o32.S
@@ -28,18 +28,7 @@
NESTED(handle_sys, PT_SIZE, sp)
.set noat
SAVE_SOME
-#ifdef CONFIG_TRACE_IRQFLAGS
- TRACE_IRQS_ON... |
d834c16516d1ebec4766fc58c059bf01311e6045 | Analyze and fix the following issue in the Linux kernel code: pccard_store_cis: fix wrong error handling | Problem Details:
The test for the error from pcmcia_replace_cis() was incorrect, and
would always trigger (because if an error didn't happen, the "ret" value
would not be zero, it would be the passed-in count).
Reported and debugged by Fabrice Bellet <fabrice@bellet.info>
Rather than just fix the single broken test, ... | ```diff
diff --git a/drivers/pcmcia/socket_sysfs.c b/drivers/pcmcia/socket_sysfs.c
index c5d7476da471..933cd864a5c9 100644
--- a/drivers/pcmcia/socket_sysfs.c
+++ b/drivers/pcmcia/socket_sysfs.c
@@ -298,7 +298,7 @@ static ssize_t pccard_store_cis(struct kobject *kobj, char *buf, loff_t off, siz
{
struct pcmcia_socke... |
6470f2ba641cf93d357854cdc63a65350352bb97 | Analyze and fix the following issue in the Linux kernel code: [SCSI] trivial scsi_execute_async fix | Problem Details:
In scsi_execute_async()'s error path, a struct scsi_io_context
allocated with kmem_cache_alloc() is kfree()'d. Obviously
kmem_cache_free() should be used instead.
Signed-off-by: Arne Redlich <arne.redlich@xiranet.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com> | ```diff
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index d6743b959a72..8ada93ae34f7 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -424,7 +424,7 @@ int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd,
free_req:
blk_put_request(req);
free_sense:
- kfre... |
80c6e3c0b5eb855b69270658318f5ccf04d7b1ff | Analyze and fix the following issue in the Linux kernel code: [SCSI] fix scsi_device_types overrun in scsi.c | Problem Details:
this overrun was spotted by coverity (cid #1403).
If type == ARRAY_SIZE(scsi_device_types), we are off by one.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com> | ```diff
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 7a054f9d1ee3..a21642e32c42 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -128,7 +128,7 @@ const char * scsi_device_type(unsigned type)
return "Well-known LUN ";
if (type == 0x1f)
return "No Device ";
- if (type > ARRAY... |
7b75b990e3cb33fd529640d589e77950e72a607c | Analyze and fix the following issue in the Linux kernel code: [SCSI] aic7xxx: fix byte I/O order in ahd_inw | Problem Details:
Comment says "Read high byte first as some registers increment..."
but code doesn't guarantee that, I think:
return ((ahd_inb(ahd, port+1) << 8) | ahd_inb(ahd, port));
Compiler can reorder it.
Make the order explicit.
Signed-off-by: Denis Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Andrew Mor... | ```diff
diff --git a/drivers/scsi/aic7xxx/aic79xx_inline.h b/drivers/scsi/aic7xxx/aic79xx_inline.h
index 8ad3ce945b9e..a3266e066c00 100644
--- a/drivers/scsi/aic7xxx/aic79xx_inline.h
+++ b/drivers/scsi/aic7xxx/aic79xx_inline.h
@@ -527,7 +527,8 @@ ahd_inw(struct ahd_softc *ahd, u_int port)
* or have other side effect... |
203cf2fc13a5db1fb202c294948fa9cb43bf69fa | Analyze and fix the following issue in the Linux kernel code: [CIFS] Fix readdir of large directories for backlevel servers | Problem Details:
(were not setting all of resume key)
Signed-off-by: Steve French <sfrench@us.ibm.com> | ```diff
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index 71e86c38e632..b0e5db10664c 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -946,6 +946,7 @@ static int cifs_save_resume_key(const char *current_entry,
filename = &pFindData->FileName[0];
/* one byte length, no name conversion */
len = (... |
4e9011d50d77ce7d234272e203235d8ecffd61a1 | Analyze and fix the following issue in the Linux kernel code: [PATCH] rtc-sysfs fix | Problem Details:
It's not clear how this thinko got through..
Cc: Olaf Hering <olaf@aepfle.de>
Cc: David Brownell <david-b@pacbell.net>
Cc: Alessandro Zummo <alessandro.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/drivers/rtc/rtc-sysfs.c b/drivers/rtc/rtc-sysfs.c
index 6f8370e88a76..625637b84d33 100644
--- a/drivers/rtc/rtc-sysfs.c
+++ b/drivers/rtc/rtc-sysfs.c
@@ -116,7 +116,7 @@ static void __exit rtc_sysfs_exit(void)
class_interface_unregister(&rtc_sysfs_interface);
}
-subsys_init(rtc_sysfs_init);
+s... |
9a292308255ad381dd74541be468c4aec240a615 | Analyze and fix the following issue in the Linux kernel code: [MTD] fix printk warning | Problem Details:
gcc spits out this warning:
drivers/mtd/mtd_blkdevs.c: In function ‘do_blktrans_request’:
drivers/mtd/mtd_blkdevs.c:72: warning: format ‘%ld’ expects type ‘long int’, but argument 2 has type ‘unsigned int’
This could be fixed any number of ways, including use of BUG().
rq_data_dir() only returns 0 or... | ```diff
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
index 6baf5fe14230..178b53b56be9 100644
--- a/drivers/mtd/mtd_blkdevs.c
+++ b/drivers/mtd/mtd_blkdevs.c
@@ -69,7 +69,7 @@ static int do_blktrans_request(struct mtd_blktrans_ops *tr,
return 1;
default:
- printk(KERN_NOTICE "Unknown reques... |
a6b93a908508810c5d51dd9b390283345af6f2d9 | Analyze and fix the following issue in the Linux kernel code: [SERIAL] Fix oops when removing suspended serial port | Problem Details:
A serial card might have been removed when the system is resumed.
This results in a suspended port being shut down, which results in
the ports shutdown method being called twice in a row. This causes
BUGs. Avoid this by tracking the suspended state separately from
the initialised state.
Signed-off-b... | ```diff
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index d814bb1dcb05..397147a7054f 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -1940,6 +1940,9 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *port)
if (state->info && state->info->fl... |
fe59d5372ae719ca4550958f1e5bb4dd6eeac9cd | Analyze and fix the following issue in the Linux kernel code: [SERIAL] Fix resume handling bug | Problem Details:
Unfortunately, pcmcia_dev_present() returns false when a device is
suspended, so checking this on resume does not work too well. Omit
this test.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ```diff
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c
index 1267cbed52f5..00f9ffd69489 100644
--- a/drivers/serial/serial_cs.c
+++ b/drivers/serial/serial_cs.c
@@ -307,16 +307,14 @@ static int serial_suspend(struct pcmcia_device *link)
static int serial_resume(struct pcmcia_device *link)
{
- ... |
255341c6fded73204b1ee6feb5fe16e125b27f62 | Analyze and fix the following issue in the Linux kernel code: [SERIAL] OMAP1510 serial fix for 115200 baud | Problem Details:
The patch below is necessary for 115200 baud on an OMAP1510 internal UART.
It's been in the linux-omap tree for some time and with it applied to a
vanilla Linus git tree the serial console on the Amstrad Delta (which is
OMAP1510 based and whose initial bootloader runs at 115200) works fine (it
doesn't ... | ```diff
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index cef03e68771b..a07442ffefbd 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -1896,6 +1896,17 @@ serial8250_set_termios(struct uart_port *port, struct termios *termios,
serial_outp(up, UART_EFR, efr);
}
+#ifdef CONFIG_ARCH_O... |
80e3c2b659515ef236f33f691ff5b22ae90ae8e4 | Analyze and fix the following issue in the Linux kernel code: [SERIAL] returning proper error from serial core driver | Problem Details:
Fix the issue of returning 0 even in case of error from uart_set_info
function. Now it returns the error EBUSY when it can not set new port.
Signed-off-by: Ram Gupta <r.gupta@astronautics.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ```diff
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index d7e28ab4c313..d814bb1dcb05 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -792,6 +792,7 @@ static int uart_set_info(struct uart_state *state,
* We failed anyway.
*/
retval = -EBUSY;
+ ... |
0b30d668a20acd2ffd4268f7bbe799b0dd73d5cf | Analyze and fix the following issue in the Linux kernel code: [SERIAL] 8250 resourse management fixes | Problem Details:
I think register ranges obviously need to be claimed/released for all UARTs
including those with UPIO_MEM32 and UPIO_TSI iotype.
Also, serial8250_request_rsa_resources() returns false positives with
UPIO_MEM32, UPIO_AU, and UPIO_TSI iotype -- I don't think this makes any sense.
Signed-off-by: Sergei ... | ```diff
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 0ae9ced00ed4..8d7ef69312a5 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -1949,6 +1949,8 @@ static int serial8250_request_std_resource(struct uart_8250_port *up)
case UPIO_AU:
size = 0x100000;
/* fall thru */
+ case UPI... |
de897881e474cae06cf06c830fcadc916c53ce64 | Analyze and fix the following issue in the Linux kernel code: drivers/net/wireless/{airo,ipw2100}: fix error handling bugs | Problem Details:
airo:
* fix oops, if !CONFIG_PROC_FS (create_proc_entry always returns NULL)
* handle pci_register_driver() failure. if it fails, we really do
want to exit, rather than (as a comment indicates) return success
because-we-are-a-library.
* #if 0 have_isa_dev variable, which is assigned a value but ... | ```diff
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index ba737c6cebec..39d09345027c 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -5659,25 +5659,40 @@ static int airo_pci_resume(struct pci_dev *pdev)
static int __init airo_init_module( void )
{
- int i, ha... |
b7a00ecd557859c4037b6465fdd6c9a49b1fa649 | Analyze and fix the following issue in the Linux kernel code: [netdrvr] phy: Fix bugs in error handling | Problem Details:
The recent __must_check stuff flagged some error handling bugs.
phy/fixed.c:
* handle device_bind_driver() failure
phy/phy_device.c:
* handle device_bind_driver() failure
* release rwsem upon failure
Signed-off-by: Jeff Garzik <jeff@garzik.org> | ```diff
diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c
index 19f7ee63276f..94b47c8d0ab4 100644
--- a/drivers/net/phy/fixed.c
+++ b/drivers/net/phy/fixed.c
@@ -289,9 +289,13 @@ static int fixed_mdio_register_device(int number, int speed, int duplex)
goto probe_fail;
}
- device_bind_driver(&phydev-... |
99c8b9477f2b8c4f625545c41f0318570fa38894 | Analyze and fix the following issue in the Linux kernel code: kbuild: trivial documentation fixes | Problem Details:
Signed-off-by: "Robert P. J. Day" <rpjday@mindspring.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> | ```diff
diff --git a/Documentation/kbuild/modules.txt b/Documentation/kbuild/modules.txt
index 2e7702e94a78..769ee05ee4d1 100644
--- a/Documentation/kbuild/modules.txt
+++ b/Documentation/kbuild/modules.txt
@@ -43,7 +43,7 @@ are not planned to be included in the kernel tree.
What is covered within this file is mainly ... |
9a3d0fe84f9fe296a86ea9315092d31986bc7a3a | Analyze and fix the following issue in the Linux kernel code: kconfig: fix saving alternate kconfig file in parent dir | Problem Details:
This fixes bugzilla entry: 7182
http://bugzilla.kernel.org/show_bug.cgi?id=7182
With this patch we no longer append the directory part twice
before saving the config file.
This patch has been sent to Roman Zippel for review with no feedback.
It is so obviously simple that this should be OK to apply it... | ```diff
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 69f96b398c22..66b15ef02931 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -517,7 +517,7 @@ int conf_write(const char *name)
fclose(out);
if (*tmpname) {
- strcat(dirname, name ? name : conf_get_confign... |
d6d861e3c963b4077c83e078e3e300c4b81f93e7 | Analyze and fix the following issue in the Linux kernel code: [PATCH] paravirt: optimize ptep establish for pae | Problem Details:
The ptep_establish macro is only used on user-level PTEs, for P->P mapping
changes. Since these always happen under protection of the pagetable lock,
the strong synchronization of a 64-bit cmpxchg is not needed, in fact, not
even a lock prefix needs to be used. We can simply instead clear the P-bit,
... | ```diff
diff --git a/include/asm-i386/pgtable-2level.h b/include/asm-i386/pgtable-2level.h
index 201c86a6711e..8d8d3b9ecdb0 100644
--- a/include/asm-i386/pgtable-2level.h
+++ b/include/asm-i386/pgtable-2level.h
@@ -16,6 +16,7 @@
#define set_pte(pteptr, pteval) (*(pteptr) = pteval)
#define set_pte_at(mm,addr,ptep,ptev... |
23002d88be309a7c78db69363c9d933a29a3b0bb | Analyze and fix the following issue in the Linux kernel code: [PATCH] paravirt: kpte flush | Problem Details:
Create a new PTE function which combines clearing a kernel PTE with the
subsequent flush. This allows the two to be easily combined into a single
hypercall or paravirt-op. More subtly, reverse the order of the flush for
kmap_atomic. Instead of flushing on establishing a mapping, flush on clearing
a ... | ```diff
diff --git a/arch/i386/mm/highmem.c b/arch/i386/mm/highmem.c
index ba44000b9069..f9f647cdbc7b 100644
--- a/arch/i386/mm/highmem.c
+++ b/arch/i386/mm/highmem.c
@@ -38,22 +38,19 @@ void *kmap_atomic(struct page *page, enum km_type type)
idx = type + KM_TYPE_NR*smp_processor_id();
vaddr = __fix_to_virt(FIX_K... |
bd4c8ce41a2e2f0c5bf54343ab54e8e09faec021 | Analyze and fix the following issue in the Linux kernel code: [PATCH] invalidate_inode_pages2(): ignore page refcounts | Problem Details:
The recent fix to invalidate_inode_pages() (git commit 016eb4a) managed to
unfix invalidate_inode_pages2().
The problem is that various bits of code in the kernel can take transient refs
on pages: the page scanner will do this when inspecting a batch of pages, and
the lru_cache_add() batching pagevecs... | ```diff
diff --git a/mm/truncate.c b/mm/truncate.c
index 8fde6580657e..f4edbc179d14 100644
--- a/mm/truncate.c
+++ b/mm/truncate.c
@@ -287,9 +287,39 @@ unsigned long invalidate_inode_pages(struct address_space *mapping)
{
return invalidate_mapping_pages(mapping, 0, ~0UL);
}
-
EXPORT_SYMBOL(invalidate_inode_pages);... |
d025c9db7f31fc0554ce7fb2dfc78d35a77f3487 | Analyze and fix the following issue in the Linux kernel code: [PATCH] Support piping into commands in /proc/sys/kernel/core_pattern | Problem Details:
Using the infrastructure created in previous patches implement support to
pipe core dumps into programs.
This is done by overloading the existing core_pattern sysctl
with a new syntax:
|program
When the first character of the pattern is a '|' the kernel will instead
threat the rest of the pattern as... | ```diff
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index bad52433de69..06435f3665f4 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1151,11 +1151,23 @@ static int dump_write(struct file *file, const void *addr, int nr)
static int dump_seek(struct file *file, loff_t off)
{
- if (file->f_op->llseek) {
- i... |
65da4d81f48e092f71feaf04bf2ccd096b5a5171 | Analyze and fix the following issue in the Linux kernel code: [PATCH] ioremap balanced with iounmap for drivers/serial/sunsu.c | Problem Details:
ioremap must be balanced by an iounmap and failing to do so can result
in a memory leak.
Signed-off-by: Amol Lad <amol@verismonetworks.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: David S. Miller <davem@sunset.davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvald... | ```diff
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c
index d3a5aeee73a3..9b3b9aaa6b90 100644
--- a/drivers/serial/sunsu.c
+++ b/drivers/serial/sunsu.c
@@ -1499,6 +1499,9 @@ static int __devexit su_remove(struct of_device *dev)
uart_remove_one_port(&sunsu_reg, &up->port);
}
+ if (up->port.membase)... |
af907dc8cd4157d629e48533b3400786467340d5 | Analyze and fix the following issue in the Linux kernel code: [PATCH] ioremap balanced with iounmap for drivers/serial/mux.c | Problem Details:
ioremap must be balanced by an iounmap and failing to do so can result
in a memory leak.
Signed-off-by: Amol Lad <amol@verismonetworks.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/drivers/serial/mux.c b/drivers/serial/mux.c
index 4a1c9983f38f..aa819d3f8ee5 100644
--- a/drivers/serial/mux.c
+++ b/drivers/serial/mux.c
@@ -521,6 +521,8 @@ static void __exit mux_exit(void)
for (i = 0; i < port_cnt; i++) {
uart_remove_one_port(&mux_driver, &mux_ports[i]);
+ if (mux_ports[... |
a141a04330bd6eadf7081a0860dc786be7d09c46 | Analyze and fix the following issue in the Linux kernel code: [PATCH] ioremap balanced with iounmap for drivers/serial/mpsc.c | Problem Details:
ioremap must be balanced by an iounmap and failing to do so can result
in a memory leak.
Signed-off-by: Amol Lad <amol@verismonetworks.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds... | ```diff
diff --git a/drivers/serial/mpsc.c b/drivers/serial/mpsc.c
index 63d2a66e563b..704243c9f78a 100644
--- a/drivers/serial/mpsc.c
+++ b/drivers/serial/mpsc.c
@@ -1893,6 +1893,10 @@ mpsc_drv_map_regs(struct mpsc_port_info *pi, struct platform_device *pd)
}
else {
mpsc_resource_err("SDMA base");
+ if (pi->mp... |
be618f550cb499db263e2ce22c5ad4f4dbfd53e6 | Analyze and fix the following issue in the Linux kernel code: [PATCH] ioremap balanced with iounmap for drivers/serial/mpc52xx_uart.c | Problem Details:
ioremap must be balanced by an iounmap and failing to do so can result
in a memory leak.
Signed-off-by: Amol Lad <amol@verismonetworks.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index 7708e5dd3656..dbad0e31e005 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -338,14 +338,23 @@ mpc52xx_uart_release_port(struct uart_port *port)
static int
mpc52xx_uart_request_port(struct uart_po... |
6257b3bdfde4295c04872d710c2419ff8efc1b86 | Analyze and fix the following issue in the Linux kernel code: [PATCH] ioremap balanced with iounmap for drivers/serial/ip22zilog.c | Problem Details:
ioremap must be balanced by an iounmap and failing to do so can result
in a memory leak.
Signed-off-by: Amol Lad <amol@verismonetworks.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/drivers/serial/ip22zilog.c b/drivers/serial/ip22zilog.c
index 5ff269fb604c..dbf13c03a1bb 100644
--- a/drivers/serial/ip22zilog.c
+++ b/drivers/serial/ip22zilog.c
@@ -1229,13 +1229,27 @@ static int __init ip22zilog_init(void)
static void __exit ip22zilog_exit(void)
{
int i;
+ struct uart_ip22zil... |
f4664132613caf40bfbf17b7e0ab3340a8b8f526 | Analyze and fix the following issue in the Linux kernel code: [PATCH] ioremap balanced with iounmap for drivers/serial/ioc4_serial.c | Problem Details:
ioremap must be balanced by an iounmap and failing to do so can result
in a memory leak.
Signed-off-by: Amol Lad <amol@verismonetworks.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Brent Casavant <bcasavan@sgi.com>
Cc: Pat Gefre <pfg@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-... | ```diff
diff --git a/drivers/serial/ioc4_serial.c b/drivers/serial/ioc4_serial.c
index 576ca1eaa2b6..5ec4716c99bf 100644
--- a/drivers/serial/ioc4_serial.c
+++ b/drivers/serial/ioc4_serial.c
@@ -2685,6 +2685,7 @@ static int ioc4_serial_remove_one(struct ioc4_driver_data *idd)
if (soft) {
free_irq(control->ic_irq, ... |
d9964d5c9067fe58fecb7ba10b2de4771d2005d9 | Analyze and fix the following issue in the Linux kernel code: [PATCH] ioremap balanced with iounmap for drivers/serial/8250_gsc.c | Problem Details:
ioremap must be balanced by an iounmap and failing to do so can result
in a memory leak.
Signed-off-by: Amol Lad <amol@verismonetworks.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/drivers/serial/8250_gsc.c b/drivers/serial/8250_gsc.c
index 913c71cc0569..1ebe6b585d2d 100644
--- a/drivers/serial/8250_gsc.c
+++ b/drivers/serial/8250_gsc.c
@@ -64,6 +64,7 @@ serial_init_chip(struct parisc_device *dev)
err = serial8250_register_port(&port);
if (err < 0) {
printk(KERN_WARNIN... |
f12ad7d59ab77591e4ab2dacd6faa9ea9afffb99 | Analyze and fix the following issue in the Linux kernel code: [PATCH] ioremap balanced with iounmap for drivers/serial/8250_acorn,c | Problem Details:
ioremap must be balanced by an iounmap and failing to do so can result
in a memory leak.
Signed-off-by: Amol Lad <amol@verismonetworks.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/drivers/serial/8250_acorn.c b/drivers/serial/8250_acorn.c
index 32af3650e8b4..ef8cc8a70c60 100644
--- a/drivers/serial/8250_acorn.c
+++ b/drivers/serial/8250_acorn.c
@@ -35,6 +35,7 @@ struct serial_card_type {
struct serial_card_info {
unsigned int num_ports;
int ports[MAX_PORTS];
+ void __io... |
16c564bb3cdecbc39eab5c0de3fe94ed58ba4163 | Analyze and fix the following issue in the Linux kernel code: [PATCH] Generic ioremap_page_range: x86_64 conversion | Problem Details:
Convert x86_64 to use generic ioremap_page_range()
[akpm@osdl.org: build fix]
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/arch/x86_64/mm/ioremap.c b/arch/x86_64/mm/ioremap.c
index 45d7d823c3b8..c6e5e8d401a4 100644
--- a/arch/x86_64/mm/ioremap.c
+++ b/arch/x86_64/mm/ioremap.c
@@ -12,117 +12,16 @@
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/module.h>
-#include <asm/io.h>
+#include <linux/io.h>
#i... |
a148ecfdf04d5fcb840324eef45d63ed674c73b9 | Analyze and fix the following issue in the Linux kernel code: [PATCH] Generic ioremap_page_range: i386 conversion | Problem Details:
Convert i386 to use generic ioremap_page_range()
[bunk@stusta.de: build fix]
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/arch/i386/mm/ioremap.c b/arch/i386/mm/ioremap.c
index 247fde76aaed..fff08ae7b5ed 100644
--- a/arch/i386/mm/ioremap.c
+++ b/arch/i386/mm/ioremap.c
@@ -12,7 +12,7 @@
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/module.h>
-#include <asm/io.h>
+#include <linux/io.h>
#include <asm... |
74588d8ba34ff1bda027cfa737972af01ab00c8b | Analyze and fix the following issue in the Linux kernel code: [PATCH] Generic ioremap_page_range: implementation | Problem Details:
This patch adds a generic implementation of ioremap_page_range() in
lib/ioremap.c based on the i386 implementation. It differs from the
i386 version in the following ways:
* The PTE flags are passed as a pgprot_t argument and must be
determined up front by the arch-specific code. No additional
... | ```diff
diff --git a/include/linux/io.h b/include/linux/io.h
index 420e2fdf26f6..aa3f5af670b5 100644
--- a/include/linux/io.h
+++ b/include/linux/io.h
@@ -19,8 +19,12 @@
#define _LINUX_IO_H
#include <asm/io.h>
+#include <asm/page.h>
void __iowrite32_copy(void __iomem *to, const void *from, size_t count);
void _... |
bc03613decef0cc4d2f3a24f19fa5a868745715f | Analyze and fix the following issue in the Linux kernel code: [PATCH] stack overflow safe kdump: safe smp_send_nmi_allbutself() | Problem Details:
Re-implement smp_send_nmi_allbutself() so that calls to smp_processor_id
(through send_IPI_allbutself) can be replaced with safe_smp_processor_id
without affecting other parts of the kernel (as suggested by Eric Biederman).
Signed-off-by: Fernando Vazquez <fernando@intellilink.co.jp>
Looks-reasonable-... | ```diff
diff --git a/arch/i386/kernel/crash.c b/arch/i386/kernel/crash.c
index 2dfc049dafa3..144b43288965 100644
--- a/arch/i386/kernel/crash.c
+++ b/arch/i386/kernel/crash.c
@@ -134,7 +134,10 @@ static int crash_nmi_callback(struct notifier_block *self,
static void smp_send_nmi_allbutself(void)
{
- send_IPI_allbut... |
ce53af9496c625a8ae33526713be34a23756db19 | Analyze and fix the following issue in the Linux kernel code: [PATCH] stack overflow safe kdump: crash: use safe_smp_processor_id() | Problem Details:
Substitute "smp_processor_id" with the stack overflow-safe
"safe_smp_processor_id" in the reboot path to the second kernel.
[akpm@osdl.org: build fix]
Signed-off-by: Fernando Vazquez <fernando@intellilink.co.jp>
Looks-reasonable-to: Andi Kleen <ak@muc.de>
Acked-by: "Eric W. Biederman" <ebiederm@xmissi... | ```diff
diff --git a/arch/i386/kernel/crash.c b/arch/i386/kernel/crash.c
index 67d297dc1003..2dfc049dafa3 100644
--- a/arch/i386/kernel/crash.c
+++ b/arch/i386/kernel/crash.c
@@ -23,6 +23,7 @@
#include <asm/hw_irq.h>
#include <asm/apic.h>
#include <asm/kdebug.h>
+#include <asm/smp.h>
#include <mach_ipi.h>
@@ -8... |
2654c08caa12a06237b28f85446ae2d223c30144 | Analyze and fix the following issue in the Linux kernel code: [PATCH] stack overflow safe kdump: safe_smp_processor_id(): voyager | Problem Details:
"safe_smp_processor_id" implementation for i386-Voyager.
Signed-off-by: Fernando Vazquez <fernando@intellilink.co.jp>
Looks-reasonable-to: Andi Kleen <ak@muc.de>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>... | ```diff
diff --git a/arch/i386/mach-voyager/voyager_smp.c b/arch/i386/mach-voyager/voyager_smp.c
index 6c86575ffdcb..856c73fcb7e7 100644
--- a/arch/i386/mach-voyager/voyager_smp.c
+++ b/arch/i386/mach-voyager/voyager_smp.c
@@ -99,6 +99,7 @@ static void do_boot_cpu(__u8 cpuid);
static void do_quad_bootstrap(void);
i... |
dc2bc768a009b9ad8711894c544dc6b0d8c0ce57 | Analyze and fix the following issue in the Linux kernel code: [PATCH] stack overflow safe kdump: safe_smp_processor_id() | Problem Details:
This is a the first of a series of patch-sets aiming at making kdump more
robust against stack overflows.
This patch set does the following:
* Add safe_smp_processor_id function to i386 architecture (this function was
inspired by the x86_64 function of the same name).
* Substitute "smp_processor_i... | ```diff
diff --git a/arch/i386/kernel/smp.c b/arch/i386/kernel/smp.c
index 465188e2d701..1b080ab8a49f 100644
--- a/arch/i386/kernel/smp.c
+++ b/arch/i386/kernel/smp.c
@@ -700,3 +700,30 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
return 0;
}
EXPORT_SYMBOL(smp_call_function_single)... |
7d1bdca9b06acb3df07329eaff72d5eaf1543287 | Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix getdelays.c - cpumask length and error reporting | Problem Details:
Fix the length passed while (un)registering cpumask. We were passing sizeof
the array, make it strlen().
Error value printed in fatal errors should be derived from the message. The
message contains an nlmsgerr embedded with an error value. We must report
that value to the user.
Signed-off-by: Balb... | ```diff
diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c
index 795ca3911cc5..b11792abd6b6 100644
--- a/Documentation/accounting/getdelays.c
+++ b/Documentation/accounting/getdelays.c
@@ -285,7 +285,7 @@ int main(int argc, char *argv[])
if (maskset) {
rc = send_cmd(nl_sd, id,... |
0ae646845b603e9df5711084436d389f8371ffb3 | Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix taskstats size calculation (use the new genetlink utility functions) | Problem Details:
The addition of the CSA patch pushed the size of struct taskstats to 256
bytes. This exposed a problem with prepare_reply(), we were not allocating
space for the netlink and genetlink header. It worked earlier because
alloc_skb() would align the skb to SMP_CACHE_BYTES, which added some additonal
byte... | ```diff
diff --git a/kernel/taskstats.c b/kernel/taskstats.c
index 2ed4040d0dc5..c451af2ddb50 100644
--- a/kernel/taskstats.c
+++ b/kernel/taskstats.c
@@ -75,7 +75,7 @@ static int prepare_reply(struct genl_info *info, u8 cmd, struct sk_buff **skbp,
/*
* If new attributes are added, please revisit this allocation
... |
eed4e51fb60c3863c134a5e9f6006b29805ead97 | Analyze and fix the following issue in the Linux kernel code: [PATCH] Add vector AIO support | Problem Details:
This work is initially done by Zach Brown to add support for vectored aio.
These are the core changes for AIO to support
IOCB_CMD_PREADV/IOCB_CMD_PWRITEV.
[akpm@osdl.org: huge build fix]
Signed-off-by: Zach Brown <zach.brown@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bada... | ```diff
diff --git a/fs/aio.c b/fs/aio.c
index 27ff56540c73..2e0d1505ee36 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -415,6 +415,7 @@ static struct kiocb fastcall *__aio_get_req(struct kioctx *ctx)
req->ki_retry = NULL;
req->ki_dtor = NULL;
req->private = NULL;
+ req->ki_iovec = NULL;
INIT_LIST_HEAD(&req->ki_run_l... |
9ea0f9499d15c49df23e7aac4332d830c40e12d0 | Analyze and fix the following issue in the Linux kernel code: [PATCH] reiserfs: eliminate minimum window size for bitmap searching | Problem Details:
When a file system becomes fragmented (using MythTV, for example), the
bigalloc window searching ends up causing huge performance problems. In a
file system presented by a user experiencing this bug, the file system was
90% free, but no 32-block free windows existed on the entire file system.
This cau... | ```diff
diff --git a/fs/reiserfs/bitmap.c b/fs/reiserfs/bitmap.c
index cca1dbf5458f..1bfae42117ca 100644
--- a/fs/reiserfs/bitmap.c
+++ b/fs/reiserfs/bitmap.c
@@ -1034,7 +1034,6 @@ static inline int blocknrs_and_prealloc_arrays_from_search_start
b_blocknr_t finish = SB_BLOCK_COUNT(s) - 1;
int passno = 0;
int nr_a... |
5065227b46235ec0131b383cc2f537069b55c6b6 | Analyze and fix the following issue in the Linux kernel code: [PATCH] reiserfs: on-demand bitmap loading | Problem Details:
This is the patch the three previous ones have been leading up to.
It changes the behavior of ReiserFS from loading and caching all the bitmaps
as special, to treating the bitmaps like any other bit of metadata and just
letting the system-wide caches figure out what to hang on to.
Buffer heads are al... | ```diff
diff --git a/fs/reiserfs/bitmap.c b/fs/reiserfs/bitmap.c
index abdd6d9c4558..cca1dbf5458f 100644
--- a/fs/reiserfs/bitmap.c
+++ b/fs/reiserfs/bitmap.c
@@ -60,7 +60,6 @@ static inline void get_bit_address(struct super_block *s,
int is_reusable(struct super_block *s, b_blocknr_t block, int bit_value)
{
int bm... |
6f01046b35d940079822827498a7dd6d3eec8c6b | Analyze and fix the following issue in the Linux kernel code: [PATCH] reiserfs: reorganize bitmap loading functions | Problem Details:
This patch moves the bitmap loading code from super.c to bitmap.c
The code is also restructured somewhat. The only difference between new
format bitmaps and old format bitmaps is where they are. That's a two liner
before loading the block to use the correct one. There's no need for an
entirely sepa... | ```diff
diff --git a/fs/reiserfs/bitmap.c b/fs/reiserfs/bitmap.c
index 44d9410e9d6a..abdd6d9c4558 100644
--- a/fs/reiserfs/bitmap.c
+++ b/fs/reiserfs/bitmap.c
@@ -9,6 +9,7 @@
#include <linux/buffer_head.h>
#include <linux/kernel.h>
#include <linux/pagemap.h>
+#include <linux/vmalloc.h>
#include <linux/reiserfs_fs_s... |
e1fabd3ccf02901374bffa434e0af472749a5bd9 | Analyze and fix the following issue in the Linux kernel code: [PATCH] reiserfs: fix is_reusable bitmap check to not traverse the bitmap info array | Problem Details:
There is a check in is_reusable to determine if a particular block is a bitmap
block. It verifies this by going through the array of bitmap block buffer
heads and comparing the block number to each one.
Bitmap blocks are at defined locations on the disk in both old and current
formats. Simply checki... | ```diff
diff --git a/fs/reiserfs/bitmap.c b/fs/reiserfs/bitmap.c
index 4a7dbdee1b6d..1022347a211f 100644
--- a/fs/reiserfs/bitmap.c
+++ b/fs/reiserfs/bitmap.c
@@ -50,16 +50,15 @@ static inline void get_bit_address(struct super_block *s,
{
/* It is in the bitmap block number equal to the block
* number divided by ... |
8ef386092d7c2891bd7acefb2a87f878f7e9a0d6 | Analyze and fix the following issue in the Linux kernel code: [PATCH] kill wall_jiffies | Problem Details:
With 2.6.18-rc4-mm2, now wall_jiffies will always be the same as jiffies.
So we can kill wall_jiffies completely.
This is just a cleanup and logically should not change any real behavior
except for one thing: RTC updating code in (old) ppc and xtensa use a
condition "jiffies - wall_jiffies == 1". Thi... | ```diff
diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c
index 7c1e44420a78..581ddcc22fc5 100644
--- a/arch/alpha/kernel/time.c
+++ b/arch/alpha/kernel/time.c
@@ -54,8 +54,6 @@
#include "proto.h"
#include "irq_impl.h"
-extern unsigned long wall_jiffies; /* kernel/timer.c */
-
static int set_rtc_mms... |
8f807f8d2137ba728d22820103131038639b68a9 | Analyze and fix the following issue in the Linux kernel code: [PATCH] ntp: add time_adjust to tick length | Problem Details:
This folds update_ntp_one_tick() into second_overflow() and adds time_adjust
to the tick length, this makes time_next_adjust unnecessary. This slightly
changes the adjtime() behaviour, instead of applying it to the next tick, it's
applied to the next second.
Signed-off-by: Roman Zippel <zippel@linux-... | ```diff
diff --git a/include/linux/timex.h b/include/linux/timex.h
index 1cde6f6a2712..b5f297e17668 100644
--- a/include/linux/timex.h
+++ b/include/linux/timex.h
@@ -217,7 +217,6 @@ extern long time_freq; /* frequency offset (scaled ppm) */
extern long time_reftime; /* time at last adjustment (s) */
extern long t... |
3d3675cc3d04d7fd4bb11e8c1ea79e5ade4f5e44 | Analyze and fix the following issue in the Linux kernel code: [PATCH] ntp: prescale time_offset | Problem Details:
This converts time_offset into a scaled per tick value. This avoids now
completely the crude compensation in second_overflow().
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Cc: john stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvald... | ```diff
diff --git a/include/linux/timex.h b/include/linux/timex.h
index b589c8218bb9..1cde6f6a2712 100644
--- a/include/linux/timex.h
+++ b/include/linux/timex.h
@@ -89,7 +89,7 @@
* FINENSEC is 1 ns in SHIFT_UPDATE units of the time_phase variable.
*/
#define SHIFT_SCALE 22 /* phase scale (shift) */
-#define SHI... |
ab8783b688f33c40ed7b37b814a4a1e7d341ce11 | Analyze and fix the following issue in the Linux kernel code: [PATCH] ntp: add time_adj to tick length | Problem Details:
This makes time_adj local to second_overflow() and integrates it into the tick
length instead of adding it everytime.
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Cc: john stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index 77137bec2aea..c09628d6b848 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -39,7 +39,6 @@ long time_maxerror = NTP_PHASE_LIMIT; /* maximum error (us) */
long time_esterror = NTP_PHASE_LIMIT; /* estimated error (us) */
long time_freq = (((NSE... |
4c7ee8de956fc250fe31e2fa91f6da980fabe317 | Analyze and fix the following issue in the Linux kernel code: [PATCH] NTP: Move all the NTP related code to ntp.c | Problem Details:
Move all the NTP related code to ntp.c
[akpm@osdl.org: cleanups, build fix]
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/include/linux/timex.h b/include/linux/timex.h
index d543d3871e38..2a21485bf183 100644
--- a/include/linux/timex.h
+++ b/include/linux/timex.h
@@ -294,11 +294,15 @@ extern void register_time_interpolator(struct time_interpolator *);
extern void unregister_time_interpolator(struct time_interpolator ... |
391b1fe67d193df75144a92b146613c36491ef0d | Analyze and fix the following issue in the Linux kernel code: [PATCH] RTC: rtc-ds1553, rtc-ds1742 update | Problem Details:
Check return value of sysfs_create_bin_file(). Fix polarity of
RTC_BATT_FLAG bit in DS1742.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/drivers/rtc/rtc-ds1553.c b/drivers/rtc/rtc-ds1553.c
index 4fc9422ed86d..9647188fee2c 100644
--- a/drivers/rtc/rtc-ds1553.c
+++ b/drivers/rtc/rtc-ds1553.c
@@ -18,7 +18,7 @@
#include <linux/platform_device.h>
#include <linux/io.h>
-#define DRV_VERSION "0.1"
+#define DRV_VERSION "0.2"
#define R... |
9e86ecb659f11b36b5e189214b19cb31ef5dfd72 | Analyze and fix the following issue in the Linux kernel code: [PATCH] RTC class: Kconfig improvements | Problem Details:
Small updates to make the RTC class Kconfig text be more informative. This
should help folk used to the drivers/char/rtc.c support, or a single RTC, be
slightly less surprised by the differences.
Also, adds a new RTC_DEBUG option to predefine DEBUG in the framework and its
drivers, while debugging. ... | ```diff
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 62c804af9fbe..fc766a7a611e 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -37,6 +37,13 @@ config RTC_HCTOSYS_DEVICE
The RTC device that will be used as the source for
the system time, usually rtc0.
+config RTC_DEBUG
+ bool "RT... |
0847062ad57e6d2d77875104d66f413a89769809 | Analyze and fix the following issue in the Linux kernel code: [PATCH] fix EMBEDDED + SYSCTL menu | Problem Details:
SYSCTL should still depend on EMBEDDED. This unbreaks the EMBEDDED menu
(from the recent SYSCTL_SYCALL menu option patch).
Fix typos in new SYSCTL_SYSCALL menu.
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osd... | ```diff
diff --git a/init/Kconfig b/init/Kconfig
index 899e46eec1b2..d2d72704f875 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -257,6 +257,9 @@ config CC_OPTIMIZE_FOR_SIZE
If unsure, say N.
+config SYSCTL
+ bool
+
menuconfig EMBEDDED
bool "Configure standard kernel features (for small systems)"
help
@@ ... |
9ba0bdfd040b2893bcddfec7165b545d22fc2dc7 | Analyze and fix the following issue in the Linux kernel code: [PATCH] typo fixes for rt-mutex-design.txt | Problem Details:
Address some simple typos in rt-mutex-design.txt It also changes the
indentation of the cmpxchg example (the cmpxchg example was indented by
spaces, while all other code snippets were indented by tabs).
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Jan Altenberg <tb10alj@tglx.de>
Acked... | ```diff
diff --git a/Documentation/rt-mutex-design.txt b/Documentation/rt-mutex-design.txt
index c472ffacc2f6..4b736d24da7a 100644
--- a/Documentation/rt-mutex-design.txt
+++ b/Documentation/rt-mutex-design.txt
@@ -333,11 +333,11 @@ cmpxchg is basically the following function performed atomically:
unsigned long _cmp... |
095d030cff0eafd29ee31e022d374874146a5b4c | Analyze and fix the following issue in the Linux kernel code: [PATCH] Off-by-one in drivers/char/mwave/mwavedd.c | Problem Details:
This fixes two off by ones in the mwave driver, found
via find -iname \*.[ch] | xargs grep "> ARRAY_SIZE("
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/drivers/char/mwave/mwavedd.c b/drivers/char/mwave/mwavedd.c
index 39a2e661ff55..8d14823b0514 100644
--- a/drivers/char/mwave/mwavedd.c
+++ b/drivers/char/mwave/mwavedd.c
@@ -297,7 +297,7 @@ static int mwave_ioctl(struct inode *inode, struct file *file,
" ipcnum %x, usIntCount %x\n",
ipcnu... |
1cfee2b3c21d71a8c20884dbb77ed343558db87f | Analyze and fix the following issue in the Linux kernel code: [PATCH] trident: fix pci_dev reference counting and buglet | Problem Details:
Switch trident to use pci_get/put_dev properly. Also fix a bug where the
driver erroneously passed pdev not NULL to a second search. This happened
to always work except with pci=reverse because of chip ordering.
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Muli Ben-Yehuda <muli@il.ibm.co... | ```diff
diff --git a/sound/oss/trident.c b/sound/oss/trident.c
index d4844de0c3b7..ce79cd82478a 100644
--- a/sound/oss/trident.c
+++ b/sound/oss/trident.c
@@ -3269,8 +3269,8 @@ ali_setup_spdif_out(struct trident_card *card, int flag)
char temp;
struct pci_dev *pci_dev = NULL;
- pci_dev = pci_find_device(PCI_VENDO... |
b2e9c7d07fcc8966d6aa50a77afa66c9919bd5a8 | Analyze and fix the following issue in the Linux kernel code: [PATCH] sysrq: disable lockdep on reboot | Problem Details:
SysRq : Emergency Sync
Emergency Sync complete
SysRq : Emergency Remount R/O
Emergency Remount complete
SysRq : Resetting
BUG: warning at kernel/lockdep.c:1816/trace_hardirqs_on() (Not tainted)
Call Trace:
[<ffffffff8026d56d>] show_trace+0xae/0x319
[<ffffffff8026d7ed>] dump_stack+0x15/0x17
[<ffffff... | ```diff
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c
index 0ad6cb081db4..6b4d4d1e343d 100644
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
@@ -113,6 +113,7 @@ static struct sysrq_key_op sysrq_crashdump_op = {
static void sysrq_handle_reboot(int key, struct pt_regs *pt_regs,
struct tty_struct *... |
e3e5fc91d9828a9b94a3992de47d47d2d2e34ec6 | Analyze and fix the following issue in the Linux kernel code: [PATCH] leds: turn LED off when changing triggers | Problem Details:
I was playing with LED triggers when I noticed that changing from heartbeat
(or ide-disk) to "none" at the right moment would leave the LED stuck on.
This is easy to reproduce by doing "find / >/dev/null" with the ide-disk
trigger enabled and then switching to "none".
Here is a patch that fixes the pr... | ```diff
diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c
index 47f0ff196328..454fb0901f82 100644
--- a/drivers/leds/led-triggers.c
+++ b/drivers/leds/led-triggers.c
@@ -125,6 +125,7 @@ void led_trigger_set(struct led_classdev *led_cdev, struct led_trigger *trigger)
write_unlock_irqrestore(&led_... |
756184b7d771992f4fb1998d62aebcaf3e028076 | Analyze and fix the following issue in the Linux kernel code: [PATCH] CodingStyle cleanup for kernel/sys.c | Problem Details:
Fix up kernel/sys.c to be consistent with CodingStyle and the rest of the
file.
Signed-off-by: Cal Peake <cp@absolutedigital.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/kernel/sys.c b/kernel/sys.c
index b88806c66244..2460581c928c 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -607,11 +607,10 @@ static void kernel_restart_prepare(char *cmd)
void kernel_restart(char *cmd)
{
kernel_restart_prepare(cmd);
- if (!cmd) {
+ if (!cmd)
printk(KERN_EMERG "Restarting ... |
c7bce3097c0f9bbed76ee6fd03742f2624031a45 | Analyze and fix the following issue in the Linux kernel code: [PATCH] serial: Fix up offenders peering at baud bits directly | Problem Details:
Stop some other people peering into the baud bits on their own and make
them use the tty_get_baud_rate() helper as a preperation for the move to
the new termios. Corrected dependancy previous one had on new termios
structs
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@o... | ```diff
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c
index a369dd6877d8..c1a6d3c48da1 100644
--- a/drivers/char/moxa.c
+++ b/drivers/char/moxa.c
@@ -260,7 +260,7 @@ static void MoxaPortEnable(int);
static void MoxaPortDisable(int);
static long MoxaPortGetMaxBaud(int);
static long MoxaPortSetBaud(int, long)... |
1a2f67b459bb7846d4a15924face63eb2683acc2 | Analyze and fix the following issue in the Linux kernel code: [PATCH] kmemdup: introduce | Problem Details:
One of idiomatic ways to duplicate a region of memory is
dst = kmalloc(len, GFP_KERNEL);
if (!dst)
return -ENOMEM;
memcpy(dst, src, len);
which is neat code except a programmer needs to write size twice. Which
sometimes leads to mistakes. If len passed to kmalloc is smaller that len
passed to ... | ```diff
diff --git a/include/linux/string.h b/include/linux/string.h
index e4c755860316..4f69ef9e6eb5 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -99,6 +99,7 @@ extern void * memchr(const void *,int,__kernel_size_t);
#endif
extern char *kstrdup(const char *s, gfp_t gfp);
+extern void *kmemdu... |
8c2676a5870ab15cbeea9f826266bc946fe3cc26 | Analyze and fix the following issue in the Linux kernel code: [PATCH] hot-add-mem x86_64: memory_add_physaddr_to_nid node fixup | Problem Details:
In cases where the acpi memory-add event does not containe the pxm (node)
infomation allow the driver to look up node info based on the address. The
acpi_get_node call returns -1 if it can't decode the pxm info, this causes
add_memory to panic. acpi_get_node would have to decode the resource from the... | ```diff
diff --git a/arch/ia64/mm/numa.c b/arch/ia64/mm/numa.c
index 64e4c21f311c..7807fc5c0422 100644
--- a/arch/ia64/mm/numa.c
+++ b/arch/ia64/mm/numa.c
@@ -16,6 +16,7 @@
#include <linux/node.h>
#include <linux/init.h>
#include <linux/bootmem.h>
+#include <linux/module.h>
#include <asm/mmzone.h>
#include <asm/nu... |
f28c5edc06ecd8068b38b7662ad19f4d20d741af | Analyze and fix the following issue in the Linux kernel code: [PATCH] hot-add-mem x86_64: fixup externs | Problem Details:
Fix up externs in memory_hotplug.c. Cleanup.
Signed-off-by: Keith Mannthey <kmannth@us.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index 218501cfaeb9..7b54666cea8e 100644
--- a/include/linux/memory_hotplug.h
+++ b/include/linux/memory_hotplug.h
@@ -172,5 +172,7 @@ static inline int __remove_pages(struct zone *zone, unsigned long start_pfn,
extern int add_memory(i... |
236561e5df009f79f1939e3ca269b9b6f18092f5 | Analyze and fix the following issue in the Linux kernel code: [PATCH] PCI quirks update | Problem Details:
This fixes two things
Firstly someone mistakenly used "errata" for the singular. This causes
Dave Woodhouse to emit diagnostics whenever the string is read, and so
should be fixed.
Secondly the AMD AGP tunnel has an erratum which causes hangs if you try
and do direct PCI to AGP transfers in some cas... | ```diff
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 08cd86a6dd66..23b599d6a9d5 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -93,8 +93,21 @@ static void __devinit quirk_nopcipci(struct pci_dev *dev)
pci_pci_problems |= PCIPCI_FAIL;
}
}
+
+static void __devinit quirk_nopciamd(s... |
ab8e92efcf3f7972f30033cad75f180aef4f3abc | Analyze and fix the following issue in the Linux kernel code: [PATCH] list_del-debug fix | Problem Details:
These two BUG_ON()s are redundant and undesired: we're checking for this
condition further on in the function, only better.
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/lib/list_debug.c b/lib/list_debug.c
index e80d27c97898..7ba9d823d388 100644
--- a/lib/list_debug.c
+++ b/lib/list_debug.c
@@ -59,9 +59,6 @@ EXPORT_SYMBOL(list_add);
*/
void list_del(struct list_head *entry)
{
- BUG_ON(entry->prev->next != entry);
- BUG_ON(entry->next->prev != entry);
-
if (un... |
1bdfd554be94def718323659173517c5d4a69d25 | Analyze and fix the following issue in the Linux kernel code: [PATCH] SCSI: fix request flag-related build breakage | Problem Details:
The ->flags in struct request was split into two variables, in a recent
changeset. The merge of this change forgot to update SCSI's libsas,
probably because libsas was a very recent merge.
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c
index 7f9e89bcac7e..e46e79355b77 100644
--- a/drivers/scsi/libsas/sas_scsi_host.c
+++ b/drivers/scsi/libsas/sas_scsi_host.c
@@ -126,7 +126,7 @@ static enum task_attribute sas_scsi_get_task_attr(struct scsi_cmnd *cmd)
enum t... |
059af497c23492cb1ddcbba11c09dad385960bc0 | Analyze and fix the following issue in the Linux kernel code: [PATCH] blk_queue_start_tag() shared map race fix | Problem Details:
If we share the tag map between two or more queues, then we cannot
use __set_bit() to set the bit. In fact we need to make sure we
atomically acquire this tag, so loop using test_and_set_bit() to
protect from that.
Noticed by Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Jens Axboe <axboe@kerne... | ```diff
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index f757ed413214..83425fb3c8db 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -1171,11 +1171,16 @@ int blk_queue_start_tag(request_queue_t *q, struct request *rq)
BUG();
}
- tag = find_first_zero_bit(bqt->tag_map, bqt->max_depth);
- if (tag ... |
50be345560f1ffdcb15cc0e146416b80529a2ef2 | Analyze and fix the following issue in the Linux kernel code: [PATCH] fix creating zero sized bio mempools in low memory system | Problem Details:
In the very low memory systems is in the init_bio call
scale parameter set to zero and it leads to creating
zero sized mempool.
This patch prevents pool_entries parameter become zero,
so the created pool have at least 1 entry.
Mempool with 0 entries lead to incorrect behaviour
of mempool_free. (Alloc... | ```diff
diff --git a/fs/bio.c b/fs/bio.c
index 6a0b9ad8f8c9..52de79c29942 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -1142,7 +1142,7 @@ static int biovec_create_pools(struct bio_set *bs, int pool_entries, int scale)
struct biovec_slab *bp = bvec_slabs + i;
mempool_t **bvp = bs->bvec_pools + i;
- if (i >= scale)
+... |
bcfd8d36151e531e1c6c731f1fbf792509a1c494 | Analyze and fix the following issue in the Linux kernel code: [PATCH] CONFIG_BLOCK: blk_congestion_wait() fix | Problem Details:
Don't just do nothing: it'll cause busywaits all over writeback and page
reclaim.
For now, take a fixed-length nap. Will improve when NFS starts waking up
throttled processes.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk> | ```diff
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 3e36107d342a..1d79b8d4ca6d 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1,6 +1,7 @@
#ifndef _LINUX_BLKDEV_H
#define _LINUX_BLKDEV_H
+#include <linux/sched.h>
#include <linux/major.h>
#include <linux/genhd.h>
#inclu... |
831058dec3735665fe91bd0d37b6a8cf56b91abd | Analyze and fix the following issue in the Linux kernel code: [PATCH] BLOCK: Separate the bounce buffering code from the highmem code [try #6] | Problem Details:
Move the bounce buffer code from mm/highmem.c to mm/bounce.c so that it can be
more easily disabled when the block layer is disabled.
!!!NOTE!!! There may be a bug in this code: Should init_emergency_pool() be
contingent on CONFIG_HIGHMEM?
Signed-Off-By: David Howells <dhowells@redhat.com>
Signed... | ```diff
diff --git a/mm/Makefile b/mm/Makefile
index 6200c6d6afd2..4f2166a833b9 100644
--- a/mm/Makefile
+++ b/mm/Makefile
@@ -12,6 +12,9 @@ obj-y := bootmem.o filemap.o mempool.o oom_kill.o fadvise.o \
readahead.o swap.o truncate.o vmscan.o \
prio_tree.o util.o mmzone.o vmstat.o $(mmu-y)
+ifeq ($(CON... |
dc72ef4ae35c2016fb594bcc85ce871376682174 | Analyze and fix the following issue in the Linux kernel code: [PATCH] Add blk_start_queueing() helper | Problem Details:
CFQ implements this on its own now, but it's really block layer
knowledge. Tells a device queue to start dispatching requests to
the driver, taking care to unplug if needed. Also fixes the issue
where as/cfq will invoke a stopped queue, which we really don't
want.
Signed-off-by: Jens Axboe <axboe@suse... | ```diff
diff --git a/block/as-iosched.c b/block/as-iosched.c
index f6dc95489316..bc13dc0b29be 100644
--- a/block/as-iosched.c
+++ b/block/as-iosched.c
@@ -1280,8 +1280,7 @@ static void as_work_handler(void *data)
unsigned long flags;
spin_lock_irqsave(q->queue_lock, flags);
- if (!as_queue_empty(q))
- q->request... |
89850f7ee905410c89f9295e89dc4c33502a34ac | Analyze and fix the following issue in the Linux kernel code: [PATCH] cfq-iosched: cleanups, fixes, dead code removal | Problem Details:
A collection of little fixes and cleanups:
- We don't use the 'queued' sysfs exported attribute, since the
may_queue() logic was rewritten. So kill it.
- Remove dead defines.
- cfq_set_active_queue() can be rewritten cleaner with else if conditions.
- Several places had cfq_exit_cfqq() like logic... | ```diff
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 2ac35aacbbf9..ec24284e9d39 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -17,7 +17,6 @@
* tunables
*/
static const int cfq_quantum = 4; /* max queue in one round of service */
-static const int cfq_queued = 8; /* minimum rq allo... |
cdd6026217c0e4cda2efce1bdc318661bef1f66f | Analyze and fix the following issue in the Linux kernel code: [PATCH] Remove ->rq_status from struct request | Problem Details:
After Christophs SCSI change, the only usage left is RQ_ACTIVE
and RQ_INACTIVE. The block layer sets RQ_INACTIVE right before freeing
the request, so any check for RQ_INACTIVE in a driver is a bug and
indicates use-after-free.
So kill/clean the remaining users, straight forward.
Signed-off-by: Jens A... | ```diff
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 5fa4c8e258a4..fda4a3940698 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -981,8 +981,6 @@ static int prepare_request(struct request *req, struct io_thread_req *io_req)
__u64 offset;
int len;
- if(req->... |
77ed74da26f50fa28471571ee7a2251b77526d84 | Analyze and fix the following issue in the Linux kernel code: [PATCH] i2c: Prevent deadlock on i2c client registration | Problem Details:
Delay the call to adapter->client_register() until after we are
certain that the client registration is a success. At this point the
client is fully initialized and we no longer hold the adapter->clist
mutex, so this should prevent the deadlocks if the client_register()
callback needs to take that mute... | ```diff
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 01233f0f7771..7ca81f42d14b 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -420,14 +420,6 @@ int i2c_attach_client(struct i2c_client *client)
}
list_add_tail(&client->list,&adapter->clients);
- if (adapter->client_regi... |
6ae5a6ef0340908fb7065a75231ae9980a910fbe | Analyze and fix the following issue in the Linux kernel code: [ARM] Fix XIP_KERNEL build error in arch/arm/mm/mmu.c | Problem Details:
XIP kernels need to know the start/end of text, but we were
missing the declaration of _etext in mmu.c. Add it.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ```diff
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index e566cbe4b222..f866bf6b97d4 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -27,7 +27,7 @@
DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
-extern void _stext, __data_start, _end;
+extern void _stext, _etext, __data_start, _end;
extern pgd_... |
903947d286c93d3545ef6491bf66a0b797010c8d | Analyze and fix the following issue in the Linux kernel code: kconfig/lxdialog: fix make mrproper | Problem Details:
No Makefile in scripts/kconfig/lxdialog anymore, so do not
go there during make mrproper.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> | ```diff
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index b2928f039c17..0b415ebee134 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -135,7 +135,6 @@ endif
clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \
.tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c
-subdir-... |
9ac00b7d96045fa3ce573e0ad5cdc0350ad8e1d2 | Analyze and fix the following issue in the Linux kernel code: [CIFS] Do not send newer QFSInfo to legacy servers which can not support it | Problem Details:
Fix dialect negotiation to save off when we have negotiated lanman.
This allows us to avoid sending some somewhat newer requests that the server
can not handle and go directly to the older version (infolevel) of the same
call. Make sure we try to negotiate a level which allows us to get the
server OS (... | ```diff
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index ca53720fa5b1..d6d226addde2 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -199,10 +199,12 @@ cifs_statfs(struct dentry *dentry, struct kstatfs *buf)
/* Only need to call the old QFSInfo if failed
on newer one */
if(rc)
- rc = CIFSSMB... |
f46d3e11903e452924ef2996aa9aca2aae4427e2 | Analyze and fix the following issue in the Linux kernel code: [CIFS] Fix typo in name of new cifs_show_stats | Problem Details:
Signed-off-by: Steve French <sfrench@us.ibm.com> | ```diff
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index e7641f9a13bb..ca53720fa5b1 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -465,7 +465,7 @@ static struct super_operations cifs_super_ops = {
.umount_begin = cifs_umount_begin,
.remount_fs = cifs_remount,
#ifdef CONFIG_CIFS_STATS2
- .cifs_sho... |
95d4e6be25a68cd9fbe8c0d356b585504d8db1c7 | Analyze and fix the following issue in the Linux kernel code: [NetLabel]: audit fixups due to delayed feedback | Problem Details:
Fix some issues Steve Grubb had with the way NetLabel was using the audit
subsystem. This should make NetLabel more consistent with other kernel
generated audit messages specifying configuration changes.
Signed-off-by: Paul Moore <paul.moore@hp.com>
Acked-by: Steve Grubb <sgrubb@redhat.com>
Signed-of... | ```diff
diff --git a/include/linux/audit.h b/include/linux/audit.h
index 42719d07612a..c3aa09751814 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -95,12 +95,11 @@
#define AUDIT_MAC_POLICY_LOAD 1403 /* Policy file load */
#define AUDIT_MAC_STATUS 1404 /* Changed enforcing,permissive,off */
#define... |
120b114237e2461fb4fa437c5c37edf014c916b9 | Analyze and fix the following issue in the Linux kernel code: [PATCH] Re-positioning the bss segment | Problem Details:
[AK: This apparently broke some systems, but we need it to fix
a compile problem with old binutils and in theory the patch
is correct. So let's trying reenabling it again.]
o Currently bss segment is being placed somewhere in the middle (after .data)
section and after bss lots of init section and da... | ```diff
diff --git a/arch/x86_64/kernel/vmlinux.lds.S b/arch/x86_64/kernel/vmlinux.lds.S
index d0564f1bcb0b..f8aeccf105fa 100644
--- a/arch/x86_64/kernel/vmlinux.lds.S
+++ b/arch/x86_64/kernel/vmlinux.lds.S
@@ -67,13 +67,6 @@ SECTIONS
_edata = .; /* End of data section */
- __bss_start = .; /* BSS */
- .bss... |
ded318ec80071557155604197ea45dcdb2a9ff2f | Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix broken indentation in iommu_setup | Problem Details:
No functional changes; only white space.
Signed-off-by: Andi Kleen <ak@suse.de> | ```diff
diff --git a/arch/x86_64/kernel/pci-dma.c b/arch/x86_64/kernel/pci-dma.c
index 225e19941b67..58be7929b4e2 100644
--- a/arch/x86_64/kernel/pci-dma.c
+++ b/arch/x86_64/kernel/pci-dma.c
@@ -248,58 +248,58 @@ EXPORT_SYMBOL(dma_set_mask);
*/
__init int iommu_setup(char *p)
{
- iommu_merge = 1;
+ iommu_merge = ... |
d6c641026dec68acfb4b0baa98aad960e963ed97 | Analyze and fix the following issue in the Linux kernel code: [PATCH] uml build fix | Problem Details:
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
index 16aa572325c9..300a54a6523e 100644
--- a/arch/um/drivers/net_kern.c
+++ b/arch/um/drivers/net_kern.c
@@ -310,7 +310,7 @@ static void setup_etheraddr(char *str, unsigned char *addr)
return;
random:
- random_ether_addr(addr)
+ random_e... |
2148ccc437a9eac9f0d4b3c27cb1e41f6a48194c | Analyze and fix the following issue in the Linux kernel code: [PATCH] MLSXFRM: fix mis-labelling of child sockets | Problem Details:
Accepted connections of types other than AF_INET, AF_INET6, AF_UNIX won't
have an appropriate label derived from the peer, so don't use it.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Acked-by: James Morris <jmorris@namei.org>
Acked-by: Paul Moore... | ```diff
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index cac0273ec447..e9969a2fc846 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -3619,7 +3619,9 @@ static void selinux_sock_graft(struct sock* sk, struct socket *parent)
struct inode_security_struct *isec = SOCK_INODE(pa... |
ae1390d8c3e2142e5cf6d192951d6e2b1fa213c5 | Analyze and fix the following issue in the Linux kernel code: [PATCH] i2c-sibyte: Fix modular build breakage | Problem Details:
Fix undefined reference in i2c_sibyte_exit().
drivers/built-in.o: In function `i2c_sibyte_exit':
i2c-sibyte.c:(.exit.text+0x368): undefined reference to `i2c_del_bus'
i2c-sibyte.c:(.exit.text+0x368): relocation truncated to fit: R_MIPS_26 against `i2c_del_bus'
i2c-sibyte.c:(.exit.text+0x38... | ```diff
diff --git a/drivers/i2c/busses/i2c-sibyte.c b/drivers/i2c/busses/i2c-sibyte.c
index 8f2b1f0deb81..0ca599d3b402 100644
--- a/drivers/i2c/busses/i2c-sibyte.c
+++ b/drivers/i2c/busses/i2c-sibyte.c
@@ -210,8 +210,8 @@ static int __init i2c_sibyte_init(void)
static void __exit i2c_sibyte_exit(void)
{
- i2c_del_... |
181b64803661209cda64e5e874ad75f373a69de8 | Analyze and fix the following issue in the Linux kernel code: [PATCH] cpuset: fix obscure attach_task vs exiting race | Problem Details:
Fix obscure race condition in kernel/cpuset.c attach_task() code.
There is basically zero chance of anyone accidentally being harmed by this
race.
It requires a special 'micro-stress' load and a special timing loop hacks
in the kernel to hit in less than an hour, and even then you'd have to hit
it hu... | ```diff
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index cc0395d7eba1..8c3c400cce91 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -1225,7 +1225,12 @@ static int attach_task(struct cpuset *cs, char *pidbuf, char **ppathbuf)
task_lock(tsk);
oldcs = tsk->cpuset;
- if (!oldcs) {
+ /*
+ * After getting 'o... |
683e91cbd0582cb8e63daaf0429e0a62be9cc421 | Analyze and fix the following issue in the Linux kernel code: [PATCH] SubmittingPatches: add a note about "format=flowed" when sending patches | Problem Details:
Add a note about "format=flowed" when sending patches and explain how to
fix mozilla. Thunderbird has the similar options.
Signed-off-by: Kirill Korotaev <dev@openvz.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index 958182f6aa1f..302d148c2e18 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -209,6 +209,19 @@ Exception: If your mailer is mangling patches then someone may ask
you to re-send them using M... |
03cbc358aab3faf34bfeaa02206fa660127e9b3f | Analyze and fix the following issue in the Linux kernel code: [PATCH] lockdep core: improve the lock-chain-hash | Problem Details:
With CONFIG_DEBUG_LOCK_ALLOC turned off i was getting sporadic failures in
the locking self-test:
------------>
| Locking API testsuite:
----------------------------------------------------------------------------
| spin |wlock |rlock |mutex | wsem | rsem |
... | ```diff
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index df1c3594de31..e596525669ed 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -122,8 +122,8 @@ static struct list_head chainhash_table[CHAINHASH_SIZE];
* unique.
*/
#define iterate_chain_key(key1, key2) \
- (((key1) << MAX_LOCKDEP_KEYS_BITS/2) ^ \... |
632dd2053a1146c826ceb6f26ab689389c05e751 | Analyze and fix the following issue in the Linux kernel code: [PATCH] Kcore elf note namesz field fix | Problem Details:
o As per ELF specifications, it looks like that elf note "namesz" field
contains the length of "name" including the size of null character. And
currently we are filling "namesz" without taking into the consideration
the null character size.
o Kexec-tools performs this check deligently hence I r... | ```diff
diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c
index 3ceff3857272..1294eda4acae 100644
--- a/fs/proc/kcore.c
+++ b/fs/proc/kcore.c
@@ -100,7 +100,7 @@ static int notesize(struct memelfnote *en)
int sz;
sz = sizeof(struct elf_note);
- sz += roundup(strlen(en->name), 4);
+ sz += roundup((strlen(en->name) + ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.