id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
baed16a7ff5194487764db300c2753ac7409c4c5
Analyze and fix the following issue in the Linux kernel code: [AX.25]: Make asc2ax() thread-proof
Problem Details: Asc2ax was still using a static buffer for all invocations which isn't exactly SMP-safe. Change asc2ax to take an additional result buffer as the argument. Change all callers to provide such a buffer. This one only really is a fix for ROSE and as per recent discussions there's still much more to fix...
```diff diff --git a/include/net/ax25.h b/include/net/ax25.h index 364b046e9f47..227d3378decd 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h @@ -258,7 +258,7 @@ extern struct sock *ax25_make_new(struct sock *, struct ax25_dev *); /* ax25_addr.c */ extern ax25_address null_ax25_address; extern char *ax2asc(...
3a93481589dc80d9ff9082731f35031b0345442e
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: ip_conntrack_netbios_ns.c gcc-2.95.x build fix
Problem Details: gcc-2.95.x can't do this sort of initialisation Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/netfilter/ip_conntrack_netbios_ns.c b/net/ipv4/netfilter/ip_conntrack_netbios_ns.c index 2b5cf9c51309..bb7246683b74 100644 --- a/net/ipv4/netfilter/ip_conntrack_netbios_ns.c +++ b/net/ipv4/netfilter/ip_conntrack_netbios_ns.c @@ -104,12 +104,28 @@ out: static struct ip_conntrack_helper hel...
ce723d8e048ef98ea64d12379e3921c933f5b3e0
Analyze and fix the following issue in the Linux kernel code: [IPV4]: Fix refcount damaging in net/ipv4/route.c
Problem Details: One such place that can damage the dst refcnts is route.c with CONFIG_IP_ROUTE_MULTIPATH_CACHED enabled, i don't see the user's .config. In this new code i see that rt_intern_hash is called before dst->refcnt is set to 1, dst is the 2nd arg to rt_intern_hash. Arg 2 of rt_intern_hash must come with ref...
```diff diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 8c0b14e3beec..8549f26e2495 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -1760,6 +1760,7 @@ static inline int __mkroute_input(struct sk_buff *skb, goto cleanup; } + atomic_set(&rth->u.dst.__refcnt, 1); rth->u.dst.flags= DST_HOST; #ifdef ...
c921e4c4dbb043f9435414c4e661e7f0a783053d
Analyze and fix the following issue in the Linux kernel code: [BNX2]: Fix bug in irq handler and add prefetch
Problem Details: Fix bug in bnx2_interrupt() that caused an unnecessary register read. The BNX2_PCICFG_MISC_STATUS should only be read when the status tag has not changed. Add prefetch of the status block in bnx2_msi() similar to tg3_msi(). The status block is not touched in bnx2_msi() and prefetching it will speed up...
```diff diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 55a72c7ad001..83598e32179c 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -14,8 +14,8 @@ #define DRV_MODULE_NAME "bnx2" #define PFX DRV_MODULE_NAME ": " -#define DRV_MODULE_VERSION "1.2.20" -#define DRV_MODULE_RELDATE "August 22, 2005"...
bbf1813fb8ff9d21171bf22e6d1f0e0393601e86
Analyze and fix the following issue in the Linux kernel code: NTFS: Fix cluster (de)allocators to work when the runlist is NULL and more
Problem Details: importantly to take a locked runlist rather than them locking it which leads to lock reversal. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
```diff diff --git a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog index b0cc43bd2974..beed90c9f551 100644 --- a/fs/ntfs/ChangeLog +++ b/fs/ntfs/ChangeLog @@ -70,6 +70,9 @@ ToDo/Notes: - Add BUG() checks to ntfs_attr_make_non_resident() and ntfs_attr_set() to ensure that these functions are never called for compressed or...
6fd60fa97b706e52abba7c9f810b148aa230817f
Analyze and fix the following issue in the Linux kernel code: [I2C] Clean up i2c-pxa debugging/printks
Problem Details: Fix up comments made by review by gregkh. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index a72d28365297..fdf53ce04248 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c @@ -60,17 +60,6 @@ struct pxa_i2c { */ #define I2C_PXA_SLAVE_ADDR 0x1 -/* - * Set this to zero to remove all debug stat...
807c453de7c5487d2e5eece76bafdea8f39d249e
Analyze and fix the following issue in the Linux kernel code: NTFS: Fix handling of sparse attributes in ntfs_attr_make_non_resident().
Problem Details: Also, add BUG() checks to ntfs_attr_make_non_resident() and ntfs_attr_set() to ensure that these functions are never called for compressed or encrypted attributes. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
```diff diff --git a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog index 1d1dcab3902c..b0cc43bd2974 100644 --- a/fs/ntfs/ChangeLog +++ b/fs/ntfs/ChangeLog @@ -66,6 +66,10 @@ ToDo/Notes: return LCN_ENOENT when there is no runlist and the allocated size is zero. - Fix load_attribute_list() to handle the case of a NULL ...
42ca89c18b75e1c4c3b02aa5589ad3aa916909a8
Analyze and fix the following issue in the Linux kernel code: [IPV6]: Need to use pskb_trim_rcsum().
Problem Details: Fix pskb_trim usage in ipv6. Only the udp one is really a bug, other places are just doing equivalent code. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index 5be6da2584ee..3b9fa900a4bf 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c @@ -459,11 +459,10 @@ static int ipv6_hop_jumbo(struct sk_buff *skb, int optoff) IP6_INC_STATS_BH(IPSTATS_MIB_INTRUNCATEDPKTS); goto drop; } - if (pkt_len + size...
2983d1bd1a596e88cdddc0c2d45b9e97728f3f41
Analyze and fix the following issue in the Linux kernel code: NTFS: Fix several bugs in fs/ntfs/attrib.c.
Problem Details: - Fix a bug in ntfs_map_runlist_nolock() where we forgot to protect access to the allocated size in the ntfs inode with the size lock. - Fix ntfs_attr_vcn_to_lcn_nolock() and ntfs_attr_find_vcn_nolock() to return LCN_ENOENT when there is no runlist and the allocated size is zero. - Fix load_attri...
```diff diff --git a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog index 29841bf82264..1d1dcab3902c 100644 --- a/fs/ntfs/ChangeLog +++ b/fs/ntfs/ChangeLog @@ -60,6 +60,12 @@ ToDo/Notes: the index context. Thanks to Yura Pakhuchiy for finding this bug. - Remove bogus setting of PageError in ntfs_read_compressed_block(). ...
d8c97d5f3aa348272df2ccb4e224b1cf9a1eb6d7
Analyze and fix the following issue in the Linux kernel code: [IA64] simplified efi memory map parsing
Problem Details: New version leaves the original memory map unmodified. Also saves any granule trimmings for use by the uncached memory allocator. Inspired by Khalid Aziz (various traces of his patch still remain). Fixes to uncached_build_memmap() and sn2 testing by Martin Hicks. Signed-off-by: Tony Luck <tony.luck@...
```diff diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c index 179f230816ed..1291db581721 100644 --- a/arch/ia64/kernel/efi.c +++ b/arch/ia64/kernel/efi.c @@ -239,57 +239,30 @@ is_available_memory (efi_memory_desc_t *md) return 0; } -/* - * Trim descriptor MD so its starts at address START_ADDR. If th...
8e08ceaeacd5d300aaad166f2eef8bfc37e09831
Analyze and fix the following issue in the Linux kernel code: NTFS: Fix a bug in fs/ntfs/index.c::ntfs_index_lookup(). When the returned
Problem Details: index entry is in the index root, we forgot to set the @ir pointer in the index context. Thanks for Yura Pakhuchiy for finding this bug. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
```diff diff --git a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog index 39dca6dced11..1168d3ed2bec 100644 --- a/fs/ntfs/ChangeLog +++ b/fs/ntfs/ChangeLog @@ -55,6 +55,9 @@ ToDo/Notes: length is zero. - Add runlist.[hc]::ntfs_rl_punch_nolock() which punches a caller specified hole into a runlist. + - Fix a bug in fs/...
2b0ada2b8e086c267dd116a39ad41ff0a717b665
Analyze and fix the following issue in the Linux kernel code: NTFS: Fix handling of valid but empty mapping pairs array in
Problem Details: fs/ntfs/runlist.c::ntfs_mapping_pairs_decompress(). Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
```diff diff --git a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog index f4c27f7c1b6a..8fe38c801166 100644 --- a/fs/ntfs/ChangeLog +++ b/fs/ntfs/ChangeLog @@ -46,6 +46,8 @@ ToDo/Notes: - Fix two nasty runlist merging bugs that had gone unnoticed so far. Thanks to Stefano Picerno for the bug report. - Remove two bogus B...
84d6ebe63f50b6efd8be252b58a207132157c60f
Analyze and fix the following issue in the Linux kernel code: NTFS: Fix two nasty runlist merging bugs that had gone unnoticed so far.
Problem Details: Thanks to Stefano Picerno for the bug report. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
```diff diff --git a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog index c5bbedff5ae5..4bc8f91c5fc0 100644 --- a/fs/ntfs/ChangeLog +++ b/fs/ntfs/ChangeLog @@ -43,6 +43,8 @@ ToDo/Notes: - Use ntfs_malloc_nofs_nofail() in the two critical regions in fs/ntfs/runlist.c::ntfs_runlists_merge(). This means we no longer nee...
8920e8f94c44e31a73bdf923b04721e26e88cadd
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix 32bit sendmsg() flaw
Problem Details: When we copy 32bit ->msg_control contents to kernel, we walk the same userland data twice without sanity checks on the second pass. Second version of this patch: the original broke with 64-bit arches running 32-bit-compat-mode executables doing sendmsg() syscalls with unaligned CMSG data areas Anothe...
```diff diff --git a/include/net/compat.h b/include/net/compat.h index 9983fd857804..482eb820f13a 100644 --- a/include/net/compat.h +++ b/include/net/compat.h @@ -33,7 +33,7 @@ extern asmlinkage long compat_sys_sendmsg(int,struct compat_msghdr __user *,unsi extern asmlinkage long compat_sys_recvmsg(int,struct compat_m...
5aa3b610a7330c3cd6f0cb264d2189a3a1dcf534
Analyze and fix the following issue in the Linux kernel code: [PATCH] ppc32: Fix head_4xx.S compile error
Problem Details: head_4xx.S wasn't compiling due to a missing #endif Signed-off-by: Kumar Gala <kumar.gala@freescale.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/arch/ppc/kernel/head_4xx.S b/arch/ppc/kernel/head_4xx.S index 0a5e723d3be6..ca9518b96c6e 100644 --- a/arch/ppc/kernel/head_4xx.S +++ b/arch/ppc/kernel/head_4xx.S @@ -453,6 +453,7 @@ label: #else CRITICAL_EXCEPTION(0x1020, WDTException, UnknownException) #endif +#endif /* 0x1100 - Data TLB Mi...
d7b6b3589471c3856f1e6dc9c77abc4af962ffdb
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix ARMv6 VIPT cache >= 32K
Problem Details: This adds the necessary changes to ensure that we flush the caches correctly with aliasing VIPT caches. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c index 191788fb18d1..b0208c992576 100644 --- a/arch/arm/mm/flush.c +++ b/arch/arm/mm/flush.c @@ -16,6 +16,58 @@ #include <asm/tlbflush.h> #ifdef CONFIG_CPU_CACHE_VIPT + +void flush_cache_mm(struct mm_struct *mm) +{ + if (cache_is_vivt()) { + if (cpu_iss...
eccdfcd6f8265300380fa14a83aeb14e69830323
Analyze and fix the following issue in the Linux kernel code: [XFS] Fix modular XFS builds (Makefile botch).
Problem Details: Signed-off-by: Nathan Scott <nathans@sgi.com>
```diff diff --git a/fs/xfs/Makefile-linux-2.6 b/fs/xfs/Makefile-linux-2.6 index fbfcbe5a7cda..8e18ff157247 100644 --- a/fs/xfs/Makefile-linux-2.6 +++ b/fs/xfs/Makefile-linux-2.6 @@ -55,7 +55,7 @@ ifeq ($(CONFIG_XFS_TRACE),y) endif obj-$(CONFIG_XFS_FS) += xfs.o -obj-$(CONFIG_XFS_QUOTA) += quota/ +xfs-$(CONFIG_XFS...
caf39e87cc1182f7dae84eefc43ca14d54c78ef9
Analyze and fix the following issue in the Linux kernel code: [SCSI] Re-do "final klist fixes"
Problem Details: With the previous commit that introduces the klist enhancements, we can now re-do 2b7d6a8cb9718fc1d9e826201b64909c44a915f4 again.
```diff diff --git a/drivers/base/attribute_container.c b/drivers/base/attribute_container.c index 6c0f49340eb2..373e7b728fa7 100644 --- a/drivers/base/attribute_container.c +++ b/drivers/base/attribute_container.c @@ -27,6 +27,21 @@ struct internal_container { struct class_device classdev; }; +static void interna...
34bb61f9ddabd7a7f909cbfb05592eb775f6662a
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix klist semantics for lists which have elements removed on traversal
Problem Details: The problem is that klists claim to provide semantics for safe traversal of lists which are being modified. The failure case is when traversal of a list causes element removal (a fairly common case). The issue is that although the list node is refcounted, if it is embedded in an object (which is univ...
```diff diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 17e96698410e..03204bfd17af 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c @@ -568,6 +568,36 @@ static void bus_remove_attrs(struct bus_type * bus) } } +static void klist_devices_get(struct klist_node *n) +{ + struct device *dev = containe...
df4edad1787bbfa3c9c10824e4f11e9f4a7ec5c6
Analyze and fix the following issue in the Linux kernel code: [SCSI] Revert "final klist fixes"
Problem Details: Revert commit 2b7d6a8cb9718fc1d9e826201b64909c44a915f4. The "fix" was known to not even compile. Duh. That's not a fix. That's just stupid. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/base/attribute_container.c b/drivers/base/attribute_container.c index 373e7b728fa7..6c0f49340eb2 100644 --- a/drivers/base/attribute_container.c +++ b/drivers/base/attribute_container.c @@ -27,21 +27,6 @@ struct internal_container { struct class_device classdev; }; -static void interna...
f2c853bca542f5ac0b036377637192a74f2091c2
Analyze and fix the following issue in the Linux kernel code: [PATCH] sata_sis: Add support for SiS182 chipset
Problem Details: This patch adds support for the SiS182 sata chipset. This is a minimalistic version of the patch from http://bugme.osdl.org/show_bug.cgi?id=4192. Basically, it add the PCI IDs and handles the change of the 2nd port adress register. Signed-Off-By: Arnaud Patard <apatard@mandriva.com> Signed-off-by: Jef...
```diff diff --git a/drivers/scsi/sata_sis.c b/drivers/scsi/sata_sis.c index 43af445b3ad2..7d1aaa99aaae 100644 --- a/drivers/scsi/sata_sis.c +++ b/drivers/scsi/sata_sis.c @@ -52,7 +52,10 @@ enum { /* PCI configuration registers */ SIS_GENCTL = 0x54, /* IDE General Control register */ SIS_SCR_BASE = 0xc0, /* sat...
f718404aa939d2ae19efda8e71f7fa79cbdf1646
Analyze and fix the following issue in the Linux kernel code: [PATCH] -Wundef fixes (hisax)
Problem Details: CARD_... in hisax are all used with #if; CARD_FN_ENTERNOW_PCI lacks define to 0 if corresponding config option is not set. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/isdn/hisax/hisax.h b/drivers/isdn/hisax/hisax.h index 6eb96cba4d29..26c545fa223b 100644 --- a/drivers/isdn/hisax/hisax.h +++ b/drivers/isdn/hisax/hisax.h @@ -1241,6 +1241,8 @@ struct IsdnCardState { #ifdef CONFIG_HISAX_ENTERNOW_PCI #define CARD_FN_ENTERNOW_PCI 1 +#else +#define CARD_FN_...
185a7a1cd79b9891e3c17abdb103ba1c98d6ca7a
Analyze and fix the following issue in the Linux kernel code: [PATCH] -Wundef fixes (ncr5380)
Problem Details: NDEBUG and NDEBUG_ABORT are almost always used as integers in NCR5380; added define to 0 if they are not defined, switched lone ifdef NDEBUG into if. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c index f8ec6fe7d858..d40ba0bd68a3 100644 --- a/drivers/scsi/NCR5380.c +++ b/drivers/scsi/NCR5380.c @@ -88,6 +88,13 @@ */ #include <scsi/scsi_dbg.h> +#ifndef NDEBUG +#define NDEBUG 0 +#endif +#ifndef NDEBUG +#define NDEBUG_ABORT 0 +#endif + #if (N...
f20badbe1207bb10a8ad5fdadc2131c94344b5d9
Analyze and fix the following issue in the Linux kernel code: [PATCH] -Wundef fixes (hamachi)
Problem Details: All uses of ADDRLEN are comparisons with 64 (it's an address width). added define to 32 (again, we only care about comparisons with 64) if not defined. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/net/hamachi.c b/drivers/net/hamachi.c index d9df1d9a5739..bc9a3bf8d560 100644 --- a/drivers/net/hamachi.c +++ b/drivers/net/hamachi.c @@ -204,6 +204,10 @@ KERN_INFO " Further modifications by Keith Underwood <keithu@parl.clemson.edu> #define RUN_AT(x) (jiffies + (x)) +#ifndef ADDRLEN...
a08b6b7968e7a6afc75e365ac31830867275abdc
Analyze and fix the following issue in the Linux kernel code: [PATCH] Kconfig fix (BLK_DEV_FD dependencies)
Problem Details: Sanitized and fixed floppy dependencies: split the messy dependencies for BLK_DEV_FD by introducing a new symbol (ARCH_MAY_HAVE_PC_FDC), making BLK_DEV_FD depend on that one and taking declarations of ARCH_MAY_HAVE_PC_FDC to arch/*/Kconfig. While we are at it, fixed several obvious cases when BLK_DEV_...
```diff diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 189d5eababa8..786491f9ceb2 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig @@ -479,6 +479,9 @@ config EISA depends on ALPHA_GENERIC || ALPHA_JENSEN || ALPHA_ALCOR || ALPHA_MIKASA || ALPHA_SABLE || ALPHA_LYNX || ALPHA_NORITAKE || ALPHA_RAWHIDE...
dc9ca2af4917ce4e545fa3eb1d845c555128cabc
Analyze and fix the following issue in the Linux kernel code: [PATCH] DVB: lgdt330x check callback fix
Problem Details: Most of the patch is whitespace cleanup, but more importantly, this patch checks to see whether a callback is set before calling it. On cx88 boards (currently the only boards using lgdt330x in 2.6.13) every callback is set. However, newer drivers currently in development leave a callback undefined, an...
```diff diff --git a/drivers/media/dvb/frontends/lgdt330x.c b/drivers/media/dvb/frontends/lgdt330x.c index 1f1cd7a8d500..7142b9c51dd2 100644 --- a/drivers/media/dvb/frontends/lgdt330x.c +++ b/drivers/media/dvb/frontends/lgdt330x.c @@ -69,8 +69,8 @@ struct lgdt330x_state }; static int i2c_write_demod_bytes (struct l...
0bb6fcc13ae4fad98e0d610458975e47be0d2203
Analyze and fix the following issue in the Linux kernel code: [PATCH] pivot_root() circular reference fix
Problem Details: Fix http://bugzilla.kernel.org/show_bug.cgi?id=4857 When pivot_root is called from an init script in an initramfs environment, it causes a circular reference in the mount tree. The cause of this is that pivot_root() is not prepared to handle pivoting an unattached mount. In an initramfs environment,...
```diff diff --git a/fs/namespace.c b/fs/namespace.c index 29b70669435c..34156260c9b6 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -1334,8 +1334,12 @@ asmlinkage long sys_pivot_root(const char __user *new_root, const char __user *p error = -EINVAL; if (user_nd.mnt->mnt_root != user_nd.dentry) goto out2; /...
deac66ae454cacf942c051b86d9232af546fb187
Analyze and fix the following issue in the Linux kernel code: [PATCH] kprobes: fix bug when probed on task and isr functions
Problem Details: This patch fixes a race condition where in system used to hang or sometime crash within minutes when kprobes are inserted on ISR routine and a task routine. The fix has been stress tested on i386, ia64, pp64 and on x86_64. To reproduce the problem insert kprobes on schedule() and do_IRQ() functions a...
```diff diff --git a/arch/i386/kernel/kprobes.c b/arch/i386/kernel/kprobes.c index e5cec32018a5..6345b430b105 100644 --- a/arch/i386/kernel/kprobes.c +++ b/arch/i386/kernel/kprobes.c @@ -177,7 +177,8 @@ static int __kprobes kprobe_handler(struct pt_regs *regs) Disarm the probe we just hit, and ignore it. */ p ...
bce0649417d6e71f6df8ab7b11103d247913b142
Analyze and fix the following issue in the Linux kernel code: [PATCH] kprobes: fix handling of simultaneous probe hit/unregister
Problem Details: This patch fixes a bug in kprobes's handling of a corner case on i386 and x86_64. On an SMP system, if one CPU unregisters a kprobe just after another CPU hits that probepoint, kprobe_handler() on the latter CPU sees that the kprobe has been unregistered, and attempts to let the CPU continue as if the...
```diff diff --git a/arch/i386/kernel/kprobes.c b/arch/i386/kernel/kprobes.c index 7fb5a6f4a563..e5cec32018a5 100644 --- a/arch/i386/kernel/kprobes.c +++ b/arch/i386/kernel/kprobes.c @@ -221,7 +221,10 @@ static int __kprobes kprobe_handler(struct pt_regs *regs) * either a probepoint or a debugger breakpoint *...
661e5a3d9958dc83d610992da85625c0ada9bb06
Analyze and fix the following issue in the Linux kernel code: [PATCH] Kprobes/IA64: fix race when break hits and kprobe not found
Problem Details: This patch addresses a potential race condition for a case where Kprobe has been removed right after another CPU has taken a break hit. The way this is addressed here is when the CPU that has taken a break hit does not find its corresponding kprobe, then we check to see if the original instruction got...
```diff diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c index 82a41ac29386..4b1bd539ec47 100644 --- a/arch/ia64/kernel/kprobes.c +++ b/arch/ia64/kernel/kprobes.c @@ -554,6 +554,38 @@ static void __kprobes prepare_ss(struct kprobe *p, struct pt_regs *regs) ia64_psr(regs)->ss = 1; } +static int ...
83005161c84efa70f3d4dc193eb1024a40b650dc
Analyze and fix the following issue in the Linux kernel code: [PATCH] kprobes-prevent-possible-race-conditions-sparc64-changes fix
Problem Details: This patch adds flags "ax" to .kprobe.text section. Signed-off-by: Prasanna S Panchamukhi <prasanna@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/arch/sparc64/mm/ultra.S b/arch/sparc64/mm/ultra.S index 78beff32b6f5..b2ee9b53227f 100644 --- a/arch/sparc64/mm/ultra.S +++ b/arch/sparc64/mm/ultra.S @@ -119,7 +119,7 @@ __spitfire_flush_tlb_mm_slow: #else #error unsupported PAGE_SIZE #endif - .section .kprobes.text + .section .kprobes.text, "ax...
05e14cb3bafabbf08216ab5566f3cd687eba9723
Analyze and fix the following issue in the Linux kernel code: [PATCH] Kprobes: prevent possible race conditions sparc64 changes
Problem Details: This patch contains the sparc64 architecture specific changes to prevent the possible race conditions. Signed-off-by: Prasanna S Panchamukhi <prasanna@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/arch/sparc64/kernel/kprobes.c b/arch/sparc64/kernel/kprobes.c index bbf11f85dab1..0d66d07c8c6e 100644 --- a/arch/sparc64/kernel/kprobes.c +++ b/arch/sparc64/kernel/kprobes.c @@ -8,6 +8,7 @@ #include <linux/kprobes.h> #include <asm/kdebug.h> #include <asm/signal.h> +#include <asm/cacheflush.h> ...
1f7ad57b75ab0fba27455c7344a6ab7aa6bd90c5
Analyze and fix the following issue in the Linux kernel code: [PATCH] Kprobes: prevent possible race conditions ia64 changes
Problem Details: This patch contains the ia64 architecture specific changes to prevent the possible race conditions. Signed-off-by: Prasanna S Panchamukhi <prasanna@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/arch/ia64/kernel/jprobes.S b/arch/ia64/kernel/jprobes.S index b7fa3ccd2b0f..2323377e3695 100644 --- a/arch/ia64/kernel/jprobes.S +++ b/arch/ia64/kernel/jprobes.S @@ -49,6 +49,7 @@ /* * void jprobe_break(void) */ + .section .kprobes.text, "ax" ENTRY(jprobe_break) break.m 0x80300 END(jpro...
bb144a85c70a65730424ad1a9dc50fef66e5cafe
Analyze and fix the following issue in the Linux kernel code: [PATCH] Kprobes: prevent possible race conditions ppc64 changes
Problem Details: This patch contains the ppc64 architecture specific changes to prevent the possible race conditions. Signed-off-by: Prasanna S Panchamukhi <prasanna@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/arch/ppc64/kernel/kprobes.c b/arch/ppc64/kernel/kprobes.c index a3d519518fb8..591e4b67b5a5 100644 --- a/arch/ppc64/kernel/kprobes.c +++ b/arch/ppc64/kernel/kprobes.c @@ -44,7 +44,7 @@ static struct kprobe *kprobe_prev; static unsigned long kprobe_status_prev, kprobe_saved_msr_prev; static struct ...
0f2fbdcbb041f9087da42f8ac2e81f2817098d2a
Analyze and fix the following issue in the Linux kernel code: [PATCH] kprobes: prevent possible race conditions x86_64 changes
Problem Details: This patch contains the x86_64 architecture specific changes to prevent the possible race conditions. Signed-off-by: Prasanna S Panchamukhi <prasanna@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S index 096d470e280f..be51dbe1f75e 100644 --- a/arch/x86_64/kernel/entry.S +++ b/arch/x86_64/kernel/entry.S @@ -784,8 +784,9 @@ ENTRY(execve) ret CFI_ENDPROC -ENTRY(page_fault) +KPROBE_ENTRY(page_fault) errorentry do_page_fault + .previo...
3d97ae5b958855ac007b6f56a0f94ab8ade09e9e
Analyze and fix the following issue in the Linux kernel code: [PATCH] kprobes: prevent possible race conditions i386 changes
Problem Details: This patch contains the i386 architecture specific changes to prevent the possible race conditions. Signed-off-by: Prasanna S Panchamukhi <prasanna@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S index abb909793efc..3aad03839660 100644 --- a/arch/i386/kernel/entry.S +++ b/arch/i386/kernel/entry.S @@ -507,7 +507,7 @@ label: \ pushl $__KERNEL_CS; \ pushl $sysenter_past_esp -ENTRY(debug) +KPROBE_ENTRY(debug) cmpl $sysenter_entr...
d0aaff9796c3310326d10da44fc0faed352a1d29
Analyze and fix the following issue in the Linux kernel code: [PATCH] Kprobes: prevent possible race conditions generic
Problem Details: There are possible race conditions if probes are placed on routines within the kprobes files and routines used by the kprobes. For example if you put probe on get_kprobe() routines, the system can hang while inserting probes on any routine such as do_fork(). Because while inserting probes on do_fork(...
```diff diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h index 450eae22c39a..886dbd116899 100644 --- a/include/asm-generic/sections.h +++ b/include/asm-generic/sections.h @@ -12,5 +12,6 @@ extern char _sextratext[] __attribute__((weak)); extern char _eextratext[] __attribute__((weak)); ext...
505db03639db34ca2c64fe7ee27190d324281f2c
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix smsc_ircc_init return value
Problem Details: I noticed a strange return value in smsc_ircc_init in drivers/net/irda/smsc_ircc2.c in rc4-mm1. When reaching the line "if (ircc_fir > 0 && ircc_sir > 0)", ret is 0. So I don't see the point of setting it to 0 in the "else" case. >From what I see in 2.6.12 it should probably be set to -ENODEV at the...
```diff diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c index 2c9d3309314c..dd89bda1f131 100644 --- a/drivers/net/irda/smsc-ircc2.c +++ b/drivers/net/irda/smsc-ircc2.c @@ -360,6 +360,7 @@ static int __init smsc_ircc_init(void) if (smsc_ircc_open(ircc_fir, ircc_sir, ircc_dma, ircc_irq)) ...
a956f4ca3ede0a77e307f504e4a98554047b44ff
Analyze and fix the following issue in the Linux kernel code: [PATCH] smsc-ircc2: drop DIM macro in favor of ARRAY_SIZE
Problem Details: IRDA: smsc-ircc2 - remove home-grown DIM macro, use ARRAY_SIZE intead. Also fix out-of-bound array access. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Cc: Jean Tourrilhes <jt@hpl.hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c index ab3ff0cd0431..a5090ddb0d0f 100644 --- a/drivers/net/irda/smsc-ircc2.c +++ b/drivers/net/irda/smsc-ircc2.c @@ -163,7 +163,6 @@ struct smsc_ircc_cb { /* Constants */ static const char *driver_name = "smsc-ircc2"; -#define DIM(x) ...
4407c2b6b297339e296facf62e020cf66e55053d
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix race in do_get_write_access()
Problem Details: attached patch should fix the following race: Proc 1 Proc 2 __flush_batch() ll_rw_block() do_get_write_access() lock_buffer jh is only waiting for checkpoint ...
```diff diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c index 77b7662b840b..c6ec66fd8766 100644 --- a/fs/jbd/transaction.c +++ b/fs/jbd/transaction.c @@ -490,23 +490,21 @@ void journal_unlock_updates (journal_t *journal) */ static void jbd_unexpected_dirty_buffer(struct journal_head *jh) { - struct buffer_...
e6c9f5c1888097c936334bf9740024520ca47b8e
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix JBD race in t_forget list handling
Problem Details: Fix race between journal_commit_transaction() and other places as journal_unmap_buffer() that are adding buffers to transaction's t_forget list. We have to protect against such places by holding j_list_lock even when traversing the t_forget list. The fact that other places can only add buffers to the...
```diff diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c index dac720c837ab..9d0494dcc571 100644 --- a/fs/jbd/commit.c +++ b/fs/jbd/commit.c @@ -720,11 +720,17 @@ wait_for_iobuf: J_ASSERT(commit_transaction->t_log_list == NULL); restart_loop: + /* + * As there are other places (journal_unmap_buffer()) adding buffer...
8cc3c7af42aa826d413e3134628d85f3920457d8
Analyze and fix the following issue in the Linux kernel code: [PATCH] Corgi touchscreen: Fix a pmu bug
Problem Details: Corgi Touchscreen bugfix. If the PMU isn't running, the register needs to be set to a sane value rather than reusing some random value. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/input/touchscreen/corgi_ts.c b/drivers/input/touchscreen/corgi_ts.c index 768ab4a55630..512940ecb357 100644 --- a/drivers/input/touchscreen/corgi_ts.c +++ b/drivers/input/touchscreen/corgi_ts.c @@ -105,7 +105,7 @@ static int sync_receive_data_send_cmd(int doRecive, int doSend, unsigned int ...
74b74890bc23b8c6f5b0c0d99f6e1b3d39cb3dae
Analyze and fix the following issue in the Linux kernel code: [PATCH] Corgi Touchscreen: Code cleanup / fixes
Problem Details: Clean up some Corgi Touchscreen logic and merge the repeat calls to w100fb_blanking() in anticipation of the w100fb patch. Fix a pm_message_t reference. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/input/touchscreen/corgi_ts.c b/drivers/input/touchscreen/corgi_ts.c index 9fcc7ca2c208..768ab4a55630 100644 --- a/drivers/input/touchscreen/corgi_ts.c +++ b/drivers/input/touchscreen/corgi_ts.c @@ -79,6 +79,9 @@ static unsigned long calc_waittime(void) int w100fb_xres = w100fb_get_xres();...
aba5a4c055dde13a3cece53e1b4b060294d631ed
Analyze and fix the following issue in the Linux kernel code: [PATCH] Corgi Keyboard: Fix a couple of compile errors
Problem Details: Fix a couple of compile errors in the corgi keyboard driver. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/input/keyboard/corgikbd.c b/drivers/input/keyboard/corgikbd.c index 7719bdfa9eea..a31c3d64af32 100644 --- a/drivers/input/keyboard/corgikbd.c +++ b/drivers/input/keyboard/corgikbd.c @@ -235,7 +235,7 @@ static void corgikbd_hinge_timer(unsigned long data) unsigned long gprr; unsigned lon...
717dd80e999cdc84fb611decec5c5054d37c40d2
Analyze and fix the following issue in the Linux kernel code: [PATCH] hfs: show_options support
Problem Details: This adds support for show_options. It also fixes some namespace polution in the hfsplus driver. Signed-off-by: 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/fs/hfs/super.c b/fs/hfs/super.c index ab783f6afa3b..fd78414ee7e4 100644 --- a/fs/hfs/super.c +++ b/fs/hfs/super.c @@ -15,8 +15,10 @@ #include <linux/config.h> #include <linux/module.h> #include <linux/blkdev.h> +#include <linux/mount.h> #include <linux/init.h> #include <linux/parser.h> +#inclu...
a5e3985fa014029eb6795664c704953720cc7f7d
Analyze and fix the following issue in the Linux kernel code: [PATCH] hfs: remove debug code
Problem Details: This removes some old debug code, which is no longer needed. Signed-off-by: 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/fs/hfs/bnode.c b/fs/hfs/bnode.c index a096c5a56664..3d5cdc6847c0 100644 --- a/fs/hfs/bnode.c +++ b/fs/hfs/bnode.c @@ -13,8 +13,6 @@ #include "btree.h" -#define REF_PAGES 0 - void hfs_bnode_read(struct hfs_bnode *node, void *buf, int off, int len) { @@ -289,9 +287,7 @@ static struct hfs_bn...
8c702e16207c70119d03df924de35f8c3629a5c4
Analyze and fix the following issue in the Linux kernel code: [PATCH] ipmi poweroff: fix chassis control
Problem Details: The IPMI power control function proc_write_chassctrl was badly written, it directly used userspace pointers, it assumed that strings were NULL terminated, and it used the evil sscanf function. This converts over to using the sysctl interface for this data and changes the semantics to be a little more ...
```diff diff --git a/Documentation/IPMI.txt b/Documentation/IPMI.txt index 84d3d4d10c17..bf1cf98d2a27 100644 --- a/Documentation/IPMI.txt +++ b/Documentation/IPMI.txt @@ -605,12 +605,13 @@ is in the ipmi_poweroff module. When the system requests a powerdown, it will send the proper IPMI commands to do this. This is ...
56a55ec64806fb56e0cd43b0f726020b74c6689b
Analyze and fix the following issue in the Linux kernel code: [PATCH] ipmi: fix panic ipmb response
Problem Details: The "null message handler" in the IPMI driver is used in startup and panic situations to handle messages. It was only designed to work with messages from the local management controller, but in some cases it was used to get messages from remote managmenet controllers, and the system would then panic. ...
```diff diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 05293d0e6692..d0ed25278cbb 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -219,7 +219,7 @@ struct ipmi_smi interface comes in with a NULL user, call this routine with ...
8f05ee9a63b414da4fd036a9dab2d27727301188
Analyze and fix the following issue in the Linux kernel code: [PATCH] ipmi: watchdog/NMI interaction fixes
Problem Details: There are some interactions between IPMI NMI timeouts and the other operations of the IPMI driver. This make sure those interactions are handled properly. Signed-off-by: Corey Minyard <minyard@acm.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c index d35a953961cb..82d564342084 100644 --- a/drivers/char/ipmi/ipmi_watchdog.c +++ b/drivers/char/ipmi/ipmi_watchdog.c @@ -259,7 +259,7 @@ static int i_ipmi_set_timeout(struct ipmi_smi_msg *smi_msg, data[1] = 0; WDOG_SET_...
75b0768a396f2a25901b7b1edc87b95cdb3af4ef
Analyze and fix the following issue in the Linux kernel code: [PATCH] ipmi: high-res timer support fixes
Problem Details: Fix some problems with the high-res timer support. Signed-off-by: Corey Minyard <minyard@acm.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 51ce508b2f51..60f2f968b689 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c @@ -61,11 +61,11 @@ # endif static inline void add_usec_to_timer(struct timer_list *t, long v) { - t->sub_expi...
640e803376b9c4072f69fec42e304c974a631298
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix: dmi_check_system
Problem Details: Background: 1) dmi_check_system() returns the count of the number of matches. Zero thus means no matches. 2) A match callback can return nonzero to stop the match checking. Bug: The count is incremented after we check for the nonzero return value, so it does not reflect the actual count. ...
```diff diff --git a/arch/i386/kernel/dmi_scan.c b/arch/i386/kernel/dmi_scan.c index c4a73855e38c..58516e2ac172 100644 --- a/arch/i386/kernel/dmi_scan.c +++ b/arch/i386/kernel/dmi_scan.c @@ -248,9 +248,9 @@ int dmi_check_system(struct dmi_system_id *list) /* No match */ goto fail; } + count++; if (d->cal...
e08fc0457af28f2ebec36296ea7ada6024fde81b
Analyze and fix the following issue in the Linux kernel code: [PATCH] cifs_create() fix
Problem Details: cifs_create() did totally the wrong thing with nd->intent.open.flags: it interpreted nd->intent.open.flags as the original open flags, not the one transformed for open_namei(). Also it used the intent data even if it was not filled in (if called from sys_mknod()). Signed-off-by: Miklos Szeredi <miklo...
```diff diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index 3f3538d4a1fa..d335269bd91c 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c @@ -145,24 +145,23 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, return -ENOMEM; } - if(nd) { - if ((nd->intent.open.flags & O_ACCMODE) == O_RDONLY) - des...
5e21ccb136047e556acf0fdf227cab5db05c1c25
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix enum pid_directory_inos in proc/base.c
Problem Details: This patch fixes wrongly placed elements in the pid_directory_inos enum. Also add comment so this mistake is not repeated. Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Cc: <viro@parcelfarce.linux.theplanet.co.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Sig...
```diff diff --git a/fs/proc/base.c b/fs/proc/base.c index 73b1e94171b7..24eed139e54e 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -119,7 +119,6 @@ enum pid_directory_inos { #ifdef CONFIG_AUDITSYSCALL PROC_TGID_LOGINUID, #endif - PROC_TGID_FD_DIR, PROC_TGID_OOM_SCORE, PROC_TGID_OOM_ADJUST, PROC_TID_INO...
9b19d85acca488b63af96f59c8bad2dfd75506b0
Analyze and fix the following issue in the Linux kernel code: [PATCH] provide MODALIAS= enviroment variable to autoload ieee1394 modules via udev
Problem Details: https://bugzilla.novell.com/show_bug.cgi?id=103746 Old 2.6.13 hotplug enviroment for 'plug in firewire disk' event: ==> debug.01139.ieee1394.add.8211 <== set -- ieee1394 UDEV_LOG='7' ACTION='add' DEVPATH='/class/ieee1394/00010410100036e0-0' SUBSYSTEM='ieee1394' SEQNUM='1139' PHYSDEVPATH='/devices/pci...
```diff diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c index bebcc47ab06c..b23322523ef5 100644 --- a/drivers/ieee1394/nodemgr.c +++ b/drivers/ieee1394/nodemgr.c @@ -1068,6 +1068,8 @@ static int nodemgr_hotplug(struct class_device *cdev, char **envp, int num_envp, struct unit_directory *ud; int...
d1b551386a5f3f50a5003b691f819b07f8e6f034
Analyze and fix the following issue in the Linux kernel code: [PATCH] cpusets: fix the "dynamic sched domains" bug
Problem Details: For a NUMA system with multiple CPUs per node, declaring a cpu-exclusive cpuset that includes only some, but not all, of the CPUs in a node will mangle the sched domain structures. Signed-off-by: John Hawkes <hawkes@sgi.com> Cc; Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> ...
```diff diff --git a/kernel/sched.c b/kernel/sched.c index 50860ad5b624..9508527845df 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -4970,10 +4970,10 @@ static int cpu_to_phys_group(int cpu) * gets dynamically allocated. */ static DEFINE_PER_CPU(struct sched_domain, node_domains); -static struct sched_group ...
f68f447e8389de9a62e3e80c3c5823cce484c2e5
Analyze and fix the following issue in the Linux kernel code: [PATCH] ia64 cpuset + build_sched_domains() mangles structures
Problem Details: I've already sent this to the maintainers, and this is now being sent to a larger community audience. I have fixed a problem with the ia64 version of build_sched_domains(), but a similar fix still needs to be made to the generic build_sched_domains() in kernel/sched.c. The "dynamic sched domains" fun...
```diff diff --git a/arch/ia64/kernel/domain.c b/arch/ia64/kernel/domain.c index bbb8efe126b7..e907109983f1 100644 --- a/arch/ia64/kernel/domain.c +++ b/arch/ia64/kernel/domain.c @@ -120,10 +120,10 @@ static int cpu_to_phys_group(int cpu) * gets dynamically allocated. */ static DEFINE_PER_CPU(struct sched_domain, ...
38f18527592756d24a12e84c0713e8c902ba7f15
Analyze and fix the following issue in the Linux kernel code: [PATCH] block: CFQ refcounting fix
Problem Details: I ran across a memory leak related to the cfq scheduler. The cfq init function increments the refcnt of the associated request_queue. This refcount gets decremented in cfq's exit function. Since blk_cleanup_queue only calls the elevator exit function when its refcnt goes to zero, the request_q never g...
```diff diff --git a/drivers/block/cfq-iosched.c b/drivers/block/cfq-iosched.c index cd056e7e64ec..30c0903c7cdd 100644 --- a/drivers/block/cfq-iosched.c +++ b/drivers/block/cfq-iosched.c @@ -2260,8 +2260,6 @@ static void cfq_put_cfqd(struct cfq_data *cfqd) if (!atomic_dec_and_test(&cfqd->ref)) return; - blk_put_...
7ea6040b0eff07d3a9a4e2d248ac137c6ad02d42
Analyze and fix the following issue in the Linux kernel code: [PATCH] inotify: fix event loss on hardlinked files
Problem Details: People have run into a problem when they do this: watch (file1, all_events); watch (file2, some_events); if file2 is a hard link to file1, some events will be missed because by default we replace the mask. The patch below adds a flag IN_MASK_ADD which will cause inotify to add to the existing mask i...
```diff diff --git a/fs/inotify.c b/fs/inotify.c index 2fd97ef547ff..a37e9fb1da58 100644 --- a/fs/inotify.c +++ b/fs/inotify.c @@ -931,6 +931,7 @@ asmlinkage long sys_inotify_add_watch(int fd, const char __user *path, u32 mask) struct nameidata nd; struct file *filp; int ret, fput_needed; + int mask_add = 0; ...
5ba4d46dc44c5399bc4e7a39239de5a1690848a4
Analyze and fix the following issue in the Linux kernel code: [PATCH] tpm: fix tpm_atmel.c on ICH6
Problem Details: While installing Debian on our new IBM X41 Tablet, I tried briefly to use the built-in Atmel TPM. The Athmel TPM is also located on the LPC-bus of the ICH6. To make it work I had to apply the following patch: Signed-off-by: Philipp Matthias Hahn <pmhahn@titan.lahn.de> Acked-by: Kylene Jo Hall <kjhal...
```diff diff --git a/drivers/char/tpm/tpm_atmel.c b/drivers/char/tpm/tpm_atmel.c index cc2cc77fd174..c0d64914595f 100644 --- a/drivers/char/tpm/tpm_atmel.c +++ b/drivers/char/tpm/tpm_atmel.c @@ -206,6 +206,9 @@ static struct pci_device_id tpm_pci_tbl[] __devinitdata = { {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_...
1e1a5cc77ec019e0d67c2abcbd486e4f3ac947a4
Analyze and fix the following issue in the Linux kernel code: [PATCH] isdn_v110 warning fix
Problem Details: Here's a small warning fix for drivers/isdn/i4l/isdn_v110.c drivers/isdn/i4l/isdn_v110.c:523: warning: `ret' might be used uninitialized in this function In addition to Karsten Keil signing off on the patch, Thomas Pfeiffer also commented on the patch, saying "initializing ret with the value zero is ...
```diff diff --git a/drivers/isdn/i4l/isdn_v110.c b/drivers/isdn/i4l/isdn_v110.c index f47f2b9846d8..38619e8cd823 100644 --- a/drivers/isdn/i4l/isdn_v110.c +++ b/drivers/isdn/i4l/isdn_v110.c @@ -516,11 +516,11 @@ buffer_full: } int -isdn_v110_stat_callback(int idx, isdn_ctrl * c) +isdn_v110_stat_callback(int idx, i...
96803820b3d9830518083c02681fd3f72987ae4d
Analyze and fix the following issue in the Linux kernel code: [PATCH] hpet: fix drift and url
Problem Details: The HPET driver is using a parts per second drift factor instead of the standard parts per million drift the time interpolator code expects. This patch fixes that problem and updates the URL for the HPET spec. Signed-off-by: Alex Williamson <alex.williamson@hp.com> Cc: "Robert W. Picco" <bob.picco@hp...
```diff diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index 762fa430fb5b..a695f25e4497 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c @@ -44,7 +44,7 @@ /* * The High Precision Event Timer driver. * This driver is closely modelled after the rtc.c driver. - * http://www.intel.com/labs/platcomp/h...
414edcd32aa54bad8827e7c74cace168006c5fab
Analyze and fix the following issue in the Linux kernel code: [PATCH] vt: fix possible memory corruption in complement_pos
Problem Details: Based on a patch from Andr Pereira de Almeida <andre@cachola.com.br> It might be possible for the saved pointer (*p) to become invalid in between vc_resizes, so saving the screen offset instead of the screen pointer is saner. This bug is very hard to trigger though, but Andre probably did, if he's su...
```diff diff --git a/drivers/char/vt.c b/drivers/char/vt.c index 27b6c297906a..b8d0c290b0db 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c @@ -434,21 +434,25 @@ void invert_screen(struct vc_data *vc, int offset, int count, int viewed) /* used by selection: complement pointer position */ void complement_pos(st...
eed74dfcd48101d259012ac08d29061eea500249
Analyze and fix the following issue in the Linux kernel code: [PATCH] optimise 64bit unaligned access on 32bit kernel
Problem Details: I've rewriten Atushi's fix for the 64-bit put_unaligned on 32-bit systems bug to generate more efficient code. This case has buzilla URL http://bugzilla.kernel.org/show_bug.cgi?id=5138. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus...
```diff diff --git a/include/asm-generic/unaligned.h b/include/asm-generic/unaligned.h index 6c90f0f36eec..4dc8ddb401c1 100644 --- a/include/asm-generic/unaligned.h +++ b/include/asm-generic/unaligned.h @@ -16,9 +16,9 @@ * The main single-value unaligned transfer routines. */ #define get_unaligned(ptr) \ - ((__typ...
82a25b5670eef736a20613f8b93fe55ecb5ca4bc
Analyze and fix the following issue in the Linux kernel code: [PATCH] remove verify_area(): remove fs/umsdos/notes as it only contain a verify_area related note
Problem Details: The file `fs/umsdos/notes' contains only a small note about a possible bug involving verify_area(). Since umsdos is no longer in the kernel and verify_area() is also gone, it seems to make sense that this file goes the way of the Dodo. After applying this patch the `fs/umsdos/' directory will be empt...
```diff diff --git a/fs/umsdos/notes b/fs/umsdos/notes deleted file mode 100644 index 3c47d1f4fc47..000000000000 --- a/fs/umsdos/notes +++ /dev/null @@ -1,17 +0,0 @@ -This file contain idea and things I don't want to forget - -Possible bug in fs/read_write.c -Function sys_readdir() - - There is a call the verify_area t...
e752dd6cc66a3e6a11396928998baf390cc00420
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix send_sigqueue() vs thread exit race
Problem Details: posix_timer_event() first checks that the thread (SIGEV_THREAD_ID case) does not have PF_EXITING flag, then it calls send_sigqueue() which locks task list. But if the thread exits in between the kernel will oops (->sighand == NULL after __exit_sighand). This patch moves the PF_EXITING check into the ...
```diff diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c index 38798a2ff994..b7b532acd9fc 100644 --- a/kernel/posix-timers.c +++ b/kernel/posix-timers.c @@ -427,21 +427,23 @@ int posix_timer_event(struct k_itimer *timr,int si_private) timr->sigq->info.si_code = SI_TIMER; timr->sigq->info.si_tid = timr->it...
a97c9bf33f4612e2aed6f000f6b1d268b6814f3c
Analyze and fix the following issue in the Linux kernel code: [PATCH] fix cramfs making duplicate entries in inode cache
Problem Details: Every time cramfs_lookup() is called to lookup and inode for a dentry, get_cramfs_inode() will allocate a new inode without checking to see if that inode already exists in the inode cache. This is fine the first time, but if the dentry cache entry(ies) associated with that inode are aged out, but the ...
```diff diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c index 6c285efa2004..7fe85415ae7c 100644 --- a/fs/cramfs/inode.c +++ b/fs/cramfs/inode.c @@ -39,12 +39,47 @@ static DECLARE_MUTEX(read_mutex); #define CRAMINO(x) ((x)->offset?(x)->offset<<2:1) #define OFFSET(x) ((x)->i_ino) -static struct inode *get_cramfs_i...
2d237c63659c098a662b1b09d43460f04c498436
Analyze and fix the following issue in the Linux kernel code: [PATCH] Console blanking locking fix
Problem Details: I've had WARN_CONSOLE_UNLOCKED warnings when calling TIOCLINUX TIOCL_BLANKSCREEN and TIOCL_UNBLANKSCREEN. (I'm blind and I use a braille display. I use those functions to blank my laptop's screen so people don't read it, and hopefully to conserve power.) The warnings are from these places: do_blank_...
```diff diff --git a/drivers/char/vt.c b/drivers/char/vt.c index 665103ccaee8..27b6c297906a 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c @@ -2272,7 +2272,9 @@ int tioclinux(struct tty_struct *tty, unsigned long arg) ret = paste_selection(tty); break; case TIOCL_UNBLANKSCREEN: + acquire_console_se...
f62c6d0a2607b2d1fdf280d4d1467a7a6e24c67d
Analyze and fix the following issue in the Linux kernel code: [PATCH] Add missing overflow check in get_blkdev_list
Problem Details: Patch to clean up missing overflow check in get_blkdev_list. The printf which adds the "Block Devices" string in /proc/devices can overflow the presented page if get_chrdev_list eats up the entire 4k space. Signed-off-by: Neil Horman <nhorman@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> S...
```diff diff --git a/drivers/block/genhd.c b/drivers/block/genhd.c index 47fd3659a061..d42840cc0d1d 100644 --- a/drivers/block/genhd.c +++ b/drivers/block/genhd.c @@ -45,7 +45,7 @@ int get_blkdev_list(char *p, int used) struct blk_major_name *n; int i, len; - len = sprintf(p, "\nBlock devices:\n"); + len = snprin...
96d0821cacd095e25a39dfff5232a45b63ed18dd
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix function/macro name collision on i386 oprofile
Problem Details: The i386 OProfile code has a function named nmi_exit(), which collides with the nmi_exit() macro in linux/hardirq.h. At the moment, we get away with it, because hardirq.h isn't included in the oprofile code. I hit this as a bug when working with a patch which (indirectly) adds a #include of hardirq.h...
```diff diff --git a/arch/i386/oprofile/init.c b/arch/i386/oprofile/init.c index c90332de582b..5341d481d92f 100644 --- a/arch/i386/oprofile/init.c +++ b/arch/i386/oprofile/init.c @@ -15,9 +15,9 @@ * with the NMI mode driver. */ -extern int nmi_init(struct oprofile_operations * ops); -extern int nmi_timer_init(st...
85747f0325406f3393f48e50c7e31437e2915141
Analyze and fix the following issue in the Linux kernel code: [PATCH] parport: add NetMOS 9805 support
Problem Details: This interface is said to be commonly used in germany: "The patch has been proven to work fine in a beige G3 Mac." http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=262324 Signed-off-by: maximilian attems <janitor@sternwelten.at> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvald...
```diff diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c index 4598c6a9212d..97f723179f62 100644 --- a/drivers/parport/parport_pc.c +++ b/drivers/parport/parport_pc.c @@ -2739,6 +2739,7 @@ enum parport_pc_pci_cards { syba_2p_epp, syba_1p_ecp, titan_010l, + titan_1284p1, titan_1284p2, a...
2b579beec255d6589fabe51b60933d723630bcd4
Analyze and fix the following issue in the Linux kernel code: [PATCH] proc: link count fix
Problem Details: This patch fixes bug titled "sunrpc as module and bad proc/sys link count" reported by Jiri Slaby. The problem was, that only proc_dir_entry->nlink was updated and the corresponding inode->i_nlink was not. The fix is to implement the inode->getattr() method, and update i_nlink (if necessary). A quic...
```diff diff --git a/fs/proc/generic.c b/fs/proc/generic.c index abe8920313fb..8a8c34461d48 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c @@ -249,6 +249,18 @@ out: return error; } +static int proc_getattr(struct vfsmount *mnt, struct dentry *dentry, + struct kstat *stat) +{ + struct inode *inode = dentr...
230649da7cb73914b8b2a1ffc802a2951e970454
Analyze and fix the following issue in the Linux kernel code: [PATCH] create_workqueue_thread() signedness fix
Problem Details: With "-W -Wno-unused -Wno-sign-compare" I get the following compile warning: CC kernel/workqueue.o kernel/workqueue.c: In function `workqueue_cpu_callback': kernel/workqueue.c:504: warning: ordered comparison of pointer with integer zero On error create_workqueue_thread() returns NULL, not neg...
```diff diff --git a/kernel/workqueue.c b/kernel/workqueue.c index c7e36d4a70ca..a3de837a8ddd 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -499,7 +499,7 @@ static int __devinit workqueue_cpu_callback(struct notifier_block *nfb, case CPU_UP_PREPARE: /* Create a new workqueue thread for it. */ list...
f3ef6f63e5c575c136b39bb423a6e9a002932da7
Analyze and fix the following issue in the Linux kernel code: [PATCH] Speedup FAT filesystem directory reads
Problem Details: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> This speeds up directory reads for large FAT partitions, if the buffercache has to be filled from the drive. Following values were taken from: $ time find path_to_freshly_mounted_fat > /dev/null on an otherwise idle system. FAT with 16KB Clusters...
```diff diff --git a/fs/fat/dir.c b/fs/fat/dir.c index e5ae1b720dde..895049b2ac9c 100644 --- a/fs/fat/dir.c +++ b/fs/fat/dir.c @@ -30,6 +30,29 @@ static inline loff_t fat_make_i_pos(struct super_block *sb, | (de - (struct msdos_dir_entry *)bh->b_data); } +static inline void fat_dir_readahead(struct inode *dir, se...
e139aa595c5d3bd01699530cbe017dec75fdb07f
Analyze and fix the following issue in the Linux kernel code: [PATCH] PNP: make pnp_dbg conditional directly on CONFIG_PNP_DEBUG
Problem Details: Seems pointless to require .c files to test CONFIG_PNP_DEBUG and conditionally define DEBUG before including <linux/pnp.h>. Just test CONFIG_PNP_DEBUG directly in pnp.h. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Adam Belay <ambx1@neo.rr.com> Signed-off-by: Andrew Morton <akpm@osdl.org> ...
```diff diff --git a/drivers/pnp/card.c b/drivers/pnp/card.c index 6e5229e92fbc..e95ed67d4f05 100644 --- a/drivers/pnp/card.c +++ b/drivers/pnp/card.c @@ -8,13 +8,6 @@ #include <linux/config.h> #include <linux/module.h> #include <linux/slab.h> - -#ifdef CONFIG_PNP_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif ...
d2052c1676a39cae101a81f3da8a4ade8b668c88
Analyze and fix the following issue in the Linux kernel code: [PATCH] sonypi SPIC initialisation fix
Problem Details: Newer Sony VAIO models (VGN-S480, VGN-S460, VGN-S3XP etc) use a new method to initialize the SPIC device. The new way to initialize (and disable) the device comes directly from the AML code in the _CRS, _SRS and _DIS methods from the DSDT table. This patch adds support for the new models. Signed-off...
```diff diff --git a/Documentation/sonypi.txt b/Documentation/sonypi.txt index 0f3b2405d09e..c1237a925505 100644 --- a/Documentation/sonypi.txt +++ b/Documentation/sonypi.txt @@ -99,6 +99,7 @@ statically linked into the kernel). Those options are: SONYPI_MEYE_MASK 0x0400 SONYPI_MEMORYSTICK_MASK 0x0800 ...
c92371566ea505cf455c208cdfb89046b3db87de
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix sound/arm/Makefile for locality of reference
Problem Details: Ensure that sound/arm/Makefile is sanely organised so that additions to it don't break all other patches out there. This means I only have to adjust the line numbers in my patch queue rather than having to re-generate by hand those which touch this file. Signed-off-by: Russell King <rmk+kernel@arm.li...
```diff diff --git a/sound/arm/Makefile b/sound/arm/Makefile index 103f136926d9..4ef6dd00c6ee 100644 --- a/sound/arm/Makefile +++ b/sound/arm/Makefile @@ -2,12 +2,14 @@ # Makefile for ALSA # -snd-sa11xx-uda1341-objs := sa11xx-uda1341.o -snd-aaci-objs := aaci.o devdma.o -snd-pxa2xx-pcm-objs := pxa2xx-pcm.o -snd-px...
202e5979af4d91c7ca05892641131dee22653259
Analyze and fix the following issue in the Linux kernel code: [PATCH] compat: be more consistent about [ug]id_t
Problem Details: When I first wrote the compat layer patches, I was somewhat cavalier about the definition of compat_uid_t and compat_gid_t (or maybe I just misunderstood :-)). This patch makes the compat types much more consistent with the types we are being compatible with and hopefully will fix a few bugs along the...
```diff diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index 4613219dd73e..ece4564919d8 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c @@ -546,20 +546,20 @@ struct msgbuf32 { s32 mtype; char mtext[1]; }; struct ipc_perm32 { key_t key; - compat_uid_t uid;...
c3d8c1414573be8cf7c8fdc1e076935697c7f6af
Analyze and fix the following issue in the Linux kernel code: [PATCH] More __read_mostly variables
Problem Details: Move some more frequently read variables that showed up during some of our performance tests as sometimes ending up in hot cachelines to the read_mostly section. Fix: Move the __read_mostly from before hpet_usec_quotient to follow the variable like the other uses of __read_mostly. Signed-off-by: Alok...
```diff diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index 294bcca985ab..e29fd5aeaf8e 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c @@ -82,7 +82,7 @@ EXPORT_SYMBOL(efi_enabled); /* cpu data as detected by the assembly code in head.S */ struct cpuinfo_x86 new_cpu_data __initd...
8446f1d391f3d27e6bf9c43d4cbcdac0ca720417
Analyze and fix the following issue in the Linux kernel code: [PATCH] detect soft lockups
Problem Details: This patch adds a new kernel debug feature: CONFIG_DETECT_SOFTLOCKUP. When enabled then per-CPU watchdog threads are started, which try to run once per second. If they get delayed for more than 10 seconds then a callback from the timer interrupt detects this condition and prints out a warning message...
```diff diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c index 8bbdbda07a2d..0178457db721 100644 --- a/arch/i386/kernel/nmi.c +++ b/arch/i386/kernel/nmi.c @@ -478,6 +478,11 @@ void touch_nmi_watchdog (void) */ for (i = 0; i < NR_CPUS; i++) alert_counter[i] = 0; + + /* + * Tickle the softlockup dete...
5b039e681b8c5f30aac9cc04385cc94be45d0823
Analyze and fix the following issue in the Linux kernel code: [PATCH] 3c59x PM fixes
Problem Details: This patch adds some missing pci-related calls to the suspend and resume routines of the 3c59x driver. It also makes the driver free/request IRQ on suspend/resume, in accordance with the proposal at: http://lists.osdl.org/pipermail/linux-pm/2005-May/000955.html Signed-off-by: Andrew Morton <akpm@osdl...
```diff diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index 07746b95fd83..de0dc4ab6e54 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c @@ -973,6 +973,11 @@ static int vortex_suspend (struct pci_dev *pdev, pm_message_t state) netif_device_detach(dev); vortex_down(dev, 1); } + pci_save_sta...
48c8b1134249432318c8e5d19adc37c45242c4b1
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86_64: Fix off by one in e820_mapped
Problem Details: This allows a valid iommu placed immediately after memory to work, to be recognized as after the last byte of memory and not overlapping it. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Acked-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torv...
```diff diff --git a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c index b548dea4e5b9..116ac5f53dce 100644 --- a/arch/x86_64/kernel/e820.c +++ b/arch/x86_64/kernel/e820.c @@ -85,7 +85,7 @@ int __init e820_mapped(unsigned long start, unsigned long end, unsigned type) struct e820entry *ei = &e820.map[i]; i...
0c2b9d5c035f5a82c9c4ba717984d04838a0701e
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86_64: Fix cluster mode send_IPI_allbutself to use get_cpu()/put_cpu()
Problem Details: Need to ensure we dont get prempted when we clear ourself from mask when using clustered mode genapic code. Signed-off-by: Ashok Raj <ashok.raj@intel.com> Acked-by: 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/arch/x86_64/kernel/genapic_cluster.c b/arch/x86_64/kernel/genapic_cluster.c index 9703da7202e3..f6523dd1bc09 100644 --- a/arch/x86_64/kernel/genapic_cluster.c +++ b/arch/x86_64/kernel/genapic_cluster.c @@ -72,10 +72,14 @@ static void cluster_send_IPI_mask(cpumask_t mask, int vector) static void cl...
842363ff5fd79ce75c311175ea832901e2b2d40e
Analyze and fix the following issue in the Linux kernel code: [PATCH] ppc32: fix ocp_device_suspend to use pm_message_t instead of u32
Problem Details: Recent "u32 -> pm_message_t" change triggered hidden bug in ocp_device_suspend. Fix it to correctly use pm_message_t instead of u32. Signed-off-by: Eugene Surovegin <ebs@ebshome.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/arch/ppc/syslib/ocp.c b/arch/ppc/syslib/ocp.c index e5fd2ae503ea..9ccce438bd7a 100644 --- a/arch/ppc/syslib/ocp.c +++ b/arch/ppc/syslib/ocp.c @@ -165,7 +165,7 @@ ocp_device_remove(struct device *dev) } static int -ocp_device_suspend(struct device *dev, u32 state) +ocp_device_suspend(struct devi...
b5dcbf47e10e568273213a4410daa27c11cdba3a
Analyze and fix the following issue in the Linux kernel code: [PATCH] IB: RMPP fixes
Problem Details: - Fix payload length of middle RMPP sent segments. Middle payload lengths should be 0 on the send side. (This is perhaps a compliance and should not be an interop issue as middle payload lengths are supposed to be ignored on receive). - Fix length in first segment of multipacket sends (This ...
```diff diff --git a/drivers/infiniband/core/mad_rmpp.c b/drivers/infiniband/core/mad_rmpp.c index 43fd805e0265..2bd8b1cc57c4 100644 --- a/drivers/infiniband/core/mad_rmpp.c +++ b/drivers/infiniband/core/mad_rmpp.c @@ -593,7 +593,8 @@ static int send_next_seg(struct ib_mad_send_wr_private *mad_send_wr) rmpp_mad->rmp...
0b2b35f68140ceeb1b78ef85680198e63ebc8649
Analyze and fix the following issue in the Linux kernel code: [PATCH] IB: Add user-supplied context to userspace CM ABI
Problem Details: - Add user specified context to all uCM events. Users will not retrieve any events associated with the context after destroying the corresponding cm_id. - Provide the ib_cm_init_qp_attr() call to userspace clients of the CM. This call may be used to set QP attributes properly before modifying th...
```diff diff --git a/drivers/infiniband/core/ucm.c b/drivers/infiniband/core/ucm.c index 79595826ccc7..d0f0b0a2edd3 100644 --- a/drivers/infiniband/core/ucm.c +++ b/drivers/infiniband/core/ucm.c @@ -72,7 +72,6 @@ enum { static struct semaphore ctx_id_mutex; static struct idr ctx_id_table; -static int ...
06c56e44f3e32a859420ecac97996cc6f12827bb
Analyze and fix the following issue in the Linux kernel code: [PATCH] IPoIB: fix memory leak
Problem Details: Fix IPoIB memory leak on device removal. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 0e8ac138e355..49d120d2b92c 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -1062,6 +1062,8 @@ static void ipoib_remove_one(struct ib_device *device) ...
bafa49cc1b800df4748b29e2b038ff029d7c8747
Analyze and fix the following issue in the Linux kernel code: [ARM] 2884/1: BAST - fix PC104 IRQ routing
Problem Details: Patch from Ben Dooks This has been broken for a while now, so fix the problems with the code, test and bring up to date. This also makes the code conditional on an Kconfig option Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig index da818344f954..06807c6ee68a 100644 --- a/arch/arm/mach-s3c2410/Kconfig +++ b/arch/arm/mach-s3c2410/Kconfig @@ -18,6 +18,14 @@ config ARCH_BAST Product page: <http://www.simtec.co.uk/products/EB2410ITX/>. +config BAST_PC104_I...
7691d931aa55409ae3339d541ec0b87ab0a2adae
Analyze and fix the following issue in the Linux kernel code: [ARM] 2871/1: Fixes an issue with gettimeofday not working correctly on Intel IOP3xx processors
Problem Details: Patch from Adam Brooks The current gettimeofday implementation for the IOP3xx processors reads the contents of the timer interrupt register and does math on the value to figure out exactly what time it is. To do this it multiplies the contents of the timer register with a large constant. The result...
```diff diff --git a/arch/arm/mach-iop3xx/iop321-time.c b/arch/arm/mach-iop3xx/iop321-time.c index d53af1669502..0039793b694a 100644 --- a/arch/arm/mach-iop3xx/iop321-time.c +++ b/arch/arm/mach-iop3xx/iop321-time.c @@ -60,7 +60,7 @@ static unsigned long iop321_gettimeoffset(void) /* * Now convert them to usec. ...
ca20aa6954bcb4537064a1bf5e8f74af57da2a03
Analyze and fix the following issue in the Linux kernel code: [libata sata_mv] fix build
Problem Details: This function will go away when pci_intx() finally makes it into the core PCI layer.
```diff diff --git a/drivers/scsi/sata_mv.c b/drivers/scsi/sata_mv.c index ea76fe44585e..f97e3afa97d9 100644 --- a/drivers/scsi/sata_mv.c +++ b/drivers/scsi/sata_mv.c @@ -699,6 +699,22 @@ static int mv_host_init(struct ata_probe_ent *probe_ent) return rc; } +/* move to PCI layer, integrate w/ MSI stuff */ +static ...
7da79312830e6d9b3f6ee06b86c3a35caba2f6e7
Analyze and fix the following issue in the Linux kernel code: [PATCH] libata: fix pio_mask values (take 2)
Problem Details: ata_get_mode_mask() uses bits 3 and 4 in the pio_mask to represent PIO modes 3 and 4. The value read from the drive, which reports support for PIO3 and PIO4 in bits 0 and 1, is shifted left by 3 bits and OR'd with 0x7 (which then corresponds to PIO 2-0 in libata). Thus, the drivers below need adjustm...
```diff diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c index 31065261de8e..320df6cd3def 100644 --- a/drivers/scsi/ahci.c +++ b/drivers/scsi/ahci.c @@ -250,7 +250,7 @@ static struct ata_port_info ahci_port_info[] = { .host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | ATA_FLAG_SATA_RESET | ATA_FLAG_MMIO...
344babaa9d39b10b85cadec4e5335d43b52b4ec0
Analyze and fix the following issue in the Linux kernel code: [kernel-doc] fix various DocBook build problems/warnings
Problem Details: Most serious is fixing include/sound/pcm.h, which breaks the DocBook build. The other stuff is just filling in things that cause warnings.
```diff diff --git a/Documentation/DocBook/mcabook.tmpl b/Documentation/DocBook/mcabook.tmpl index 4367f4642f3d..42a760cd7467 100644 --- a/Documentation/DocBook/mcabook.tmpl +++ b/Documentation/DocBook/mcabook.tmpl @@ -96,7 +96,7 @@ <chapter id="pubfunctions"> <title>Public Functions Provided</title> -!Earch...
bbeec90b98a3066f6f2b8d41c80561f5665e4631
Analyze and fix the following issue in the Linux kernel code: [wireless] build fixes after merging WE-19
Problem Details:
```diff diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 89c2ff9570d5..2be65d308fbe 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c @@ -6867,7 +6867,7 @@ static inline char *airo_translate_scan(struct net_device *dev, } else { iwe.u.qual.level = (bss->dBm + 32...
09bbe1043a65903c93f6b6df123e36e3584bfac7
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix set/get MTU cases in sunos_ioctl()
Problem Details: Need to use compat struct sizes and compat_sys_ioctl(). Reported by Adrian Bunk via kernel bugzilla #2683 Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/sunos_ioctl32.c b/arch/sparc64/kernel/sunos_ioctl32.c index 87c1aeb02220..7654b8a7f03a 100644 --- a/arch/sparc64/kernel/sunos_ioctl32.c +++ b/arch/sparc64/kernel/sunos_ioctl32.c @@ -152,11 +152,12 @@ asmlinkage int sunos_ioctl (int fd, u32 cmd, u32 arg) ret = compat_sys_ioctl...
c6bb15a0c485fbdd3d161da54fd29f4f15e1b070
Analyze and fix the following issue in the Linux kernel code: [ARCNET]: Fix return value from arcnet_send_packet().
Problem Details: From: Pieter Dejaeghere <pieter@dejaeghere.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/arcnet/arcnet.c b/drivers/net/arcnet/arcnet.c index 4f9f69e22c1b..12ef52c193a3 100644 --- a/drivers/net/arcnet/arcnet.c +++ b/drivers/net/arcnet/arcnet.c @@ -597,7 +597,7 @@ static int arcnet_send_packet(struct sk_buff *skb, struct net_device *dev) struct ArcProto *proto; int txbuf;...
0a3f4358ac6283fe3a565183eaf9716de28b6fd0
Analyze and fix the following issue in the Linux kernel code: [NET]: proto_unregister: fix sleeping while atomic
Problem Details: proto_unregister holds a lock while calling kmem_cache_destroy, which can sleep. Noticed by Daniele Orlandi <daniele@orlandi.com>. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/core/sock.c b/net/core/sock.c index b32b1815ae5a..ac63b56e23b2 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -1529,6 +1529,8 @@ EXPORT_SYMBOL(proto_register); void proto_unregister(struct proto *prot) { write_lock(&proto_list_lock); + list_del(&prot->node); + write_unlock(&proto_lis...
00b309f561e9746fd6ac9598c4203c6610fcb26c
Analyze and fix the following issue in the Linux kernel code: [PATCH] wl3501_cs : WE-17 support
Problem Details: wl3501_cs won't compile with WE-19. This patches fixes it. Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com> Acked-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
```diff diff --git a/drivers/net/wireless/wl3501.h b/drivers/net/wireless/wl3501.h index b5719437e981..7fcbe589c3f2 100644 --- a/drivers/net/wireless/wl3501.h +++ b/drivers/net/wireless/wl3501.h @@ -609,6 +609,7 @@ struct wl3501_card { struct net_device_stats stats; struct iw_statistics wstats; struct iw_spy_da...
054034dbf5b1a6aef800af4eb22d421d1c7d4b6d
Analyze and fix the following issue in the Linux kernel code: [PATCH] net: fix bonding with spider_net
Problem Details: Another small update for the spidernet driver to fix a bug encountered during testing our latest hardware with dual-ethernet support. Signed-off-by: Arnd Bergmann <arndb@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
```diff diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c index 6784e6e13685..4e19220473d0 100644 --- a/drivers/net/spider_net.c +++ b/drivers/net/spider_net.c @@ -1292,23 +1292,29 @@ static int spider_net_set_mac(struct net_device *netdev, void *p) { struct spider_net_card *card = netdev_priv(netdev...
543cec517dbc07c7c801ccacd02141d99f09f756
Analyze and fix the following issue in the Linux kernel code: [PATCH] net: update the spider_net driver
Problem Details: - Prevent PCI posting problems by using synchronous register access in critical places - Check return value from firmware device tree functions - fix device cleanup Signed-off-by: Arnd Bergmann <arndb@de.ibm.com> Cc: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Sign...
```diff diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c index 692a0437fef7..6784e6e13685 100644 --- a/drivers/net/spider_net.c +++ b/drivers/net/spider_net.c @@ -108,6 +108,23 @@ spider_net_write_reg(struct spider_net_card *card, u32 reg, u32 value) writel(value, card->regs + reg); } +/** + * spid...
8e84c801bad50d2e0e9f802610d2c13f8d342230
Analyze and fix the following issue in the Linux kernel code: [PATCH] s390: claw driver fixes
Problem Details: [patch 1/4] s390: claw driver fixes From: Andy Richter <richtera@us.ibm.com> - change memory allocation and move dbf from proc to debugfs - use dev_kfree_skb_any instead of dev_kfree_skb_irq Signed-off-by: Frank Pavlic <pavlic@de.ibm.com> diffstat: claw.c | 20 ++++++++++---------- 1 files chan...
```diff diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c index 24c0af49c25c..3092473991a7 100644 --- a/drivers/s390/net/claw.c +++ b/drivers/s390/net/claw.c @@ -2,9 +2,9 @@ * drivers/s390/net/claw.c * ESCON CLAW network driver * - * $Revision: 1.35 $ $Date: 2005/03/24 12:25:38 $ + * $Revis...
776bd20fa25fd8fc71fd4a2f213c106d6868db39
Analyze and fix the following issue in the Linux kernel code: [PATCH] S2io: Hardware and miscellaneous fixes
Problem Details: Hi, This patch contains the following hardware related fixes and other miscellaneous bug fixes. 1. Updated the definition of single and double-bit ECC errors 2. Earlier we were allocating Transmit descriptors equal to MAX_SKB_FRAGS. This was causing a boundary condition failure. Need to allocate...
```diff diff --git a/drivers/net/s2io-regs.h b/drivers/net/s2io-regs.h index 2234a8f05eb2..7cefe5507b9e 100644 --- a/drivers/net/s2io-regs.h +++ b/drivers/net/s2io-regs.h @@ -1,5 +1,5 @@ /************************************************************************ - * regs.h: A Linux PCI-X Ethernet driver for S2IO 10GbE S...