id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
29ff2db55196717e2e67e0f04adc833ee7edd491
Analyze and fix the following issue in the Linux kernel code: [PATCH] select() warning fixes
Problem Details: fs/select.c: In function `core_sys_select': fs/select.c:339: warning: assignment from incompatible pointer type fs/select.c:376: warning: comparison of distinct pointer types lacks a cast By using a void* we can remove lots of casts rather than adding more. Cc: Jes Sorensen <jes@trained-monkey.org> S...
```diff diff --git a/fs/select.c b/fs/select.c index 071660fa7b01..fce0fd1bb1d1 100644 --- a/fs/select.c +++ b/fs/select.c @@ -310,7 +310,7 @@ static int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp, s64 *timeout) { fd_set_bits fds; - char *bits; + void *bits; int ret, ...
8a5bc075b8d8cf7a87b3f08fad2fba0f5d13295e
Analyze and fix the following issue in the Linux kernel code: [PATCH] sched: don't awaken RT tasks on expired array
Problem Details: RT tasks are being awakened on the expired array when expired_starving() is true, whereas they really should be excluded. Fix. Signed-off-by: Mike Galbraith <efault@gmx.de> Acked-by: Ingo Molnar <mingo@elte.hu> Cc: Con Kolivas <kernel@kolivas.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-o...
```diff diff --git a/kernel/sched.c b/kernel/sched.c index 2e8a146dd066..365f0b90b4de 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -713,7 +713,7 @@ static void __activate_task(task_t *p, runqueue_t *rq) { prio_array_t *target = rq->active; - if (unlikely(batch_task(p) || expired_starving(rq))) + if (unlikel...
5ce74abe788a26698876e66b9c9ce7e7acc25413
Analyze and fix the following issue in the Linux kernel code: [PATCH] sched: fix interactive task starvation
Problem Details: Fix a starvation problem that occurs when a stream of highly interactive tasks delay an array switch for extended periods despite EXPIRED_STARVING(rq) being true. AFAIKT, the only choice is to enqueue awakening tasks on the expired array in this case. Without this patch, it can be nearly impossible t...
```diff diff --git a/kernel/sched.c b/kernel/sched.c index dd153d6f8a04..2e8a146dd066 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -664,6 +664,48 @@ static int effective_prio(task_t *p) return prio; } +/* + * We place interactive tasks back into the active array, if possible. + * + * To guarantee that this ...
7519fdc90fe577cb966ab1ce2bf51ac639f05a0e
Analyze and fix the following issue in the Linux kernel code: [PATCH] Remove sys_ prefix of new syscalls from __NR_sys_*
Problem Details: On i386, we don't use sys_ prefix for __NR_*. This patch removes it [FWIW, _syscall*() macros will generate foo() instead of sys_foo().] Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Jens Axboe <axboe@suse.de>
```diff diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h index 2e7f3e257fdd..7b1ba84d4a5b 100644 --- a/include/asm-i386/unistd.h +++ b/include/asm-i386/unistd.h @@ -318,8 +318,8 @@ #define __NR_unshare 310 #define __NR_set_robust_list 311 #define __NR_get_robust_list 312 -#define __NR_sys_splice ...
88e6faefaeed40a162041d85689e94595756d4c3
Analyze and fix the following issue in the Linux kernel code: [PATCH] splice: warning fix
Problem Details: From: Andrew Morton <akpm@osdl.org> net/socket.c:148: warning: initialization from incompatible pointer type extern declarations in .c files! Bad boy. Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jens Axboe <axboe@suse.de>
```diff diff --git a/include/linux/fs.h b/include/linux/fs.h index 9e8e2ee353b4..2a629fd88ef0 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1611,10 +1611,17 @@ extern ssize_t generic_file_sendfile(struct file *, loff_t *, size_t, read_actor extern void do_generic_mapping_read(struct address_space *mappi...
b5ac4817de3032796c558b0a32062e7392b5ea60
Analyze and fix the following issue in the Linux kernel code: kconfig: fix typo in change count initialization
Problem Details: Configuration needs saving when either of these conditions is true. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 1b8882ddbc74..1b5df589f3ae 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -325,7 +325,7 @@ int conf_read(const char *name) sym->flags |= e->right.sym->flags & SYMBOL_NEW; } - sym_change_count = conf_...
40aee729b350672c2550640622416a855e27938f
Analyze and fix the following issue in the Linux kernel code: kconfig: fix default value for choice input
Problem Details: The wrong default value can cause conf to end up in endless loop for choice questions. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 10eeae53d827..b86c64f90c94 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -328,8 +328,7 @@ static int conf_choice(struct menu *menu) printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu)); def_sym = sym_get_choice_va...
eaaae38c1ac4ccbec6d2de7255b0538f38fb29d6
Analyze and fix the following issue in the Linux kernel code: kbuild: fix NULL dereference in scripts/mod/modpost.c
Problem Details: before is NULL in this case, concluding from the surrounding code it seems that after is the right one to use. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 0b92ddff26fd..7e8079a34adf 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -658,7 +658,7 @@ static void warn_sec_mismatch(const char *modname, const char *fromsec, warn("%s - Section mismatch: reference to %s:%s from %s " ...
71378be91f5473e89c8be170c6e49edda3bdbb67
Analyze and fix the following issue in the Linux kernel code: kbuild: fix mode of checkstack.pl and other files.
Problem Details: Make it executable like it should be. Do the same for other files intended to be executed by the user - the ones called by the build process needn't be executable as they already work (as argument to their interpreter). Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-b...
```diff diff --git a/scripts/bloat-o-meter b/scripts/bloat-o-meter old mode 100644 new mode 100755 diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl old mode 100644 new mode 100755 diff --git a/scripts/namespace.pl b/scripts/namespace.pl old mode 100644 new mode 100755 diff --git a/scripts/show_delta b/scripts...
d39a206bc35d46a3b2eb98cd4f34e340d5e56a50
Analyze and fix the following issue in the Linux kernel code: kbuild: rebuild initramfs if content of initramfs changes
Problem Details: initramfs.cpio.gz being build in usr/ and included in the kernel was not rebuild when the included files changed. To fix this the following was done: - let gen_initramfs.sh generate a list of files and directories included in the initramfs - gen_initramfs generate the gzipped cpio archive so we coul...
```diff diff --git a/scripts/gen_initramfs_list.sh b/scripts/gen_initramfs_list.sh index 6d411169bfa6..56b3bed1108f 100644 --- a/scripts/gen_initramfs_list.sh +++ b/scripts/gen_initramfs_list.sh @@ -1,22 +1,55 @@ #!/bin/bash # Copyright (C) Martin Schlemmer <azarah@nosferatu.za.org> -# Released under the terms of the...
019ff2d57b0bbe77d1eca19f5b634e5e7ff2a0b8
Analyze and fix the following issue in the Linux kernel code: [XFS] Fix a problem in aligning inode allocations to stripe unit
Problem Details: boundaries. SGI-PV: 951862 SGI-Modid: xfs-linux-melb:xfs-kern:25726a Signed-off-by: Nathan Scott <nathans@sgi.com>
```diff diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c index 4eeb856183b1..deddbd03c166 100644 --- a/fs/xfs/xfs_ialloc.c +++ b/fs/xfs/xfs_ialloc.c @@ -158,9 +158,10 @@ xfs_ialloc_ag_alloc( */ agi = XFS_BUF_TO_AGI(agbp); newino = be32_to_cpu(agi->agi_newino); - if(likely(newino != NULLAGINO)) { - args.a...
8c0b5113a55c698f3190ec85925815640f1c2049
Analyze and fix the following issue in the Linux kernel code: [XFS] Fix utime(2) in the case that no times parameter was passed in.
Problem Details: SGI-PV: 949858 SGI-Modid: xfs-linux-melb:xfs-kern:25717a Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
```diff diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index 149237304fb6..2e2e275c786f 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c @@ -673,8 +673,7 @@ xfs_vn_setattr( if (ia_valid & ATTR_ATIME) { vattr.va_mask |= XFS_AT_ATIME; vattr.va_atime = attr->ia_ati...
58829e490ee805f1c8b3009abc90e2a1a7a0d278
Analyze and fix the following issue in the Linux kernel code: [XFS] Fix an inode use-after-free durin an unpin. When reclaiming inodes
Problem Details: that have been unlinked, we may need to execute transactions during reclaim. By the time the transaction has hit the disk, the linux inode and xfs vnode may already have been freed so we can't reference them safely. Use the known xfs inode state to determine if it is safe to reference the vnode and lin...
```diff diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index 48146bdc6bdd..94b60dd03801 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c @@ -2732,16 +2732,29 @@ xfs_iunpin( ASSERT(atomic_read(&ip->i_pincount) > 0); if (atomic_dec_and_test(&ip->i_pincount)) { - vnode_t *vp = XFS_ITOV_NULL(ip); + /*...
1fc5d959d88a5f77aa7e4435f6c9d0e2d2236704
Analyze and fix the following issue in the Linux kernel code: [XFS] Fix inode reclaim scalability regression. When a filesystem has
Problem Details: millions of inodes cached and has sparse cluster population, removing inodes from the cluster hash consumes excessive amounts of CPU time. Reduce the CPU cost by making removal O(1) via use of a double linked list for the hash chains. SGI-PV: 951551 SGI-Modid: xfs-linux-melb:xfs-kern:25683a Signed-of...
```diff diff --git a/fs/xfs/xfs_iget.c b/fs/xfs/xfs_iget.c index bb33113eef9f..b53854325266 100644 --- a/fs/xfs/xfs_iget.c +++ b/fs/xfs/xfs_iget.c @@ -421,7 +421,10 @@ finish_inode: ip->i_chash = chlnew; chlnew->chl_ip = ip; chlnew->chl_blkno = ip->i_blkno; + if (ch->ch_list) + ch->ch_list->chl_prev = ...
8272145c05c6d01a34f5114357c5e8093fb66472
Analyze and fix the following issue in the Linux kernel code: [XFS] Fix a writepage regression where we accidentally stopped honouring
Problem Details: nonblock mode with the new IO path code (since 2.6.16). SGI-PV: 951662 SGI-Modid: xfs-linux-melb:xfs-kern:25676a Signed-off-by: Nathan Scott <nathans@sgi.com>
```diff diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index 6cbbd165c60d..4d191ef39b67 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c @@ -870,12 +870,14 @@ xfs_page_state_convert( pgoff_t end_index, last_index, tlast; ssize_t size, len; int ...
e50bd16fe49689bc5fb54fca5ed8b568dfba65c6
Analyze and fix the following issue in the Linux kernel code: [XFS] Fix superblock validation regression for the zero imaxpct case.
Problem Details: Thanks to kjamieson for noticing. SGI-PV: 951661 SGI-Modid: xfs-linux-melb:xfs-kern:25675a Signed-off-by: Nathan Scott <nathans@sgi.com>
```diff diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index 049fabb7f7e0..c0b1c2906880 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c @@ -270,7 +270,7 @@ xfs_mount_validate_sb( (sbp->sb_blocklog - sbp->sb_inodelog != sbp->sb_inopblog) || (sbp->sb_rextsize * sbp->sb_blocksize > XFS_MAX_RTEXT...
530515a06f90c0831732709efee4a99497bd2b7c
Analyze and fix the following issue in the Linux kernel code: [CPUFREQ] x86_64: Proper null pointer check in powernow_k8_get
Problem Details: This prevents crashes on dual core system when enough ticks are lost. Replaces earlier patch by me. (Duplicate null data check in powernowk8_get() removed -- davej) arch/i386/kernel/cpu/cpufreq/powernow-k8.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) Signed-off-by: Thomas ...
```diff diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c index 6ba497c47df6..30bb6fd5b2b2 100644 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c @@ -46,7 +46,7 @@ #define PFX "powernow-k8: " #define BFX PFX "BIOS e...
b40fc4923ee3352c44ac2c0bd5f4d6018d6c4ad7
Analyze and fix the following issue in the Linux kernel code: [CPUFREQ] x86_64: Revert earlier powernow-k8 change
Problem Details: (Better fix to be applied in next patch) Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Dave Jones <davej@redhat.com>
```diff diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c index 712a26bd4457..6ba497c47df6 100644 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c @@ -55,7 +55,7 @@ static DEFINE_MUTEX(fidvid_mutex); static struct power...
1356c1948da967bc1d4c663762bfe21dfcec4b2f
Analyze and fix the following issue in the Linux kernel code: [ARM] 3473/1: Use numbers 0-15 for the VFP double registers
Problem Details: Patch from Catalin Marinas This patch changes the double registers numbering to 0-15 from even 0-30, in preparation for future VFP extensions. It also fixes the VFP_REG_ZERO bug (value 16 actually represents the 8th double register with the original numbering). The original mcrr/mrrc on CP10 were gen...
```diff diff --git a/arch/arm/vfp/vfpdouble.c b/arch/arm/vfp/vfpdouble.c index 2418d12e7fb5..febd115dba28 100644 --- a/arch/arm/vfp/vfpdouble.c +++ b/arch/arm/vfp/vfpdouble.c @@ -1127,9 +1127,9 @@ u32 vfp_double_cpdo(u32 inst, u32 fpscr) { u32 op = inst & FOP_MASK; u32 exceptions = 0; - unsigned int dd = vfp_get_s...
1b72373491a061be6d456d219a4e2d054ac2aaad
Analyze and fix the following issue in the Linux kernel code: [libata] sata_mv: fix can_queue line accidentally removed in scsi-eh patch
Problem Details:
```diff diff --git a/drivers/scsi/sata_mv.c b/drivers/scsi/sata_mv.c index 0ebf13668f51..b64b077573c2 100644 --- a/drivers/scsi/sata_mv.c +++ b/drivers/scsi/sata_mv.c @@ -378,6 +378,7 @@ static struct scsi_host_template mv_sht = { .name = DRV_NAME, .ioctl = ata_scsi_ioctl, .queuecommand = ata_scsi_queuecmd, ...
65714b918415e06c92426f6544b2296dae694590
Analyze and fix the following issue in the Linux kernel code: [PATCH] CONFIGFS_FS must depend on SYSFS
Problem Details: This patch fixes the a compile error with CONFIG_SYSFS=n Configfs is creating, as a matter of policy, the /sys/kernel/config mountpoint. This means it requires CONFIG_SYSFS. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <ma...
```diff diff --git a/fs/Kconfig b/fs/Kconfig index e207be68d4ca..97f317413122 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -861,7 +861,7 @@ config RAMFS config CONFIGFS_FS tristate "Userspace-driven configuration filesystem (EXPERIMENTAL)" - depends on EXPERIMENTAL + depends on SYSFS && EXPERIMENTAL help conf...
cbca692c246874a3cc1b5a9b694add4c39e8bc18
Analyze and fix the following issue in the Linux kernel code: [PATCH] Bogus NULL pointer check in fs/configfs/dir.c
Problem Details: We check the "group" pointer after we dereference it. This check is bogus, as it cannot be NULL coming in. Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
```diff diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c index 8ed9b06a9828..5638c8f9362f 100644 --- a/fs/configfs/dir.c +++ b/fs/configfs/dir.c @@ -504,7 +504,7 @@ static int populate_groups(struct config_group *group) int ret = 0; int i; - if (group && group->default_groups) { + if (group->default_groups) { ...
676165a8af7167f488abdcce6851a9bc36e83254
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix buddy list race that could lead to page lru list corruptions
Problem Details: Rohit found an obscure bug causing buddy list corruption. page_is_buddy is using a non-atomic test (PagePrivate && page_count == 0) to determine whether or not a free page's buddy is itself free and in the buddy lists. Each of the conjuncts may be true at different times due to unrelated conditions, ...
```diff diff --git a/include/linux/mm.h b/include/linux/mm.h index 6aa016f1d3ae..1154684209a4 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -229,10 +229,9 @@ struct page { unsigned long private; /* Mapping-private opaque data: * usually used for buffer_heads * if PagePrivate set; used...
0f4852513fb07405ce88da40d8c497060561246e
Analyze and fix the following issue in the Linux kernel code: IPoIB: Make send and receive queue sizes tunable
Problem Details: Make IPoIB's send and receive queue sizes tunable via module parameters ("send_queue_size" and "recv_queue_size"). This allows the queue sizes to be enlarged to fix disastrously bad performance on some platforms and workloads, without bloating memory usage when large queues aren't needed. Signed-off-...
```diff diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h index 374109df7303..12a1e0572ef2 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib.h +++ b/drivers/infiniband/ulp/ipoib/ipoib.h @@ -65,6 +65,8 @@ enum { IPOIB_RX_RING_SIZE = 128, IPOIB_TX_RING_SIZE = 64, + IPOIB_M...
f2de3b06126ddb07d0e4617225d74dce0855add3
Analyze and fix the following issue in the Linux kernel code: IPoIB: Wait for join to finish before freeing mcast struct
Problem Details: ipoib_mcast_restart_task() might free an mcast object while a join request is still outstanding, leading to an oops when the query completes. Fix this by waiting for query to complete, similar to what ipoib_stop_thread() is doing. The wait for mcast completion code is consolidated in wait_for_mcast_j...
```diff diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c index 07b9826b5193..1dae4b238252 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c @@ -609,6 +609,22 @@ int ipoib_mcast_start_thread(struct ...
bf6a9e31cfa768ce0a8e18474b3ca808641d9243
Analyze and fix the following issue in the Linux kernel code: IB: simplify static rate encoding
Problem Details: Push translation of static rate to HCA format into low-level drivers, where it belongs. For static rate encoding, use encoding of rate field from IB standard PathRecord, with addition of value 0, for backwards compatibility with current usage. The changes are: - Add enum ib_rate to midlayer include...
```diff diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c index cae0845f472a..b78e7dc69330 100644 --- a/drivers/infiniband/core/verbs.c +++ b/drivers/infiniband/core/verbs.c @@ -45,6 +45,40 @@ #include <rdma/ib_verbs.h> #include <rdma/ib_cache.h> +int ib_rate_to_mult(enum ib_rate rate) ...
c3a9d6541f84ac3ff566982d08389b87c1c36b4e
Analyze and fix the following issue in the Linux kernel code: [Security] Keys: Fix oops when adding key to non-keyring
Problem Details: This fixes the problem of an oops occuring when a user attempts to add a key to a non-keyring key [CVE-2006-1522]. The problem is that __keyring_search_one() doesn't check that the keyring it's been given is actually a keyring. I've fixed this problem by: (1) declaring that caller of __keyring_sear...
```diff diff --git a/security/keys/key.c b/security/keys/key.c index a057e3311aad..b6061fa29da7 100644 --- a/security/keys/key.c +++ b/security/keys/key.c @@ -785,6 +785,10 @@ key_ref_t key_create_or_update(key_ref_t keyring_ref, key_check(keyring); + key_ref = ERR_PTR(-ENOTDIR); + if (keyring->type != &key_type_...
3a326a2ce88e71d00ac0d133e314a3342a7709f8
Analyze and fix the following issue in the Linux kernel code: [PATCH] introduce a "kernel-internal pipe object" abstraction
Problem Details: separate out the 'internal pipe object' abstraction, and make it usable to splice. This cleans up and fixes several aspects of the internal splice APIs and the pipe code: - pipes: the allocation and freeing of pipe_inode_info is now more symmetric and more streamlined with existing kernel practice...
```diff diff --git a/fs/fifo.c b/fs/fifo.c index 889f722ee36d..b16e2f597d61 100644 --- a/fs/fifo.c +++ b/fs/fifo.c @@ -15,12 +15,13 @@ #include <linux/fs.h> #include <linux/pipe_fs_i.h> -static void wait_for_partner(struct inode* inode, unsigned int* cnt) +static void wait_for_partner(struct inode* inode, unsigned ...
19910d1aec0b2b96ff4b4a93e2aed0d32643e850
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: Fix DNAT in LOCAL_OUT
Problem Details: 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_nat_rule.c b/net/ipv4/netfilter/ip_nat_rule.c index efba8c4e42e0..1aba926c1cb0 100644 --- a/net/ipv4/netfilter/ip_nat_rule.c +++ b/net/ipv4/netfilter/ip_nat_rule.c @@ -279,7 +279,7 @@ static struct ipt_target ipt_dnat_reg = { .target = ipt_dnat_target, .targetsize = sizeo...
9469d458b90bfb9117cbb488cfa645d94c3921b1
Analyze and fix the following issue in the Linux kernel code: [NET]: Fix hotplug race during device registration.
Problem Details: From: Thomas de Grenier de Latour <degrenier@easyconnect.fr> On Sun, 9 Apr 2006 21:56:59 +0400, Sergey Vlasov <vsu@altlinux.ru> wrote: > However, show_address() does not output anything unless > dev->reg_state == NETREG_REGISTERED - and this state is set by > netdev_run_todo() only after netdev_regis...
```diff diff --git a/net/core/dev.c b/net/core/dev.c index dfb62998866a..2731570eba5b 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3042,11 +3042,11 @@ void netdev_run_todo(void) switch(dev->reg_state) { case NETREG_REGISTERING: + dev->reg_state = NETREG_REGISTERED; err = netdev_register_sysfs(dev)...
503e4faad18baa62bb818537b920ad939749823e
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: Fix build with CONFIG_NETFILTER=y/m on IA64
Problem Details: Can't build with CONFIG_NETFILTER=y/m on IA64, there's a missing #include in net/ipv6/netfilter.c net/ipv6/netfilter.c: In function `nf_ip6_checksum': net/ipv6/netfilter.c:92: warning: implicit declaration of function `csum_ipv6_magic' Signed-off-by: Brian Haley <brian.haley@hp.com> Signed-off-by: Da...
```diff diff --git a/net/ipv6/netfilter.c b/net/ipv6/netfilter.c index 3e9ecfaf67e2..395a417ba955 100644 --- a/net/ipv6/netfilter.c +++ b/net/ipv6/netfilter.c @@ -7,6 +7,7 @@ #include <net/ipv6.h> #include <net/ip6_route.h> #include <net/xfrm.h> +#include <net/ip6_checksum.h> int ip6_route_me_harder(struct sk_buf...
bbadf503d7c7e6efe0a4cd731f8855ba08276215
Analyze and fix the following issue in the Linux kernel code: [TG3]: Speed up SRAM access (2nd version)
Problem Details: Speed up SRAM read and write functions if possible by using MMIO instead of config. cycles. With this change, the post reset signature done at the end of D3 power change must now be moved before the D3 power change. IBM reported a problem on powerpc blades during ethtool self test that was caused by t...
```diff diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 376d8e776936..73e271e59c6a 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -497,21 +497,20 @@ static void tg3_write_mem(struct tg3 *tp, u32 off, u32 val) unsigned long flags; spin_lock_irqsave(&tp->indirect_lock, flags); - pci_write_config...
a0aed49bdb2bbb4234789f241cffb607fd2e213d
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: Fix IP_NF_CONNTRACK_NETLINK dependency
Problem Details: When NAT is built as a module, ip_conntrack_netlink can not be linked 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/Kconfig b/net/ipv4/netfilter/Kconfig index 77855ccd6b43..c60fd5c4ea1e 100644 --- a/net/ipv4/netfilter/Kconfig +++ b/net/ipv4/netfilter/Kconfig @@ -69,6 +69,7 @@ config IP_NF_CONNTRACK_NETLINK tristate 'Connection tracking netlink interface (EXPERIMENTAL)' depends on EXPERIMEN...
32292a7ff1d9306841a8da6ea286847b1070cc6a
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: Fix section mismatch warnings
Problem Details: Fix section mismatch warnings caused by netfilter's init_or_cleanup functions used in many places by splitting the init from the cleanup parts. 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_standalone.c b/net/ipv4/netfilter/ip_conntrack_standalone.c index adc1a0f66409..929d61f7be91 100644 --- a/net/ipv4/netfilter/ip_conntrack_standalone.c +++ b/net/ipv4/netfilter/ip_conntrack_standalone.c @@ -776,18 +776,46 @@ static ctl_table ip_ct_net_table[] = { EXP...
cdee5751bf91d02616aaf30a5affef56105e3b79
Analyze and fix the following issue in the Linux kernel code: [BLUETOOTH] sco: Possible double free.
Problem Details: this fixes coverity bug id #1068. hci_send_sco() frees skb if (skb->len > hdev->sco_mtu). Since it returns a negative error value only in this case, we can directly return here. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index 6b61323ce23c..0c2d13ad69bb 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c @@ -255,7 +255,7 @@ static inline int sco_send_frame(struct sock *sk, struct msghdr *msg, int len) } if ((err = hci_send_sco(conn->hcon, skb)) < 0) - goto fai...
ad96b485b4224785bcca478cfba02d06c46ee575
Analyze and fix the following issue in the Linux kernel code: [TG3]: Fix a memory leak.
Problem Details: This patch fixes a memory leak (buf wasn't freed) spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 0b5358072172..d6047bd6805d 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -8034,9 +8034,13 @@ static int tg3_test_nvram(struct tg3 *tp) for (i = 0; i < size; i++) csum8 += buf8[i]; - if (csum8 == 0) - return 0; - return -EIO; + if...
e3a5cd9edff9a7a20de3c88c9d479704da98fb85
Analyze and fix the following issue in the Linux kernel code: [NET]: Fix an off-by-21-or-49 error.
Problem Details: This patch fixes an off-by-21-or-49 error ;-) spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 21b68464cabb..c12990c9c603 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -165,7 +165,7 @@ static ssize_t show_operstate(struct class_device *dev, char *buf) operstate = IF_OPER_DOWN; read_unlock(&dev_base_lock); - if (operst...
50fba2aa7cefa6b0e1768cb350c9e69042320c03
Analyze and fix the following issue in the Linux kernel code: [INET]: Move no-tunnel ICMP error to tunnel4/tunnel6
Problem Details: This patch moves the sending of ICMP messages when there are no IPv4/IPv6 tunnels present to tunnel4/tunnel6 respectively. Please note that for now if xfrm4_tunnel/xfrm6_tunnel is loaded then no ICMP messages will ever be sent. This is similar to how we handle AH/ESP/IPCOMP. This move fixes the bug ...
```diff diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index eef07b0916a3..ea398ee43f28 100644 --- a/net/ipv4/ipip.c +++ b/net/ipv4/ipip.c @@ -474,9 +474,6 @@ static int ipip_rcv(struct sk_buff *skb) struct iphdr *iph; struct ip_tunnel *tunnel; - if (!pskb_may_pull(skb, sizeof(struct iphdr))) - goto out; - iph...
2e2f7aefa8a8ba4adb6ecee8cbb43fbe9ca4cc89
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: Fix fragmentation issues with bridge netfilter
Problem Details: The conntrack code doesn't do re-fragmentation of defragmented packets anymore but relies on fragmentation in the IP layer. Purely bridged packets don't pass through the IP layer, so the bridge netfilter code needs to take care of fragmentation itself. Signed-off-by: Patrick McHardy <kaber@trash.net> ...
```diff diff --git a/include/net/ip.h b/include/net/ip.h index 8fe6156ca9b0..3d2e5ca62a5a 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -95,6 +95,7 @@ extern int ip_local_deliver(struct sk_buff *skb); extern int ip_mr_input(struct sk_buff *skb); extern int ip_output(struct sk_buff *skb); extern int ip_...
550e29bc96e6f1ced2bca82dace197b009434367
Analyze and fix the following issue in the Linux kernel code: [FIB_TRIE]: Fix leaf freeing.
Problem Details: Seems like leaf (end-nodes) has been freed by __tnode_free_rcu and not by __leaf_free_rcu. This fixes the problem. Only tnode_free is now used which checks for appropriate node type. free_leaf can be removed. Signed-off-by: Robert Olsson <robert.olsson@its.uu.se> Signed-off-by: David S. Miller <davem@...
```diff diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index ccd3efc6a173..95a639f2e3db 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c @@ -50,7 +50,7 @@ * Patrick McHardy <kaber@trash.net> */ -#define VERSION "0.406" +#define VERSION "0.407" #include <linux/config.h> #include <asm/uaccess...
13011d08346d9d649119cc6ef519209c6f33f1e8
Analyze and fix the following issue in the Linux kernel code: [ARM] 3468/1: S3C2410: SMDK common include fix
Problem Details: Patch from Ben Dooks common-smdk.c does not include its own header file defining the exported prototypes. 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/common-smdk.c b/arch/arm/mach-s3c2410/common-smdk.c index 36b8291b5e03..f372fbda124e 100644 --- a/arch/arm/mach-s3c2410/common-smdk.c +++ b/arch/arm/mach-s3c2410/common-smdk.c @@ -37,6 +37,7 @@ #include <asm/arch/nand.h> +#include "common-smdk.h" #include "devs.h" #incl...
67d4d8352b5a78df422a956657d9be4b860680ab
Analyze and fix the following issue in the Linux kernel code: [ARM] 3461/1: ARM: OMAP: Fix clk_get() when using id and name
Problem Details: Patch from Tony Lindgren Recent change to use both id and name when available was not necessarily returning the right clock as it also searched for clock name afterwards. This caused MMC to break on H2 and H3 boards. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+ker...
```diff diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index 06485c193ee3..32ec04c58bcd 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c @@ -58,7 +58,7 @@ struct clk * clk_get(struct device *dev, const char *id) if (p->id == idno && strcmp(id, p->name) == 0 && try...
932355797530f5bd4e1355a2c384e9f3ccc3dcbc
Analyze and fix the following issue in the Linux kernel code: [ARM] 3459/1: ixp23xx: fix debug serial macros for big-endian operation
Problem Details: Patch from Lennert Buytenhek The debug-8250 macros do byte accesses, which means that if we're in big-endian mode, we need to logically OR the UART address with 3, as the LSB byte lane (where UART data and status is transferred) has the highest byte address in the word when we are in big-endian mode. ...
```diff diff --git a/include/asm-arm/arch-ixp23xx/debug-macro.S b/include/asm-arm/arch-ixp23xx/debug-macro.S index eb99fd69fd24..2b25e640247d 100644 --- a/include/asm-arm/arch-ixp23xx/debug-macro.S +++ b/include/asm-arm/arch-ixp23xx/debug-macro.S @@ -17,6 +17,9 @@ tst \rx, #1 @ mmu enabled? ldreq \rx, =IXP23XX...
67644726317a8274be4a3d0ef85b9ccebaa90304
Analyze and fix the following issue in the Linux kernel code: [SELINUX] Fix build after ipsec decap state changes.
Problem Details: security/selinux/xfrm.c: In function 'selinux_socket_getpeer_dgram': security/selinux/xfrm.c:284: error: 'struct sec_path' has no member named 'x' security/selinux/xfrm.c: In function 'selinux_xfrm_sock_rcv_skb': security/selinux/xfrm.c:317: error: 'struct sec_path' has no member named 'x' ...
```diff diff --git a/security/selinux/xfrm.c b/security/selinux/xfrm.c index dfab6c886698..abe99d881376 100644 --- a/security/selinux/xfrm.c +++ b/security/selinux/xfrm.c @@ -281,7 +281,7 @@ u32 selinux_socket_getpeer_dgram(struct sk_buff *skb) int i; for (i = sp->len-1; i >= 0; i--) { - struct xfrm_state *x ...
66004a6ca23f2a2408b32cbe27fda0389fb8f9dc
Analyze and fix the following issue in the Linux kernel code: Move request_standard_resources() back to before PCI probing
Problem Details: This effectively undoes the PCI resource allocation changes done in commit b408cbc704352eccee301e1103b23203ba1c3a0e, but leaves the cleanups of that commit in place. We're going back to marking the resources reported by e820 busy _before_ doing PCI probing, so that any PCI resource that clashes with t...
```diff diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index 8e70894a9f86..80cb3b2d0997 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c @@ -1347,8 +1347,8 @@ legacy_init_iomem_resources(struct resource *code_resource, struct resource *dat /* * Request address space for all stan...
bbd3aff89d4b34ef17a748e4c001ecc5b43e3e55
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86_64: fix CONFIG_REORDER
Problem Details: Fix CONFIG_REORDER. The value of cflags-y was assined to CFLAGS before cflags-y was assigned the value used for CONFIG_REORDER. Use cflags-y for all CFLAGS options in the Makefile to avoid this happening again. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andi Kleen <ak@suse.de> Sig...
```diff diff --git a/arch/x86_64/Makefile b/arch/x86_64/Makefile index 585fd4a559c8..e573e2ab5510 100644 --- a/arch/x86_64/Makefile +++ b/arch/x86_64/Makefile @@ -24,37 +24,37 @@ LDFLAGS := -m elf_x86_64 OBJCOPYFLAGS := -O binary -R .note -R .comment -S LDFLAGS_vmlinux := - CHECKFLAGS += -D__x86_64__ -m64 +...
b20367a6c2a0cd937cb1f0a8cf848f1402fef99c
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86_64: Fix drift with HPET timer enabled
Problem Details: If the HPET timer is enabled, the clock can drift by ~3 seconds a day. This is due to the HPET timer not being initialized with the correct setting (still using PIT count). If HZ changes, this drift can become even more pronounced. HPET patch initializes tick_nsec with correct tick_nsec settings for ...
```diff diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c index 2eeaa95edff0..7392570f975d 100644 --- a/arch/x86_64/kernel/time.c +++ b/arch/x86_64/kernel/time.c @@ -917,6 +917,8 @@ void __init time_init(void) vxtime.hpet_address = 0; if (hpet_use_timer) { + /* set tick_nsec to use the proper r...
ac04dcaf6f567307fbeef9c3c1fff35280e53f02
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86_64: Don't export strlen twice
Problem Details: Fix WARNING: vmlinux: 'strlen' exported twice. Previous export was in vmlinux Reported by Mats Johannesson Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/arch/x86_64/kernel/x8664_ksyms.c b/arch/x86_64/kernel/x8664_ksyms.c index d78f46056bda..fec4e521c01c 100644 --- a/arch/x86_64/kernel/x8664_ksyms.c +++ b/arch/x86_64/kernel/x8664_ksyms.c @@ -112,7 +112,6 @@ EXPORT_SYMBOL_GPL(unset_nmi_callback); #undef memcpy #undef memset #undef memmove -#undef ...
7bf36bbc5e0c09271f9efe22162f8cc3f8ebd3d2
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86_64: When user could have changed RIP always force IRET
Problem Details: Intel EM64T CPUs handle uncanonical return addresses differently from AMD CPUs. The exception is reported in the SYSRET, not the next instruction. This leads to the kernel exception handler running on the user stack with the wrong GS because the kernel didn't expect exceptions on this instruction. Th...
```diff diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S index 10ec27b607f1..c946e4fe67a7 100644 --- a/arch/x86_64/kernel/entry.S +++ b/arch/x86_64/kernel/entry.S @@ -180,6 +180,10 @@ rff_trace: * * XXX if we had a free scratch register we could save the RSP into the stack frame * and rep...
4211a30349e8d2b724cfb4ce2584604f5e59c299
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86_64: Proper null pointer check in powernow_k8_get
Problem Details: This prevents crashes on dual core system when enough ticks are lost. Replaces earlier patch by me. Cc: Dave Jones <davej@redhat.com> Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c index 6ba497c47df6..7c0e160a2145 100644 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c @@ -46,7 +46,7 @@ #define PFX "powernow-k8: " #define BFX PFX "BIOS e...
95d769aaf47abfc77b600631403ff5af6c990cff
Analyze and fix the following issue in the Linux kernel code: [PATCH] i386: Consolidate modern APIC handling
Problem Details: AMD systems have a modern APIC that supports 8 bit IDs, but don't have a XAPIC version number. Add a new "modern_apic" subfunction that handles this correctly and use it (nearly) everywhere where XAPIC is tested for. I removed one wart: the code specified that external APICs would use an 8bit APIC ID...
```diff diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c index 6273bf74c203..254cee9f0b7b 100644 --- a/arch/i386/kernel/apic.c +++ b/arch/i386/kernel/apic.c @@ -62,6 +62,18 @@ int apic_verbosity; static void apic_pm_activate(void); +int modern_apic(void) +{ + unsigned int lvr, version; + /* AMD syste...
fa47dd0ba303599f8adf8d8336ed2fb74efc47c5
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86_64: Fix compilation with CONFIG_PCI=n / allnoconfig
Problem Details: Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/arch/x86_64/kernel/pci-dma.c b/arch/x86_64/kernel/pci-dma.c index 03c9eeedb0f3..af035ede70cd 100644 --- a/arch/x86_64/kernel/pci-dma.c +++ b/arch/x86_64/kernel/pci-dma.c @@ -48,9 +48,11 @@ dma_alloc_pages(struct device *dev, gfp_t gfp, unsigned order) { struct page *page; int node; +#ifdef CON...
805e8c03c9ea9bdb402a36341e02ec24825d5417
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86_64: Clean up execve path
Problem Details: Just call IRET always, no need for any special cases. Needed for the next bug fix. Signed-off-by: Andi Kleen <ak@suse.de> 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 8538bfea30e6..10ec27b607f1 100644 --- a/arch/x86_64/kernel/entry.S +++ b/arch/x86_64/kernel/entry.S @@ -408,25 +408,9 @@ ENTRY(stub_execve) CFI_ADJUST_CFA_OFFSET -8 CFI_REGISTER rip, r11 SAVE_REST - movq %r11, %r15 - CFI_REGISTER r...
2db8d99ffdbed7d2beb1bbdefdcd086dda9dee98
Analyze and fix the following issue in the Linux kernel code: [IA64] always map VGA framebuffer UC, even if it supports WB
Problem Details: EFI on some machines, e.g., Intel Tiger, reports that the VGA framebuffer supports WB access. ioremap() prefers WB when possible, so it can work when mapping main memory. But it doesn't make sense to map a framebuffer WB, because the driver doesn't flush explicitly, so updates won't make it to the de...
```diff diff --git a/include/asm-ia64/vga.h b/include/asm-ia64/vga.h index bc3349ffc505..091177cda223 100644 --- a/include/asm-ia64/vga.h +++ b/include/asm-ia64/vga.h @@ -17,7 +17,7 @@ extern unsigned long vga_console_iobase; extern unsigned long vga_console_membase; -#define VGA_MAP_MEM(x) ((unsigned long) ioremap...
cfab9d0e1da8e08a39759d0fc3bf5e40f0ac2d55
Analyze and fix the following issue in the Linux kernel code: [IA64] fix bug in ia64 __mutex_fastpath_trylock
Problem Details: The parenthesis around "likely" used in ia64 __mutex_fastpath_trylock is incorrect, and it leads to broken mutex_trylock. Here is the patch that fixed the bug. I removed the likely altogether because there is no branch and gcc does a reasonable job at predicating the return value. Signed-off-by: Ken...
```diff diff --git a/include/asm-ia64/mutex.h b/include/asm-ia64/mutex.h index 5a3224f6af38..bed73a643a56 100644 --- a/include/asm-ia64/mutex.h +++ b/include/asm-ia64/mutex.h @@ -84,7 +84,7 @@ __mutex_fastpath_unlock(atomic_t *count, void (*fail_fn)(atomic_t *)) static inline int __mutex_fastpath_trylock(atomic_t *co...
1f7bc828e30fe3e23ea0968b9595ad20e2785978
Analyze and fix the following issue in the Linux kernel code: ocfs2: remove an overly aggressive BUG() in dlmfs
Problem Details: Don't BUG() user_dlm_unblock_lock() on the absence of the USER_LOCK_BLOCKED flag - this turns out to be a valid case. Make some of the related BUG() statements print more useful information. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
```diff diff --git a/fs/ocfs2/dlm/userdlm.c b/fs/ocfs2/dlm/userdlm.c index c3764f4744ee..bac4615965f6 100644 --- a/fs/ocfs2/dlm/userdlm.c +++ b/fs/ocfs2/dlm/userdlm.c @@ -268,13 +268,26 @@ static void user_dlm_unblock_lock(void *opaque) spin_lock(&lockres->l_lock); - BUG_ON(!(lockres->l_flags & USER_LOCK_BLOCKED)...
ab0920ce7ebb6d60063c793f227ae198a492251b
Analyze and fix the following issue in the Linux kernel code: ocfs2: multi node truncate fix
Problem Details: Fix ocfs2_truncate_file() so that it forces a truncate_inode_pages() on all interested nodes in all cases of a truncate(), not just allocation change. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
```diff diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 34e903a6a46b..581eb451a41a 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -260,6 +260,17 @@ static int ocfs2_truncate_file(struct inode *inode, if (new_i_size == le64_to_cpu(fe->i_size)) goto bail; + /* This forces other nodes to sync and drop t...
ed3865079b573ef55dc13ab0bfb242ed5ebab4c1
Analyze and fix the following issue in the Linux kernel code: [GFS2] Finally get ref counting correct
Problem Details: The last patch missed some other instances of incorrect ref counting, this fixes all of those too. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
```diff diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index 316eed688f8e..100672d2c6c5 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c @@ -776,9 +776,9 @@ static struct gfs2_dirent *gfs2_dirent_search(struct inode *inode, goto got_dent; leaf = (struct gfs2_leaf *)bh->b_data; ln = be64_to_cpu(leaf->lf_next); - ...
b09e593d799560f1a0782c20ac5900058390a26f
Analyze and fix the following issue in the Linux kernel code: [GFS2] Fix a ref count bug and other clean ups
Problem Details: This fixes a ref count bug that sometimes showed up a umount time (causing it to hang) but it otherwise mostly harmless. At the same time there are some clean ups including making the log operations structures const, moving a memory allocation so that its not done in the fast path of checking to see if...
```diff diff --git a/fs/gfs2/daemon.c b/fs/gfs2/daemon.c index 94317dc7e42c..b3830b92d78c 100644 --- a/fs/gfs2/daemon.c +++ b/fs/gfs2/daemon.c @@ -129,7 +129,7 @@ int gfs2_logd(void *data) gfs2_ail1_empty(sdp, DIO_ALL); if (time_after_eq(jiffies, t)) { - gfs2_log_flush(sdp); + gfs2_log_flush(sdp, NULL); ...
95f3df6bcb89d370c57b7165f55c5a409d011c8e
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix SA110/SA1100 cache flushing
Problem Details: We had two implementations for flushing the cache, which meant StrongARM caches weren't being correctly flushed. Fix this by always using the v4wb_flush_kern_cache_all method, rather than duplicating it. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mm/cache-v4wb.S b/arch/arm/mm/cache-v4wb.S index 5c4055b62d97..54e3c5bb5186 100644 --- a/arch/arm/mm/cache-v4wb.S +++ b/arch/arm/mm/cache-v4wb.S @@ -10,7 +10,7 @@ #include <linux/config.h> #include <linux/linkage.h> #include <linux/init.h> -#include <asm/hardware.h> +#include <asm/memor...
f1dc24d53e9e91cf795f05751eeb7e220c7c15e1
Analyze and fix the following issue in the Linux kernel code: [ARM] ebsa110: Fix incorrect serial port address
Problem Details: Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/include/asm-arm/arch-ebsa110/uncompress.h b/include/asm-arm/arch-ebsa110/uncompress.h index 66b19c7fd908..ae5b775eb0b7 100644 --- a/include/asm-arm/arch-ebsa110/uncompress.h +++ b/include/asm-arm/arch-ebsa110/uncompress.h @@ -10,7 +10,7 @@ #include <linux/serial_reg.h> -#define SERIAL_BASE ((u...
6e29ebad0f252b085a3bb0188637f315efda0a48
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix ebsa110 debug macros
Problem Details: Was including debug-8250.h rather than debug-8250.S Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/include/asm-arm/arch-ebsa110/debug-macro.S b/include/asm-arm/arch-ebsa110/debug-macro.S index f61cadabe0ec..9213bfe4831d 100644 --- a/include/asm-arm/arch-ebsa110/debug-macro.S +++ b/include/asm-arm/arch-ebsa110/debug-macro.S @@ -18,4 +18,4 @@ #define UART_SHIFT 2 #define FLOW_CONTROL -#include...
d9df92e22aca939857c5bc9ecb130ef22307ccc1
Analyze and fix the following issue in the Linux kernel code: kbuild: properly pass options to hostcc when doing make O=..
Problem Details: This fix a longstanding bug where proper options was not passed to hostcc in case of a make O=.. build. This bug showed up in (not yet merged) klibc, and is not known to have any counterpart in-kernel. Fixed by moving the flags macro to Kbuild.include so it can be used by both Makefile.lib and Makefile...
```diff diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 59620b1554e0..b0d067be7390 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -87,6 +87,11 @@ cc-ifversion = $(shell if [ $(call cc-version, $(CC)) $(1) $(2) ]; then \ # $(Q)$(MAKE) $(build)=dir build := -f $(if $(KBUILD_SRC),...
7d2d8fe0cb88914d26219db51341d780a032b198
Analyze and fix the following issue in the Linux kernel code: kbuild: modules_install for external modules must not remove existing modules
Problem Details: When installing external modules with `make modules_install', the first thing that happens is a rm -rf of the target directory. This works only once, and breaks when installing more than one (set of) external module(s). With following fix we have the functionality: - for a in-kernel modules_install the...
```diff diff --git a/Makefile b/Makefile index c380f5891f4f..fc8e08c419f0 100644 --- a/Makefile +++ b/Makefile @@ -1112,7 +1112,6 @@ modules_install: _emodinst_ _emodinst_post install-dir := $(if $(INSTALL_MOD_DIR),$(INSTALL_MOD_DIR),extra) PHONY += _emodinst_ _emodinst_: - $(Q)rm -rf $(MODLIB)/$(install-dir) $(Q)...
aa360879ed38fbe88057cc43f720881ab9e6a63a
Analyze and fix the following issue in the Linux kernel code: kbuild: fix make dir/
Problem Details: kbuild added an extra '/' after the directory - resulting in all files being rebuild in a subdirectory. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/Makefile b/Makefile index 131950c02919..c380f5891f4f 100644 --- a/Makefile +++ b/Makefile @@ -1284,7 +1284,7 @@ kernelversion: # build-dir => directory in kernel source tree to use ifeq ($(KBUILD_EXTMOD),) - build-dir = $(dir $@) + build-dir = $(patsubst %/,%,$(dir $@)) ...
0947640f4388de50a39f762748b08e586a482527
Analyze and fix the following issue in the Linux kernel code: kbuild: mips: fix sed regexp to generate asm-offset.h
Problem Details: Changes to Makefile.kbuild ("kbuild: add -fverbose-asm to i386 Makefile") breaks asm-offset.h file on MIPS. Other archs possibly suffer this change too but I'm not sure. Here is a fix just for MIPS. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/Kbuild b/Kbuild index 95d6a00bace0..2d4f95e4b89f 100644 --- a/Kbuild +++ b/Kbuild @@ -18,7 +18,7 @@ define sed-y "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}" endef # Override default regexp for specific architectures -sed-$(CONFIG_MIPS) := "/^@@@/s///p" +s...
bc2546a67975a7bddc72f8c48b0bb2081b56f853
Analyze and fix the following issue in the Linux kernel code: kbuild: fix building single targets with make O=.. single-target
Problem Details: This fixes single targets build so it now works relaiably in following cases: - build with mixed kernel source and output files (make single-target) - build with separate output directory (make O=.. single-target) - external module with mixed kernel source and output files (make M='pwd' single-target...
```diff diff --git a/Makefile b/Makefile index b4019426fa25..131950c02919 100644 --- a/Makefile +++ b/Makefile @@ -1275,40 +1275,43 @@ kernelversion: # Single targets # --------------------------------------------------------------------------- -# The directory part is taken from first prerequisite, so this -# work...
86678dfddba55a7b9e2ea084d59be6500fec2256
Analyze and fix the following issue in the Linux kernel code: [PATCH] drm: Fix issue reported by Coverity in drivers/char/drm/via_irq.c
Problem Details: This patch tries to fix an issue reported in drivers/char/drm/via_irq.c by Coverity, please review and apply if correct. Error reported: CID: 3444 Checker: REVERSE_INULL (help) File: /export2/p4-coverity/mc2/linux26/drivers/char/drm/via_irq.c Function: via_driver_irq_wait Description: Pointer "dev_pri...
```diff diff --git a/drivers/char/drm/via_irq.c b/drivers/char/drm/via_irq.c index 6152415644e9..1228fa55355b 100644 --- a/drivers/char/drm/via_irq.c +++ b/drivers/char/drm/via_irq.c @@ -198,7 +198,7 @@ via_driver_irq_wait(drm_device_t * dev, unsigned int irq, int force_sequence, unsigned int cur_irq_sequence; drm_...
b86756ae76dc5e7ecff3ca52a5842155e6d457de
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix CHRP booting - needs a define_machine call
Problem Details: The patch removing _machine and converting platforms over to use define_machine wasn't complete as far as CHRP was concerned. This adds the define_machine call for CHRP and gets it booting again. Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/platforms/chrp/chrp.h b/arch/powerpc/platforms/chrp/chrp.h index 63f0aee4c158..996c28744e96 100644 --- a/arch/powerpc/platforms/chrp/chrp.h +++ b/arch/powerpc/platforms/chrp/chrp.h @@ -9,3 +9,4 @@ extern long chrp_time_init(void); extern void chrp_find_bridges(void); extern void ch...
0da323505fc7dd6b01d35e6181cb3d45f992726a
Analyze and fix the following issue in the Linux kernel code: [ARM] arm's arch_local_page_offset() fix against 2.6.17-rc1
Problem Details: This patch fixes arch_local_page_offset(pfn,nid) in arm. This new one (added by unify_pfn_to_page patches) is obviously buggy. This macro calculate page offset in a node. Note: about LOCAL_MAP_NR() comment in arm's sub-archs says... /* * Given a kaddr, LOCAL_MAP_NR finds the owning node of the me...
```diff diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h index 2b3cf69b3ed9..a814e73e6656 100644 --- a/include/asm-arm/memory.h +++ b/include/asm-arm/memory.h @@ -188,7 +188,7 @@ static inline __deprecated void *bus_to_virt(unsigned long x) */ #include <linux/numa.h> #define arch_pfn_to_nid(pfn) (PF...
1417ae0869472f4f3768779c51c3979faca20b2e
Analyze and fix the following issue in the Linux kernel code: kbuild: fix unneeded rebuilds in drivers/net/chelsio after moving source tree
Problem Details: This fixes some uneeded rebuilds under drivers/net/chelsio after moving the source tree. The makefiles used $(TOPDIR) for include paths, which is unnecessary. Changed to use relative paths. Compile tested, produces byte-identical code to the previous makefiles. Signed-off-by: Carl-Daniel Hailfinger <...
```diff diff --git a/drivers/net/chelsio/Makefile b/drivers/net/chelsio/Makefile index 91e927827c43..54c78d94f48b 100644 --- a/drivers/net/chelsio/Makefile +++ b/drivers/net/chelsio/Makefile @@ -4,7 +4,7 @@ obj-$(CONFIG_CHELSIO_T1) += cxgb.o -EXTRA_CFLAGS += -I$(TOPDIR)/drivers/net/chelsio $(DEBUG_FLAGS) +EXTRA_CF...
8036dc6bdca0faa981be01377728678a6f6f3fde
Analyze and fix the following issue in the Linux kernel code: kbuild: fix unneeded rebuilds in drivers/media/video after moving source tree
Problem Details: This fixes some uneeded rebuilds under drivers/media/video after moving the source tree. The makefiles used $(src) and $(srctree) for include paths, which is unnecessary. Changed to use relative paths. Compile tested, produces byte-identical code to the previous makefiles. Signed-off-by: Carl-Daniel ...
```diff diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile index 4092a5e37ffc..b3ea2d63db9b 100644 --- a/drivers/media/video/Makefile +++ b/drivers/media/video/Makefile @@ -84,4 +84,4 @@ obj-$(CONFIG_USB_IBMCAM) += usbvideo/ obj-$(CONFIG_USB_KONICAWC) += usbvideo/ obj-$(CONFIG_USB_VI...
a7d7cb3cd6c97cbbe21d528c014e5f592006457d
Analyze and fix the following issue in the Linux kernel code: kbuild: fix garbled text in modules.txt
Problem Details: Signed-off-by: Brian Gerst <bgerst@didntduck.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/Documentation/kbuild/modules.txt b/Documentation/kbuild/modules.txt index fcccf2432f98..61fc079eb966 100644 --- a/Documentation/kbuild/modules.txt +++ b/Documentation/kbuild/modules.txt @@ -44,7 +44,7 @@ What is covered within this file is mainly information to authors of modules. The author of an...
31ce6daefe2d312e31ee06b0b3301b1cb7878c04
Analyze and fix the following issue in the Linux kernel code: [PATCH] libata-dev: irq-pio minor fix 2
Problem Details: irq-pio minor fix 2: - Use qc as data for ata_pio_task(). Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index d270b23a03b8..57b3240ee867 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -4097,9 +4097,6 @@ static void ata_pio_task(void *_data) fsm_start: WARN_ON(ap->hsm_task_state == HSM_ST_IDLE); - qc = ata_qc_fro...
4332a771f4d2f23a6d3beff3dd5405e79775a211
Analyze and fix the following issue in the Linux kernel code: [PATCH] libata-dev: irq-pio minor fix
Problem Details: irq-pio minor fix: - remove the redundant hsm_task_state = HSM_ST_IDLE - add devno to printk() as done in upstream Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 56537293ad41..d270b23a03b8 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -4043,8 +4043,8 @@ fsm_start: } /* no more data to transfer */ - DPRINTK("ata%u: command complete, drv_stat 0x%x\n", - ap->...
ce1823f0323be9f38bbe0df229a5bba025404923
Analyze and fix the following issue in the Linux kernel code: IB/srp: Fix memory leak in options parsing
Problem Details: Fix memory leak if parsing destination GID fails. Coverity bug 1042 Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index fd8a95a9c5d3..5f2b3f6e4c47 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -1434,6 +1434,7 @@ static int srp_parse_options(const char *buf, struct srp_target_port *target) ...
3aff13cfb8810cc228e8fdcb92103ed0b11ee38e
Analyze and fix the following issue in the Linux kernel code: intelfb: fixup p calculation
Problem Details: This fixes up the p calculation of p1 and p2 for the i9xx chipsets. This seems to work a lot better for lower pixel clocks.. Signed-off-by: Dave Airlie <airlied@linux.ie>
```diff diff --git a/drivers/video/intelfb/intelfb.h b/drivers/video/intelfb/intelfb.h index 43128f9b68f0..631a3a95de40 100644 --- a/drivers/video/intelfb/intelfb.h +++ b/drivers/video/intelfb/intelfb.h @@ -286,7 +286,7 @@ struct intelfb_info { int pll_index; }; -#define IS_I9xx(dinfo) (((dinfo)->chipset == INTEL_...
227c939b00cf786b5e2e95fc904518206f478421
Analyze and fix the following issue in the Linux kernel code: IB/mthca: Always build debugging code unless CONFIG_EMBEDDED=y
Problem Details: Change the mthca debugging trace output code so that it can enabled and disabled at runtime with the debug_level module parameter in sysfs. Also, don't allow CONFIG_INFINIBAND_MTHCA_DEBUG to be disabled unless CONFIG_EMBEDDED is selected. We want users (and especially distros) to have this turned on ...
```diff diff --git a/drivers/infiniband/hw/mthca/Kconfig b/drivers/infiniband/hw/mthca/Kconfig index e88be85b3d5c..9aa5a4468a75 100644 --- a/drivers/infiniband/hw/mthca/Kconfig +++ b/drivers/infiniband/hw/mthca/Kconfig @@ -7,10 +7,11 @@ config INFINIBAND_MTHCA ("Tavor") and the MT25208 PCI Express HCA ("Arbel"). ...
f5545d24b8aa9fccd8071203e83bc9f4b26e17a6
Analyze and fix the following issue in the Linux kernel code: IPoIB: Always build debugging code unless CONFIG_EMBEDDED=y
Problem Details: Don't allow CONFIG_INFINIBAND_IPOIB_DEBUG to be disabled unless CONFIG_EMBEDDED is selected. We want users (and especially distros) to have this turned on unless they really need to save space, because by the time we want debugging output, it's usually too late to rebuild a kernel. The debugging outp...
```diff diff --git a/drivers/infiniband/ulp/ipoib/Kconfig b/drivers/infiniband/ulp/ipoib/Kconfig index 8d2e04cac68e..13d6d01c72c0 100644 --- a/drivers/infiniband/ulp/ipoib/Kconfig +++ b/drivers/infiniband/ulp/ipoib/Kconfig @@ -10,8 +10,9 @@ config INFINIBAND_IPOIB group: <http://www.ietf.org/html.charters/ipoib-cha...
37289efe3ee0c0a00b5d8302df9a2b007e65c187
Analyze and fix the following issue in the Linux kernel code: IB/mad: fix oops in cancel_mads
Problem Details: We have seen the following OOPs in cancel_mads, when restarting opensm multiple times: Call Trace: [<c010549b>] show_stack+0x9b/0xb0 [<c01055ec>] show_registers+0x11c/0x190 [<c01057cd>] die+0xed/0x160 [<c031b966>] do_page_fault+0x3f6/0x5d0 [<c010511f>] error_code+0x4f...
```diff diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index ba54c856b0e5..3a702da83e41 100644 --- a/drivers/infiniband/core/mad.c +++ b/drivers/infiniband/core/mad.c @@ -2311,6 +2311,7 @@ static void local_completions(void *data) local = list_entry(mad_agent_priv->local_list.next, ...
3e7ee3e7b36fa4e2d88d8fb0a2577be95fc4636d
Analyze and fix the following issue in the Linux kernel code: [PATCH] splice: fix page stealing LRU handling.
Problem Details: Originally from Nick Piggin, just adapted to the newer branch. You can't check PageLRU without holding zone->lru_lock. The page release code can get away with it only because the page refcount is 0 at that point. Also, you can't reliably remove pages from the LRU unless the refcount is 0. Ever. Sign...
```diff diff --git a/fs/pipe.c b/fs/pipe.c index 5093408746b8..795df987cd38 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -95,6 +95,8 @@ static void anon_pipe_buf_release(struct pipe_inode_info *info, struct pipe_buff { struct page *page = buf->page; + buf->flags &= ~PIPE_BUF_FLAG_STOLEN; + /* * If nobody else us...
53cd9ae886273d6c2b8ba4aa63d6cd6b1217b57f
Analyze and fix the following issue in the Linux kernel code: [PATCH] splice: fix shadow[] filling logic
Problem Details: Clear the entire range, and don't increment pidx or we keep filling the same position again and again. Thanks to KAMEZAWA Hiroyuki. Signed-off-by: Jens Axboe <axboe@suse.de>
```diff diff --git a/fs/splice.c b/fs/splice.c index 6081cf7d2d1b..a555d0a83fe9 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -237,9 +237,9 @@ static int __generic_file_splice_read(struct file *in, struct inode *pipe, * fill shadow[] with pages at the right locations, so we only * have to fill holes */ - memse...
24c7cd0630f76f0eb081d539c53893d9f15787e8
Analyze and fix the following issue in the Linux kernel code: [PATCH] sbp2: fix spinlock recursion
Problem Details: sbp2util_mark_command_completed takes a lock which was already taken by sbp2scsi_complete_all_commands. This is a regression in Linux 2.6.15. Reported by Kristian Harms at https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=187394 [ More complete commentary, as response to questions by Andrew: ] ...
```diff diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index 2c765ca5aa50..f4206604db03 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c @@ -496,22 +496,17 @@ static struct sbp2_command_info *sbp2util_find_command_for_orb( /* * This function finds the sbp2_command for a given outsta...
c9d1a0b8d52e7539e22f3c3190f8b6e0c80b6cfe
Analyze and fix the following issue in the Linux kernel code: [WATCHDOG] pcwd_usb.c: fix a NULL pointer dereference
Problem Details: The Coverity checker noted that this resulted in a NULL pointer reference if we were coming from if (usb_pcwd == NULL) { printk(KERN_ERR PFX "Out of memory\n"); goto error; } Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Wim Van Sebroec...
```diff diff --git a/drivers/char/watchdog/pcwd_usb.c b/drivers/char/watchdog/pcwd_usb.c index 2700c5c45b8a..3fdfda9324fa 100644 --- a/drivers/char/watchdog/pcwd_usb.c +++ b/drivers/char/watchdog/pcwd_usb.c @@ -705,7 +705,8 @@ err_out_misc_deregister: err_out_unregister_reboot: unregister_reboot_notifier(&usb_pcwd_n...
6bbc20bc0b5d9c5a351fb3a027e60e396c1329a6
Analyze and fix the following issue in the Linux kernel code: [WATCHDOG] pcwd.c sprintf/strcpy fix
Problem Details: change sprintf(pcwd_private.fw_ver_str, "ERROR"); to strcpy... as pointed out by Andrew Morton. Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Andrew Morton <akpm@osdl.org>
```diff diff --git a/drivers/char/watchdog/pcwd.c b/drivers/char/watchdog/pcwd.c index 28a404adf8f0..6d44ca68312d 100644 --- a/drivers/char/watchdog/pcwd.c +++ b/drivers/char/watchdog/pcwd.c @@ -269,7 +269,7 @@ static inline void pcwd_get_firmware(void) { int one, ten, hund, minor; - sprintf(pcwd_private.fw_ver_st...
c324ab4281d6b7a3130e9291d74b5c2361a16d56
Analyze and fix the following issue in the Linux kernel code: [WATCHDOG] pcwd.c add debug info
Problem Details: Add debugging info for the pcwd.c module. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
```diff diff --git a/drivers/char/watchdog/pcwd.c b/drivers/char/watchdog/pcwd.c index e952c9bc12bb..0e4b3dfa0084 100644 --- a/drivers/char/watchdog/pcwd.c +++ b/drivers/char/watchdog/pcwd.c @@ -158,6 +158,13 @@ static struct { /* this is private data for each ISA-PC watchdog card */ } pcwd_private; /* module pa...
6e60e79a1d46eaa3369febc2f6c31e0acfaaae3f
Analyze and fix the following issue in the Linux kernel code: [ARM] 3429/1: ARM: OMAP: 4/8 Update GPIO
Problem Details: Patch from Tony Lindgren Update OMAP GPIO code from linux-omap tree: - Fix omap16xx edge control by Juha Yrjola - Support for additional omap16xx trigger modes by Dirk Behme - Fix edge detection by Tony Lindgren et al. - Better support for omap15xx and omap310 by Andrej Zaborowski - Fix omap15xx inte...
```diff diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index b4d5b9e4bfce..d3c8ea7eecfd 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c @@ -174,7 +174,7 @@ static int gpio_bank_count; static inline struct gpio_bank *get_gpio_bank(int gpio) { #ifdef CONFIG_ARCH_OMAP15XX - if...
c13b56a1130bbfacfb588de100e5a248383805a6
Analyze and fix the following issue in the Linux kernel code: [libata] irq-pio: Fix merge mistake
Problem Details:
```diff diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 9de48dd4234a..fc3e57f84268 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -4124,101 +4124,6 @@ fsm_start: goto fsm_start; } -/** - * ata_qc_timeout - Handle timeout of queued command - * @qc: Command th...
a580290c3e64bb695158a090d02d1232d9609311
Analyze and fix the following issue in the Linux kernel code: Documentation: fix minor kernel-doc warnings
Problem Details: This patch updates the comments to match the actual code. Signed-off-by: Martin Waitz <tali@admingilde.org> Signed-off-by: Adrian Bunk <bunk@stusta.de>
```diff diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl index 8c9c6704e85b..ca02e04a906c 100644 --- a/Documentation/DocBook/kernel-api.tmpl +++ b/Documentation/DocBook/kernel-api.tmpl @@ -322,7 +322,6 @@ X!Earch/i386/kernel/mca.c <chapter id="sysfs"> <title>The Filesy...
5d9428de1a9785f10a4339f80b717be665ba51c7
Analyze and fix the following issue in the Linux kernel code: BUG_ON() Conversion in drivers/net/
Problem Details: this changes if() BUG(); constructs to BUG_ON() which is cleaner, contains unlikely() and can better optimized away. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
```diff diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c index ce99845d8266..066e22b01a94 100644 --- a/drivers/net/8139cp.c +++ b/drivers/net/8139cp.c @@ -539,8 +539,7 @@ rx_status_loop: unsigned buflen; skb = cp->rx_skb[rx_tail].skb; - if (!skb) - BUG(); + BUG_ON(!skb); desc = &cp->rx_ring[rx_...
7e99e9b66336565f0088ea59d848ab187f9689c3
Analyze and fix the following issue in the Linux kernel code: BUG_ON() Conversion in drivers/s390/net/lcs.c
Problem Details: this changes if() BUG(); constructs to BUG_ON() which is cleaner, contains unlikely() and can better optimized away. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
```diff diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c index edcf05d5d568..5d6b7a57b02f 100644 --- a/drivers/s390/net/lcs.c +++ b/drivers/s390/net/lcs.c @@ -675,9 +675,8 @@ lcs_ready_buffer(struct lcs_channel *channel, struct lcs_buffer *buffer) int index, rc; LCS_DBF_TEXT(5, trace, "rdybuff"); - if...
40094fa65238291d51839326320aba997092ab1f
Analyze and fix the following issue in the Linux kernel code: BUG_ON() Conversion in mm/slab.c
Problem Details: this changes if() BUG(); constructs to BUG_ON() which is cleaner, contains unlikely() and can better optimized away. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
```diff diff --git a/mm/slab.c b/mm/slab.c index 4cbf8bb13557..f055c1420216 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -1297,8 +1297,7 @@ void __init kmem_cache_init(void) if (cache_cache.num) break; } - if (!cache_cache.num) - BUG(); + BUG_ON(!cache_cache.num); cache_cache.gfporder = order; cache_cache.co...
75babcacede876608f14ef1a20e795ce17ae637f
Analyze and fix the following issue in the Linux kernel code: BUG_ON() Conversion in mm/highmem.c
Problem Details: this changes if() BUG(); constructs to BUG_ON() which is cleaner, contains unlikely() and can better optimized away. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
```diff diff --git a/mm/highmem.c b/mm/highmem.c index 55885f64af40..9b274fdf9d08 100644 --- a/mm/highmem.c +++ b/mm/highmem.c @@ -74,8 +74,7 @@ static void flush_all_zero_pkmaps(void) pkmap_count[i] = 0; /* sanity check */ - if (pte_none(pkmap_page_table[i])) - BUG(); + BUG_ON(pte_none(pkmap_page_table[i])...
9f31252cb61d5bc641cdef8a069a2ca5a77855f2
Analyze and fix the following issue in the Linux kernel code: BUG_ON() Conversion in kernel/signal.c
Problem Details: this changes if() BUG(); constructs to BUG_ON() which is cleaner, contains unlikely() and can better optimized away. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
```diff diff --git a/kernel/timer.c b/kernel/timer.c index 6b812c04737b..c3a874f1393c 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -1479,8 +1479,7 @@ register_time_interpolator(struct time_interpolator *ti) unsigned long flags; /* Sanity check */ - if (ti->frequency == 0 || ti->mask == 0) - BUG(); + BUG_O...
fda8bd78a15950b9b01a1c1477a9095cb08c27c1
Analyze and fix the following issue in the Linux kernel code: BUG_ON() Conversion in kernel/signal.c
Problem Details: this changes if() BUG(); constructs to BUG_ON() which is cleaner, contains unlikely() and can better optimized away. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
```diff diff --git a/kernel/signal.c b/kernel/signal.c index 92025b108791..5ccaac505e8d 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -769,8 +769,7 @@ specific_send_sig_info(int sig, struct siginfo *info, struct task_struct *t) { int ret = 0; - if (!irqs_disabled()) - BUG(); + BUG_ON(!irqs_disabled()); ...
524223ca8142d593124bde66f3ffa1deb6f56c06
Analyze and fix the following issue in the Linux kernel code: BUG_ON() Conversion in kernel/ptrace.c
Problem Details: this changes if() BUG(); constructs to BUG_ON() which is cleaner, contains unlikely() and can better optimized away. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
```diff diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 86a7f6c60cb2..0eeb7e66722c 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c @@ -30,8 +30,7 @@ */ void __ptrace_link(task_t *child, task_t *new_parent) { - if (!list_empty(&child->ptrace_list)) - BUG(); + BUG_ON(!list_empty(&child->ptrace_list)); if (...
9ba025f10885758975fbbc2292a5b9e7cb8026a8
Analyze and fix the following issue in the Linux kernel code: BUG_ON() Conversion in ipc/shm.c
Problem Details: this changes if() BUG(); constructs to BUG_ON() which is cleaner, contains unlikely() and can better optimized away. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
```diff diff --git a/ipc/shm.c b/ipc/shm.c index f806a2e314e0..6b0c9af5bbf7 100644 --- a/ipc/shm.c +++ b/ipc/shm.c @@ -91,8 +91,8 @@ static inline int shm_addid(struct shmid_kernel *shp) static inline void shm_inc (int id) { struct shmid_kernel *shp; - if(!(shp = shm_lock(id))) - BUG(); + shp = shm_lock(id); + BU...
7ec70738097af9dfd25d5f83e9b27a532f462912
Analyze and fix the following issue in the Linux kernel code: BUG_ON() Conversion in fs/freevxfs/
Problem Details: this changes if() BUG(); constructs to BUG_ON() which is cleaner, contains unlikely() and can better optimized away. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
```diff diff --git a/fs/freevxfs/vxfs_olt.c b/fs/freevxfs/vxfs_olt.c index 76a0708ae978..049500847903 100644 --- a/fs/freevxfs/vxfs_olt.c +++ b/fs/freevxfs/vxfs_olt.c @@ -42,24 +42,21 @@ static inline void vxfs_get_fshead(struct vxfs_oltfshead *fshp, struct vxfs_sb_info *infp) { - if (infp->vsi_fshino) - BUG(); + B...
2c2111c2bd821d3e7cf5a6a37a112a620fd947a3
Analyze and fix the following issue in the Linux kernel code: BUG_ON() Conversion in fs/udf/
Problem Details: this changes if() BUG(); constructs to BUG_ON() which is cleaner, contains unlikely() and can better optimized away. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
```diff diff --git a/fs/udf/inode.c b/fs/udf/inode.c index 81e0e8459af1..2983afd5e7fd 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c @@ -312,12 +312,10 @@ static int udf_get_block(struct inode *inode, sector_t block, struct buffer_head err = 0; bh = inode_getblk(inode, block, &err, &phys, &new); - if (bh) - BU...
d6735bfcc998863dab89dacca2aed20932b6bc21
Analyze and fix the following issue in the Linux kernel code: BUG_ON() Conversion in fs/sysv/
Problem Details: this changes if() BUG(); constructs to BUG_ON() which is cleaner, contains unlikely() and can better optimized away. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
```diff diff --git a/fs/sysv/dir.c b/fs/sysv/dir.c index 8c66e9270dd6..d7074341ee87 100644 --- a/fs/sysv/dir.c +++ b/fs/sysv/dir.c @@ -253,8 +253,7 @@ int sysv_delete_entry(struct sysv_dir_entry *de, struct page *page) lock_page(page); err = mapping->a_ops->prepare_write(NULL, page, from, to); - if (err) - BUG()...