id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
f933ff504f5b3f0f94b98d69d48fc8d3c1e92267 | Analyze and fix the following issue in the Linux kernel code: [PATCH] i2c: scx200_acb fix and speed up the poll loop | Problem Details:
scx200_acb: Fix and speed up the poll loop
Signed-off-by: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c
index 0ae77f84ffe8..8e646bdb556c 100644
--- a/drivers/i2c/busses/scx200_acb.c
+++ b/drivers/i2c/busses/scx200_acb.c
@@ -47,10 +47,7 @@ static int base[MAX_DEVICES] = { 0x820, 0x840 };
module_param_array(base, int, NULL, 0);
MODULE_... |
ef4d9275e2949976cb43c8bd0c11cb77b9b017e9 | Analyze and fix the following issue in the Linux kernel code: [PATCH] i2c: scx200_acb debug log cleanup | Problem Details:
scx200_acb: debug log cleanup
Signed-off-by: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c
index f45779b76908..bfa243d5a8f2 100644
--- a/drivers/i2c/busses/scx200_acb.c
+++ b/drivers/i2c/busses/scx200_acb.c
@@ -45,12 +45,6 @@ static int base[MAX_DEVICES] = { 0x820, 0x840 };
module_param_array(base, int, NULL, 0);
MODULE_... |
4c180fc424550217344db6fe8960732dbd7feb0c | Analyze and fix the following issue in the Linux kernel code: [PATCH] skge: multicast statistics fix | Problem Details:
Fix count of multicast packets.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org> | ```diff
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index 72148f0fbfcc..e15cbefcb6e3 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -357,7 +357,7 @@ static struct net_device_stats *skge_get_stats(struct net_device *dev)
skge->net_stats.rx_bytes = data[1];
skge->net_stats.tx_packets = data[2] +... |
050ff18016979b98e3cadb930d6e29bfd5530469 | Analyze and fix the following issue in the Linux kernel code: [PATCH] sky2: Fix RX stats | Problem Details:
Unicast packets are shown as multicast, real multicast packets are missing.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org> | ```diff
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 78c210facaa8..f3f70b07576d 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -2607,7 +2607,7 @@ static struct net_device_stats *sky2_get_stats(struct net_device *dev)
sky2->net_stats.rx_bytes = data[1];
sky2->net_stats.tx_packets = data[2]... |
4edac92fcf5956b0ef52fb281207863902e430bc | Analyze and fix the following issue in the Linux kernel code: [PATCH] Restore channel setting after scan. | Problem Details:
After a scan, we weren't switching back to the original channel if we
were associated with an AP. So NetworkManager's periodic scans would
disrupt connectivity until the ESSID was manually set again. Fix that.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linvil... | ```diff
diff --git a/net/ieee80211/softmac/ieee80211softmac_scan.c b/net/ieee80211/softmac/ieee80211softmac_scan.c
index 290ddb0951d6..bb9ab8b45d09 100644
--- a/net/ieee80211/softmac/ieee80211softmac_scan.c
+++ b/net/ieee80211/softmac/ieee80211softmac_scan.c
@@ -232,6 +232,13 @@ void ieee80211softmac_scan_finished(stru... |
9320199957cebc39ccef372fa1fccf5ba3d3fd7d | Analyze and fix the following issue in the Linux kernel code: [PATCH] hostap: Fix memory leak on PCI probe error path | Problem Details:
The Coverity checker (CID: 659, 660) spotted this resource leak on
PCI probe error path. Free private data structure if pci_enable_device()
fails.
Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com> | ```diff
diff --git a/drivers/net/wireless/hostap/hostap_pci.c b/drivers/net/wireless/hostap/hostap_pci.c
index 2e85bdced2dd..194f07097581 100644
--- a/drivers/net/wireless/hostap/hostap_pci.c
+++ b/drivers/net/wireless/hostap/hostap_pci.c
@@ -307,7 +307,7 @@ static int prism2_pci_probe(struct pci_dev *pdev,
memset(hw... |
3a1c42ad98fddab63e62b400ae98e6f609485efc | Analyze and fix the following issue in the Linux kernel code: [PATCH] hostap: Fix unlikely read overrun in CIS parsing | Problem Details:
The Coverity checker (CID: 452, 453, 454, 455, 456) spotted this
unlikely read overrun of CIS buffer. Abort if CISTPL_CONFIG or
CISTPL_MANFID would not fit in buffer.
Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com> | ```diff
diff --git a/drivers/net/wireless/hostap/hostap_plx.c b/drivers/net/wireless/hostap/hostap_plx.c
index 94fe2449f099..e258517ac85d 100644
--- a/drivers/net/wireless/hostap/hostap_plx.c
+++ b/drivers/net/wireless/hostap/hostap_plx.c
@@ -368,7 +368,7 @@ static int prism2_plx_check_cis(void __iomem *attr_mem, int a... |
8abceaf1cf44b9d95bcc366fa277b33e292141c4 | Analyze and fix the following issue in the Linux kernel code: [PATCH] hostap: Fix double free in prism2_config() error path | Problem Details:
The Coverity checker (CID: 930) spotted this double free on error path
(allocation failure). Do not free these here since generic error path
will take care of this.
Signed-off-by: Eugene Teo <eugene.teo@eugeneteo.net>
Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: John W. Linville <l... | ```diff
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c
index f8f4503475f9..d335b250923a 100644
--- a/drivers/net/wireless/hostap/hostap_cs.c
+++ b/drivers/net/wireless/hostap/hostap_cs.c
@@ -585,8 +585,6 @@ static int prism2_config(dev_link_t *link)
parse = kmalloc(size... |
54b85f489bdfafc9306dfcc21e0d2687c34c3b34 | Analyze and fix the following issue in the Linux kernel code: [PATCH] hostap: Fix ap_add_sta() return value verification | Problem Details:
The Coverity checker (CID: 273) spotted this inconsequent NULL checking
(unconditionally dereferencing directly after checking for NULL
isn't a good idea). Return immediately to avoid this.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: Joh... | ```diff
diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c
index 753a1de6664b..06c3fa32b310 100644
--- a/drivers/net/wireless/hostap/hostap_ap.c
+++ b/drivers/net/wireless/hostap/hostap_ap.c
@@ -3141,7 +3141,7 @@ int hostap_add_sta(struct ap_data *ap, u8 *sta_addr)
if (ret ... |
971d1e69229f3dfc6dd233b8f4b82df2c35eedd8 | Analyze and fix the following issue in the Linux kernel code: [PATCH] hostap: Fix hw reset after CMDCODE_ACCESS_WRITE timeout | Problem Details:
The Coverity checker (CID: 59) noted that the call to prism2_hw_reset()
was dead code. Move prism2_hw_reset() call to a place where it is
actually executed.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: John W. Linville <linville@tuxdriver... | ```diff
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c
index b1f142d9e232..328e9a1d13b5 100644
--- a/drivers/net/wireless/hostap/hostap_hw.c
+++ b/drivers/net/wireless/hostap/hostap_hw.c
@@ -928,15 +928,15 @@ static int hfa384x_set_rid(struct net_device *dev, u16 rid, voi... |
e750d1c7cc314b9ba1934b0b474b7d39f906f865 | Analyze and fix the following issue in the Linux kernel code: NTFS: 2.1.27 - Various bug fixes and cleanups. | Problem Details:
Signed-off-by: Anton Altaparmakov <aia21@cantab.net> | ```diff
diff --git a/Documentation/filesystems/ntfs.txt b/Documentation/filesystems/ntfs.txt
index 251168587899..638cbd3d2b00 100644
--- a/Documentation/filesystems/ntfs.txt
+++ b/Documentation/filesystems/ntfs.txt
@@ -457,6 +457,11 @@ ChangeLog
Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/Chang... |
a778f217328a7391e0919b6463ec7f143851d12d | Analyze and fix the following issue in the Linux kernel code: NTFS: Fix a bug in fs/ntfs/inode.c::ntfs_read_locked_index_inode() where we | Problem Details:
forgot to update a temporary variable so loading index inodes which
have an index allocation attribute failed.
Signed-off-by: Anton Altaparmakov <aia21@cantab.net> | ```diff
diff --git a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog
index a3a9d4b97979..5fb74e62f535 100644
--- a/fs/ntfs/ChangeLog
+++ b/fs/ntfs/ChangeLog
@@ -38,6 +38,9 @@ ToDo/Notes:
allowed by NTFS, i.e. 255 Unicode characters, not including the
terminating NULL (which is not stored on disk).
- Improve comments on... |
7a673c6b8fff4b2888ef1d47462e4be79936ac5a | Analyze and fix the following issue in the Linux kernel code: [PATCH] devpts: use lib/parser.c for parsing mount options | Problem Details:
Item from "2.6 should fix" list.
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c
index bfb8a230bac9..14c5620b5cab 100644
--- a/fs/devpts/inode.c
+++ b/fs/devpts/inode.c
@@ -18,6 +18,7 @@
#include <linux/mount.h>
#include <linux/tty.h>
#include <linux/devpts_fs.h>
+#include <linux/parser.h>
#define DEVPTS_SUPER_MAGIC 0x1cd1
@@ -32,39... |
dd287796d608fcdc3fe5e8fdb5bf762a8f1bc32a | Analyze and fix the following issue in the Linux kernel code: [PATCH] pause_on_oops command line option | Problem Details:
Attempt to fix the problem wherein people's oops reports scroll off the screen
due to repeated oopsing or to oopses on other CPUs.
If this happens the user can reboot with the `pause_on_oops=<seconds>' option.
It will allow the first oopsing CPU to print an oops record just a single
time. Second oops... | ```diff
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 880be3a30d8d..7b7382d0f758 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1126,6 +1126,11 @@ running once the system is up.
pas16= [HW,SCSI]
See header of drivers/s... |
772a0dc5d2103baff2f15c2668930bcd37add777 | Analyze and fix the following issue in the Linux kernel code: [PATCH] notifier: profile.h forward decl fix | Problem Details:
Declarations use struct notifier_block on both legs of the ifdef, so move the
notifier_block forward declaration outside the ifdef.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/include/linux/profile.h b/include/linux/profile.h
index 026969a5595c..1f2fea6640a4 100644
--- a/include/linux/profile.h
+++ b/include/linux/profile.h
@@ -14,6 +14,7 @@
struct proc_dir_entry;
struct pt_regs;
+struct notifier_block;
/* init basic kernel profiler */
void __init profile_init(vo... |
91368d73e4b60d577ad171e5bd315b564265fcdb | Analyze and fix the following issue in the Linux kernel code: [PATCH] make bug messages more consistent | Problem Details:
Consolidate all kernel bug printouts to begin with the "BUG: " string.
Makes it easier to find them in large bootup logs.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c
index be87c5e2ee95..1db34effdd8d 100644
--- a/arch/i386/kernel/nmi.c
+++ b/arch/i386/kernel/nmi.c
@@ -543,7 +543,7 @@ void nmi_watchdog_tick (struct pt_regs * regs)
/*
* die_nmi will return ONLY if NOTIFY_STOP happens..
*/
- die_nmi(re... |
4f7a07b88726781e37c4c5f63db3a6ee3f8500d3 | Analyze and fix the following issue in the Linux kernel code: [PATCH] convert fs/9p/ to mutexes, fix locking bugs | Problem Details:
Convert fs/9p/mux.c from semaphore to mutex.
NOTE: fixed locking bugs in the process - the code was using semaphores
the other way around.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Eric Van Hensbergen <ericvh@ericvh.myip.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torv... | ```diff
diff --git a/fs/9p/mux.c b/fs/9p/mux.c
index ea1134eb47c8..8e8356c1c229 100644
--- a/fs/9p/mux.c
+++ b/fs/9p/mux.c
@@ -31,6 +31,7 @@
#include <linux/poll.h>
#include <linux/kthread.h>
#include <linux/idr.h>
+#include <linux/mutex.h>
#include "debug.h"
#include "v9fs.h"
@@ -110,7 +111,7 @@ static void v9f... |
6362e4d4eda61efb04ac1cdae32e48ac6d90b701 | Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix oops in invalidate_dquots() | Problem Details:
When quota is being turned off we assumed that all the references to dquots
were already dropped. That need not be true as inodes being deleted are
not on superblock's inodes list and hence we need not reach it when
removing quota references from inodes. So invalidate_dquots() has to wait
for all the... | ```diff
diff --git a/fs/dquot.c b/fs/dquot.c
index 1966c890b48d..9376a4378988 100644
--- a/fs/dquot.c
+++ b/fs/dquot.c
@@ -118,8 +118,7 @@
* spinlock to internal buffers before writing.
*
* Lock ordering (including related VFS locks) is the following:
- * i_mutex > dqonoff_sem > iprune_sem > journal_lock > dqpt... |
ce6ed29f3136bc4b3644ecf4091d6390d444f628 | Analyze and fix the following issue in the Linux kernel code: [PATCH] suspend: make progress printing prettier | Problem Details:
Combination of printk/pr_debug led to <7> in the middle of the line, and we
printed way too many dots.
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c
index 0036955357e0..1b46c2da5a50 100644
--- a/kernel/power/snapshot.c
+++ b/kernel/power/snapshot.c
@@ -83,7 +83,7 @@ static int save_highmem_zone(struct zone *zone)
void *kaddr;
unsigned long pfn = zone_pfn + zone->zone_start_pfn;
- if (!(... |
2b322ce210aec74ae0d02938d3a01e29fe079469 | Analyze and fix the following issue in the Linux kernel code: [PATCH] revert "swsusp: fix breakage with swap on lvm" | Problem Details:
This was a temporary thing for 2.6.16.
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/kernel/power/swsusp.c b/kernel/power/swsusp.c
index 2d9d08f72f76..4e90905f0e87 100644
--- a/kernel/power/swsusp.c
+++ b/kernel/power/swsusp.c
@@ -153,11 +153,13 @@ static int swsusp_swap_check(void) /* This is called before saving image */
{
int i;
+ if (!swsusp_resume_device)
+ return -ENODE... |
aeefc956d5d8f8402216a5447bd72ade9eb37eff | Analyze and fix the following issue in the Linux kernel code: [PATCH] x86: Make _syscallX() macros compile in PIC mode | Problem Details:
Gcc reserves %ebx when compiling position-independent-code on i386. This
means, the _syscallX() macros in include/asm-i386/unistd.h will not
compile. This patch is changes the existing macros to take special care to
preserve %ebx.
The bug can be tracked at http://bugzilla.kernel.org/show_bug.cgi?id=... | ```diff
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h
index dc81a55dd94d..d8afd0e3b81a 100644
--- a/include/asm-i386/unistd.h
+++ b/include/asm-i386/unistd.h
@@ -347,9 +347,9 @@ __syscall_return(type,__res); \
type name(type1 arg1) \
{ \
long __res; \
-__asm__ volatile ("int $0x80" \
+__asm__ vo... |
75874d5cc8efef22457072e14103dc55f164e64e | Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: fix dump_stack() | Problem Details:
i386 has a small bug in the stack dump code where it prints an extra log
level code. Remove that and fix the alignment of normal stack dump
printout. Also remove some unnecessary printk() calls.
Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Sign... | ```diff
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
index a807a2da581d..1b7ad4115d81 100644
--- a/arch/i386/kernel/traps.c
+++ b/arch/i386/kernel/traps.c
@@ -217,19 +217,17 @@ static void show_stack_log_lvl(struct task_struct *task, unsigned long *esp,
for(i = 0; i < kstack_depth_to_print; i++) {... |
52f4a91afd9316fb4f0f3a77c5ff56b9c98632ea | Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix the imlicit declaration of mtrr_centaur_report_mcr in arch/i386/kernel/cpu/centaur.c | Problem Details:
arch/i386/kernel/cpu/centaur.c: In function `centaur_mcr_insert':
arch/i386/kernel/cpu/centaur.c:33: warning: implicit declaration of function `mtrr_centaur_report_mcr'
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torval... | ```diff
diff --git a/arch/i386/kernel/cpu/centaur.c b/arch/i386/kernel/cpu/centaur.c
index f52669ecb93f..bd75629dd262 100644
--- a/arch/i386/kernel/cpu/centaur.c
+++ b/arch/i386/kernel/cpu/centaur.c
@@ -4,6 +4,7 @@
#include <asm/processor.h>
#include <asm/msr.h>
#include <asm/e820.h>
+#include <asm/mtrr.h>
#include... |
382dbd07c9cb4f255c28f680996ad819a8ce9bfe | Analyze and fix the following issue in the Linux kernel code: [PATCH] fix implicit declaration of GET_APIC_ID in arch/i386/kernel/apic.c | Problem Details:
arch/i386/kernel/apic.c:840: warning: implicit declaration of function `GET_APIC_ID'
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c
index 776c90989e06..eb5279d23b7f 100644
--- a/arch/i386/kernel/apic.c
+++ b/arch/i386/kernel/apic.c
@@ -38,6 +38,7 @@
#include <asm/i8253.h>
#include <mach_apic.h>
+#include <mach_apicdef.h>
#include <mach_ipi.h>
#include "io_ports.h"
``` |
be0a39120cb6b88bd085a3a280f5c769a3ed85ad | Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: more vsyscall documentation | Problem Details:
Document a limitation of vsyscall-sysenter, since patches to fix it have
been rejected.
Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/arch/i386/kernel/vsyscall-sysenter.S b/arch/i386/kernel/vsyscall-sysenter.S
index 76b728159403..3b62baa6a371 100644
--- a/arch/i386/kernel/vsyscall-sysenter.S
+++ b/arch/i386/kernel/vsyscall-sysenter.S
@@ -21,6 +21,9 @@
* instruction clobbers %esp, the user's %esp won't even survive entry
* int... |
635cf99a80f4ebee59d70eb64bb85ce829e4591f | Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: fix singlestep through an int80 syscall | Problem Details:
Using PTRACE_SINGLESTEP on a child that does an int80 syscall misses the
SIGTRAP that should be delivered upon syscall exit. Fix that by setting
TIF_SINGLESTEP when entering the kernel via int80 with TF set.
/* Test whether singlestep through an int80 syscall works.
*/
#define _GNU_SOURCE
#include <... | ```diff
diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S
index 4d704724b2f5..cfc683f153b9 100644
--- a/arch/i386/kernel/entry.S
+++ b/arch/i386/kernel/entry.S
@@ -226,6 +226,10 @@ ENTRY(system_call)
pushl %eax # save orig_eax
SAVE_ALL
GET_THREAD_INFO(%ebp)
+ testl $TF_MASK,EFLAGS(%esp)
+ jz no_s... |
db753bdfc24c31228996799d508ce3bf7cbe3b99 | Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: fix uses of user_mode() vs. user_mode_vm() | Problem Details:
>commit 76381fee7e8feb4c22be636aa5d4765dbe4fbf9e
>Author: Vincent Hanquez <vincent.hanquez@cl.cam.ac.uk>
>Date: Thu Jun 23 00:08:46 2005 -0700
>
> [PATCH] xen: x86_64: use more usermode macro
>
> Make use of the user_mode macro where it's possible. This is useful for Xen
> because it will n... | ```diff
diff --git a/arch/i386/kernel/crash.c b/arch/i386/kernel/crash.c
index d49dbe8dc96b..e3c5fca0aa8a 100644
--- a/arch/i386/kernel/crash.c
+++ b/arch/i386/kernel/crash.c
@@ -105,7 +105,7 @@ static int crash_nmi_callback(struct pt_regs *regs, int cpu)
return 1;
local_irq_disable();
- if (!user_mode(regs)) {
... |
44fd22992cb76dc51c52cf4b8aff1bc7899bb23c | Analyze and fix the following issue in the Linux kernel code: [PATCH] Register the boot-cpu in the cpu maps earlier | Problem Details:
Register the boot-cpu in the cpu maps earlier to allow the early printk to
work, and to fix an obscure deadlock at boot.
Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/init/main.c b/init/main.c
index 4c194c47395f..141e8896d252 100644
--- a/init/main.c
+++ b/init/main.c
@@ -438,6 +438,15 @@ void __init parse_early_param(void)
* Activate the first processor.
*/
+static void __init boot_cpu_init(void)
+{
+ int cpu = smp_processor_id();
+ /* Mark the boot cpu "... |
99b7de33477882b86d54ce8ecbf90147f9d106d7 | Analyze and fix the following issue in the Linux kernel code: [PATCH] x86: early printk handling fixes | Problem Details:
The history is that -mm kernels do not work for me for a few months
already. The things started from crashing somewhere after starting init,
and for the last month - no boot at all, just "Uncompressing... OK,
booting kernel", and silence. Early console didn't work too. With the
latest releases this... | ```diff
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index 5f58f8cb9836..2d8782960f41 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -1459,6 +1459,16 @@ void __init setup_arch(char **cmdline_p)
parse_cmdline_early(cmdline_p);
+#ifdef CONFIG_EARLY_PRINTK
+ {
+ char *s ... |
e5428ede94179ddccaa56308e0f194fa299edbb4 | Analyze and fix the following issue in the Linux kernel code: [PATCH] Compilation fix for ES7000 when no ACPI is specified in config (i386) | Problem Details:
ES7000 platform code clean up for compilation errors and a warning.
Ifdef'd the ACPI related parts in the ES7000 platform code. They were
causing compile errors in certain configuration (without ACPI defined). I
think this approach would be best (as opposed to Kconfig changes) since it
only touches t... | ```diff
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c
index e6e2f43db85e..e85e463af7ce 100644
--- a/arch/i386/kernel/mpparse.c
+++ b/arch/i386/kernel/mpparse.c
@@ -828,6 +828,8 @@ void __init find_smp_config (void)
smp_scan_config(address, 0x400);
}
+int es7000_plat;
+
/* -----------------... |
30e931d4092713cecd6b8c2fd70f268efaa6e428 | Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: Add a temporary to make put_user more type safe | Problem Details:
In some code I am developing I had occasion to change the type of a
variable. This made the value put_user was putting to user space wrong.
But the code continued to build cleanly without errors.
Introducing a temporary fixes this problem and at least with gcc-3.3.5 does
not cause gcc any problems wi... | ```diff
diff --git a/include/asm-i386/uaccess.h b/include/asm-i386/uaccess.h
index 3f1337c34208..371457b1ceb6 100644
--- a/include/asm-i386/uaccess.h
+++ b/include/asm-i386/uaccess.h
@@ -197,13 +197,15 @@ extern void __put_user_8(void);
#define put_user(x,ptr) \
({ int __ret_pu; \
+ __typeof__(*(ptr)) __p... |
6bb08da4773f584a7b4a838b6b770d7d18033af7 | Analyze and fix the following issue in the Linux kernel code: [PATCH] Bug fixes and cleanup for the BSD Secure Levels LSM | Problem Details:
This patch address several issues in the current BSD Secure Levels code:
o plaintext_to_sha1: Missing check for a NULL return from __get_free_page
o passwd_write_file: A page is leaked if the password is wrong.
o fix securityfs registration order
o seclvl_init is a mess and can't properly tolerate ... | ```diff
diff --git a/security/seclvl.c b/security/seclvl.c
index 8529ea6f7aa8..441beaf1bbc1 100644
--- a/security/seclvl.c
+++ b/security/seclvl.c
@@ -8,6 +8,7 @@
* Copyright (c) 2001 WireX Communications, Inc <chris@wirex.com>
* Copyright (c) 2001 Greg Kroah-Hartman <greg@kroah.com>
* Copyright (c) 2002 Internat... |
61808c2bbba127ecd9786401c55ea4c394aa0240 | Analyze and fix the following issue in the Linux kernel code: [PATCH] cciss: fix use-after-free in cciss_init_one | Problem Details:
free_hba() sets hba[i] to NULL, the dereference afterwards results in this
crash. Setting busy_initializing to 0 actually looks unnecessary, but I'm
not entirely sure, which is why I left it in.
cciss: controller appears to be disabled
Unable to handle kernel NULL pointer dereference at virtual addre... | ```diff
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index cf39cf9aac25..e29b8926f80e 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -3268,8 +3268,8 @@ clean2:
unregister_blkdev(hba[i]->major, hba[i]->devname);
clean1:
release_io_mem(hba[i]);
- free_hba(i);
hba[i]->busy_initializ... |
9e71f9c848e669f003b1319da52f03cb8e7d7403 | Analyze and fix the following issue in the Linux kernel code: [PATCH] DM: Fix bug: BIO_RW_BARRIER requests to md/raid1 hang. | Problem Details:
Both R1BIO_Barrier and R1BIO_Returned are 4 !!!!
This means that barrier requests don't get returned (i.e. b_endio called)
because it looks like they already have been.
Signed-off-by: Neil Brown <neilb@suse.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus... | ```diff
diff --git a/include/linux/raid/raid1.h b/include/linux/raid/raid1.h
index 9d5494aaac0f..3009c813d83d 100644
--- a/include/linux/raid/raid1.h
+++ b/include/linux/raid/raid1.h
@@ -130,6 +130,6 @@ struct r1bio_s {
* with failure when last write completes (and all failed).
* Record that bi_end_io was called wi... |
e9028b0ff2bad1954568604dc17725692c8524d6 | Analyze and fix the following issue in the Linux kernel code: [PATCH] fix scheduler deadlock | Problem Details:
We have noticed lockups during boot when stress testing kexec on ppc64.
Two cpus would deadlock in scheduler code trying to grab already taken
spinlocks.
The double_rq_lock code uses the address of the runqueue to order the
taking of multiple locks. This address is a per cpu variable:
if (rq1 < rq2... | ```diff
diff --git a/kernel/sched.c b/kernel/sched.c
index 6b6e0d70eb30..a5bd60453eae 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -237,6 +237,7 @@ struct runqueue {
task_t *migration_thread;
struct list_head migration_queue;
+ int cpu;
#endif
#ifdef CONFIG_SCHEDSTATS
@@ -1654,6 +1655,9 @@ unsigned lon... |
5be0e9511990dc307670dc66a42073db96b20f26 | Analyze and fix the following issue in the Linux kernel code: [PATCH] proc: fix duplicate line in /proc/devices | Problem Details:
Fix a duplicate block device line printed after the "Block device" header
in /proc/devices.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index 1d24fead51a6..826c131994c3 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -312,7 +312,7 @@ static void *devinfo_next(struct seq_file *f, void *v, loff_t *pos)
case BLK_HDR:
info->state = BLK_LIST;
(*pos)++;
- break;
+ /*f... |
949763b2b8822c6dc6da0d0e1d4af092152546c2 | Analyze and fix the following issue in the Linux kernel code: NTFS: Fix comparison of $MFT and $MFTMirr to not bail out when there are | Problem Details:
unused, invalid mft records which are the same in both $MFT and
$MFTMirr.
Signed-off-by: Anton Altaparmakov <aia21@cantab.net> | ```diff
diff --git a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog
index 8df10700a930..548d9059a697 100644
--- a/fs/ntfs/ChangeLog
+++ b/fs/ntfs/ChangeLog
@@ -28,6 +28,9 @@ ToDo/Notes:
continued the attribute lookup loop instead of aborting it.
- Use buffer_migrate_page() for the ->migratepage function of all ntfs
ad... |
fcab1e51796d8bcd1a7969ff52bd904d38748e00 | Analyze and fix the following issue in the Linux kernel code: [PATCH] sparc64: fix set_page_count merge clash | Problem Details:
Merge clash will have broken sparc64. Synch up its online_page
implementation with powerpc, which was identical until the
set_page_count removal.
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
index ded63ee9c4fd..1539a8362b6f 100644
--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -1828,8 +1828,8 @@ void __flush_tlb_all(void)
void online_page(struct page *page)
{
ClearPageReserved(page);
- set_page_count(page, 0);
- free_col... |
3ccc7384db3d762e834dfdae13c1d6434b2fdeab | Analyze and fix the following issue in the Linux kernel code: NTFS: Fix a buggette in an "should be impossible" case handling where we | Problem Details:
continued the attribute lookup loop instead of aborting it.
Signed-off-by: Anton Altaparmakov <aia21@cantab.net> | ```diff
diff --git a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog
index 3d8d60be48de..d35a5c8e3da9 100644
--- a/fs/ntfs/ChangeLog
+++ b/fs/ntfs/ChangeLog
@@ -24,6 +24,8 @@ ToDo/Notes:
- Fix two compiler warnings on Alpha. Thanks to Andrew Morton for
reporting them.
- Fix an (innocent) off-by-one error in the runlist ... |
67b1dfe77a2eb2a88b37cd77b8979cbdb7695bd6 | Analyze and fix the following issue in the Linux kernel code: NTFS: Fix an (innocent) off-by-one error in the runlist code. | Problem Details:
Signed-off-by: Anton Altaparmakov <aia21@cantab.net> | ```diff
diff --git a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog
index 9d8ffa89e2c2..3d8d60be48de 100644
--- a/fs/ntfs/ChangeLog
+++ b/fs/ntfs/ChangeLog
@@ -19,6 +19,12 @@ ToDo/Notes:
- Enable the code for setting the NT4 compatibility flag when we start
making NTFS 1.2 specific modifications.
+2.1.27 - Various bug f... |
6201573cc9bfe1e0bdec229bed8e95b0dc88a587 | Analyze and fix the following issue in the Linux kernel code: V4L/DVB (3568f): saa7110: Fix array overrun | Problem Details:
Fix a (probably harmless) array overrun in the DECODER_DUMP command of the
saa7110 driver. No big deal as this command is not used anywhere anyway.
Also reformat the dump so that it displays nicely.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-... | ```diff
diff --git a/drivers/media/video/saa7110.c b/drivers/media/video/saa7110.c
index 7bb85a7b326e..20cad9fc99ef 100644
--- a/drivers/media/video/saa7110.c
+++ b/drivers/media/video/saa7110.c
@@ -432,15 +432,13 @@ saa7110_command (struct i2c_client *client,
break;
case DECODER_DUMP:
- for (v = 0; v < 0x34; v... |
58a0b84c92e62c2cc42036259a4b51e0bcaf8fa5 | Analyze and fix the following issue in the Linux kernel code: V4L/DVB (3568d): saa7111.c fix | Problem Details:
When grabbing composite video with Iomega Buz, the stock driver will
prevent grabbing from the same input twice in a row, forcing the user to
switch inputs before anything useful can be grabbed again. It is caused by
some optimization code in the input selection parts, and triggered by the
saa7111_com... | ```diff
diff --git a/drivers/media/video/saa7111.c b/drivers/media/video/saa7111.c
index a2e1ccb79e49..6bd1789c8f78 100644
--- a/drivers/media/video/saa7111.c
+++ b/drivers/media/video/saa7111.c
@@ -212,6 +212,7 @@ saa7111_command (struct i2c_client *client,
switch (cmd) {
case 0:
+ break;
case DECODER_INIT:
... |
6254312352dfd1c996245cb3bc74be901dc165cc | Analyze and fix the following issue in the Linux kernel code: V4L/DVB (3568a): saa7114: Fix i2c block write | Problem Details:
Fix the i2c block write mode of the saa7114 driver. A previous code change
accidentally commented out a local variable increment, which should have been
kept, causing the register writes over the I2C bus to never be batched,
replacing any attempted block write by slower, individual write transactions.... | ```diff
diff --git a/drivers/media/video/saa7114.c b/drivers/media/video/saa7114.c
index fd0a4b4ef014..1c29d05307a5 100644
--- a/drivers/media/video/saa7114.c
+++ b/drivers/media/video/saa7114.c
@@ -139,9 +139,6 @@ saa7114_write (struct i2c_client *client,
u8 reg,
u8 va... |
bf5295bba804a6aead9bc1c0d5970173a9d4e08e | Analyze and fix the following issue in the Linux kernel code: [BNX2]: Fix link change handling | Problem Details:
Fix some link-related problems by doing a coalesce_now after link
change interrupt to flush out the transient link status.
To facilitate this, the host coalesce cmd register value is cached in
the device structure.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem... | ```diff
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 7d213707008a..c56888e66351 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -313,8 +313,6 @@ bnx2_disable_int(struct bnx2 *bp)
static void
bnx2_enable_int(struct bnx2 *bp)
{
- u32 val;
-
REG_WR(bp, BNX2_PCICFG_INT_ACK_CMD,
BNX2_... |
57ae595f6bf8bde42de199ff9fe68b873080fde2 | Analyze and fix the following issue in the Linux kernel code: [PATCH] powerpc: via-pmu warning fix | Problem Details:
drivers/macintosh/via-pmu.c:164: warning: `sleep_in_progress' defined but not used
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org> | ```diff
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index 8a8fffa339f0..4f5f3abc9cb3 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -161,7 +161,9 @@ static int drop_interrupts;
#if defined(CONFIG_PM) && defined(CONFIG_PPC32)
static int option_lid_wakeup = 1;
... |
2d0eee14b23f20c501a6c2536edf68f93c56edcd | Analyze and fix the following issue in the Linux kernel code: [PATCH] powerpc: Fix warning in add_memory | Problem Details:
arch/powerpc/mm/mem.c: In function `add_memory':
arch/powerpc/mm/mem.c:128: warning: assignment makes integer from pointer without a cast
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org> | ```diff
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index 6809cdba6e94..80550b284505 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -125,7 +125,7 @@ int __devinit add_memory(u64 start, u64 size)
nid = hot_add_scn_to_nid(start);
pgdata = NODE_DATA(nid);
- start = __va(start);
+ st... |
fe0b06b123762ab620b5bee3dab1576ddddd0a7f | Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix softmac scan | Problem Details:
Softmac scanning fails because the stop flag is not cleared before
scanning is started. The attached one-line patch fixes this.
Signed-Off-By: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com> | ```diff
diff --git a/net/ieee80211/softmac/ieee80211softmac_scan.c b/net/ieee80211/softmac/ieee80211softmac_scan.c
index 846c62db3c4c..290ddb0951d6 100644
--- a/net/ieee80211/softmac/ieee80211softmac_scan.c
+++ b/net/ieee80211/softmac/ieee80211softmac_scan.c
@@ -178,6 +178,7 @@ int ieee80211softmac_start_scan_implement... |
f484d582d3e66ad78dcce2465c9ec479bacc1075 | Analyze and fix the following issue in the Linux kernel code: [PATCH] trivial fixes to softmac | Problem Details:
This patch removes a blank line that shouldn't be there and fixes a
spelling error in softmac.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com> | ```diff
diff --git a/net/ieee80211/softmac/ieee80211softmac_auth.c b/net/ieee80211/softmac/ieee80211softmac_auth.c
index ccbb51c8ee4c..dd5fb0f34628 100644
--- a/net/ieee80211/softmac/ieee80211softmac_auth.c
+++ b/net/ieee80211/softmac/ieee80211softmac_auth.c
@@ -358,7 +358,7 @@ ieee80211softmac_deauth_resp(struct net_d... |
45867e6a55aee984d69ce8f93a87e26d32d470dc | Analyze and fix the following issue in the Linux kernel code: [PATCH] softmac: fix Makefiles | Problem Details:
Signed-off-by: John W. Linville <linville@tuxdriver.com> | ```diff
diff --git a/net/ieee80211/Makefile b/net/ieee80211/Makefile
index f988417121da..796a7c76ee48 100644
--- a/net/ieee80211/Makefile
+++ b/net/ieee80211/Makefile
@@ -10,3 +10,4 @@ ieee80211-objs := \
ieee80211_wx.o \
ieee80211_geo.o
+obj-$(CONFIG_IEEE80211_SOFTMAC) += softmac/
diff --git a/net/ieee80211/soft... |
714e1a511627b7d95ff1666c66272613a96d2873 | Analyze and fix the following issue in the Linux kernel code: [PATCH] softmac: fix some sparse warnings | Problem Details:
Signed-off-by: John W. Linville <linville@tuxdriver.com> | ```diff
diff --git a/net/ieee80211/softmac/ieee80211softmac_auth.c b/net/ieee80211/softmac/ieee80211softmac_auth.c
index 94cac14bc1d4..286f0718eb7e 100644
--- a/net/ieee80211/softmac/ieee80211softmac_auth.c
+++ b/net/ieee80211/softmac/ieee80211softmac_auth.c
@@ -243,7 +243,7 @@ free_aq:
/*
* Handle deauthorization
... |
0caab23e11c015559af81a4c0f4759ca05a5446a | Analyze and fix the following issue in the Linux kernel code: scsi: link in the debug driver last | Problem Details:
If the debug driver is built-in, link it in last, so that any real
drivers will probe first, rather than having the debug driver pick the
first scsi slots..
Signed-off-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: James Bottomley <James.Bottomley@S... | ```diff
diff --git a/drivers/scsi/Makefile b/drivers/scsi/Makefile
index 15dc2e00e1b2..e513c3158ad9 100644
--- a/drivers/scsi/Makefile
+++ b/drivers/scsi/Makefile
@@ -117,7 +117,6 @@ obj-$(CONFIG_SCSI_PPA) += ppa.o
obj-$(CONFIG_SCSI_IMM) += imm.o
obj-$(CONFIG_JAZZ_ESP) += NCR53C9x.o jazz_esp.o
obj-$(CONFIG_SUN3X_... |
6a6bbd29a0284c1b9d33c324ba85f3ebb5509589 | Analyze and fix the following issue in the Linux kernel code: [PATCH] Use of uninitialized variable in drivers/net/depca.c | Problem Details:
hi,
this fixes coverity bug #888, where the variable
dev is used uninitialized. I assume the programmer
meant to use mdev, which is initialized.
Compile tested only.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org> | ```diff
diff --git a/drivers/net/depca.c b/drivers/net/depca.c
index 03804cc38be0..0941d40f046f 100644
--- a/drivers/net/depca.c
+++ b/drivers/net/depca.c
@@ -1412,7 +1412,7 @@ static int __init depca_mca_probe(struct device *device)
irq = 11;
break;
default:
- printk("%s: mca_probe IRQ error. You should neve... |
5185c7c20a4b88892f868ad8d92d1b640b1edba9 | Analyze and fix the following issue in the Linux kernel code: [PATCH] Use after free in net/tulip/de2104x.c | Problem Details:
hi,
this fixes coverity bug #912, where skb is freed first,
and dereferenced a few lines later with skb->len.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org> | ```diff
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c
index 6299e186c73f..e3dd144d326b 100644
--- a/drivers/net/tulip/de2104x.c
+++ b/drivers/net/tulip/de2104x.c
@@ -1327,11 +1327,11 @@ static void de_clean_rings (struct de_private *de)
struct sk_buff *skb = de->tx_skb[i].skb;
if ((skb) &... |
95f6b5a1e38e26dc313e283e1e6058d3ffff517d | Analyze and fix the following issue in the Linux kernel code: [PATCH] s390: qeth driver statistics fixes | Problem Details:
[patch 2/6] s390: qeth driver statistics fixes
From: Ursula Braun <braunu@de.ibm.com>
- display "unsigned int" values in /proc/qeth_perf with %u instead of %i
- omit qdio header length when increasing card->stats.tx_bytes
Signed-off-by: Frank Pavlic <fpavlic@de.ibm.com>
diffstat:
qeth_main.c | ... | ```diff
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c
index dba7f7f02e79..634c3958f426 100644
--- a/drivers/s390/net/qeth_main.c
+++ b/drivers/s390/net/qeth_main.c
@@ -4419,6 +4419,7 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb)
int elements_needed = 0;
enum qeth_large_... |
c2d3d4b938d1a8df4fd4db73427009dfb9e8b225 | Analyze and fix the following issue in the Linux kernel code: [PATCH] AMD Au1xx0: fix Ethernet TX stats | Problem Details:
With Au1xx0 Ethernet driver, TX bytes/packets always remain zero. The
problem seems to be that when packet has been transmitted, the length word
in DMA buffer is zero.
The patch updates the TX stats when a buffer is fed to DMA. The initial
2.4 patch was posted to linux-mips@linux-mips.org by Thomas ... | ```diff
diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c
index cd0b1dccfb61..1363083b4d83 100644
--- a/drivers/net/au1000_eth.c
+++ b/drivers/net/au1000_eth.c
@@ -90,8 +90,6 @@ static void au1000_tx_timeout(struct net_device *);
static int au1000_set_config(struct net_device *dev, struct ifmap *map);
... |
d97381702d3a2f917cfe935fbca1e850a37b984b | Analyze and fix the following issue in the Linux kernel code: [PATCH] fix spidernet build issue | Problem Details:
<unchangelogged>
Signed-off-by: Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org> | ```diff
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 00e72b12fb92..b90468aea077 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -58,8 +58,8 @@ obj-$(CONFIG_STNIC) += stnic.o 8390.o
obj-$(CONFIG_FEALNX) += fealnx.o
obj-$(CONFIG_TIGON3) += tg3.o
obj-$(CONFIG_BNX2) += bnx2.o
-spidernet... |
09c7ad79dc62c499bb03d1ee92f838db2fc776c5 | Analyze and fix the following issue in the Linux kernel code: [PATCH] libata: Fix a drive detection problem | Problem Details:
The current code follows the spec but uses an overlong delay. This would
be great if the hardware did. Several vendors however forget the D7
pulldown. Fortunately 0xFF isnt a sane reset state so we can use it to
skip detection as is done in drivers/ide. (ie this is a tested solution
over a long time)
... | ```diff
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 5d00bb721e23..477afb4a9255 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -2001,9 +2001,19 @@ static unsigned int ata_bus_softreset(struct ata_port *ap,
* status is checked. Because waiting for "a while" ... |
d903cea3811994d4c4122a0e3ca6d3a197e812e2 | Analyze and fix the following issue in the Linux kernel code: [IA64] Ignore disabled Local SAPIC Affinity Structure in SRAT | Problem Details:
According to the ACPI spec, the OSPM must ignore the contents of the
Processor Local APIC/SAPIC Affinity Structure in System Resource
Affinity Table (SRAT), if its enable flag is cleared. However, ia64
linux refers all of the Processor Local APIC/SAPIC Affinity Structures
in SRAT regardless of the enab... | ```diff
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index 4722ec51c70c..24fe7c81e108 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -443,6 +443,9 @@ void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
void __init
acpi_numa_processor_affinity_init(struct acpi_table_p... |
2332c9ae7911618575241e0c843cd686968db8e3 | Analyze and fix the following issue in the Linux kernel code: [IA64] fix ia64 is_hugepage_only_range | Problem Details:
fix is_hugepage_only_range() definition to be "overlaps"
instead of "within architectural restricted hugetlb address
range". Simplify the ia64 specific code that used to use
is_hugepage_only_range() to just check which region the
address is in.
Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
Signe... | ```diff
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c
index 9dbc7dadd165..8d506710fdbd 100644
--- a/arch/ia64/mm/hugetlbpage.c
+++ b/arch/ia64/mm/hugetlbpage.c
@@ -113,8 +113,7 @@ void hugetlb_free_pgd_range(struct mmu_gather **tlb,
unsigned long floor, unsigned long ceiling)
{
/*
- * Thi... |
6a534ee35cfd02f60e99d301b9ac446ea11a9cfd | Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: Fix undefined references to get_h225_addr | Problem Details:
get_h225_addr is exported, but declared static, which fails when
linking statically.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/ipv4/netfilter/ip_conntrack_helper_h323.c b/net/ipv4/netfilter/ip_conntrack_helper_h323.c
index 20da6730b860..daeb1395faa4 100644
--- a/net/ipv4/netfilter/ip_conntrack_helper_h323.c
+++ b/net/ipv4/netfilter/ip_conntrack_helper_h323.c
@@ -639,8 +639,8 @@ void ip_conntrack_h245_expect(struct ip_c... |
1e30a014e311e627b91489ff5ec1b54496d308af | Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: futher {ip,ip6,arp}_tables unification | Problem Details:
This patch moves {ip,ip6,arp}t_entry_{match,target} definitions to
x_tables.h. This move simplifies code and future compatibility fixes.
Signed-off-by: Dmitry Mishin <dim@openvz.org>
Acked-off-by: Kirill Korotaev <dev@openvz.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S.... | ```diff
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h
index bf71efb63007..1350e47b0234 100644
--- a/include/linux/netfilter/x_tables.h
+++ b/include/linux/netfilter/x_tables.h
@@ -4,6 +4,62 @@
#define XT_FUNCTION_MAXNAMELEN 30
#define XT_TABLE_MAXNAMELEN 32
+struct xt_entry_ma... |
81fbfd6925c064b764cb0536aed9232c7b48f6df | Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: Fix xt_policy address matching | Problem Details:
Fix missing inversion in address matching, it was broken during the
conversion to x_tables.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/netfilter/xt_policy.c b/net/netfilter/xt_policy.c
index d57a611ae0d3..1099cb005fcc 100644
--- a/net/netfilter/xt_policy.c
+++ b/net/netfilter/xt_policy.c
@@ -27,9 +27,9 @@ xt_addr_cmp(const union xt_policy_addr *a1, const union xt_policy_addr *m,
{
switch (family) {
case AF_INET:
- return... |
f0d835835ba30686dc085e98c8eeac0b9c26e3b2 | Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: nfnetlink_queue: fix nfnetlink message size | Problem Details:
Fix oversized message, use NLMSG_SPACE just one since it reserves space
for the netlink header and NFA_SPACE for every attribute.
Thanks to Harald Welte for the feedback
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Mil... | ```diff
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c
index 2cf5fb8322c4..b5701662182e 100644
--- a/net/netfilter/nfnetlink_queue.c
+++ b/net/netfilter/nfnetlink_queue.c
@@ -354,16 +354,17 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue,
QDEBUG("entered\n");
/* all macr... |
1cde64365b0c4f576f8f45b834e6a6de081b5914 | Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: ctnetlink: Fix expectaction mask dumping | Problem Details:
The expectation mask has some particularities that requires a different
handling. The protocol number fields can be set to non-valid protocols,
ie. l3num is set to 0xFFFF. Since that protocol does not exist, the mask
tuple will not be dumped. Moreover, this results in a kernel panic when
nf_conntrack a... | ```diff
diff --git a/net/ipv4/netfilter/ip_conntrack_netlink.c b/net/ipv4/netfilter/ip_conntrack_netlink.c
index 5ce2e3fc2c7f..9b6e19bae90f 100644
--- a/net/ipv4/netfilter/ip_conntrack_netlink.c
+++ b/net/ipv4/netfilter/ip_conntrack_netlink.c
@@ -4,7 +4,7 @@
* (C) 2001 by Jay Schulist <jschlst@samba.org>
* (C) 2002... |
50b521aa54f415a626bfd63d1a9b72120e9fbe88 | Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: Fix Kconfig typos | Problem Details:
Signed-off-by: Thomas Vgtle <tv@lio96.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
index 174027809148..332acb37b385 100644
--- a/net/netfilter/Kconfig
+++ b/net/netfilter/Kconfig
@@ -11,7 +11,7 @@ config NETFILTER_NETLINK_QUEUE
tristate "Netfilter NFQUEUE over NFNETLINK interface"
depends on NETFILTER_NETLINK
help
- If this op... |
443da0d52766ef8ed50b59673ac7ea6aa6e9218c | Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: Fix ip6tables breakage from {get,set}sockopt compat layer | Problem Details:
do_ipv6_getsockopt returns -EINVAL for unknown options, not
-ENOPROTOOPT as do_ipv6_setsockopt.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index 602feec47738..4c20eeb3d568 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -907,7 +907,7 @@ int ipv6_getsockopt(struct sock *sk, int level, int optname,
err = do_ipv6_getsockopt(sk, level, optname, optval, optlen);
... |
3a2916aa289504d694072a98876d23ca31d6401e | Analyze and fix the following issue in the Linux kernel code: [ARM] 3389/1: typo and grammar fix | Problem Details:
Patch from Erik Hovland
I found a typo and what seems to be a run-on sentence in
arch/arm/common/dmabounce.c
This patch corrects both.
Signed-off-by: Erik Hovland <erik@hovland.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ```diff
diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c
index ad6c89a555bb..7971d0dc6892 100644
--- a/arch/arm/common/dmabounce.c
+++ b/arch/arm/common/dmabounce.c
@@ -5,7 +5,7 @@
* limited DMA windows. These functions utilize bounce buffers to
* copy data to/from buffers located outside th... |
39806805de0314d5847bfd6d046ad7d4407ccd46 | Analyze and fix the following issue in the Linux kernel code: [ARM] 3384/1: AT91RM9200: Timer | Problem Details:
Patch from Andrew Victor
If the timer interrupt is ever significantly delayed (or after the
system was suspended), the system could spin incrementing the time for
too long.
The fix is to replace the "do {} while" with a "while {}".
Orignal patch by Savin Zlobec and Peter Menzebach.
Signed-off-by: An... | ```diff
diff --git a/arch/arm/mach-at91rm9200/time.c b/arch/arm/mach-at91rm9200/time.c
index 1b6dd2deeb22..7ffcf443b99f 100644
--- a/arch/arm/mach-at91rm9200/time.c
+++ b/arch/arm/mach-at91rm9200/time.c
@@ -71,11 +71,11 @@ static irqreturn_t at91rm9200_timer_interrupt(int irq, void *dev_id, struct pt_r
if (at91_sys_r... |
a04f2d9d3a08002a7712f18fcec43e2c4151d953 | Analyze and fix the following issue in the Linux kernel code: [ARM] 3381/1: ixp2000: fix slowport write timing control register fields | Problem Details:
Patch from Lennert Buytenhek
The original version of the chip docs had the PW and SU fields in
the slowport write timing control register accidentally reversed.
This is mentioned in the errata (documentation change #4) and fixed
in newer docs.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>... | ```diff
diff --git a/include/asm-arm/arch-ixp2000/ixp2000-regs.h b/include/asm-arm/arch-ixp2000/ixp2000-regs.h
index 2b57f91b4ebd..ccae4bec92c5 100644
--- a/include/asm-arm/arch-ixp2000/ixp2000-regs.h
+++ b/include/asm-arm/arch-ixp2000/ixp2000-regs.h
@@ -353,8 +353,8 @@
* Masks and shifts for various fields in the WT... |
e99053e07514e514611167ad648c65c87982c4d9 | Analyze and fix the following issue in the Linux kernel code: [ARM] 3379/1: ixp2000: use generic 8250 debug macros | Problem Details:
Patch from Lennert Buytenhek
The xscale UART in the ixp2000 is basically just an 8250 UART (with
some extra bits and pieces), so we can use the generic 8250 debug
macros on the ixp2000.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ```diff
diff --git a/include/asm-arm/arch-ixp2000/debug-macro.S b/include/asm-arm/arch-ixp2000/debug-macro.S
index 5631e0889861..bc8b39654793 100644
--- a/include/asm-arm/arch-ixp2000/debug-macro.S
+++ b/include/asm-arm/arch-ixp2000/debug-macro.S
@@ -23,18 +23,5 @@
#endif
.endm
- .macro senduart,rd,rx
- strb \r... |
bd115ea007e671e96b8b53c2e0e885103d39fd40 | Analyze and fix the following issue in the Linux kernel code: [ARM] 3378/1: ixp2000: fix gpio interrupt handling | Problem Details:
Patch from Lennert Buytenhek
ixp2000 used to initially mark GPIO interrupts as invalid, and not
mark them valid until set_irq_type() was called, but this doesn't
work if you want to use request_irq() with the SA_TRIGGER_* flags.
So, just mark the GPIO interrupts valid from the beginning. We
configur... | ```diff
diff --git a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c
index cfd5bef3190b..6e8d504aca55 100644
--- a/arch/arm/mach-ixp2000/core.c
+++ b/arch/arm/mach-ixp2000/core.c
@@ -288,8 +288,6 @@ void gpio_line_config(int line, int direction)
local_irq_save(flags);
if (direction == GPIO_OUT) {
- i... |
edb20fb5be2ff6943920aca4ccab0f4fdacddb9c | Analyze and fix the following issue in the Linux kernel code: [PATCH] SELinux: fix hard link count for selinuxfs root directory | Problem Details:
A further fix is needed for selinuxfs link count management, to ensure that
the count is correct for the parent directory when a subdirectory is
created. This is only required for the root directory currently, but the
code has been updated for the general case.
Signed-off-by: James Morris <jmorris@na... | ```diff
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
index f321c0c49f46..f5d78365488f 100644
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
@@ -1166,12 +1166,12 @@ out:
return ret;
}
-static int sel_make_dir(struct super_block *sb, struct dentry *dentry)
+static i... |
d6aafa65354cd2dbb089ab9e7dc618f22230fe32 | Analyze and fix the following issue in the Linux kernel code: [PATCH] selinuxfs cleanups: sel_make_avc_files | Problem Details:
Fix copy & paste error in sel_make_avc_files(), removing a supurious call to
d_genocide() in the error path. All of this will be cleaned up by
kill_litter_super().
Signed-off-by: James Morris <jmorris@namei.org>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Andrew Morton <akpm@osdl.org... | ```diff
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
index ab7c9935c29a..f321c0c49f46 100644
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
@@ -1151,22 +1151,19 @@ static int sel_make_avc_files(struct dentry *dir)
dentry = d_alloc_name(dir, files[i].name);
if (!d... |
40e906f8224966ef65756cc75f9999ea2de0523d | Analyze and fix the following issue in the Linux kernel code: [PATCH] selinuxfs cleanups: fix hard link count | Problem Details:
Fix the hard link count for selinuxfs directories, which are currently one
short.
Signed-off-by: James Morris <jmorris@namei.org>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
index cc782083d71f..4f7cda67ac0a 100644
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
@@ -1181,6 +1181,8 @@ static int sel_make_dir(struct super_block *sb, struct dentry *dentry)
}
inode->i_op = &simple_dir_inod... |
8aad38752e81d1d4de67e3d8e2524618ce7c9276 | Analyze and fix the following issue in the Linux kernel code: [PATCH] selinux: Disable automatic labeling of new inodes when no policy is loaded | Problem Details:
This patch disables the automatic labeling of new inodes on disk
when no policy is loaded.
Discussion is here:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=180296
In short, we're changing the behavior so that when no policy is loaded,
SELinux does not label files at all. Currently it does ad... | ```diff
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 5b16196f2823..9ff51c668f06 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -1957,7 +1957,7 @@ static int selinux_inode_init_security(struct inode *inode, struct inode *dir,
inode_security_set_sid(inode, newsid);
... |
442295c94bf650221af3ef20fc68fa3e93876818 | Analyze and fix the following issue in the Linux kernel code: [PATCH] mm: slab cache interleave rotor fix | Problem Details:
The alien cache rotor in mm/slab.c assumes that the first online node is
node 0. Eventually for some archs, especially with hotplug, this will no
longer be true.
Fix the interleave rotor to handle the general case of node numbering.
Signed-off-by: Paul Jackson <pj@sgi.com>
Acked-by: Christoph Lamete... | ```diff
diff --git a/mm/slab.c b/mm/slab.c
index 6b691ecbac44..1c8f5ee230d5 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -830,7 +830,7 @@ static void init_reap_node(int cpu)
node = next_node(cpu_to_node(cpu), node_online_map);
if (node == MAX_NUMNODES)
- node = 0;
+ node = first_node(node_online_map);
__get_cp... |
fdb7cc59084ba7eef935e4e40aaaf538ee34c625 | Analyze and fix the following issue in the Linux kernel code: [PATCH] mm: hugetlb alloc_fresh_huge_page bogus node loop fix | Problem Details:
Fix bogus node loop in hugetlb.c alloc_fresh_huge_page(), which was
assuming that nodes are numbered contiguously from 0 to num_online_nodes().
Once the hotplug folks get this far, that will be false.
Signed-off-by: Paul Jackson <pj@sgi.com>
Acked-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by... | ```diff
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 06699d871a8e..ebad6bbb3501 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -105,7 +105,9 @@ static int alloc_fresh_huge_page(void)
struct page *page;
page = alloc_pages_node(nid, GFP_HIGHUSER|__GFP_COMP|__GFP_NOWARN,
HUGETLB_PAGE_ORDER);
- nid = (nid + 1)... |
9b65ef59d42a56fa1358958ede77aaa5bac385a8 | Analyze and fix the following issue in the Linux kernel code: [PATCH] fix swap cluster offset | Problem Details:
When we've allocated SWAPFILE_CLUSTER pages, ->cluster_next should be the
first index of swap cluster. But current code probably sets it wrong offset.
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Acked-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-... | ```diff
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 1f9cf0d073b8..365ed6ff182d 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -116,7 +116,7 @@ static inline unsigned long scan_swap_map(struct swap_info_struct *si)
last_in_cluster = offset + SWAPFILE_CLUSTER;
else if (offset == last_in_cluster) {
s... |
879336c3930ae9273ea1c45214cb8adae0ce494a | Analyze and fix the following issue in the Linux kernel code: [PATCH] drain_node_pages: interrupt latency reduction / optimization | Problem Details:
1. Only disable interrupts if there is actually something to free
2. Only dirty the pcp cacheline if we actually freed something.
3. Disable interrupts for each single pcp and not for cleaning
all the pcps in all zones of a node.
drain_node_pages is called every 2 seconds from cache_reap. This
fix... | ```diff
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index ed91684cb1f5..b7f14a4799a5 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -603,13 +603,14 @@ static int rmqueue_bulk(struct zone *zone, unsigned int order,
/*
* Called from the slab reaper to drain pagesets on a particular node that
* belong to th... |
b18e7e654d7af741d2bf34a90dc34128d0217fea | Analyze and fix the following issue in the Linux kernel code: [PATCH] slab: fix drain_array() so that it works correctly with the shared_array | Problem Details:
The list_lock also protects the shared array and we call drain_array() with
the shared array. Therefore we cannot go as far as I wanted to but have to
take the lock in a way so that it also protects the array_cache in
drain_pages.
(Note: maybe we should make the array_cache locking more consistent? ... | ```diff
diff --git a/mm/slab.c b/mm/slab.c
index 3274144c0d16..6b691ecbac44 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3521,7 +3521,8 @@ static void enable_cpucache(struct kmem_cache *cachep)
/*
* Drain an array if it contains any elements taking the l3 lock only if
- * necessary.
+ * necessary. Note that the l3 l... |
4866920b93fd7d5b520278c3c76e6f4d5a352d81 | Analyze and fix the following issue in the Linux kernel code: [PATCH] hugepage: Fix hugepage logic in free_pgtables() harder | Problem Details:
Turns out the hugepage logic in free_pgtables() was doubly broken. The
loop coalescing multiple normal page VMAs into one call to free_pgd_range()
had an off by one error, which could mean it would coalesce one hugepage
VMA into the same bundle (checking 'vma' not 'next' in the loop). I
transferred t... | ```diff
diff --git a/mm/memory.c b/mm/memory.c
index f6e3be9cbf5a..80c3fb370f91 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -285,7 +285,7 @@ void free_pgtables(struct mmu_gather **tlb, struct vm_area_struct *vma,
* Optimization: gather nearby vmas into one call down
*/
while (next && next->vm_start <= v... |
9da61aef0fd5b17dd4bf4baf33db12c470def774 | Analyze and fix the following issue in the Linux kernel code: [PATCH] hugepage: Fix hugepage logic in free_pgtables() | Problem Details:
free_pgtables() has special logic to call hugetlb_free_pgd_range() instead
of the normal free_pgd_range() on hugepage VMAs. However, the test it uses
to do so is incorrect: it calls is_hugepage_only_range on a hugepage sized
range at the start of the vma. is_hugepage_only_range() will return true
if ... | ```diff
diff --git a/include/asm-ia64/page.h b/include/asm-ia64/page.h
index 5e6362a786b7..732cf3086741 100644
--- a/include/asm-ia64/page.h
+++ b/include/asm-ia64/page.h
@@ -57,6 +57,7 @@
# define HAVE_ARCH_HUGETLB_UNMAPPED_AREA
# define ARCH_HAS_HUGEPAGE_ONLY_RANGE
+# define ARCH_HAS_HUGETLB_FREE_PGD_RANGE
#endi... |
3935baa9bcda3ccaee4f7849f5157d316e34412e | Analyze and fix the following issue in the Linux kernel code: [PATCH] hugepage: serialize hugepage allocation and instantiation | Problem Details:
Currently, no lock or mutex is held between allocating a hugepage and
inserting it into the pagetables / page cache. When we do go to insert the
page into pagetables or page cache, we recheck and may free the newly
allocated hugepage. However, since the number of hugepages in the system
is strictly l... | ```diff
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 41b1038f76da..d5987a87bbe5 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -13,6 +13,7 @@
#include <linux/pagemap.h>
#include <linux/mempolicy.h>
#include <linux/cpuset.h>
+#include <linux/mutex.h>
#include <asm/page.h>
#include <asm/pgtable.h>
@@ -26,6 +27,... |
79ac6ba40eb8d70f0d204e98ae9b63280ad1018c | Analyze and fix the following issue in the Linux kernel code: [PATCH] hugepage: Small fixes to hugepage clear/copy path | Problem Details:
Move the loops used in mm/hugetlb.c to clear and copy hugepages to their
own functions for clarity. As we do so, we add some checks of need_resched
- we are, after all copying megabytes of memory here. We also add
might_sleep() accordingly. We generally dropped locks around the clear and
copy, alrea... | ```diff
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 783098f6cf8e..41b1038f76da 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -27,6 +27,29 @@ static struct list_head hugepage_freelists[MAX_NUMNODES];
static unsigned int nr_huge_pages_node[MAX_NUMNODES];
static unsigned int free_huge_pages_node[MAX_NUMNODES];
+s... |
8f860591ffb29738cf5539b6fbf27f50dcdeb380 | Analyze and fix the following issue in the Linux kernel code: [PATCH] Enable mprotect on huge pages | Problem Details:
2.6.16-rc3 uses hugetlb on-demand paging, but it doesn_t support hugetlb
mprotect.
From: David Gibson <david@gibson.dropbear.id.au>
Remove a test from the mprotect() path which checks that the mprotect()ed
range on a hugepage VMA is hugepage aligned (yes, really, the sense of
is_aligned_hugepag... | ```diff
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h
index 088a945bf26b..ee056c41a9fb 100644
--- a/include/asm-i386/pgtable.h
+++ b/include/asm-i386/pgtable.h
@@ -219,13 +219,12 @@ extern unsigned long pg0[];
* The following only work if pte_present() is true.
* Undefined behaviour if not..
... |
aed75ff3caafce404d9be7f0c088716375be5279 | Analyze and fix the following issue in the Linux kernel code: [PATCH] readahead: fix initial window size calculation | Problem Details:
The current current get_init_ra_size is not optimal across different IO
sizes and max_readahead values. Here is a quick summary of sizes computed
under current design and under the attached patch. All of these assume 1st
IO at offset 0, or 1st detected sequential IO.
32k max, 4k request
old ... | ```diff
diff --git a/mm/readahead.c b/mm/readahead.c
index 57557e294987..301b36c4a0ce 100644
--- a/mm/readahead.c
+++ b/mm/readahead.c
@@ -83,10 +83,10 @@ static unsigned long get_init_ra_size(unsigned long size, unsigned long max)
{
unsigned long newsize = roundup_pow_of_two(size);
- if (newsize <= max / 64)
- n... |
6e5ef1a96e6e3b123da56292bc35017c8c401491 | Analyze and fix the following issue in the Linux kernel code: [PATCH] vmscan: emove obsolete checks from shrink_list() and fix unlikely in refill_inactive_zone() | Problem Details:
As suggested by Marcelo:
1. The optimization introduced recently for not calling
page_referenced() during zone reclaim makes two additional checks in
shrink_list unnecessary.
2. The if (unlikely(sc->may_swap)) in refill_inactive_zone is optimized
for the zone_reclaim case. However, most peo... | ```diff
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 3914a94aa905..f713e9f6ac73 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -460,12 +460,9 @@ static unsigned long shrink_page_list(struct list_head *page_list,
* Anonymous process memory has backing store?
* Try to allocate it some swap space here.
*/
- if... |
6626c5d53bc45c59798628677ba5606f02e371f3 | Analyze and fix the following issue in the Linux kernel code: [PATCH] mm: prep_zero_page() in irq is a bug | Problem Details:
prep_zero_page() uses KM_USER0 and hence may not be used from IRQ context, at
least for highmem pages.
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Christoph Lameter <christoph@lameter.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index bdff85899638..ed91684cb1f5 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -217,6 +217,11 @@ static inline void prep_zero_page(struct page *page, int order, gfp_t gfp_flags)
int i;
BUG_ON((gfp_flags & (__GFP_WAIT | __GFP_HIGHMEM)) == __GFP_HIGHMEM... |
f9aed0e2537174b95908f48b6052ae37196c9390 | Analyze and fix the following issue in the Linux kernel code: [PATCH] sg: use compound pages | Problem Details:
sg increments the refcount of constituent pages in its higher order memory
allocations when they are about to be mapped by userspace. This is done so
the subsequent get_page/put_page when doing the mapping and unmapping does not
free the page.
Move over to the preferred way, that is, using compound p... | ```diff
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index 5a0a19322d01..0e0ca8fc7318 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -1140,32 +1140,6 @@ sg_fasync(int fd, struct file *filp, int mode)
return (retval < 0) ? retval : 0;
}
-/* When startFinish==1 increments page counts for pages other... |
fb8d14e172a29ba5ac69a73b61196be86fdfc3e1 | Analyze and fix the following issue in the Linux kernel code: [PATCH] mm: shrink_inactive_lis() nr_scan accounting fix | Problem Details:
In shrink_inactive_list(), nr_scan is not accounted when nr_taken is 0.
But 0 pages taken does not mean 0 pages scanned.
Move the goto statement below the accounting code to fix it.
Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus To... | ```diff
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 85e95f445022..486184d2b50c 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1132,9 +1132,6 @@ static unsigned long shrink_inactive_list(unsigned long max_scan,
zone->pages_scanned += nr_scan;
spin_unlock_irq(&zone->lru_lock);
- if (nr_taken == 0)
- goto done... |
c9b02d970c385a253edb36c87643b0df706b50b4 | Analyze and fix the following issue in the Linux kernel code: [PATCH] mm: isolate_lru_pages() scan count fix | Problem Details:
In isolate_lru_pages(), *scanned reports one more scan because the scan
counter is increased one more time on exit of the while-loop.
Change the while-loop to for-loop to fix it.
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn>
Signed-off-by: Andrew Mort... | ```diff
diff --git a/mm/vmscan.c b/mm/vmscan.c
index c712b946e4ff..85e95f445022 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1074,9 +1074,9 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
{
unsigned long nr_taken = 0;
struct page *page;
- unsigned long scan = 0;
+ unsigned long scan;
- whil... |
7fb2d46d396b2491818f8e43b01049b3234e6c07 | Analyze and fix the following issue in the Linux kernel code: [PATCH] zone_reclaim: additional comments and cleanup | Problem Details:
Add some comments to explain how zone reclaim works. And it fixes the
following issues:
- PF_SWAPWRITE needs to be set for RECLAIM_SWAP to be able to write
out pages to swap. Currently RECLAIM_SWAP may not do that.
- remove setting nr_reclaimed pages after slab reclaim since the slab shrinking
c... | ```diff
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 2d5d4864de88..c712b946e4ff 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1887,6 +1887,7 @@ int zone_reclaim_interval __read_mostly = 30*HZ;
*/
static int __zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
{
+ /* Minimum pages needed in order t... |
78eef01b0fae087c5fadbd85dd4fe2918c3a015f | Analyze and fix the following issue in the Linux kernel code: [PATCH] on_each_cpu(): disable local interrupts | Problem Details:
When on_each_cpu() runs the callback on other CPUs, it runs with local
interrupts disabled. So we should run the function with local interrupts
disabled on this CPU, too.
And do the same for UP, so the callback is run in the same environment on both
UP and SMP. (strictly it should do preempt_disable... | ```diff
diff --git a/arch/i386/kernel/smp.c b/arch/i386/kernel/smp.c
index 218d725a5a1e..d134e9643a58 100644
--- a/arch/i386/kernel/smp.c
+++ b/arch/i386/kernel/smp.c
@@ -504,27 +504,23 @@ void unlock_ipi_call_lock(void)
spin_unlock_irq(&call_lock);
}
-static struct call_data_struct * call_data;
-
-/*
- * this fun... |
ac2b898ca6fb06196a26869c23b66afe7944e52e | Analyze and fix the following issue in the Linux kernel code: [PATCH] slab: Remove SLAB_NO_REAP option | Problem Details:
SLAB_NO_REAP is documented as an option that will cause this slab not to be
reaped under memory pressure. However, that is not what happens. The only
thing that SLAB_NO_REAP controls at the moment is the reclaim of the unused
slab elements that were allocated in batch in cache_reap(). Cache_reap()
i... | ```diff
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c
index ff79e68b347c..7b82ff090d42 100644
--- a/drivers/scsi/iscsi_tcp.c
+++ b/drivers/scsi/iscsi_tcp.c
@@ -3639,7 +3639,7 @@ iscsi_tcp_init(void)
taskcache = kmem_cache_create("iscsi_taskcache",
sizeof(struct iscsi_data_task), 0,
- SLAB_H... |
911851e6ee6ac4e26f07be342a89632f78494fef | Analyze and fix the following issue in the Linux kernel code: [PATCH] slab: fix kernel-doc warnings | Problem Details:
Fix kernel-doc warnings in mm/slab.c.
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org> | ```diff
diff --git a/mm/slab.c b/mm/slab.c
index 2cd80203984b..5c2574989834 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1615,8 +1615,12 @@ static void check_poison_obj(struct kmem_cache *cachep, void *objp)
#if DEBUG
/**
- * slab_destroy_objs - call the registered destructor for each object in
- * a slab that i... |
b50ec7d8070ae7a39fe78e65a8812bbc3ca2f7ac | Analyze and fix the following issue in the Linux kernel code: [PATCH] kcalloc(): INT_MAX -> ULONG_MAX | Problem Details:
Since size_t has the same size as a long on all architectures, it's enough
for overflow checks to check against ULONG_MAX.
This change could allow a compiler better optimization (especially in the
n=1 case).
The practical effect seems to be positive, but quite small:
text data bss ... | ```diff
diff --git a/include/linux/slab.h b/include/linux/slab.h
index 8cf52939d0ab..38bed95dda7a 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -118,7 +118,7 @@ extern void *kzalloc(size_t, gfp_t);
*/
static inline void *kcalloc(size_t n, size_t size, gfp_t flags)
{
- if (n != 0 && size > INT_MAX ... |
8e7a9aae91101916b86de07fafe3272ea8dc1f10 | Analyze and fix the following issue in the Linux kernel code: [PATCH] xtensa: pgtable fixes | Problem Details:
- Don't return uninitialised stack values in case of allocation failure
- Don't bother clearing PageCompound because __GFP_COMP wasn't specified
Increment over the pte page rather than one pte entry in
pte_alloc_one_kernel
- Actually increment the page pointer in pte_alloc_one
- Compile fixes, t... | ```diff
diff --git a/arch/xtensa/mm/pgtable.c b/arch/xtensa/mm/pgtable.c
index e5e119c820e4..cbc56aedf13e 100644
--- a/arch/xtensa/mm/pgtable.c
+++ b/arch/xtensa/mm/pgtable.c
@@ -14,7 +14,7 @@
pte_t* pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
{
- pte_t *pte, p;
+ pte_t *pte = NULL, *p;
int ... |
83485f826bea154a0ab41e9b8689105531dd7cb2 | Analyze and fix the following issue in the Linux kernel code: [PATCH] serial: serial_txx9 driver update | Problem Details:
Update the serial_txx9 driver.
* More strict check in verify_port. Cleanup.
* Do not insert a char caused previous overrun.
* Fix some spin_locks.
* Do not call uart_add_one_port for absent ports.
Also, this patch removes a BROKEN tag from Kconfig. This driver has been
marked as BROKEN by remov... | ```diff
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index 89e5413cc2a3..c66ef96c71b4 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -866,7 +866,7 @@ config SERIAL_M32R_PLDSIO
config SERIAL_TXX9
bool "TMPTX39XX/49XX SIO support"
- depends HAS_TXX9_SERIAL && BROKEN
+ depends HAS... |
d2044a94e80b61f68ee7456f82d9b443e9ff6ac7 | Analyze and fix the following issue in the Linux kernel code: [PATCH] dm: bio split bvec fix | Problem Details:
The code that handles bios that span table target boundaries by breaking
them up into smaller bios will not split an individual struct bio_vec into
more than two pieces. Sometimes more than that are required.
This patch adds a loop to break the second piece up into as many pieces as
are necessary.
C... | ```diff
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 88d60202b9db..26b08ee425c7 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -533,30 +533,35 @@ static void __clone_and_map(struct clone_info *ci)
} else {
/*
- * Create two copy bios to deal with io that has
- * been split across a target.
+ ... |
b40607fc02f8248828d52d88f91b7d68df1933b0 | Analyze and fix the following issue in the Linux kernel code: [PATCH] __get_page_state() cpumask cleanup and fix | Problem Details:
__get_page_state() has an open-coded for_each_cpu_mask() loop in it.
Tidy that up, then notice that the code was buggy:
while (cpu < NR_CPUS) {
unsigned long *in, *out, off;
if (!cpu_isset(cpu, *cpumask))
continue;
an obvious infinite loop. I guess we just never call it with a holey cpu
ma... | ```diff
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 234bd4895d14..61775866ea18 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1214,24 +1214,22 @@ DEFINE_PER_CPU(long, nr_pagecache_local) = 0;
static void __get_page_state(struct page_state *ret, int nr, cpumask_t *cpumask)
{
- int cpu = 0;
+ unsigne... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.