id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
f494f8fcb18e962839a82d542fbe6bed9cf5be07
Analyze and fix the following issue in the Linux kernel code: add-scaled-time-to-taskstats-based-process-accounting fix
Problem Details: This moves the new items to the end of the taskstats struct as requested by Balbir and yourself. Cc: Balbir Singh <balbir@in.ibm.com> Cc: Jay Lan <jlan@engr.sgi.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-fou...
```diff diff --git a/include/linux/taskstats.h b/include/linux/taskstats.h index 92bfd1c153fb..5d69c0744fff 100644 --- a/include/linux/taskstats.h +++ b/include/linux/taskstats.h @@ -85,12 +85,9 @@ struct taskstats { * On some architectures, value will adjust for cpu time stolen * from the kernel in involuntary w...
6c0286b199c3eb2caa973525dfc8a7ed67090ec0
Analyze and fix the following issue in the Linux kernel code: Char: rocket, fix signed/unsigned warning
Problem Details: Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c index abe3ad0f6195..7e6a3a413bb2 100644 --- a/drivers/char/rocket.c +++ b/drivers/char/rocket.c @@ -549,8 +549,8 @@ static void rp_handle_port(struct r_port *info) static void rp_do_poll(unsigned long dummy) { CONTROLLER_t *ctlp; - int ctrl, aiop, c...
4384a3fae10c1badb859d2c98a6d2944b14609f6
Analyze and fix the following issue in the Linux kernel code: Char: rocket, remove potential leak in module_init
Problem Details: if (controller && !request_region) then we leaked a tty driver struct, fix it by adding function deinit tail with goto-ing into it (and from other fail paths too) Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <tor...
```diff diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c index ffcd8b4fbf99..abe3ad0f6195 100644 --- a/drivers/char/rocket.c +++ b/drivers/char/rocket.c @@ -2359,14 +2359,14 @@ static const struct tty_operations rocket_ops = { */ static int __init rp_init(void) { - int retval, pci_boards_found, isa_boards...
ac6aec2f5683588361ab408cb3346b08c66bdfbe
Analyze and fix the following issue in the Linux kernel code: Char: rocket, fix dynamic_dev tty
Problem Details: - register_device unconditionally (non-pci dependent) to have also isa devices in /dev - unregister devices on module removal - don't set TTY_DRIVER_DYNAMIC_DEV twice (removed the one dependent on some macro) Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Ferenc Wagner <wferi@niif.hu> Signed-...
```diff diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c index d790b08525b4..01ce0c7d30a9 100644 --- a/drivers/char/rocket.c +++ b/drivers/char/rocket.c @@ -700,8 +700,8 @@ static void init_r_port(int board, int aiop, int chan, struct pci_dev *pci_dev) spin_lock_init(&info->slock); mutex_init(&info->write...
65f76a82ec7a0374fad85211535330e203740475
Analyze and fix the following issue in the Linux kernel code: Char: cyclades, fix some -W warnings
Problem Details: Most of them are signedness, the rest unused function parameters. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index 46a15d24ce7d..0634dd1c773a 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c @@ -662,7 +662,7 @@ static void cy_throttle(struct tty_struct *tty); static void cy_send_xchar(struct tty_struct *tty, char ch); -#define IS_CYC_...
1c0a387c1f9e48e480579d3b4e0f9c1a36c77751
Analyze and fix the following issue in the Linux kernel code: Char: cyclades, move spin_lock to one place
Problem Details: Lock whole processing in isr, avoid error-prone locking/unlocking in rx/tx esp. On fail paths (there was a bug in the past yet). Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index 39bfe043fba8..46a15d24ce7d 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c @@ -994,7 +994,6 @@ static void cyy_chip_rx(struct cyclades_card *cinfo, int chip, printk(KERN_DEBUG "cyy_interrupt: rcvd intr, chip %d\n", chip); ...
c43422053bea7a5ce09f18d0c50a606fe1a549f4
Analyze and fix the following issue in the Linux kernel code: Char: moxa, fix and optimise empty timer
Problem Details: moxa, fix and optimise empty timer don't wait and delete empty timer in empty timer function. Also fire next empty timer at rounded jiffies to save power. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@l...
```diff diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c index ed76f0a127fd..5000b3bd091e 100644 --- a/drivers/char/moxa.c +++ b/drivers/char/moxa.c @@ -1040,14 +1040,14 @@ static void check_xmit_empty(unsigned long data) struct moxa_port *ch; ch = (struct moxa_port *) data; - del_timer_sync(&moxa_ports[ch-...
5b4db0c2f25925fcfc17fa7233b7b90dc023d207
Analyze and fix the following issue in the Linux kernel code: whitespace fixes: system timers
Problem Details: Signed-off-by: Daniel Walker <dwalker@mvista.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/timer.c b/kernel/timer.c index 6ce1952eea7d..0735f0aa3afb 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -817,7 +817,7 @@ unsigned long next_timer_interrupt(void) #endif /* - * Called from the timer interrupt handler to charge one tick to the current + * Called from the timer inter...
0719e3702e3ad81c51aec993a641a7d84d3ac618
Analyze and fix the following issue in the Linux kernel code: whitespace fixes: interval timers
Problem Details: Signed-off-by: Daniel Walker <dwalker@mvista.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/itimer.c b/kernel/itimer.c index 3205e8e114fa..2fab344dbf56 100644 --- a/kernel/itimer.c +++ b/kernel/itimer.c @@ -130,7 +130,7 @@ asmlinkage long sys_getitimer(int which, struct itimerval __user *value) enum hrtimer_restart it_real_fn(struct hrtimer *timer) { struct signal_struct *sig =...
62769dce8616f4066a1349f798bdd4ef5dd8feca
Analyze and fix the following issue in the Linux kernel code: whitespace fixes: execution domains
Problem Details: Signed-off-by: Daniel Walker <dwalker@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/exec_domain.c b/kernel/exec_domain.c index 3c2eaea66b1e..a9e6bad9f706 100644 --- a/kernel/exec_domain.c +++ b/kernel/exec_domain.c @@ -57,7 +57,7 @@ lookup_exec_domain(u_long personality) { struct exec_domain * ep; u_long pers = personality(personality); - + read_lock(&exec_domain...
5600b892789c21749898e1ef815a2b9b152f51e0
Analyze and fix the following issue in the Linux kernel code: whitespace fixes: system auditing
Problem Details: Just removing white space at the end of lines. Signed-off-by: Daniel Walker <dwalker@mvista.com> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/audit.c b/kernel/audit.c index 2924251a6547..6977ea57a7e2 100644 --- a/kernel/audit.c +++ b/kernel/audit.c @@ -664,11 +664,11 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) if (sid) { if (selinux_sid_to_string( sid, &ctx, &len)) { - audit_l...
bd3a8492baecde685a7568f9785651e9b11747f5
Analyze and fix the following issue in the Linux kernel code: whitespace fixes: compat syscalls
Problem Details: Signed-off-by: Daniel Walker <dwalker@mvista.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/compat.c b/kernel/compat.c index 3bae3742c2aa..b78328af19ad 100644 --- a/kernel/compat.c +++ b/kernel/compat.c @@ -247,8 +247,8 @@ asmlinkage long compat_sys_setrlimit(unsigned int resource, int ret; mm_segment_t old_fs = get_fs (); - if (resource >= RLIM_NLIMITS) - return -EINVAL; ...
9f8dbe9c9ccd847b07a374f92f3c71251e5789cf
Analyze and fix the following issue in the Linux kernel code: whitespace fixes: syscall auditing
Problem Details: Signed-off-by: Daniel Walker <dwalker@mvista.com> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 938e60a61882..e19b5a33aede 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c @@ -320,7 +320,7 @@ static int audit_filter_rules(struct task_struct *tsk, result = audit_comparator(tsk->personality, f->op, f->val); break; case AUDIT_ARCH: - if...
314f70fd967064c7fa0734908f5feae6ac2831a9
Analyze and fix the following issue in the Linux kernel code: whitespace fixes: capability syscalls
Problem Details: Large chunks of 5 spaces instead of tabs. Signed-off-by: Daniel Walker <dwalker@mvista.com> Cc: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/capability.c b/kernel/capability.c index 14853be5944d..cbc5fd60c0f3 100644 --- a/kernel/capability.c +++ b/kernel/capability.c @@ -5,7 +5,7 @@ * * Integrated into 2.1.97+, Andrew G. Morgan <morgan@kernel.org> * 30 May 2002: Cleanup, Robert M. Love <rml@tech9.net> - */ + */ #includ...
c277e63fbe53697eab7595e86b297c643e2ea723
Analyze and fix the following issue in the Linux kernel code: whitespace fixes: panic handling
Problem Details: Signed-off-by: Daniel Walker <dwalker@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/panic.c b/kernel/panic.c index f64f4c1ac11f..3886bd8230fe 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -56,14 +56,14 @@ EXPORT_SYMBOL(panic_blink); * * This function never returns. */ - + NORET_TYPE void panic(const char * fmt, ...) { long i; static char buf[1024]; va_l...
22a8bdeb535d75d586d247ffaa51742556ebfee8
Analyze and fix the following issue in the Linux kernel code: whitespace fixes: module loading
Problem Details: Signed-off-by: Daniel Walker <dwalker@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/module.c b/kernel/module.c index a389b423c279..7734595bd329 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -105,7 +105,7 @@ void __module_put_and_exit(struct module *mod, long code) do_exit(code); } EXPORT_SYMBOL(__module_put_and_exit); - + /* Find a module section: 0 means not ...
23ff4440243fe3fa42515d18aa213be14bb706ee
Analyze and fix the following issue in the Linux kernel code: whitespace fixes: fork
Problem Details: Signed-off-by: Daniel Walker <dwalker@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/fork.c b/kernel/fork.c index 125246fc75a5..1232aac6a1cd 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -268,7 +268,7 @@ static inline int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm) get_file(file); if (tmp->vm_flags & VM_DENYWRITE) atomic_dec(&inode->i_writecount)...
902749cdbd3da8199e57d082f36a6de60591aeb6
Analyze and fix the following issue in the Linux kernel code: whitespace fixes: DMA channel allocator
Problem Details: Signed-off-by: Daniel Walker <dwalker@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/dma.c b/kernel/dma.c index 937b13ca33ba..6a82bb716dac 100644 --- a/kernel/dma.c +++ b/kernel/dma.c @@ -20,7 +20,7 @@ #include <asm/dma.h> #include <asm/system.h> - + /* A note on resource allocation: * @@ -95,7 +95,7 @@ void free_dma(unsigned int dmanr) if (xchg(&dma_chan_busy[dm...
9ce34218a8b63594c8958b5a4ef8cce24d511e1b
Analyze and fix the following issue in the Linux kernel code: whitespace fixes: audit filtering
Problem Details: Signed-off-by: Daniel Walker <dwalker@mvista.com> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index 359645cff5b2..df66a21fb360 100644 --- a/kernel/auditfilter.c +++ b/kernel/auditfilter.c @@ -1498,7 +1498,7 @@ int audit_receive_filter(int type, int pid, int uid, int seq, void *data, * auditctl to read from it... which isn't ever going to *...
1bfbc608ba05951678eedc246c9baf62367764a0
Analyze and fix the following issue in the Linux kernel code: whitespace fixes: relayfs
Problem Details: Signed-off-by: Daniel Walker <dwalker@mvista.com> Cc: Tom Zanussi <zanussi@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/relay.c b/kernel/relay.c index ad855017bc59..61134eb7a0c8 100644 --- a/kernel/relay.c +++ b/kernel/relay.c @@ -370,7 +370,7 @@ void relay_reset(struct rchan *chan) if (!chan) return; - if (chan->is_global && chan->buf[0]) { + if (chan->is_global && chan->buf[0]) { __relay_reset(ch...
dedf8b79ec06e91fa87f6cba99e6e61b4140ceca
Analyze and fix the following issue in the Linux kernel code: whitespace fixes: cpuset
Problem Details: Signed-off-by: Daniel Walker <dwalker@mvista.com> Cc: Paul Jackson <pj@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 2eb2e50db0d6..64950fa5d321 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -2431,12 +2431,12 @@ int __cpuset_zone_allowed_hardwall(struct zone *z, gfp_t gfp_mask) node = zone_to_nid(z); if (node_isset(node, current->mems_allowed)) return 1; - ...
6ae965cd647d84ab787225fe908cb5bbbc499605
Analyze and fix the following issue in the Linux kernel code: whitespace fixes: process accounting
Problem Details: Lots of converting spaces to tabs. Signed-off-by: Daniel Walker <dwalker@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/acct.c b/kernel/acct.c index 24f0f8b2ba72..fce53d8df8a7 100644 --- a/kernel/acct.c +++ b/kernel/acct.c @@ -329,16 +329,16 @@ static comp_t encode_comp_t(unsigned long value) } /* - * If we need to round up, do it (and handle overflow correctly). - */ + * If we need to ...
6fa6c3b1d1780450a2f051937b3c6258eb1a8d5f
Analyze and fix the following issue in the Linux kernel code: whitespace fixes: time syscalls
Problem Details: Signed-off-by: Daniel Walker <dwalker@mvista.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/time.c b/kernel/time.c index d9725bdcd045..09d3c45c4da7 100644 --- a/kernel/time.c +++ b/kernel/time.c @@ -9,9 +9,9 @@ */ /* * Modification history kernel/time.c - * + * * 1993-09-02 Philip Gladstone - * Created file with time related functions from sched.c and adjtimex() + ...
b8cc55493557f2259ac56ba0ac7f6804804f79a5
Analyze and fix the following issue in the Linux kernel code: mxser: fix compiler warning when building without CONFIG_PCI
Problem Details: drivers/char/mxser.c:386: warning: 'mxser_get_PCI_conf' declared 'static' but never defined when building without CONFIG_PCI. [jesper.juhl@gmail.com: Fix warning: 'CheckIsMoxaMust' defined but not used] Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Jesper Juhl <jesper.juhl@gmail.c...
```diff diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index a24738e85fb8..661aca0e155d 100644 --- a/drivers/char/mxser.c +++ b/drivers/char/mxser.c @@ -383,7 +383,6 @@ static int mxser_init(void); /* static void mxser_poll(unsigned long); */ static int mxser_get_ISA_conf(int, struct mxser_hwconf *); -s...
72c2d5823fc7be799a12184974c3bdc57acea3c4
Analyze and fix the following issue in the Linux kernel code: V3 file capabilities: alter behavior of cap_setpcap
Problem Details: The non-filesystem capability meaning of CAP_SETPCAP is that a process, p1, can change the capabilities of another process, p2. This is not the meaning that was intended for this capability at all, and this implementation came about purely because, without filesystem capabilities, there was no way to ...
```diff diff --git a/include/linux/capability.h b/include/linux/capability.h index 8961e7fb755c..7a8d7ade28a0 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h @@ -310,10 +310,6 @@ typedef __u32 kernel_cap_t; #define CAP_SETFCAP 31 #ifdef __KERNEL__ -/* - * Bounding set - */ -extern kern...
7058cb02ddab4bce70a46e519804fccb7ac0a060
Analyze and fix the following issue in the Linux kernel code: sysctl: deprecate sys_sysctl in a user space visible fashion.
Problem Details: After adding checking to register_sysctl_table and finding a whole new set of bugs. Missed by countless code reviews and testers I have finally lost patience with the binary sysctl interface. The binary sysctl interface has been sort of deprecated for years and finding a user space program that uses ...
```diff diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 280ec06573e6..5b25162cd9a4 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt @@ -82,6 +82,41 @@ Who: Dominik Brodowski <linux@brodo.de> -----------...
064b5bba0cc495201729285c6a6ce205df0a386a
Analyze and fix the following issue in the Linux kernel code: sysctl: remove broken netfilter binary sysctls
Problem Details: No one has bothered to set strategy routine for the the netfilter sysctls that return jiffies to be sysctl_jiffies. So it appears the sys_sysctl path is unused and untested, so this patch removes the binary sysctl numbers. Which fixes the netfilter oops in 2.6.23-rc2-mm2 for me. Signed-off-by: Eric ...
```diff diff --git a/net/ipv4/netfilter/nf_conntrack_proto_icmp.c b/net/ipv4/netfilter/nf_conntrack_proto_icmp.c index 11fedc73049c..adcbaf6d4299 100644 --- a/net/ipv4/netfilter/nf_conntrack_proto_icmp.c +++ b/net/ipv4/netfilter/nf_conntrack_proto_icmp.c @@ -281,7 +281,6 @@ static int icmp_nlattr_to_tuple(struct nlattr...
baa3a2a0d24ebcf1c451bec8e5bee3d3467f4cbb
Analyze and fix the following issue in the Linux kernel code: sysctl: remove broken sunrpc debug binary sysctls
Problem Details: This is debug code so no need to support binary sysctl, and the binary sysctls as they were written were not consistent with what showed up in /proc so remove the binary sysctl support. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Cc: Alexey Dobriyan <adobriyan@sw.ru> Cc: "David S. Miller"...
```diff diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c index 738db32a287d..864b541bbf51 100644 --- a/net/sunrpc/sysctl.c +++ b/net/sunrpc/sysctl.c @@ -114,7 +114,6 @@ done: static ctl_table debug_table[] = { { - .ctl_name = CTL_RPCDEBUG, .procname = "rpc_debug", .data = &rpc_debug, .maxlen = si...
d12af679bcf8995a237560bdf7a4d734f8df5dbb
Analyze and fix the following issue in the Linux kernel code: sysctl: fix neighbour table sysctls.
Problem Details: - In ipv6 ndisc_ifinfo_syctl_change so it doesn't depend on binary sysctl names for a function that works with proc. - In neighbour.c reorder the table to put the possibly unused entries at the end so we can remove them by terminating the table early. - In neighbour.c kill the entries with questi...
```diff diff --git a/net/core/neighbour.c b/net/core/neighbour.c index cd3af59b38a1..67ba9914e52e 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -2496,7 +2496,6 @@ static struct neigh_sysctl_table { .proc_handler = &proc_dointvec, }, { - .ctl_name = NET_NEIGH_RETRANS_TIME, .procname = "...
6de0ec00ba8db84d7c452e65e502989455ecb6ea
Analyze and fix the following issue in the Linux kernel code: VFS: make notify_change pass ATTR_KILL_S*ID to setattr operations
Problem Details: When an unprivileged process attempts to modify a file that has the setuid or setgid bits set, the VFS will attempt to clear these bits. The VFS will set the ATTR_KILL_SUID or ATTR_KILL_SGID bits in the ia_valid mask, and then call notify_change to clear these bits and set the mode accordingly. With ...
```diff diff --git a/fs/attr.c b/fs/attr.c index ae58bd3f875f..966b73e25f82 100644 --- a/fs/attr.c +++ b/fs/attr.c @@ -103,12 +103,11 @@ EXPORT_SYMBOL(inode_setattr); int notify_change(struct dentry * dentry, struct iattr * attr) { struct inode *inode = dentry->d_inode; - mode_t mode; + mode_t mode = inode->i_mode;...
cdd6fe6e2f7eb8e940854317613885c33b1fe584
Analyze and fix the following issue in the Linux kernel code: reiserfs: turn of ATTR_KILL_S*ID at beginning of reiserfs_setattr
Problem Details: reiserfs_setattr can call notify_change recursively using the same iattr struct. This could cause it to trip the BUG() in notify_change. Fix reiserfs to clear those bits near the beginning of the function. Signed-off-by: Jeff Layton <jlayton@redhat.com> Cc: Chris Mason <chris.mason@oracle.com> Cc: Jef...
```diff diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index 9ea12004fa57..0804289d355d 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c @@ -3061,7 +3061,11 @@ int reiserfs_setattr(struct dentry *dentry, struct iattr *attr) { struct inode *inode = dentry->d_inode; int error; - unsigned int ia_val...
8a0ce7d99a4d19788e017f3138bc59b9962057ae
Analyze and fix the following issue in the Linux kernel code: knfsd: only set ATTR_KILL_S*ID if ATTR_MODE isn't being explicitly set
Problem Details: It's theoretically possible for a single SETATTR call to come in that sets the mode and the uid/gid. In that case, don't set the ATTR_KILL_S*ID bits since that would trip the BUG() in notify_change. Just fix up the mode to have the same effect. Signed-off-by: Jeff Layton <jlayton@redhat.com> Cc: Nei...
```diff diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 819545d21670..46934c97f8f7 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -364,14 +364,23 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap, if (iap->ia_valid & ATTR_MODE) { iap->ia_mode &= S_IALLUGO; imode = iap->ia_mode |=...
1ac564ecabc777636cf4eb88840802d7dc57d286
Analyze and fix the following issue in the Linux kernel code: ecryptfs: allow lower fs to interpret ATTR_KILL_S*ID
Problem Details: Make sure ecryptfs doesn't trip the BUG() in notify_change. This also allows the lower filesystem to interpret ATTR_KILL_S*ID in its own way. Signed-off-by: Jeff Layton <jlayton@redhat.com> Cc: Michael Halcrow <mhalcrow@us.ibm.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Neil Brown <neilb@suse.de> Cc:...
```diff diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 5701f816faf4..0b1ab016fa2e 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c @@ -914,6 +914,14 @@ static int ecryptfs_setattr(struct dentry *dentry, struct iattr *ia) if (rc < 0) goto out; } + + /* + * mode change is for clearing se...
ef1d7151d2901295278d5aada39c547ed8601419
Analyze and fix the following issue in the Linux kernel code: cpu hotplug: intel_cacheinfo: fix cpu hotplug error handling
Problem Details: - Fix resource leakage in error case within detect_cache_attributes() - Don't register hotcpu notifier when cache_add_dev() returns error - Introduce cache_dev_map cpumask to track whether cache interface for CPU is successfully added by cache_add_dev() or not. cache_add_dev() may fail with out ...
```diff diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c index 1826395ebeeb..297a24116949 100644 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c @@ -499,6 +499,11 @@ static void __cpuinit cache_remove_shared_cpu_map(unsigned int cpu, int ...
d435d862baca3e25e5eec236762a43251b1e7ffc
Analyze and fix the following issue in the Linux kernel code: cpu hotplug: mce: fix cpu hotplug error handling
Problem Details: - Clear kobject in percpu device_mce before calling sysdev_register() with Because mce_create_device() may fail and it leaves kobject filled with junk. It will be the problem when mce_create_device() will be called next time. - Fix error handling in mce_create_device() Error handling should ...
```diff diff --git a/arch/x86/kernel/mce_64.c b/arch/x86/kernel/mce_64.c index 8ca8f8648969..66e6b797b2cb 100644 --- a/arch/x86/kernel/mce_64.c +++ b/arch/x86/kernel/mce_64.c @@ -802,16 +802,29 @@ static __cpuinit int mce_create_device(unsigned int cpu) if (!mce_available(&cpu_data[cpu])) return -EIO; + memset(&...
881a841f4ae268207c29721532406ad061e41857
Analyze and fix the following issue in the Linux kernel code: cpu hotplug: msr: fix cpu hotplug error handling
Problem Details: Do msr_device_create() in CPU_UP_PREPARE instead of CPU_ONLINE. Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Gautham R Shenoy <ego@in.ibm.com> Cc: Oleg Nesterov <oleg@tv-sign.ru> Cc: Andi Kleen <ak@suse.de> Cc: Jan Beulich <jbeulich@novell.com> Signed-o...
```diff diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c index df85c9c13601..e0d5e82e64b3 100644 --- a/arch/x86/kernel/msr.c +++ b/arch/x86/kernel/msr.c @@ -133,37 +133,42 @@ static const struct file_operations msr_fops = { .open = msr_open, }; -static int __cpuinit msr_device_create(int i) +static int m...
c7e38a9c27ced4020d64749400cece4fbad4679e
Analyze and fix the following issue in the Linux kernel code: cpu hotplug: thermal_throttle: fix cpu hotplug error handling
Problem Details: Do thermal_throttle_add_dev() in CPU_UP_PREPARE instead of CPU_ONLINE. Cc: Dmitriy Zavin <dmitriyz@google.com> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Gautham R Shenoy <ego@in.ibm.com> Cc: Oleg Nesterov <oleg@tv-sign.ru> Cc: Andi Kleen <ak@suse.de> Cc: Jan Beulich <jbeulich@novell.com...
```diff diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c index 494d320d909b..24885be5c48c 100644 --- a/arch/x86/kernel/cpu/mcheck/therm_throt.c +++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c @@ -131,17 +131,19 @@ static __cpuinit int thermal_throttle_cpu_callback(struct n...
12d00f6a121877235a5cacc56386936dd9bb81af
Analyze and fix the following issue in the Linux kernel code: cpu hotplug: slab: fix memory leak in cpu hotplug error path
Problem Details: This patch fixes memory leak in error path. In reality, we don't need to call cpuup_canceled(cpu) for now. But upcoming cpu hotplug error handling change needs this. Cc: Christoph Lameter <clameter@sgi.com> Cc: Gautham R Shenoy <ego@in.ibm.com> Acked-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-...
```diff diff --git a/mm/slab.c b/mm/slab.c index 671588497e82..54eb555c4ef8 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -1282,13 +1282,18 @@ static int __cpuinit cpuup_prepare(long cpu) shared = alloc_arraycache(node, cachep->shared * cachep->batchcount, 0xbaadf00d); - if (!shared) + if (!shared) { + ...
6c72ffaab9851e3ee380c77169c0cfcba6b58d4c
Analyze and fix the following issue in the Linux kernel code: update checkpatch.pl to version 0.11
Problem Details: This version brings a more cautious checkpatch.pl by default. The more subjective checks are only applied with the --strict option. It also brings the usual slew of corrections for false positives. Of note: - new tree detection, the source tree will be found via the executable - a major revamp ...
```diff diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 59ad83caa210..cbb42580a81d 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -9,7 +9,7 @@ use strict; my $P = $0; $P =~ s@.*/@@g; -my $V = '0.10'; +my $V = '0.11'; use Getopt::Long qw(:config no_auto_abbrev); @@ -18,12 +18...
faf8c714f4508207a9c81cc94dafc76ed6680b44
Analyze and fix the following issue in the Linux kernel code: param_sysfs_builtin memchr argument fix
Problem Details: If memchr argument is longer than strlen(kp->name), there will be some weird result. It will casuse duplicate filenames in sysfs for the "nousb". kernel warning messages are as bellow: sysfs: duplicate filename 'usbcore' can not be created WARNING: at fs/sysfs/dir.c:416 sysfs_add_one() [<c01c4750>]...
```diff diff --git a/kernel/params.c b/kernel/params.c index 1d6aca288cdc..16f269e9ddc9 100644 --- a/kernel/params.c +++ b/kernel/params.c @@ -592,11 +592,17 @@ static void __init param_sysfs_builtin(void) for (i=0; i < __stop___param - __start___param; i++) { char *dot; + size_t kplen; kp = &__start___par...
2c6221483169ddd4c04797cd7296ed4fe52fcdd7
Analyze and fix the following issue in the Linux kernel code: Fix discrepancy between VDSO based gettimeofday() and sys_gettimeofday().
Problem Details: On platforms that copy sys_tz into the vdso (currently only x86_64, soon to include powerpc), it is possible for the vdso to get out of sync if a user calls (admittedly unusual) settimeofday(NULL, ptr). This patch adds a hook for architectures that set CONFIG_GENERIC_TIME_VSYSCALL to ensure when sys_t...
```diff diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index 98cfc90cab1d..2bb84214e5f1 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c @@ -371,6 +371,11 @@ ia64_setup_printk_clock(void) ia64_printk_clock = ia64_itc_printk_clock; } +/* IA64 doesn't cache the timezone */ +void up...
9cd9a0058dd35268b24fa16795a92c800f4086d4
Analyze and fix the following issue in the Linux kernel code: Hibernation: Enter platform hibernation state in a consistent way
Problem Details: Make hibernation_platform_enter() execute the enter-a-sleep-state sequence instead of the mixed shutdown-with-entering-S4 thing. Replace the shutting down of devices done by kernel_shutdown_prepare(), before entering the ACPI S4 sleep state, with suspending them and the shutting down of sysdevs with c...
```diff diff --git a/kernel/power/disk.c b/kernel/power/disk.c index e50f4da18fd5..8b15f777010a 100644 --- a/kernel/power/disk.c +++ b/kernel/power/disk.c @@ -278,21 +278,50 @@ int hibernation_platform_enter(void) { int error; - if (hibernation_ops) { - kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK); - /* - * We...
8f4ce8c32f2dc2bc2411cafe39976fc5c0adfabf
Analyze and fix the following issue in the Linux kernel code: serial: turn serial console suspend a boot rather than compile time option
Problem Details: Currently, there's a CONFIG_DISABLE_CONSOLE_SUSPEND that allows one to stop the serial console from being suspended when the rest of the machine goes to sleep. This is incredibly useful for debugging power management-related things; however, having it as a compile-time option has proved to be incredib...
```diff diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 98cf90f2631d..189df0bcab99 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -479,6 +479,16 @@ and is between 256 and 4096 characters. It is defined in the file UART at th...
f059bca1c57f665211dc23de1fb31c1849b65c7b
Analyze and fix the following issue in the Linux kernel code: pm_trace displays the wrong time from the RTC
Problem Details: The way in which read_magic_time() displays the date read from the RTC is apparently confusing to the users (cf. https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=250238). Make it print dates in the standard way. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Dave Jones <davej@redhat.com...
```diff diff --git a/drivers/base/power/trace.c b/drivers/base/power/trace.c index 2b0c601e422e..2b4b392dcbc1 100644 --- a/drivers/base/power/trace.c +++ b/drivers/base/power/trace.c @@ -114,7 +114,7 @@ static unsigned int read_magic_time(void) get_rtc_time(&time); printk("Time: %2d:%02d:%02d Date: %02d/%02d/%02d\...
232b14328050a4639130b0dec185f43968e72035
Analyze and fix the following issue in the Linux kernel code: freezer: do not sync filesystems from freeze_processes
Problem Details: The syncing of filesystems from within the freezer is generally not needed. Also, if there's an ext3 filesystem loopback-mounted from a FUSE one, the syncing results in writes to it and deadlocks. Similarly, it will deadlock if FUSE implements sync. Change freeze_processes() so that it doesn't execut...
```diff diff --git a/kernel/power/disk.c b/kernel/power/disk.c index 9348d95a4fb8..555c0f0b2f7e 100644 --- a/kernel/power/disk.c +++ b/kernel/power/disk.c @@ -313,6 +313,10 @@ int hibernate(void) if (error) goto Exit; + printk("Syncing filesystems ... "); + sys_sync(); + printk("done.\n"); + error = prepare_pr...
2776365370b579afc36cff14dc70a567b66f0378
Analyze and fix the following issue in the Linux kernel code: freezer: document relationship with memory shrinking
Problem Details: One important reason to freeze tasks, which is that we don't want them to allocate memory after freeing it for the hibernation image, has not been documented. Fix it. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Acked-by: Nigel Cunningham <nigel@nigel.suspend2....
```diff diff --git a/Documentation/power/freezing-of-tasks.txt b/Documentation/power/freezing-of-tasks.txt index 04dc1cf9d215..d5c65e8d6a37 100644 --- a/Documentation/power/freezing-of-tasks.txt +++ b/Documentation/power/freezing-of-tasks.txt @@ -81,7 +81,16 @@ hibernation image has been created and before the system i...
75e8b71d559632dd70c9799ea8b5c133a2ddcea9
Analyze and fix the following issue in the Linux kernel code: tty_ioctl: fix the baud_table check in encode_baud_rate
Problem Details: The tty_termios_encode_baud_rate() function as defined by tty_ioctl.c has a problem with the baud_table within. The comparison operators are reversed and as a result this table's entries never match and BOTHER is always used. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Acked-by: Alan Cox ...
```diff diff --git a/drivers/char/tty_ioctl.c b/drivers/char/tty_ioctl.c index 745d552620bf..0def089cc1f2 100644 --- a/drivers/char/tty_ioctl.c +++ b/drivers/char/tty_ioctl.c @@ -228,7 +228,8 @@ EXPORT_SYMBOL(tty_termios_input_baud_rate); * and will all go away once this is done. */ -void tty_termios_encode_baud_...
1ccfd63367c1a6aaf8b33943f18856dde85f2f0b
Analyze and fix the following issue in the Linux kernel code: i4l: Fix random hard freeze with AVM c4 card
Problem Details: The patch - Includes the call to capilib_data_b3_req in the spinlock. This routine in turn calls the offending mq_enqueue routine that triggered the freeze if not locked. This should also fix other indicators of incosistent capilib_msgidqueue list, that trigger messages like: Oct 5 03:05:57 B...
```diff diff --git a/drivers/isdn/hardware/avm/c4.c b/drivers/isdn/hardware/avm/c4.c index d58f927e766a..8710cf6214d9 100644 --- a/drivers/isdn/hardware/avm/c4.c +++ b/drivers/isdn/hardware/avm/c4.c @@ -727,6 +727,7 @@ static void c4_send_init(avmcard *card) { struct sk_buff *skb; void *p; + unsigned long flags; ...
9713d9e650045f7f2afd81d58a068827be306993
Analyze and fix the following issue in the Linux kernel code: i4l: fix random freezes with AVM B1 drivers
Problem Details: This fix the same issue which was debbuged for the C4 controller for the B1 versions. The capilib_ function modify or traverse a linked list without locking. This patch extends the existing locking to the calls of these function to prevent access to a list which is in the middle of a modification. S...
```diff diff --git a/drivers/isdn/hardware/avm/b1.c b/drivers/isdn/hardware/avm/b1.c index 7a69a18d07e2..4484a6417235 100644 --- a/drivers/isdn/hardware/avm/b1.c +++ b/drivers/isdn/hardware/avm/b1.c @@ -321,12 +321,15 @@ void b1_reset_ctr(struct capi_ctr *ctrl) avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata)...
0c42ea3f93b5684cf60ba0ac6810ad1f865954b0
Analyze and fix the following issue in the Linux kernel code: au1100fb: fix modpost warnings
Problem Details: MODPOST vmlinux.o WARNING: vmlinux.o(.text+0x170be8): Section mismatch: reference to .init.data:au1100fb_fix (between 'au1100fb_drv_probe' and 'read_null') WARNING: vmlinux.o(.text+0x170dc4): Section mismatch: reference to .init.data:au1100fb_var (between 'au1100fb_drv_probe' and 'read_null') WARNING: ...
```diff diff --git a/drivers/video/au1100fb.c b/drivers/video/au1100fb.c index 832e4613673a..62bd4441b5e0 100644 --- a/drivers/video/au1100fb.c +++ b/drivers/video/au1100fb.c @@ -457,7 +457,7 @@ static struct fb_ops au1100fb_ops = /* AU1100 LCD controller device driver */ -int au1100fb_drv_probe(struct device *dev...
53da05632b96440b07615458e57d096a89cc466c
Analyze and fix the following issue in the Linux kernel code: netport_con.c: fix build errors and warnings
Problem Details: Fix build broken by accaa24c492f1aa3b9c37226d868dc59c3007531: CC drivers/video/console/newport_con.o drivers/video/console/newport_con.c: In function 'newport_show_logo': drivers/video/console/newport_con.c:111: error: assignment of read-only location drivers/video/console/newport_con.c:111: wa...
```diff diff --git a/drivers/video/console/newport_con.c b/drivers/video/console/newport_con.c index f57d7b2758b7..d31b203bf654 100644 --- a/drivers/video/console/newport_con.c +++ b/drivers/video/console/newport_con.c @@ -98,7 +98,7 @@ static inline void newport_init_cmap(void) } } -static struct linux_logo *newp...
50a8ec31c3a00594ceb7c5f1dcf2ecdaf6a5b847
Analyze and fix the following issue in the Linux kernel code: kbuild: disable depmod in cross-compile kernel build
Problem Details: When building embedded systems in a cross-compile environment and populating a target's file system image, we don't want to run the depmod on the host as we may be building for a completely different architecture. Since there's no such thing as a cross-depmod, we just disable running depmod in the cros...
```diff diff --git a/Makefile b/Makefile index e8ace82e334f..784903a63e0f 100644 --- a/Makefile +++ b/Makefile @@ -1030,19 +1030,12 @@ _modinst_: fi $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst -# If System.map exists, run depmod. This deliberately does not have a -# dependency on System.map since that wou...
3be6cbd73f74b4a3da82cc7d6e1688a4ae595fc7
Analyze and fix the following issue in the Linux kernel code: [libata] kill ata_sg_is_last()
Problem Details: Short term, this works around a bug introduced by early sg-chaining work. Long term, removing this function eliminates a branch from a hot path loop in each scatter/gather table build. Also, as this code demonstrates, we don't need to _track_ the end of the s/g list, as long as we mark it in some way...
```diff diff --git a/drivers/ata/pdc_adma.c b/drivers/ata/pdc_adma.c index 8d1b03d5bcb1..199f7e150eb3 100644 --- a/drivers/ata/pdc_adma.c +++ b/drivers/ata/pdc_adma.c @@ -318,7 +318,7 @@ static int adma_fill_sg(struct ata_queued_cmd *qc) struct scatterlist *sg; struct ata_port *ap = qc->ap; struct adma_port_priv ...
db15178755f823d1fa8c242210cf04c26fca1483
Analyze and fix the following issue in the Linux kernel code: [PATCH] rt2x00: Fix residual check in PLCP calculations.
Problem Details: Because rt2x00 implements the residual calculation different from what the legacy code does (i.e. scaled values), we need to adjust the residual check. Again, we are only mimicking the behaviour of the ralink driver without actually knowing what we do :-( Signed-off-by: Mattias Nissler <mattias.nissle...
```diff diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index bb6f46cfbb9f..ff399f8083e9 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c @@ -550,7 +550,7 @@ void rt2x00lib_write_tx_desc(struct rt2x00_dev *rt2x00dev, /*...
c7c466763d70059ead7ed990e2e9766a0caf9509
Analyze and fix the following issue in the Linux kernel code: [PATCH] iwlwifi: Fix rate setting in probe request for HW sacn
Problem Details: This patch fixes setting of rates in probe request used in HW scan. The bug was reported by Helmut Schaa <hschaa@suse.de> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index a1d2716556be..83019d1d7ccc 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c @@ -1747,21 +1747,22 @@ static void iwl_unset_hw_setting(struct iwl_p...
023384faf6a6cb44b5d4a265a7c58279ff810de1
Analyze and fix the following issue in the Linux kernel code: [PATCH] b43: Make b43_stop() static
Problem Details: This fixes a sparse warning. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 5f03efdb63a8..9d9ff76a9bc6 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c @@ -3520,7 +3520,7 @@ static int b43_start(struct ieee80211_hw *hw) return err; } -void b43_stop(struct ieee8021...
923403b8074a6db4207b404934d5c821d73c199f
Analyze and fix the following issue in the Linux kernel code: [PATCH] drivers/net/wireless/b43/main.c: fix an uninitialized variable
Problem Details: Fix an uninitialized variable in drivers/net/wireless/b43/main.c::b43_start(). Cc: Adrian Bunk <bunk@kernel.org> Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com> Cc: Michael Buesch <mb@bu3sch.de> Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: "John W. Linville" <linville@tuxdriver.com> Signed-off...
```diff diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index c9b0d1aa2063..5f03efdb63a8 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c @@ -3494,7 +3494,7 @@ static int b43_start(struct ieee80211_hw *hw) struct b43_wl *wl = hw_to_b43_wl(hw); struct ...
4457e1a497736328f01704ff416bc2355c12b975
Analyze and fix the following issue in the Linux kernel code: [PATCH] iwlwifi: set correct base rate for A band in rs_dbgfs_set_mcs
Problem Details: This patch fixes base rate needed for fixed rate operation in A band Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c index 60caaea21076..8dc78c0bf1ff 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c @@ -2021,12 +2021,18 @@ static int open_file_generic(struct inode *inode,...
e0579d576cb894a4cf3c5af04fbf38e8c1281738
Analyze and fix the following issue in the Linux kernel code: [PATCH] zd1211rw, fix oops when ejecting install media
Problem Details: The disconnect function can dereference the net_device structure when it is never allocated. This is the case when ejecting the device installer. Signed-off-by: Marc Pignat <marc.pignat@hevs.ch> Acked-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c index b0684f965761..c755b6923812 100644 --- a/drivers/net/wireless/zd1211rw/zd_usb.c +++ b/drivers/net/wireless/zd1211rw/zd_usb.c @@ -1044,14 +1044,17 @@ error: static void disconnect(struct usb_interface *intf) { s...
208eec88639a61002bb140dc5c64984684c2705d
Analyze and fix the following issue in the Linux kernel code: [PATCH] b43legacy: Fix potential return of uninitialized variable
Problem Details: Using the Coverity checker, Adrian Bunk found that routine b43legacy_start could return an unitialized variable. This patch fixes the problem. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c index f0749510bcd7..d09479e816cd 100644 --- a/drivers/net/wireless/b43legacy/main.c +++ b/drivers/net/wireless/b43legacy/main.c @@ -3306,7 +3306,7 @@ static int b43legacy_start(struct ieee80211_hw *hw) struct b43legacy_...
c899a575fa9cc802a4a77f6c5078b14fc1d12487
Analyze and fix the following issue in the Linux kernel code: [PATCH] iwl4965-base.c: fix off-by-one errors
Problem Details: This patch fixes two off-by-one errors resulting in array overflows spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index 7b0c602082b1..acdf5507d3d0 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c @@ -4492,13 +4492,13 @@ static u8 ratio2dB[100] = { * Conversion as...
ba8007ceb076f336a453a049cc5353eaa01d7136
Analyze and fix the following issue in the Linux kernel code: [PATCH] p54: Make filter configuration atomic
Problem Details: p54_set_filter is now called from configure_filter, which is not allowed to sleep. The filter configuration packet allocation should be atomic now. Thanks to Dmitry Torokhov <dtor@insightbb.com> for reporting this bug. Signed-off-by: Michael Wu <flamingice@sourmilk.net> Signed-off-by: John W. Linvill...
```diff diff --git a/drivers/net/wireless/p54common.c b/drivers/net/wireless/p54common.c index 2c63cf0ad2cd..1437db0cf4b2 100644 --- a/drivers/net/wireless/p54common.c +++ b/drivers/net/wireless/p54common.c @@ -577,7 +577,7 @@ static int p54_set_filter(struct ieee80211_hw *dev, u16 filter_type, struct p54_tx_control_...
90ba931fa1d3410c87d93ef774624d12533f37c3
Analyze and fix the following issue in the Linux kernel code: [PATCH] janitorial: fix all double includes in drivers/net/wireless
Problem Details: This patch removes all double includes of the same file. This makes scripts/checkincludes.pl happy. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index c141a264ac45..c9b0d1aa2063 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c @@ -49,7 +49,6 @@ #include "pio.h" #include "sysfs.h" #include "xmit.h" -#include "sysfs.h" #include "lo.h" #inc...
98798f4875b7149db4eb7d0a126fc6dcd9637821
Analyze and fix the following issue in the Linux kernel code: [PATCH] rtl8187: Fix more frag bit checking, rts duration calc
Problem Details: The wrong pointer is passed to ieee80211_get_morefrag. Fix this. While we're at it, reorder things so they look better and the rts duration calculation is done with the right length. Thanks to Christoph Hellwig for finding the ieee80211_get_morefrag issue. Signed-off-by: Michael Wu <flamingice@sourm...
```diff diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c index 0ef887dd2867..805b2af50afc 100644 --- a/drivers/net/wireless/rtl8187_dev.c +++ b/drivers/net/wireless/rtl8187_dev.c @@ -131,7 +131,8 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb, struct rtl8187...
9611f61eb5baf22b6b6ed46c2c196c10e1fade6a
Analyze and fix the following issue in the Linux kernel code: [PARISC] Fix infinite loop in /proc/iomem
Problem Details: pcibios_link_hba_resources() could corrupt the resource tree by inserting resources in the wrong place. Fix this by calling pci_claim_resource() for PCI-PCI bridges. Delete pcibios_link_hba_resources as we shouldn't need it any more. Also get rid of lba_claim_dev_resources() and just call pci_claim_...
```diff diff --git a/arch/parisc/kernel/pci.c b/arch/parisc/kernel/pci.c index 563df0072dee..8263d490b1b7 100644 --- a/arch/parisc/kernel/pci.c +++ b/arch/parisc/kernel/pci.c @@ -194,31 +194,6 @@ void __init pcibios_init_bus(struct pci_bus *bus) pci_write_config_word(dev, PCI_BRIDGE_CONTROL, bridge_ctl); } - -/* K...
8401f77505d00b779e3d2d74180cb465de1c2e2b
Analyze and fix the following issue in the Linux kernel code: sched: cleanup, fix spacing
Problem Details: cleanup: fix sysctl_sched_features initialization spacing, and fix sd_alloc_ctl_cpu_table() prototype spacing. found via scripts/checkpatch.pl. Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/kernel/sched.c b/kernel/sched.c index f6febb25c7b6..9e6fb15f6f78 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -449,12 +449,12 @@ enum { }; const_debug unsigned int sysctl_sched_features = - SCHED_FEAT_NEW_FAIR_SLEEPERS *1 | - SCHED_FEAT_START_DEBIT *1 | - SCHED_FEAT_TREE_AVG *0 | - ...
51e97990234ed195a05b424bf04c387f5ae5e5cf
Analyze and fix the following issue in the Linux kernel code: sched: fix return value of wait_for_completion_interruptible()
Problem Details: The recent wait_for_completion() cleanups: commit 8cbbe86dfcfd68ad69916164bdc838d9e09adca8 Author: Andi Kleen <ak@suse.de> Date: Mon Oct 15 17:00:14 2007 +0200 sched: cleanup: refactor common code of sleep_on / wait_for_completion Refactor common code of sleep_on / wait_for_com...
```diff diff --git a/kernel/sched.c b/kernel/sched.c index 92721d1534b8..f6febb25c7b6 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -3859,7 +3859,10 @@ EXPORT_SYMBOL(wait_for_completion_timeout); int __sched wait_for_completion_interruptible(struct completion *x) { - return wait_for_common(x, MAX_SCHEDULE_TIM...
06fa73589f79e58e52e6a0329594fb42f8c6d277
Analyze and fix the following issue in the Linux kernel code: r8169: add KERN_DEBUG to dprintk (trivial)
Problem Details: - prefix dprintk with KERN_DEBUG - fix a bug with existing use of dprintk (PFX KERN_INFO PFX) Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Cc: Edward Hsu <edward_hsu@realtek.com.tw>
```diff diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 419c00cbe6e9..94b79f55c71c 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -44,7 +44,8 @@ printk( "Assertion failed! %s,%s,%s,line=%d\n", \ #expr,__FILE__,__FUNCTION__,__LINE__); \ } -#define dprintk(fmt, args...) do { printk(PF...
6f67a00498abf8f0b29c2cecfce188c70be309d0
Analyze and fix the following issue in the Linux kernel code: kbuild: make deb-pkg - add 'Provides:' line
Problem Details: http://bugzilla.kernel.org/show_bug.cgi?id=8941 Current Debian's kernel-modules depend on matching linux-image-$version, though Linux's make deb-pkg build a .deb that 'Provides: kernel-image-$version' only. The following patch adds the Debian-compliant 'Provides', leaving the default one; hopely this ...
```diff diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 6edb29f2b4a6..0f657b5f3bc8 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -83,6 +83,7 @@ Maintainer: $name Standards-Version: 3.6.1 Package: $packagename +Provides: kernel-image-$version, linux-image-$version Ar...
05dd7ed2c7e22d0fc3027fc27a072664bbdf8274
Analyze and fix the following issue in the Linux kernel code: [SCSI] gdth: __init fixes
Problem Details: This patch fixes the following build warnings: WARNING: vmlinux.o(.text+0xbcffdb): Section mismatch: reference to .init.text.20:gdth_search_drives (between 'gdth_pci_probe_one' and 'gdth_start_timeout') WARNING: vmlinux.o(.text+0xbd0102): Section mismatch: reference to .init.text.20:gdth_enable_int (b...
```diff diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c index 3ac080ee6e2f..56de5a6f2817 100644 --- a/drivers/scsi/gdth.c +++ b/drivers/scsi/gdth.c @@ -4734,7 +4734,7 @@ static struct scsi_host_template gdth_template = { }; #ifdef CONFIG_ISA -static int gdth_isa_probe_one(ulong32 isa_bios) +static int __init...
4135f9d28af912d541c0c32f1bc2ee6da23306eb
Analyze and fix the following issue in the Linux kernel code: [SCSI] aic7xxx_old: fix accidental logic reversal
Problem Details: Commit bbfbbbc1182f8b44c8cc4c99f4a3f3a512149022 accidentally reversed the logic of this NULL check. Spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/aic7xxx_old.c b/drivers/scsi/aic7xxx_old.c index 4025608d6964..8f8db5f0aef7 100644 --- a/drivers/scsi/aic7xxx_old.c +++ b/drivers/scsi/aic7xxx_old.c @@ -8417,7 +8417,7 @@ aic7xxx_alloc(struct scsi_host_template *sht, struct aic7xxx_host *temp) p->host = host; p->scb_data = ...
52f095ee88d8851866bc7694ab991ca5abf21d5e
Analyze and fix the following issue in the Linux kernel code: [IPV6]: Fix again the fl6_sock_lookup() fixed locking
Problem Details: YOSHIFUJI fairly pointed out, that the users increment should be done under the ip6_sk_fl_lock not to give IPV6_FL_A_PUT a chance to put this count to zero and release the flowlabel. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c index e55ae1a1f560..b12cc22e7745 100644 --- a/net/ipv6/ip6_flowlabel.c +++ b/net/ipv6/ip6_flowlabel.c @@ -210,9 +210,9 @@ struct ip6_flowlabel * fl6_sock_lookup(struct sock *sk, __be32 label) for (sfl=np->ipv6_fl_list; sfl; sfl = sfl->next) { ...
875baf3cbc0f11009ef5ca33c78210d265c8d779
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla2xxx: printk fixes
Problem Details: drivers/scsi/qla2xxx/qla_sup.c: In function 'qla24xx_write_flash_data': drivers/scsi/qla2xxx/qla_sup.c:655: warning: format '%llx' expects type 'long long unsigned int', but argument 6 has type 'dma_addr_t' drivers/scsi/qla2xxx/qla_sup.c: In function 'qla25xx_read_optrom_data': drivers/scsi/qla2xxx/qla...
```diff diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c index 40b059fc1981..6670ad585f28 100644 --- a/drivers/scsi/qla2xxx/qla_sup.c +++ b/drivers/scsi/qla2xxx/qla_sup.c @@ -656,7 +656,7 @@ qla24xx_write_flash_data(scsi_qla_host_t *ha, uint32_t *dwptr, uint32_t faddr, "Unable to bu...
ff86ba59fbf6f0fd56b367b99b66dc8fb8ad61e7
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc: lpfc_debugfs.c: fix typo
Problem Details: This patch fixes a typo introduced by commit bbfbbbc1182f8b44c8cc4c99f4a3f3a512149022. It wasn't a compile error since CONFIG_LPFC_DEBUG_FS is not (yet?) available as an option. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c index 149fdd25f8e8..d6a98bc970ff 100644 --- a/drivers/scsi/lpfc/lpfc_debugfs.c +++ b/drivers/scsi/lpfc/lpfc_debugfs.c @@ -901,7 +901,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) } } - vport->disc_trc = kmzlloc( + v...
bc34b841556aad437baf4199744e55500bfa2088
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: nf_conntrack_tcp: fix connection reopening fix
Problem Details: If one side aborts an established connection, the entry still lingers for 10s in conntrack for the late packets. Allow to open up the connection again for the party which sent the RST packet. Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> Tested-by: Krzysztof Piotr Oledzki <ole@ans.pl> Sig...
```diff diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c index c7075345971b..4dc23ab3a39f 100644 --- a/net/netfilter/nf_conntrack_proto_tcp.c +++ b/net/netfilter/nf_conntrack_proto_tcp.c @@ -834,10 +834,12 @@ static int tcp_packet(struct nf_conn *conntrack, case TCP_CONNTRA...
78c2e50253569e62caa4a61fc1cc5a0158edec43
Analyze and fix the following issue in the Linux kernel code: [IPV6]: Fix race in ipv6_flowlabel_opt() when inserting two labels
Problem Details: In the IPV6_FL_A_GET case the hash is checked for flowlabels with the given label. If it is not found, the lock, protecting the hash, is dropped to be re-get for writing. After this a newly allocated entry is inserted, but no checks are performed to catch a classical SMP race, when the conflicting lab...
```diff diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c index f40a08669db0..e55ae1a1f560 100644 --- a/net/ipv6/ip6_flowlabel.c +++ b/net/ipv6/ip6_flowlabel.c @@ -154,8 +154,10 @@ static void ip6_fl_gc(unsigned long dummy) write_unlock(&ip6_fl_lock); } -static int fl_intern(struct ip6_flowlabel *fl...
009e8c965fd72a78636b9a96c7015109c5c70176
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: xt_sctp: fix mistake to pass a pointer where array is required
Problem Details: Macros like SCTP_CHUNKMAP_XXX(chukmap) require chukmap to be an array, but match_packet() passes a pointer to these macros. Also remove the ELEMCOUNT macro and fix a bug in SCTP_CHUNKMAP_COPY. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by:...
```diff diff --git a/include/linux/netfilter/xt_sctp.h b/include/linux/netfilter/xt_sctp.h index b157897e7792..dd5a4fd4cfd3 100644 --- a/include/linux/netfilter/xt_sctp.h +++ b/include/linux/netfilter/xt_sctp.h @@ -7,9 +7,6 @@ #define XT_SCTP_VALID_FLAGS 0x07 -#define ELEMCOUNT(x) (sizeof(x)/sizeof(x[0])) - - st...
1b83336bb9fa4f110b5b0a4378a82cd5f0fd0ac8
Analyze and fix the following issue in the Linux kernel code: [NET]: Fix OOPS due to missing check in dev_parse_header().
Problem Details: [ This is kernel bugzilla 9174 "linux-2.6.23-git11 kernel panic" ] The device in question is an IPv6-over-IPv4 tunnel, which doesn't have any header_ops, so the crash happens in dev_parse_header when dereferencing them. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <...
```diff diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 39dd83b183a9..452c88d971ad 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -827,7 +827,7 @@ static inline int dev_parse_header(const struct sk_buff *skb, { const struct net_device *dev = skb->dev; - if (!dev-...
df2e014bfbbf26d160e1bf47b05fc05c96205e2b
Analyze and fix the following issue in the Linux kernel code: [TCP]: Remove lost_retrans zero seqno special cases
Problem Details: Both high-sack detection and new lowest seq variables have unnecessary zero special case which are now removed by setting safe initial seqnos. This also fixes problem which caused zero received_upto being passed to tcp_mark_lost_retrans which confused after relations within the marker loop causing inc...
```diff diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 0f00966b1784..9288220b73a8 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -1121,7 +1121,7 @@ static int tcp_mark_lost_retrans(struct sock *sk, u32 received_upto) struct sk_buff *skb; int flag = 0; int cnt = 0; - u32 new_low_se...
4b21960f90d4d011e49e386d0525b1e89f320658
Analyze and fix the following issue in the Linux kernel code: kbuild: modpost problem when symbols move from one module to another
Problem Details: When part of build an external module tree, modpost first reads in the kernel's and then the external tree's Module.symvers files. From these files it establishes a symbol => module mapping. When it later reads in each module built and processes the symbols it finds, it discovers the symbol=>module m...
```diff diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 2ef9a193fcae..93ac52adb498 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -268,6 +268,9 @@ static struct symbol *sym_add_exported(const char *name, struct module *mod, "was in %s%s\n", mod->name, name, s->modul...
f8b9e5945738d25c04d6735c2a070f574d2b34c5
Analyze and fix the following issue in the Linux kernel code: [PARISC] Unbreak processor_probe when we have more than NR_CPUS
Problem Details: If we already have NR_CPUS worth of cpus online, we obviously shouldn't be trying to bring up more... Fixes a particularly vexing issue I had when running another machines kernel on my rp3440. Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
```diff diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c index 549f5484342c..370086fb8333 100644 --- a/arch/parisc/kernel/processor.c +++ b/arch/parisc/kernel/processor.c @@ -82,7 +82,12 @@ static int __cpuinit processor_probe(struct parisc_device *dev) unsigned long cpuid; struct cpuinf...
bfaae0f04c68bafc12ec50c6922d71a90deea3e2
Analyze and fix the following issue in the Linux kernel code: [NET]: fix carrier-on bug?
Problem Details: While looking at a net driver with the following construct, if (!netif_carrier_ok(dev)) netif_carrier_on(dev); it stuck me that the netif_carrier_ok() check was redundant, since netif_carrier_on() checks bit __LINK_STATE_NOCARRIER anyway. This is the same reason why netif_queue_stopped() need not...
```diff diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 95ae11956f35..e01d57692c9a 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c @@ -249,10 +249,11 @@ static void dev_watchdog_down(struct net_device *dev) */ void netif_carrier_on(struct net_device *dev) { - if (test_and_cle...
8c08d50d4fc52a9367c356ebbeb194c30fbc7ac8
Analyze and fix the following issue in the Linux kernel code: IB/ehca: Fix ehca_encode_hwpage_size() and alloc_fmr()
Problem Details: Simplify ehca_encode_hwpage_size(), fixing an infinite loop for pgsize == 0 in the process. Fix the bug in alloc_fmr() that triggered the loop. Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/ehca/ehca_mrmw.c b/drivers/infiniband/hw/ehca/ehca_mrmw.c index 16c9efd8eeac..b9a788c4fdd1 100644 --- a/drivers/infiniband/hw/ehca/ehca_mrmw.c +++ b/drivers/infiniband/hw/ehca/ehca_mrmw.c @@ -72,17 +72,9 @@ enum ehca_mr_pgsize { static u32 ehca_encode_hwpage_size(u32 pgsize...
9511724da9c090da5a6dcf6c557b1cedc4f5cfd7
Analyze and fix the following issue in the Linux kernel code: IB/ehca: Fix masking error in {,re}reg_phys_mr()
Problem Details: Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/ehca/ehca_mrmw.c b/drivers/infiniband/hw/ehca/ehca_mrmw.c index da88738265ed..16c9efd8eeac 100644 --- a/drivers/infiniband/hw/ehca/ehca_mrmw.c +++ b/drivers/infiniband/hw/ehca/ehca_mrmw.c @@ -259,7 +259,7 @@ struct ib_mr *ehca_reg_phys_mr(struct ib_pd *pd, pginfo.u.phy.num_...
45542479fb261342d5244869cf3ca4636b7ffd43
Analyze and fix the following issue in the Linux kernel code: [NET]: Fix uninitialised variable in ip_frag_reasm()
Problem Details: Fix uninitialised variable in ip_frag_reasm(). err should be set to -ENOMEM if the initial call of skb_clone() fails. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index 453ae041edde..2143bf30597a 100644 --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c @@ -486,7 +486,6 @@ static int ip_frag_reasm(struct ipq *qp, struct sk_buff *prev, if (prev) { head = prev->next; fp = skb_clone(head, GFP_ATOMIC...
13996378e6585fb25e582afe7489bf52dde78deb
Analyze and fix the following issue in the Linux kernel code: [IPSEC]: Rename mode to outer_mode and add inner_mode
Problem Details: This patch adds a new field to xfrm states called inner_mode. The existing mode object is renamed to outer_mode. This is the first part of an attempt to fix inter-family transforms. As it is we always use the outer family when determining which mode to use. As a result we may end up shoving IPv4 pa...
```diff diff --git a/include/net/xfrm.h b/include/net/xfrm.h index f0f3318f6550..688f6f5d3285 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -186,7 +186,8 @@ struct xfrm_state /* Reference to data common to all the instances of this * transformer. */ struct xfrm_type *type; - struct xfrm_mode *mode;...
ed3e37ddb0b422120d3d2d5da718c44c40af30ba
Analyze and fix the following issue in the Linux kernel code: [IPSEC]: Use the top IPv4 route's peer instead of the bottom
Problem Details: For IPv4 we were using the bottom route's peer instead of the top one. This is wrong because the peer is only used by TCP to keep track of information about the TCP destination address which certainly does not live in the bottom route. This patch fixes that which allows us to get rid of the family che...
```diff diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c index c65b8e03c049..1f0ea0e0371b 100644 --- a/net/ipv4/xfrm4_policy.c +++ b/net/ipv4/xfrm4_policy.c @@ -169,16 +169,16 @@ __xfrm4_bundle_create(struct xfrm_policy *policy, struct xfrm_state **xfrm, int dst_prev->neighbour = neigh_clone(rt->u.dst....
1bfcb10f670f5ff5e1d9f53e59680573524cb142
Analyze and fix the following issue in the Linux kernel code: [IPSEC]: Add missing BEET checks
Problem Details: Currently BEET mode does not reinject the packet back into the stack like tunnel mode does. Since BEET should behave just like tunnel mode this is incorrect. This patch fixes this by introducing a flags field to xfrm_mode that tells the IPsec code whether it should terminate and reinject the packet b...
```diff diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 7f156a0b94c8..2143f2911a21 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -314,6 +314,12 @@ struct xfrm_mode { struct module *owner; unsigned int encap; + int flags; +}; + +/* Flags for xfrm_mode. */ +enum { + XFRM_MODE_FLAG_TUNNEL = ...
440725000cba0b1a68ca2df20124be3a5b7f7702
Analyze and fix the following issue in the Linux kernel code: [IPSEC]: Fix length check in xfrm_parse_spi
Problem Details: Currently xfrm_parse_spi requires there to be 16 bytes for AH and ESP. In contrived cases there may not actually be 16 bytes there since the respective header sizes are less than that (8 and 12 currently). This patch changes the test to use the actual header length instead of 16. Signed-off-by: Herbe...
```diff diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c index 113f44429982..cb97fda1b6df 100644 --- a/net/xfrm/xfrm_input.c +++ b/net/xfrm/xfrm_input.c @@ -49,13 +49,16 @@ EXPORT_SYMBOL(secpath_dup); int xfrm_parse_spi(struct sk_buff *skb, u8 nexthdr, __be32 *spi, __be32 *seq) { int offset, offset_seq; +...
33b5ecb8f64706d1ed472dcb44162ab3a7345724
Analyze and fix the following issue in the Linux kernel code: [IPSEC]: Get nexthdr from caller in xfrm6_rcv_spi
Problem Details: Currently xfrm6_rcv_spi gets the nexthdr value itself from the packet. This means that we need to fix up the value in case we have a 4-on-6 tunnel. Moving this logic into the caller simplifies things and allows us to merge the code with IPv4. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Si...
```diff diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 680739f69003..d8974ca19032 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -1058,7 +1058,7 @@ static inline int xfrm4_rcv_spi(struct sk_buff *skb, int nexthdr, __be32 spi) extern int xfrm4_output(struct sk_buff *skb); extern int xfrm4_tunn...
04663d0b8b3c8ce3804106279420cfe5bdfcce3c
Analyze and fix the following issue in the Linux kernel code: [IPSEC]: Fix pure tunnel modes involving IPv6
Problem Details: I noticed that my recent patch broke 6-on-4 pure IPsec tunnels (the ones that are only used for incompressible IPsec packets). Subsequent reviews show that I broke 6-on-6 pure tunnels more than three years ago and nobody ever noticed. I suppose every must be testing 6-on-6 IPComp with large pings whic...
```diff diff --git a/net/ipv4/xfrm4_tunnel.c b/net/ipv4/xfrm4_tunnel.c index 1312417608e2..83e9580feac4 100644 --- a/net/ipv4/xfrm4_tunnel.c +++ b/net/ipv4/xfrm4_tunnel.c @@ -18,7 +18,7 @@ static int ipip_output(struct xfrm_state *x, struct sk_buff *skb) static int ipip_xfrm_rcv(struct xfrm_state *x, struct sk_buff ...
16910b9829797cda4032fbc84e5292ac7b4474f7
Analyze and fix the following issue in the Linux kernel code: [IPV6]: Fix return type for snmp6_free_dev()
Problem Details: This call is essentially void. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 52d10d213217..edf06ca34749 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -283,12 +283,11 @@ err_ip: return err; } -static int snmp6_free_dev(struct inet6_dev *idev) +static void snmp6_free_dev(struct inet6_dev *idev) { snmp_mib...
47e958eac280c263397582d5581e868c3227a1bd
Analyze and fix the following issue in the Linux kernel code: [NET]: Fix the race between sk_filter_(de|at)tach and sk_clone()
Problem Details: The proposed fix is to delay the reference counter decrement until the quiescent state pass. This will give sk_clone() a chance to get the reference on the cloned filter. Regular sk_filter_uncharge can happen from the sk_free() only and there's no need in delaying the put - the socket is dead anyway a...
```diff diff --git a/include/net/sock.h b/include/net/sock.h index b9cfe125c9e6..43fc3fa50d62 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -904,16 +904,6 @@ static inline int sk_filter(struct sock *sk, struct sk_buff *skb) return err; } -/** - * sk_filter_rcu_free: Free a socket filter - * @rcu: rc...
309dd5fc872448e35634d510049642312ebc170d
Analyze and fix the following issue in the Linux kernel code: [NET]: Move the filter releasing into a separate call
Problem Details: This is done merely as a preparation for the fix. The sk_filter_uncharge() unaccounts the filter memory and calls the sk_filter_release(), which in turn decrements the refcount anf frees the filter. The latter function will be required separately. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Si...
```diff diff --git a/include/net/sock.h b/include/net/sock.h index 453c79d0915b..b9cfe125c9e6 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -922,14 +922,18 @@ static inline void sk_filter_rcu_free(struct rcu_head *rcu) * Remove a filter from a socket and release its resources. */ -static inline void...
2588fe1d782f1686847493ad643157d5d10bf602
Analyze and fix the following issue in the Linux kernel code: [INET]: Consolidate xxx_frag_intern
Problem Details: This routine checks for the existence of a given entry in the hash table and inserts the new one if needed. The ->equal callback is used to compare two frag_queue-s together, but this one is temporary and will be removed later. The netfilter code and the ipv6 one use the same routine to compare frags....
```diff diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h index 911c2cd02941..133e187fbc98 100644 --- a/include/net/inet_frag.h +++ b/include/net/inet_frag.h @@ -41,6 +41,8 @@ struct inet_frags { unsigned int (*hashfn)(struct inet_frag_queue *); void (*destructor)(struct inet_frag_queue *); void ...
bd5435e76a226b7151ae5aaee2cd366ab003dd2e
Analyze and fix the following issue in the Linux kernel code: [DCCP]: fix link error with !CONFIG_SYSCTL
Problem Details: Do not define the sysctl_dccp_sync_ratelimit sysctl variable in the CONFIG_SYSCTL dependent sysctl.c module - move it to input.c instead. This fixes the following build bug: net/built-in.o: In function `dccp_check_seqno': input.c:(.text+0xbd859): undefined reference to `sysctl_dccp_sync_ratelimit' ...
```diff diff --git a/net/dccp/input.c b/net/dccp/input.c index 19d7e1dbd87e..3560a2a875a0 100644 --- a/net/dccp/input.c +++ b/net/dccp/input.c @@ -19,6 +19,9 @@ #include "ccid.h" #include "dccp.h" +/* rate-limit for syncs in reply to sequence-invalid packets; RFC 4340, 7.5.4 */ +int sysctl_dccp_sync_ratelimit __rea...
dc8a82ad285dcd2831feb2fd8f7b41ce1f82e243
Analyze and fix the following issue in the Linux kernel code: [IPV6]: Fix memory leak in cleanup_ipv6_mibs()
Problem Details: The icmpv6msg mib statistics is not freed. This is almost not critical for current kernel, since ipv6 module is unloadable, but this can happen on load error and will happen every time we stop the network namespace (when we have one, of course). Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Ack...
```diff diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index bc929381fa46..1b1caf3aa1c1 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c @@ -747,6 +747,7 @@ static void cleanup_ipv6_mibs(void) { snmp_mib_free((void **)ipv6_statistics); snmp_mib_free((void **)icmpv6_statistics); + snmp_mib_free((v...
239cd34327d12e84f5528caa7b11c9e651372c39
Analyze and fix the following issue in the Linux kernel code: [BNX2]: Fix Serdes WoL bug.
Problem Details: The bug is in the code in bnx2_set_power_state() that assumes copper devices when setting up WoL. This is no longer true after adding WoL support for Serdes devices. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 78ed633ceb82..2a79ffc4eea5 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -3079,14 +3079,18 @@ bnx2_set_power_state(struct bnx2 *bp, pci_power_t state) autoneg = bp->autoneg; advertising = bp->advertising; - bp->autoneg = AUTONE...
e9e42faf47255274a1ed0b9bf1c46118023ec5fa
Analyze and fix the following issue in the Linux kernel code: [SCSI] initio: Fix merge fallout
Problem Details: Fix IRQ reporting - just assign the ->pci_dev pointer earlier and use the pci_dev irq field rather than keeping a private one Init the spinlock as it works better on SMP that way Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c index 22d40fd5845b..4c4465d39a1d 100644 --- a/drivers/scsi/initio.c +++ b/drivers/scsi/initio.c @@ -665,7 +665,7 @@ static void initio_init(struct initio_host * host, u8 *bios_addr) host->max_tags[i] = 0xFF; } /* for */ ...
0fec02c93f60fb44ba3a24a0d3e4a52521d34d3f
Analyze and fix the following issue in the Linux kernel code: [SCSI] hptiop: avoid buffer overflow when returning sense data
Problem Details: The newer firmware may return more than 96 bytes of sense data when it does autosense. Truncate this to the size of the SCSI layer sense buffer to avoid an overrun. Signed-off-by: HighPoint Linux Team <linux@highpoint-tech.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c index 8515054cdf70..0844331abb87 100644 --- a/drivers/scsi/hptiop.c +++ b/drivers/scsi/hptiop.c @@ -375,8 +375,9 @@ static void hptiop_host_request_callback(struct hptiop_hba *hba, u32 _tag) scp->result = SAM_STAT_CHECK_CONDITION; memset(&scp->sen...