id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
3d80dcaca1fb6a718f1d4a381e0017d525fdf321
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Add HP Pavilion dv4t-1300 to MSI whitelist
Problem Details: BugLink: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=547994 Enable MSI by default for this Pavilion model. Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 20a66f85f0a4..c9ad182e1b4b 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -2303,6 +2303,7 @@ static void __devinit check_probe_mask(struct azx *chip, int dev) * white-list for enable_msi */ static struct snd...
e23a8b6a8f319c0f08b6ccef2dccbb37e7603dc2
Analyze and fix the following issue in the Linux kernel code: x86: Reduce verbosity of "PAT enabled" kernel message
Problem Details: On modern systems, the kernel prints the message x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106 once for every CPU. This gets kind of ridiculous on huge systems; for example, on a 64-thread system I was lucky enough to get: dmesg| grep 'PAT enabled' | wc 64 70...
```diff diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c index 7257cf3decf9..e78cd0ec2bcf 100644 --- a/arch/x86/mm/pat.c +++ b/arch/x86/mm/pat.c @@ -81,6 +81,7 @@ enum { void pat_init(void) { u64 pat; + bool boot_cpu = !boot_pat_state; if (!pat_enabled) return; @@ -122,8 +123,10 @@ void pat_init(void) r...
40258ee97d0d5e5c30a3d4b7acaf294fe82cd23f
Analyze and fix the following issue in the Linux kernel code: sh: Fix up uninitialized variable use caught by gcc 4.4.
Problem Details: In the unaligned kernel exception fixup case the printk() was ordered before the copy_from_user(), resulting in a nonsensical instruction value. This fixes up the ordering properly. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/kernel/traps_32.c b/arch/sh/kernel/traps_32.c index f9760c5c234a..69bb1652eccd 100644 --- a/arch/sh/kernel/traps_32.c +++ b/arch/sh/kernel/traps_32.c @@ -678,12 +678,6 @@ uspace_segv: } else { se_sys += 1; - if (se_kernmode_warn) - printk(KERN_NOTICE "Unaligned kernel access " - ...
96830a57de1197519b62af6a4c9ceea556c18c3d
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix idle time field in /proc/uptime
Problem Details: Git commit 79741dd changes idle cputime accounting, but unfortunately the /proc/uptime file hasn't caught up. Here the idle time calculation from /proc/stat is copied over. Signed-off-by: Michael Abbott <michael.abbott@diamond.ac.uk> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/fs/proc/uptime.c b/fs/proc/uptime.c index 0c10a0b3f146..766b1d456050 100644 --- a/fs/proc/uptime.c +++ b/fs/proc/uptime.c @@ -4,13 +4,18 @@ #include <linux/sched.h> #include <linux/seq_file.h> #include <linux/time.h> +#include <linux/kernel_stat.h> #include <asm/cputime.h> static int uptime_...
d81165919ebf6e1cb9eeb612150f9287ad414659
Analyze and fix the following issue in the Linux kernel code: lsm: Use a compressed IPv6 string format in audit events
Problem Details: Currently the audit subsystem prints uncompressed IPv6 addresses which not only differs from common usage but also results in ridiculously large audit strings which is not a good thing. This patch fixes this by simply converting audit to always print compressed IPv6 addresses. Old message example: ...
```diff diff --git a/security/lsm_audit.c b/security/lsm_audit.c index 500aad0ebd6a..3bb90b6f1dd3 100644 --- a/security/lsm_audit.c +++ b/security/lsm_audit.c @@ -187,7 +187,7 @@ static inline void print_ipv6_addr(struct audit_buffer *ab, char *name1, char *name2) { if (!ipv6_addr_any(addr)) - audit_log_for...
22e141300ec47010da2bfb03e1c0c74c3518ac7b
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - CD-audio sound for hda-intel conexant benq laptop
Problem Details: After puting a cd-audio inside my laptop there was no sound out here, so I decided to install alsa-driver with debug level and setup a model=test, it didn't help, but then I look at source code and added this few lines, now cd-audio is working both when playback/recording. [Additional minor fixes of m...
```diff diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 9d899eda44d7..3fbbc8c01e70 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c @@ -682,11 +682,13 @@ static struct hda_input_mux cxt5045_capture_source = { }; static struct hda_input_mux cxt5045_c...
a6bbce200deefb78c49e159ca718df22f18e5037
Analyze and fix the following issue in the Linux kernel code: sh: includecheck fix: dwarf.c
Problem Details: fix the following 'make includecheck' warning: arch/sh/kernel/dwarf.c: asm/dwarf.h is included more than once. Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/kernel/dwarf.c b/arch/sh/kernel/dwarf.c index bc4d8d75332b..03b3616c80a5 100644 --- a/arch/sh/kernel/dwarf.c +++ b/arch/sh/kernel/dwarf.c @@ -24,7 +24,6 @@ #include <asm/unwinder.h> #include <asm/sections.h> #include <asm/unaligned.h> -#include <asm/dwarf.h> #include <asm/stacktrace.h> ...
09dd3fc19c09f79115267361ecd7d5c5d2c27a3a
Analyze and fix the following issue in the Linux kernel code: Fix build of cpm_uart due to core changes
Problem Details: Commit ebd2c8f6d2ec4012c267ecb95e72a57b8355a705 "serial: kill off uart_info" broke the build of this driver, this fixes it. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
```diff diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c index 8d349b23249a..300cea768d74 100644 --- a/drivers/serial/cpm_uart/cpm_uart_core.c +++ b/drivers/serial/cpm_uart/cpm_uart_core.c @@ -649,7 +649,7 @@ static int cpm_uart_tx_pump(struct uart_port *port) u8 *p; in...
e0908085fc2391c85b85fb814ae1df377c8e0dcb
Analyze and fix the following issue in the Linux kernel code: powerpc/8xx: Fix regression introduced by cache coherency rewrite
Problem Details: After upgrading to the latest kernel on my mpc875 userspace started running incredibly slow (hours to get to a shell, even!). I tracked it down to commit 8d30c14cab30d405a05f2aaceda1e9ad57800f36, that patch removed a work-around for the 8xx. Adding it back makes my problem go away. Signed-off-by: Rex ...
```diff diff --git a/arch/powerpc/mm/pgtable.c b/arch/powerpc/mm/pgtable.c index 83f1551ec2c9..53040931de32 100644 --- a/arch/powerpc/mm/pgtable.c +++ b/arch/powerpc/mm/pgtable.c @@ -30,6 +30,8 @@ #include <asm/tlbflush.h> #include <asm/tlb.h> +#include "mmu_decl.h" + DEFINE_PER_CPU(struct mmu_gather, mmu_gathers)...
daf8f40391b2a1978ea2071c20959d91fade6b1a
Analyze and fix the following issue in the Linux kernel code: powerpc/4xx: Fix erroneous xmon warning on PowerPC 4xx
Problem Details: The xmon code relies on MSR_RI being non-zero to indicate that an exception is recoverable. If it is not, it prints a warning message. However, the PowerPC 4xx cores do not have an MSR_RI bit and this warning is produced for every xmon event. This introduces an unrecoverable_excp function to determi...
```diff diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index 0e09a45ac79a..c6f0a71b405e 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c @@ -335,6 +335,16 @@ int cpus_are_in_xmon(void) } #endif +static inline int unrecoverable_excp(struct pt_regs *regs) +{ +#ifdef CONFIG_4xx + ...
f32af63ed1327451cb91e3816fa043b6c2c52db1
Analyze and fix the following issue in the Linux kernel code: powerpc/mm: Fix 40x and 8xx vs. _PAGE_SPECIAL
Problem Details: The test to check whether we have _PAGE_SPECIAL defined is broken, since we always define it, just not always to a meaninful value :-) That broke 8xx and 40x under some circumstances. This fixes it by adding _PAGE_SPECIAL for both of these since they had a free PTE bit, and removing the condition aro...
```diff diff --git a/arch/powerpc/include/asm/pte-40x.h b/arch/powerpc/include/asm/pte-40x.h index 6c3e1f4378d4..ec0b0b0d1df9 100644 --- a/arch/powerpc/include/asm/pte-40x.h +++ b/arch/powerpc/include/asm/pte-40x.h @@ -43,6 +43,7 @@ #define _PAGE_NO_CACHE 0x004 /* I: caching is inhibited */ #define _PAGE_WRITETHRU 0x...
049d0497060bc8db944f7b4984271327448b3603
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix ibm,client-architecture-support printout
Problem Details: On machines without the ibm,client-architecture-support call we were missing a newline. We may as well print the full name in all its glory too - its ibm,client-architecture-support, not ibm,client-architecture as I mistakenly wrote (a name only an IBM architect could love). For my penance I will writ...
```diff diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 864334b337a3..bafac2e41ae1 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c @@ -800,7 +800,7 @@ static void __init prom_send_capabilities(void) root = call_prom("open", 1, 1, ADDR("/")); if...
f2053f1a7bf6005b4e81826b1ac8d0b4117c4cf0
Analyze and fix the following issue in the Linux kernel code: powerpc/perf_counter: Fix vdso detection
Problem Details: perf_counter uses arch_vma_name() to detect a vdso region which in turn uses current->mm->context.vdso_base. We need to initialise this before doing the mmap or else we fail to detect the vdso. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing...
```diff diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c index 3faaf29bdb29..94e2df3cae07 100644 --- a/arch/powerpc/kernel/vdso.c +++ b/arch/powerpc/kernel/vdso.c @@ -240,6 +240,13 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) goto fail_mmapsem; } + /* + * Pu...
144ef909c09b60c97b3c20b69ea30abd1e60e54d
Analyze and fix the following issue in the Linux kernel code: powerpc: Check for unsupported relocs when using CONFIG_RELOCATABLE
Problem Details: When using CONFIG_RELOCATABLE, we build the kernel as a position independent executable. The kernel then uses a little bit of relocation code to relocate itself. That code only deals with R_PPC64_RELATIVE relocations though. If for some reason you use assembly constructs such as LOAD_REG_IMMEDIATE() to...
```diff diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index aacf629c1a9f..1a54a3b3a3fa 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -164,6 +164,17 @@ PHONY += $(BOOT_TARGETS) boot := arch/$(ARCH)/boot +ifeq ($(CONFIG_RELOCATABLE),y) +quiet_cmd_relocs_check = CALL $< + cmd_...
95e0d86badc410d525ea7218fd32df7bfbf9c837
Analyze and fix the following issue in the Linux kernel code: Revert "kmod: fix race in usermodehelper code"
Problem Details: This reverts commit c02e3f361c7 ("kmod: fix race in usermodehelper code") The patch is wrong. UMH_WAIT_EXEC is called with VFORK what ensures that the child finishes prior returing back to the parent. No race. In fact, the patch makes it even worse because it does the thing it claims not do: - It...
```diff diff --git a/kernel/kmod.c b/kernel/kmod.c index 689d20f39305..9fcb53a11f87 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c @@ -143,7 +143,6 @@ struct subprocess_info { static int ____call_usermodehelper(void *data) { struct subprocess_info *sub_info = data; - enum umh_wait wait = sub_info->wait; int retva...
11ef160fda9c150cd75db77194bcc66839709662
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix releasepage to avoid unlocking extents we haven't locked
Problem Details: During releasepage, we try to drop any extent_state structs for the bye offsets of the page we're releaseing. But the code was incorrectly telling clear_extent_bit to delete the state struct unconditionallly. Normally this would be fine because we have the page locked, but other parts of btrfs will l...
```diff diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index dcce98d0ec4f..0cb88f8146ea 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2809,8 +2809,13 @@ int try_release_extent_state(struct extent_map_tree *map, else { if ((mask & GFP_NOFS) == GFP_NOFS) mask = GFP_NOFS; - clear_ext...
46562cec98368623bcd18d7fd30f20c04afd5978
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix test_range_bit for whole file extents
Problem Details: If test_range_bit finds an extent that goes all the way to (u64)-1, it can incorrectly wrap the u64 instead of treaing it like the end of the address space. This just adds a check for the highest possible offset so we don't wrap. Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index b9506548853b..dcce98d0ec4f 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -1564,6 +1564,10 @@ int test_range_bit(struct extent_io_tree *tree, u64 start, u64 end, bitset = 0; break; } + + if (state->end == (u64)-1) + br...
42daec299b8b6b9605976d0ee1266b343a31cbcc
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix errors handling cached state in set/clear_extent_bit
Problem Details: Both set and clear_extent_bit allow passing a cached state struct to reduce rbtree search times. clear_extent_bit was improperly bypassing some of the checks around making sure the extent state fields were correct for a given operation. The fix used here (from Yan Zheng) is to use the hit_next goto t...
```diff diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 7e16c6d8153f..b9506548853b 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -495,11 +495,11 @@ again: if (cached_state) { cached = *cached_state; *cached_state = NULL; - if (cached->tree && cached->start == start) { + cached...
49b92050f6ce436cde7f495bbb27437bcb09e238
Analyze and fix the following issue in the Linux kernel code: cpumask: use mm_cpumask() wrapper: m32r
Problem Details: Makes code futureproof against the impending change to mm->cpu_vm_mask. It's also a chance to use the new cpumask_ ops which take a pointer (the older ones are deprecated, but there's no hurry for arch code). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Hirokazu Takata <takata@linux...
```diff diff --git a/arch/m32r/include/asm/mmu_context.h b/arch/m32r/include/asm/mmu_context.h index 91909e5dd9d0..a70a3df33635 100644 --- a/arch/m32r/include/asm/mmu_context.h +++ b/arch/m32r/include/asm/mmu_context.h @@ -127,7 +127,7 @@ static inline void switch_mm(struct mm_struct *prev, if (prev != next) { #if...
f066a17d9f8d0a20d01d1aa9badce7f43c7bd6ad
Analyze and fix the following issue in the Linux kernel code: drm/edid: Fix standard timing parse for EDID <= 1.2
Problem Details: Aspect ratio code of 0 means 1:1 before EDID 1.3. Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 8ed732ae1ecc..9888c2076b2e 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -528,6 +528,7 @@ bad_std_timing(u8 a, u8 b) */ struct drm_display_mode *drm_mode_std(struct drm_device *dev, struct std_...
708a62bcd5f699756bae81491e64648fbf19e2a4
Analyze and fix the following issue in the Linux kernel code: hwmon: (coretemp) Fix Atom CPUs support
Problem Details: Fix Atom CPUs support. Intel documents TjMax at 90 degrees C but some Atoms may have 125 degrees C (this is undocumented speculation). Signed-off-by: Rudolf Marek <r.marek@assembler.cz> Cc: Huaxu Wan <huaxu.wan@linux.intel.com> Cc: Kent Liu <kent.liu@linux.intel.com> Signed-off-by: Jean Delvare <khali...
```diff diff --git a/Documentation/hwmon/coretemp b/Documentation/hwmon/coretemp index dbbe6c7025b0..d3d79e658718 100644 --- a/Documentation/hwmon/coretemp +++ b/Documentation/hwmon/coretemp @@ -4,7 +4,7 @@ Kernel driver coretemp Supported chips: * All Intel Core family Prefix: 'coretemp' - CPUID: family 0x...
4111d4fde6aa04a2e42c43d0e74593e6144b0f0f
Analyze and fix the following issue in the Linux kernel code: sunrpc/rpc_pipe: fix kernel-doc notation
Problem Details: Fix kernel-doc notation (& warnings) in sunrpc/rpc_pipe.c. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index 858a443f418f..49278f830367 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c @@ -860,7 +860,8 @@ static void rpc_clntdir_depopulate(struct dentry *dentry) /** * rpc_create_client_dir - Create a new rpc_client directory in rpc_pip...
61d0a8e6a8049cea246ee7ec19b042d4ff1f6ef6
Analyze and fix the following issue in the Linux kernel code: NFS/RPC: fix problems with reestablish_timeout and related code.
Problem Details: [[resending with correct cc: - "vfs.kernel.org" just isn't right!]] xprt->reestablish_timeout is used to cause TCP connection attempts to back off if the connection fails so as not to hammer the network, but to still allow immediate connections when there is no reason to believe there is a problem. ...
```diff diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index bee415465754..37c5475ba258 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -773,6 +773,7 @@ static void xs_close(struct rpc_xprt *xprt) dprintk("RPC: xs_close xprt %p\n", xprt); xs_reset_transport(transport); + xprt->...
1b9894f342a39601bb0420b7b8c7e445670c1b51
Analyze and fix the following issue in the Linux kernel code: serial core: fix new kernel-doc warnings
Problem Details: Fix new kernel-doc warnings in serial_core.[hc] files. Warning(include/linux/serial_core.h:485): No description found for parameter 'uport' Warning(include/linux/serial_core.h:485): Excess function parameter 'port' description in 'uart_handle_dcd_change' Warning(include/linux/serial_core.h:511):...
```diff diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index 2514d00c0f6f..1689bda1d13b 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c @@ -2426,7 +2426,7 @@ struct tty_driver *uart_console_device(struct console *co, int *index) /** * uart_add_one_port - attach ...
5224ee086321fec78970e2f2805892d2b34e8957
Analyze and fix the following issue in the Linux kernel code: SELinux: do not destroy the avc_cache_nodep
Problem Details: The security_ops reset done when SELinux is disabled at run time is done after the avc cache is freed and after the kmem_cache for the avc is also freed. This means that between the time the selinux disable code destroys the avc_node_cachep another process could make a security request and could try t...
```diff diff --git a/security/selinux/avc.c b/security/selinux/avc.c index 1ed0f076aadc..b4b5da1c0a42 100644 --- a/security/selinux/avc.c +++ b/security/selinux/avc.c @@ -868,8 +868,19 @@ u32 avc_policy_seqno(void) void avc_disable(void) { - avc_flush(); - synchronize_rcu(); - if (avc_node_cachep) - kmem_cache_des...
0e442afd92fcdde2cc63b6f25556b8934e42b7d2
Analyze and fix the following issue in the Linux kernel code: IB/mad: Fix lock-lock-timer deadlock in RMPP code
Problem Details: Holding agent->lock across cancel_delayed_work() (which does del_timer_sync()) in ib_cancel_rmpp_recvs() leads to lockdep reports of possible lock-timer deadlocks if a consumer ever does something that connects agent->lock to a lock taken in IRQ context (cf http://marc.info/?l=linux-rdma&m=125243699026...
```diff diff --git a/drivers/infiniband/core/mad_rmpp.c b/drivers/infiniband/core/mad_rmpp.c index 57a3c6f947b2..4e0f2829e0e5 100644 --- a/drivers/infiniband/core/mad_rmpp.c +++ b/drivers/infiniband/core/mad_rmpp.c @@ -37,7 +37,8 @@ enum rmpp_state { RMPP_STATE_ACTIVE, RMPP_STATE_TIMEOUT, - RMPP_STATE_COMPLETE + R...
637d020a02cd734bf27acfc56c6d942cddd9eb80
Analyze and fix the following issue in the Linux kernel code: 9p: Fix the incorrect update of inode size in v9fs_file_write()
Problem Details: When using the cache=loose flags, the inode's size was not being updated correctly on a remote write. Thus subsequent reads of the whole file resulted in a truncated read. Fix it. Signed-off-by: Abhishek Kulkarni <adkulkar@umail.iu.edu> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
```diff diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index de7690eec4d8..cafaa46434ba 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c @@ -32,6 +32,7 @@ #include <linux/string.h> #include <linux/inet.h> #include <linux/list.h> +#include <linux/pagemap.h> #include <asm/uaccess.h> #include <linux/idr.h> #in...
74908a0009eb36054190ab80deb9671014efed96
Analyze and fix the following issue in the Linux kernel code: include/linux/cred.h: fix build
Problem Details: mips allmodconfig: include/linux/cred.h: In function `creds_are_invalid': include/linux/cred.h:187: error: `PAGE_SIZE' undeclared (first use in this function) include/linux/cred.h:187: error: (Each undeclared identifier is reported only once include/linux/cred.h:187: error: for each function it appear...
```diff diff --git a/include/linux/cred.h b/include/linux/cred.h index fb371601a3b4..4e3387a89cb9 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h @@ -176,23 +176,7 @@ extern void __invalid_creds(const struct cred *, const char *, unsigned); extern void __validate_process_creds(struct task_struct *, ...
1eba8f84380bede3c602bd7758dea96925cead01
Analyze and fix the following issue in the Linux kernel code: rcu: Clean up code based on review feedback from Josh Triplett, part 2
Problem Details: These issues identified during an old-fashioned face-to-face code review extending over many hours. o Add comments for tricky parts of code, and correct comments that have passed their sell-by date. o Get rid of the vestiges of rcu_init_sched(), which is no longer needed now that PREEMPT_RCU is gon...
```diff diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 6fe0363724e9..70331218e4b4 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -196,6 +196,8 @@ static inline void rcu_read_lock_sched(void) __acquire(RCU_SCHED); rcu_read_acquire(); } + +/* Used by lockdep and traci...
7043078630bbc9eb908a56e08077c5abe7f2d311
Analyze and fix the following issue in the Linux kernel code: MN10300: Handle removal of struct uart_info
Problem Details: Commit ebd2c8f6d2ec4012c267ecb95e72a57b8355a705 removed struct uart_info and commit bdc04e3174e18f475289fa8f4144f66686326b7e further moved delta_msr_wait. Fix up the MN10300 on-chip serial port drivers to comply with this. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvald...
```diff diff --git a/arch/mn10300/kernel/asm-offsets.c b/arch/mn10300/kernel/asm-offsets.c index 82b40079ad76..02dc7e461fef 100644 --- a/arch/mn10300/kernel/asm-offsets.c +++ b/arch/mn10300/kernel/asm-offsets.c @@ -85,7 +85,7 @@ void foo(void) OFFSET(__rx_buffer, mn10300_serial_port, rx_buffer); OFFSET(__rx_inp, ...
92e2a6f68219f8d4c862b1f29c653b05639e4c06
Analyze and fix the following issue in the Linux kernel code: ASoC: Davinci: Fix race with cpu_dai->dma_data
Problem Details: This patch removes references to cpu_dai->dma_data. It makes struct davinci_pcm_dma_params part of struct davinci_mcbsp_dev or struct davinci_audio_dev. It removes the unused name variable from davinci_pcm_dma_params. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> Signed-off-by: Mark Brow...
```diff diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c index d32e1974fdf2..4ae707048021 100644 --- a/sound/soc/davinci/davinci-i2s.c +++ b/sound/soc/davinci/davinci-i2s.c @@ -97,22 +97,19 @@ enum { DAVINCI_MCBSP_WORD_32, }; -static struct davinci_pcm_dma_params davinci_i2s_pcm_out =...
81ac55aa14c863821248d9e82694c79bb556694d
Analyze and fix the following issue in the Linux kernel code: ASoC: DaVinci: Fix divide by zero error during 1st execution
Problem Details: When both playback and capture stream were open davinci_i2s_hw_params was setting parameters for the wrong stream. The fix for davinci_i2s_hw_params is sufficient, but it looks like a race still happens in davici_pcm_open. This patch also makes the race smaller but the next patch provides a better fix....
```diff diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c index 12a6c549ee6e..d32e1974fdf2 100644 --- a/sound/soc/davinci/davinci-i2s.c +++ b/sound/soc/davinci/davinci-i2s.c @@ -353,8 +353,9 @@ static int davinci_i2s_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_par...
4266c97a3ef4604561a22212eb0eab8a3c338971
Analyze and fix the following issue in the Linux kernel code: nommu: fix two build breakages
Problem Details: My 58fa879e1e640a1856f736b418984ebeccee1c95 "mm: FOLL flags for GUP flags" broke CONFIG_NOMMU build by forgetting to update nommu.c foll_flags type: mm/nommu.c:171: error: conflicting types for `__get_user_pages' mm/internal.h:254: error: previous declaration of `__get_user_pages' was here make[...
```diff diff --git a/mm/nommu.c b/mm/nommu.c index 1a4473faac48..8d484241d034 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -61,6 +61,7 @@ void *high_memory; struct page *mem_map; unsigned long max_mapnr; unsigned long num_physpages; +unsigned long highest_memmap_pfn; struct percpu_counter vm_committed_as; int sysct...
df0fd5e5e117329436fdea568455545ca18a71f0
Analyze and fix the following issue in the Linux kernel code: ASoC: Blackfin: fix inverted handling of SPORT0 on PORT F/G
Problem Details: Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/blackfin/bf5xx-i2s.c b/sound/soc/blackfin/bf5xx-i2s.c index 1e9d161c76c4..084b68884ada 100644 --- a/sound/soc/blackfin/bf5xx-i2s.c +++ b/sound/soc/blackfin/bf5xx-i2s.c @@ -77,12 +77,12 @@ static struct sport_param sport_params[2] = { * TFS. When Port G is selected and EMAC then there is...
11868a2dc4f5e4f2f652bfd259e1360193fcee62
Analyze and fix the following issue in the Linux kernel code: x86: mce: Use safer ways to access MCE registers
Problem Details: Use rdmsrl_safe() when accessing MCE registers. While in theory we always 'know' which ones are safe to access from the capability bits, there's a lot of hardware variations and reality might differ from theory, as it did in this case: http://bugzilla.kernel.org/show_bug.cgi?id=14204 [ 0.010016...
```diff diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index 2f5aab26320e..4b2af86e3e8d 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c @@ -305,13 +305,25 @@ static int msr_to_offset(u32 msr) static u64 mce_rdmsrl(u32 msr) { u64 v; + if (__get...
6c6a22e26868285dc3dac280e0e57de029bfae1b
Analyze and fix the following issue in the Linux kernel code: iwlagn: fix panic in iwl{5000,4965}_rx_reply_tx
Problem Details: In some cases firmware can give us bad value of index in transmit buffers array. This patch add sanity check for such values and return from processing function instantly when it happens. https://bugzilla.redhat.com/show_bug.cgi?id=521931 Patch was tested by reporter on iwl5000. I think check can be ...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index ca61d3796cef..3259b8841544 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c @@ -2021,6 +2021,12 @@ static int iwl4965_tx_status_reply_tx(struct iwl_priv *priv, ...
e31f7b96f0252e8da06df1bc7fd0f6dbc8cbec42
Analyze and fix the following issue in the Linux kernel code: ath9k: Fix RFKILL bugs
Problem Details: This patch fixes 2 issues in RFKILL: * Calling wiphy_rfkill_stop_polling() in ath9k_stop would mean that the driver cannot report HW status when the radio is re-enabled. Move this to ath_detach(). * Calling ath_radio_{enable/disable} without checking the current state results in ath_radio_enabl...
```diff diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 5055f1842b89..52bed89063d4 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -1226,11 +1226,6 @@ static void ath9k_rfkill_poll_state(struct ieee80211_hw *hw) bool bl...
018ae37292dd391494172495142b87e816a841c0
Analyze and fix the following issue in the Linux kernel code: wl12xx: fix kconfig/link errors
Problem Details: "boolean" converts a module dependency (MAC80211=m) to YES, then the WL12XX driver can be built-in instead of only modular, which leads to linker errors: wl1271_main.c:(.text+0x11177d): undefined reference to `ieee80211_frequency_to_channel' wl1271_main.c:(.text+0x111adc): undefined reference to `ieee...
```diff diff --git a/drivers/net/wireless/wl12xx/Kconfig b/drivers/net/wireless/wl12xx/Kconfig index 7b14d5bc63d6..88060e117541 100644 --- a/drivers/net/wireless/wl12xx/Kconfig +++ b/drivers/net/wireless/wl12xx/Kconfig @@ -1,5 +1,5 @@ menuconfig WL12XX - boolean "TI wl12xx driver support" + tristate "TI wl12xx driver ...
fe2475633676b0a976400dfc53f8d7006f56543e
Analyze and fix the following issue in the Linux kernel code: rt2x00: fix the definition of rt2x00crypto_rx_insert_iv
Problem Details: Remove the redundant l2pad parameter from the definition of rt2x00crypto_rx_insert_iv which is used when only CONFIG_RT2500PCI but none of the other rt2x00 family drivers is configured. Signed-off-by: Andrew Price <andy@andrewprice.me.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/rt2x00/rt2x00lib.h b/drivers/net/wireless/rt2x00/rt2x00lib.h index 5462cb5ad994..567f029a8cda 100644 --- a/drivers/net/wireless/rt2x00/rt2x00lib.h +++ b/drivers/net/wireless/rt2x00/rt2x00lib.h @@ -380,7 +380,7 @@ static inline void rt2x00crypto_tx_insert_iv(struct sk_buff *skb,...
bba98871c6c5f1f086086ccf13836a02e0f27e77
Analyze and fix the following issue in the Linux kernel code: iwlwifi: do not send sync command while holding spinlock
Problem Details: commit 10c994ca70e8e94bbc85a5bf13de5911ee8de4d2 "iwlwifi: fix remove key error" fixed an error reported by mac80211 during interface down. The fix involved changing an async command to synchronous. Unfortunately this was inside a spinlock section in which we cannot sleep. Modify the sending of the com...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index a2b9ec82b965..c6633fec8216 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c @@ -520,7 +520,7 @@ int iwl_send_static_wepkey_cmd(struct iwl_priv *priv, u8 send_if_empt...
6a211bf1fc63891bfbc510d9caa751c4dee4bc37
Analyze and fix the following issue in the Linux kernel code: mac80211: fix DTIM setting
Problem Details: When the DTIM setting is read from beacons, mac80211 will assume it is 1 if the TIM IE is not present or the value is 0. This sounds fine, but the same function processes probe responses as well, which don't have a TIM IE. This leads to overwriting any values previously parsed out of beacon frames. Th...
```diff diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 039901109fa1..71e10cabf811 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c @@ -90,8 +90,8 @@ ieee80211_bss_info_update(struct ieee80211_local *local, bss->dtim_period = tim_ie->dtim_period; } - /* set default value for buggy APs */ -...
edbf51f65eefb952a03c00eadefa9aa48580fcc6
Analyze and fix the following issue in the Linux kernel code: ath9k: Fix regression in PA calibration
Problem Details: The commit "ath9k: Fix bugs in programming registers during PA CAL" removed a REG_READ of 0x7834. This resulted in incorrect computation of the subsequent value to be written in RF2G6. This patch fixes the regression by re-adding the REG_READ. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Sign...
```diff diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c index 22a3a6903867..0ad6d0b76e9e 100644 --- a/drivers/net/wireless/ath/ath9k/calib.c +++ b/drivers/net/wireless/ath/ath9k/calib.c @@ -936,6 +936,7 @@ static inline void ath9k_hw_9285_pa_cal(struct ath_hw *ah, bool is_re...
d865ca6c147552a1c38161e2e262c4ab59e762d6
Analyze and fix the following issue in the Linux kernel code: ath9k: Fix bug in chain handling
Problem Details: * This patch fixes a bug in calculating the scaled power for three chain chipsets. * Also, a delay is needed after setting DAC low-power mode in TOP1 RF register (Top Level Register Bits). Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com> Signed-off-by: John W. Linville <linville@...
```diff diff --git a/drivers/net/wireless/ath/ath9k/eeprom_def.c b/drivers/net/wireless/ath/ath9k/eeprom_def.c index ae7fb5dcb266..4071fc91da0a 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_def.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c @@ -509,6 +509,8 @@ static void ath9k_hw_def_set_board_values(struct ...
42abfbee23bf86e2c74d569b7ddd040d29782c5a
Analyze and fix the following issue in the Linux kernel code: ath9k: Fix AHB reset for AR9280
Problem Details: The commit "ath9k: Do an AHB reset before doing RTC reset" fixed RTC reset issue for AR9280 2.0 chipsets and above. The fix is valid for all AR9280 chipsets. Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 323df96dad0b..814682618b84 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c @@ -1793,7 +1793,7 @@ static void ath9k_hw_set_regs(struct ath_hw *ah, struct ath9k_channel *chan, s...
0a475cc6a0ac8e38ac3587cff87026551800b7fe
Analyze and fix the following issue in the Linux kernel code: ath9k: Do a full reset for AR9280
Problem Details: AR9280 requires a full reset during channel change and HW reset. Currently, a fast channel change is done. This patch fixes this bug. Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 2c904c6e2099..323df96dad0b 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c @@ -2366,8 +2366,8 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, (chan->...
204d794086f26a7b191d9a9c3483af8b81362b16
Analyze and fix the following issue in the Linux kernel code: ath9k: Fix rx data corruption
Problem Details: Setting bit 20 and 25 of 0x8344 can cause occasional rx data corruption, clear them to fix this issue. Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index af5bb50a2e8b..4731ad2d9996 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c @@ -1273,6 +1273,15 @@ static void ath9k_hw_override_ini(struct ath_hw *ah, */ REG_SET_BIT(ah, A...
d8caa83967d62c05f406d34abaaf2e1baa172c6c
Analyze and fix the following issue in the Linux kernel code: ath9k: Fix chip wakeup issue
Problem Details: Waking up the chip after powering it down fails sometimes. In this case the CPU is locked for 200ms. Reduce this interval to 10ms to avoid excessive busy looping. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index 75c3041aadcb..b89234571829 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h @@ -106,7 +106,7 @@ #define AH_TSF_WRITE_TIMEOUT 100 /* (us) */ #define AH_TIME_QUANTUM ...
82905ace22614fe220875fc5748b1afbac868a76
Analyze and fix the following issue in the Linux kernel code: b43: fix build error if !CONFIG_B43_LEDS
Problem Details: Fix the following build error when CONFIG_B43_LEDS is not selected: drivers/net/wireless/b43/main.c: In function 'b43_remove': drivers/net/wireless/b43/main.c:4990: error: 'struct b43_leds' has no member named 'stop' drivers/net/wireless/b43/main.c:4991: error: 'struct b43_leds' has no member named 'w...
```diff diff --git a/drivers/net/wireless/b43/leds.c b/drivers/net/wireless/b43/leds.c index fbe31e02688b..fbe3d4f62ce2 100644 --- a/drivers/net/wireless/b43/leds.c +++ b/drivers/net/wireless/b43/leds.c @@ -325,6 +325,14 @@ void b43_leds_exit(struct b43_wldev *dev) b43_led_turn_off(dev, leds->led_radio.index, leds->l...
e899a3f232125c393cdf7f7bf6533501ef8808fb
Analyze and fix the following issue in the Linux kernel code: b43: Don't abuse wl->current_dev in the led work
Problem Details: Don't abuse wl->current_dev in the LED work for checking whether we're going down. Add an explicit variable. This fixes a crash on rmmod dereferencing the wl->current_dev NULL pointer in various other places of the driver. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <l...
```diff diff --git a/drivers/net/wireless/b43/leds.c b/drivers/net/wireless/b43/leds.c index ac5a322c84b7..fbe31e02688b 100644 --- a/drivers/net/wireless/b43/leds.c +++ b/drivers/net/wireless/b43/leds.c @@ -112,10 +112,7 @@ static void b43_led_brightness_set(struct led_classdev *led_dev, struct b43_led *led = contain...
9308779aad721cab8434fd5f98d3c85d3716fdec
Analyze and fix the following issue in the Linux kernel code: b43: Add LP PHY Analog Switch Support
Problem Details: The current verison of b43 uses "b43_phyop_switch_analog_generic" for A, G and LP phys. According to the spec, this is the wrong behaviour for the LP PHY (see: http://bcm-v4.sipsolutions.net/802.11/PHY/Anacore ) While no problems on the x86 plattform where seen, this leads to a crash on the BCM5354 S...
```diff diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c index 3e02d969f683..1e318d815a5b 100644 --- a/drivers/net/wireless/b43/phy_lp.c +++ b/drivers/net/wireless/b43/phy_lp.c @@ -2228,6 +2228,16 @@ static enum b43_txpwr_result b43_lpphy_op_recalc_txpower(struct b43_wldev *dev, retu...
176e9f6a4cf4b1bf66d18243ede0938a35c81541
Analyze and fix the following issue in the Linux kernel code: b43: Fix IRQ sync for SDIO
Problem Details: synchronize_irq is meaningless for SDIO. sdio_release_irq will sync the IRQ thread for us. 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 5b0aeff01dbf..7d22dadfd890 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c @@ -3854,10 +3854,15 @@ redo: b43_read32(dev, B43_MMIO_GEN_IRQ_MASK); /* Flush */ spin_unlock_irq(&wl->hardirq_...
a8696c800b8154e27b359866f7b837079cdb513a
Analyze and fix the following issue in the Linux kernel code: b43: Fix SDIO interrupt handler deadlock
Problem Details: We need to release the SDIO host before locking the driver mutex. 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 950a838757c4..5b0aeff01dbf 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c @@ -1914,20 +1914,14 @@ static irqreturn_t b43_interrupt_handler(int irq, void *dev_id) static void b43_sdio_interru...
3dbba8e281552da640080f08a0f127d48456669f
Analyze and fix the following issue in the Linux kernel code: b43: Add Soft-MAC SDIO device support
Problem Details: This adds support for Soft-MAC SDIO devices to b43. The driver still lacks some fixes for SDIO devices, so it's currently marked as BROKEN. Signed-off-by: Albert Herranz <albert_herranz@yahoo.es> 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/Kconfig b/drivers/net/wireless/b43/Kconfig index 83e38134accb..4fc2ce429c72 100644 --- a/drivers/net/wireless/b43/Kconfig +++ b/drivers/net/wireless/b43/Kconfig @@ -61,11 +61,28 @@ config B43_PCMCIA If unsure, say N. +config B43_SDIO + bool "Broadcom 43xx SDIO devic...
90c215c47675be42f164a4bac282666753e09225
Analyze and fix the following issue in the Linux kernel code: cfg80211: fix SME connect
Problem Details: There's a check saying /* we're good if we have both BSSID and channel */ if (wdev->conn->params.bssid && wdev->conn->params.channel) { but that isn't true -- we need the BSS struct. This leads to errors such as Trying to associate with 00:1b:53:11:dc:40 (SSID='TEST' freq=2412 MHz) ioctl[SI...
```diff diff --git a/net/wireless/sme.c b/net/wireless/sme.c index 68307883ec87..7fae7eee65de 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c @@ -188,7 +188,7 @@ void cfg80211_conn_work(struct work_struct *work) rtnl_unlock(); } -static bool cfg80211_get_conn_bss(struct wireless_dev *wdev) +static struct ...
909a203566a75d26c65370d7dd933fa513d47990
Analyze and fix the following issue in the Linux kernel code: rc80211_minstrel: fix contention window calculation
Problem Details: The contention window is supposed to be a power of two minus one, i.e. 15, 31, 63, 127... minstrel_rate_init() forgets to subtract 1, so the sequence becomes 15, 32, 66, 134... Bug reported by Dan Halperin <dhalperi@cs.washington.edu> Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John ...
```diff diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c index 7c5142988bbb..6e5d68b4e427 100644 --- a/net/mac80211/rc80211_minstrel.c +++ b/net/mac80211/rc80211_minstrel.c @@ -418,7 +418,7 @@ minstrel_rate_init(void *priv, struct ieee80211_supported_band *sband, /* contention window...
71702bc13efd3238e02197780d6e62c51c196a9d
Analyze and fix the following issue in the Linux kernel code: ssb/sdio: fix printk format warnings
Problem Details: Fix printk format warnings: drivers/ssb/sdio.c:336: warning: format '%u' expects type 'unsigned int', but argument 7 has type 'size_t' drivers/ssb/sdio.c:443: warning: format '%u' expects type 'unsigned int', but argument 7 has type 'size_t' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signe...
```diff diff --git a/drivers/ssb/sdio.c b/drivers/ssb/sdio.c index 4ff73473e695..65a6080cb02a 100644 --- a/drivers/ssb/sdio.c +++ b/drivers/ssb/sdio.c @@ -333,7 +333,7 @@ static void ssb_sdio_block_read(struct ssb_device *dev, void *buffer, goto out; err_out: - dev_dbg(ssb_sdio_dev(bus), "%04X:%04X (width=%u, len...
d45b90ddee58db8caa3b06c3709b73dd0444559c
Analyze and fix the following issue in the Linux kernel code: ssb: Fix error when V1 SPROM extraction is forced
Problem Details: When an SPROM revision is not recognized, the code falls back to a V1 SPROM; however, that revision is not forced in the appropriate structure. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/ssb/pci.c b/drivers/ssb/pci.c index f853d5600ca7..9e50896233aa 100644 --- a/drivers/ssb/pci.c +++ b/drivers/ssb/pci.c @@ -600,6 +600,7 @@ static int sprom_extract(struct ssb_bus *bus, struct ssb_sprom *out, ssb_printk(KERN_WARNING PFX "Unsupported SPROM" " revision %d detected....
96d8c6af24bcacb16f18fc88fb7f2de1a59c09d6
Analyze and fix the following issue in the Linux kernel code: iwlwifi: disable powersave for 4965
Problem Details: There's a bug in 4965 powersave that appears to be related to the way it keeps track of its data during sleep, but we haven't found it yet. Due to that, using powersave may spontaneously cause the device to SYSASSERT when transitioning from sleep to wake. Therefore, disable powersave for 4965, until (i...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index 6a13bfbc9d98..ca61d3796cef 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c @@ -2346,6 +2346,7 @@ struct iwl_cfg iwl4965_agn_cfg = { .mod_params = &iwl4965_mod...
de0bd50845eb5935ce3d503c5d2f565d6cb9ece1
Analyze and fix the following issue in the Linux kernel code: iwlwifi: fix potential rx buffer loss
Problem Details: RX handling maintains a few lists that keep track of the RX buffers. Buffers move from one list to the other as they are used, replenished, and again made available for usage. In one such instance, when a buffer is used it enters the "rx_used" list. When buffers are replenished an skb is attached to th...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c index 8150c5c3a16b..b90adcb73b06 100644 --- a/drivers/net/wireless/iwlwifi/iwl-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-rx.c @@ -239,26 +239,22 @@ void iwl_rx_allocate(struct iwl_priv *priv, gfp_t priority) struct iw...
c929c5a1281b666fabc9aa94c607932ec6d28c6d
Analyze and fix the following issue in the Linux kernel code: iwlwifi: fix HT operation in 2.4 GHz band
Problem Details: When we cleaned up the driver to properly tell mac80211 about HT rates ("iwlwifi: use iwl_hwrate_get_mac80211_idx where appropriate"), we broke internal rate indexing in 2.4 GHz band. Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com> Tested-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-o...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c index 40b207aa8fef..fd731534df1c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c @@ -883,6 +883,12 @@ static void rs_tx_status(void *priv_r, struct ieee80211_...
91d372c0afc55faf44c1b763693f089b5dad31ec
Analyze and fix the following issue in the Linux kernel code: b43: Fix resume failure
Problem Details: This fixes a resume failure where a signal is pending on resume so the firmware upload fails. This removes the interruptible sleep, because we don't really need it. In the worst case (with broken firmware) the sleep loop will take 1 second. In the common case (working firmware), it will only take a few...
```diff diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 78e9834d4c12..e789792a36bc 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c @@ -2289,11 +2289,7 @@ static int b43_upload_microcode(struct b43_wldev *dev) err = -ENODEV; goto error; }...
10a01bfd4e077ff03a4ace76a6d9b81272f91678
Analyze and fix the following issue in the Linux kernel code: ath9k: Fix bug in ANI channel handling
Problem Details: When processing MIB interrupts, OFDM and CCK error handling routines for low RSSI values have to be invoked only when the channel mode is 11G/11B. Since HT channels will also fall under the bands 2Ghz/5Ghz, check appropriately. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W...
```diff diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c index a7cbb07988cf..2b493742ef10 100644 --- a/drivers/net/wireless/ath/ath9k/ani.c +++ b/drivers/net/wireless/ath/ath9k/ani.c @@ -327,7 +327,8 @@ static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hw *ah) aniSt...
4fefce9abaeef0d6ec45e06a882db23a65135272
Analyze and fix the following issue in the Linux kernel code: jbd.h: bitfields should be unsigned
Problem Details: bitfields should be unsigned. This fixes sparse noise: error: dubious one-bit signed bitfield Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Jan Kara <jack@ucw.cz> Cc: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus To...
```diff diff --git a/include/linux/jbd.h b/include/linux/jbd.h index a1187a0c99b4..331530cd3cc6 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h @@ -556,7 +556,7 @@ struct transaction_s * This transaction is being forced and some process is * waiting for it to finish. */ - int t_synchronous_commit:1;...
a4255e4c1c41f906488ae4d3fa328a66695cf200
Analyze and fix the following issue in the Linux kernel code: ext2: fix format string compile warning (ino_t)
Problem Details: Unlike on most other architectures ino_t is an unsigned int on s390. So add an explicit cast to avoid this compile warning: fs/ext2/namei.c: In function 'ext2_lookup': fs/ext2/namei.c:73: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' Signed-off-by: Heiko Car...
```diff diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c index 23701f289e98..dd7175ce5606 100644 --- a/fs/ext2/namei.c +++ b/fs/ext2/namei.c @@ -70,7 +70,7 @@ static struct dentry *ext2_lookup(struct inode * dir, struct dentry *dentry, str if (PTR_ERR(inode) == -ESTALE) { ext2_error(dir->i_sb, __func__, "...
9f6c1333938c5d93da8be8f29f3b5469a3c00f95
Analyze and fix the following issue in the Linux kernel code: V3 minixfs: add missing directory type checking
Problem Details: There are a few places in the Minix FS code where the "inode" field of a minix_dir_entry is used without checking first to see if the dirent is really a minix3_dir_entry. The inode number in a V1/V2 dirent is 16 bits, whereas that in a V3 dirent is 32 bits. Accessing it as a 16 bit field when it real...
```diff diff --git a/fs/minix/dir.c b/fs/minix/dir.c index d407e7a0b6fe..6198731d7fcd 100644 --- a/fs/minix/dir.c +++ b/fs/minix/dir.c @@ -308,14 +308,18 @@ int minix_delete_entry(struct minix_dir_entry *de, struct page *page) struct inode *inode = (struct inode*)mapping->host; char *kaddr = page_address(page); l...
3163eaba34943967aebb1eefa0d4bdc4e5dc197c
Analyze and fix the following issue in the Linux kernel code: video: s3c_fb.c: fix build with CONFIG_HOTPLUG=n
Problem Details: Fixes `s3c_fb_remove' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o With CONFIG_HOTPLUG=n, functions marked with __devexit gets removed, so make sure we use __devexit_p when referencing pointers to them. Signed-off-by: Peter Ko...
```diff diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c index 5a72083dc67c..adf9632c6b1f 100644 --- a/drivers/video/s3c-fb.c +++ b/drivers/video/s3c-fb.c @@ -1036,7 +1036,7 @@ static int s3c_fb_resume(struct platform_device *pdev) static struct platform_driver s3c_fb_driver = { .probe = s3c_fb_probe,...
a9672c4b861afcf547bfe2cafeec4ca85a63da67
Analyze and fix the following issue in the Linux kernel code: drivers/video/tmiofb.c: fix uninitialised return value
Problem Details: drivers/video/tmiofb.c: In function 'tmiofb_resume': drivers/video/tmiofb.c:977: warning: 'retval' may be used uninitialized in this function Acked-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-...
```diff diff --git a/drivers/video/tmiofb.c b/drivers/video/tmiofb.c index a1eb0862255b..6913fe168c25 100644 --- a/drivers/video/tmiofb.c +++ b/drivers/video/tmiofb.c @@ -974,7 +974,7 @@ static int tmiofb_resume(struct platform_device *dev) { struct fb_info *info = platform_get_drvdata(dev); struct mfd_cell *cell ...
0fcf6ada2b8eb42d132c0846384f1299889609e3
Analyze and fix the following issue in the Linux kernel code: fb: do not ignore fb_set_par errors
Problem Details: At the moment about half of the framebuffer drivers can return an error code in fb_set_par. Until now it would be silently ignored by fbmem.c and fbcon.c. This patch fixes fbmem.c to return the error code and restore var on error. But it is not clear in which video mode the device is when fb_set_par f...
```diff diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 3a44695b9c09..4bee7c2e6313 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -725,7 +725,7 @@ static int con2fb_release_oldinfo(struct vc_data *vc, struct fb_info *oldinfo, int oldidx, int fou...
360fa58828784f307c3977d5ff4c8e400f074a56
Analyze and fix the following issue in the Linux kernel code: s3c2410fb: fix clockrate calculation
Problem Details: In the final part of the calculation for the tft display clockrate we divide the output pf s3c2410fb_calc_pixclk() by 2 which leaves us with a rounding error if the result is odd. Change to using DIV_ROUND_UP() to ensure that we always choose a higher divisor and thus a lower frequency. Signed-off-by...
```diff diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c index 5ffca2adc6a8..aac661225c78 100644 --- a/drivers/video/s3c2410fb.c +++ b/drivers/video/s3c2410fb.c @@ -369,7 +369,9 @@ static void s3c2410fb_activate_var(struct fb_info *info) void __iomem *regs = fbi->io; int type = fbi->regs.lcdcon1 &...
99e9e7d62becd6c7413a9e8fbda7f5b66adb5cbf
Analyze and fix the following issue in the Linux kernel code: fb: fix fb_pan_display range check
Problem Details: Fix the range check for panning. The current code fails to detect some invalid values (very high ones that can occur if an app tries to move further up/left than 0,0) as the check uses the unknown values for calculation so that an overflow can occur. To fix this it is sufficient to move the calculati...
```diff diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index a85c818be945..346f257215a7 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c @@ -871,8 +871,8 @@ fb_pan_display(struct fb_info *info, struct fb_var_screeninfo *var) err = -EINVAL; if (err || !info->fbops->fb_pan_display || - ...
f7a595e98c3140f1271957aa742a6b84407620d4
Analyze and fix the following issue in the Linux kernel code: drivers/video/console/newport_con.c: fix read outside array bounds
Problem Details: It reads linetable[] before checking bounds of index, and ARRAY_SIZE is required because linetable[] are unsigned shorts. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torv...
```diff diff --git a/drivers/video/console/newport_con.c b/drivers/video/console/newport_con.c index d31b203bf654..3772433c49d1 100644 --- a/drivers/video/console/newport_con.c +++ b/drivers/video/console/newport_con.c @@ -216,7 +216,7 @@ static void newport_get_screensize(void) } newport_xsize = newport_ysize = ...
31de59d5e1cd6968ea9d1a19cceefb7a037e46bf
Analyze and fix the following issue in the Linux kernel code: viafb: hardware acceleration initialization cleanup
Problem Details: The main motivation of this patch was to merge the three initialization functions in one and clean it up. However as some changes in other code areas where needed to do it right some small other changes were made. Changes to viafb_par: io_virt renamed as engine_mmio and moved to shared VQ_start renam...
```diff diff --git a/drivers/video/via/accel.c b/drivers/video/via/accel.c index 503f9d8e5bd0..42ab4b425679 100644 --- a/drivers/video/via/accel.c +++ b/drivers/video/via/accel.c @@ -308,9 +308,22 @@ static int hw_bitblt_2(void __iomem *engine, u8 op, u32 width, u32 height, return 0; } -void viafb_init_accel(struc...
2d6e8851f608bd0c811f2df83eeff4ad8631e723
Analyze and fix the following issue in the Linux kernel code: viafb: improve pitch handling
Problem Details: Split the pitch handling up and replaces the calculation from virtual xres and bpp with fix.line_length which already contains the pitch and does not add any constrains for the virtual resolution. Also add a bit to the second pitch which the documentation mentions but which was ignored by the driver. ...
```diff diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c index 86050e79b892..4910561a9d34 100644 --- a/drivers/video/via/hw.c +++ b/drivers/video/via/hw.c @@ -36,13 +36,6 @@ static const struct pci_device_id_info pciidlist[] = { {0, 0, 0} }; -struct offset offset_reg = { - /* IGA1 Offset Register */ - ...
5016af53ebbd1450c2656c94dfbd1dad15c19f60
Analyze and fix the following issue in the Linux kernel code: viafb: cleanup viafb_cursor
Problem Details: Clean the hardware cursor handling up. The most notable change is that it no longer buffers the values in viacursor but uses the ones in cursor instead as they are guaranteed to be always valid. Furthermore it uses local instead global variables where possible, moves the cursor variable in shared as ...
```diff diff --git a/drivers/video/via/accel.c b/drivers/video/via/accel.c index 8ac02515a18d..503f9d8e5bd0 100644 --- a/drivers/video/via/accel.c +++ b/drivers/video/via/accel.c @@ -331,7 +331,7 @@ void viafb_init_accel(struct viafb_shared *shared) } viaparinfo->fbmem_free -= CURSOR_SIZE; - viaparinfo->cursor_st...
8594ac33450e6d66460230e5d07f5515b51476c9
Analyze and fix the following issue in the Linux kernel code: viafb: remove LVDS initialization
Problem Details: At least for VX800 this initialization is not very good as some parts of the register are written with reserved values. This makes the display go white in some configurations and not usable until the framebuffer is removed. It's better to not initialize it as it allows to use a previously (by BIOS) c...
```diff diff --git a/drivers/video/via/viamode.c b/drivers/video/via/viamode.c index 9ff9424ea6c3..16a8a97f6042 100644 --- a/drivers/video/via/viamode.c +++ b/drivers/video/via/viamode.c @@ -309,8 +309,7 @@ struct io_reg CX700_ModeXregs[] = { {VIASR, SR10, 0xFF, 0x01}, {VIACR, CR96, 0xFF, 0x00}, {VIACR, CR97, 0xFF, 0...
db88e382a043bf288a6257dc5069f19c5ae67df6
Analyze and fix the following issue in the Linux kernel code: viafb: clean up virtual memory handling
Problem Details: Clean the handling of ioremapped video memory up. The following changes were made: info->screen_base - viafb_FB_MM (VRAM offset calculation) was replaced by info->fix.smem_start - viafbinfo->fix.smem_start which is essentially the same calculation but done with physical instead virtual addresses. *-...
```diff diff --git a/drivers/video/via/global.c b/drivers/video/via/global.c index 468be2425af3..1096fd5de2bf 100644 --- a/drivers/video/via/global.c +++ b/drivers/video/via/global.c @@ -46,7 +46,6 @@ int viafb_hotplug_refresh = 60; unsigned int viafb_second_offset; int viafb_second_size; int viafb_primary_dev = Non...
bc6932bb4a25ced97c4f201874573e6097237b78
Analyze and fix the following issue in the Linux kernel code: viafb: fix ioremap_nocache error handling
Problem Details: Correct the returned error code for remapping the video framebuffer. Introduce error handling for remapping MMIO register address space to avoid a NULL pointer dereference. Disable hardware acceleration if remapping MMIO register address space failed as those registers are only used for hardware accel...
```diff diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c index 743eed48a5f7..72759b620e7f 100644 --- a/drivers/video/via/viafbdev.c +++ b/drivers/video/via/viafbdev.c @@ -2134,12 +2134,16 @@ static int __devinit via_pci_probe(void) if (!viaparinfo->fbmem_virt) { printk(KERN_INFO "ioremap ...
81228a36a5d05181fff990c852a9abdf03c75593
Analyze and fix the following issue in the Linux kernel code: viafb: merge viafb_update_viafb_par in viafb_update_fix
Problem Details: Shrink and merge viafb_update_viafb_par. This removes a lot of duplicated data in viafb_par. Use the relevant data of fb_info instead. On the way it removes an inconsistency in handling a second framebuffer which only worked because viafbinfo1->par is modified to point to the same viafb_par as viafb...
```diff diff --git a/drivers/video/via/accel.c b/drivers/video/via/accel.c index 45c54bfe99bb..b3e7e8246326 100644 --- a/drivers/video/via/accel.c +++ b/drivers/video/via/accel.c @@ -34,7 +34,7 @@ void viafb_init_accel(void) void viafb_init_2d_engine(void) { - u32 dwVQStartAddr, dwVQEndAddr; + u32 dwVQStartAddr, dw...
d63870db3c41086d7f13ec8b41def4331db32327
Analyze and fix the following issue in the Linux kernel code: sisfb: read buffer overflow
Problem Details: If called with mode_idx = 1, rate = 68, a read occurs from sisfb_vrate[-1].refresh. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Krzysztof Helt <krzysztof.h1@poczta.fm> Cc: Thomas Winischhofer <thomas@winischhofer.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Lin...
```diff diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c index 4a067f0d0ceb..a4e05e4d7501 100644 --- a/drivers/video/sis/sis_main.c +++ b/drivers/video/sis/sis_main.c @@ -698,8 +698,8 @@ sisfb_search_refresh_rate(struct sis_video_info *ivideo, unsigned int rate, int rate, sisfb_vrate[i].r...
4ed824d9aead77a6a4eb1e89c3b3d270ba386fad
Analyze and fix the following issue in the Linux kernel code: davinci: fb: Frame Buffer driver for TI DA8xx/OMAP-L1xx
Problem Details: Add LCD controller (LCDC) driver for TI's DA8xx/OMAP-L1xx architecture. LCDC specifications can be found at http://www.ti.com/litv/pdf/sprufm0a. LCDC on DA8xx consists of two independent controllers, the Raster Controller and the LCD Interface Display Driver (LIDD) controller. LIDD further supports c...
```diff diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 05184a1c3e97..a7944ef48a2a 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -2041,6 +2041,17 @@ config FB_SH7760 and 8, 15 or 16 bpp color; 90 degrees clockwise display rotation for panels <= 320 pixel horizontal resolutio...
6e3658f0df6f708202159302b4f3915d9b97b8dc
Analyze and fix the following issue in the Linux kernel code: platinumfb: fix misplaced parenthesis
Problem Details: Since `+' has a higher precedence than the trinary operator `?', this added `hres * (1 << color_mode)' to the boolean testing videomode and depth. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Pa...
```diff diff --git a/drivers/video/platinumfb.c b/drivers/video/platinumfb.c index bacfabd9ce16..0a366d86f08e 100644 --- a/drivers/video/platinumfb.c +++ b/drivers/video/platinumfb.c @@ -223,10 +223,14 @@ static int platinumfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, static inline int platinum_vram...
366ec51ba9622c44191fcf4d77ed4dc84acbdeec
Analyze and fix the following issue in the Linux kernel code: omapfb: HWA742: fix pointer to be const
Problem Details: Fixes the following: warning: assignment discards qualifiers from pointer target type Signed-off-by: Imre Deak <imre.deak@nokia.com> Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/video/omap/hwa742.c b/drivers/video/omap/hwa742.c index 5d4f34887a22..ca51583ec98a 100644 --- a/drivers/video/omap/hwa742.c +++ b/drivers/video/omap/hwa742.c @@ -131,7 +131,7 @@ struct { struct omapfb_device *fbdev; struct lcd_ctrl_extif *extif; - struct lcd_ctrl *int_ctrl; + const s...
5910d35cd6c0122a490000a6de0774ac7ebcc2de
Analyze and fix the following issue in the Linux kernel code: omapfb: fix coding style / remove dead line
Problem Details: - use __iomem type attribute where appropriate - expand (a ? : b) to (a ? a : b) As suggested by Russel King <linux@arm.linux.org.uk> - remove a dead line from omapfb_main.c Signed-off-by: Arun C <arunedarath@mistralsolutions.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Imre De...
```diff diff --git a/arch/arm/plat-omap/include/mach/omapfb.h b/arch/arm/plat-omap/include/mach/omapfb.h index 7b74d1255e0b..b226bdf45739 100644 --- a/arch/arm/plat-omap/include/mach/omapfb.h +++ b/arch/arm/plat-omap/include/mach/omapfb.h @@ -276,8 +276,8 @@ typedef int (*omapfb_notifier_callback_t)(struct notifier_blo...
f9e2bc8d7b8c2d9dd05a6702fce77aca3d4f2320
Analyze and fix the following issue in the Linux kernel code: omapfb: dispc: disable iface clocks along with func clocks
Problem Details: Leaving interface clocks enabled causes dss pwrdm to stay in active state when mpu is in active state. This fix puts dss to sleep state when it is not needed. Earlier version broke framebuffer on 24xx. This is fixed by enabling clocks before trying to access DISPC_IRQSTATUS register. Signed-off-by:...
```diff diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c index f1308aa04feb..a85694900e44 100644 --- a/drivers/video/omap/dispc.c +++ b/drivers/video/omap/dispc.c @@ -858,8 +858,11 @@ EXPORT_SYMBOL(omap_dispc_free_irq); static irqreturn_t omap_dispc_irq_handler(int irq, void *dev) { - u32 stat =...
fd0eecbdfbb61076e75d34034cc5cd5ca1321a81
Analyze and fix the following issue in the Linux kernel code: omapfb: dispc: various typo fixes
Problem Details: - value and register offset was swapped in a dispc write - DISPC_CONTROL register was used instead of DISPC_SYSCONFIG - FIFO size bit field had incorrect length for OMAP3 Fixed-by: arun <arunedarath@mistralsolutions.com> Fixed-by: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com> Fixed-by: Andrzej Zabor...
```diff diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c index 915439dc05a0..f1308aa04feb 100644 --- a/drivers/video/omap/dispc.c +++ b/drivers/video/omap/dispc.c @@ -286,7 +286,7 @@ static void setup_plane_fifo(int plane, int ext_mode) BUG_ON(plane > 2); l = dispc_read_reg(fsz_reg[plane]); - ...
a4177ee7f1a83eecb1d75e85d32664b023ef65e9
Analyze and fix the following issue in the Linux kernel code: gpiolib: allow exported GPIO nodes to be named using sysfs links
Problem Details: Commit 926b663ce8215ba448960e1ff6e58b67a2c3b99b (gpiolib: allow GPIOs to be named) already provides naming on the chip level. This patch provides more flexibility by allowing multiple names where ever in sysfs on a per GPIO basis. Adapted from David Brownell's comments on a similar concept: http://lkm...
```diff diff --git a/Documentation/gpio.txt b/Documentation/gpio.txt index e4b6985044a2..566edaa56a53 100644 --- a/Documentation/gpio.txt +++ b/Documentation/gpio.txt @@ -555,6 +555,11 @@ requested using gpio_request(): /* reverse gpio_export() */ void gpio_unexport(); + /* create a sysfs link to an exported GPIO...
dac94d9ec98517e8fe3f980e38f29ea3ac712168
Analyze and fix the following issue in the Linux kernel code: rtc: at91rm9200 fixes
Problem Details: Fix two new-ish runtime warnings in the at91rm9200 (etc) RTC: Platform driver 'at91_rtc' needs updating - please use dev_pm_ops ... by just switching IRQ 1/at91_rtc: IRQF_DISABLED is not guaranteed on shared IRQs ... no longer needed now that rtc_update_irq() changed Signed-off-by: David Brown...
```diff diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c index b5bf93706913..bc8bbca9a2e2 100644 --- a/drivers/rtc/rtc-at91rm9200.c +++ b/drivers/rtc/rtc-at91rm9200.c @@ -289,7 +289,7 @@ static int __init at91_rtc_probe(struct platform_device *pdev) AT91_RTC_CALEV); ret = request_irq(A...
1a0c220f791be9e15fd897adee257e72ed4134f8
Analyze and fix the following issue in the Linux kernel code: spi_s3c24xx: fix header includes
Problem Details: The driver includes <asm/io.h> where it should be including <linux/io.h> and also includes <mach/hardware.h> and <asm/dma.h> without using anything from these. Signed-off-by: Ben Dooks <ben@simtec.co.uk> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> ...
```diff diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c index 6ba8aece90b5..0be4da0917e0 100644 --- a/drivers/spi/spi_s3c24xx.c +++ b/drivers/spi/spi_s3c24xx.c @@ -20,14 +20,11 @@ #include <linux/clk.h> #include <linux/platform_device.h> #include <linux/gpio.h> +#include <linux/io.h> #include <...
9ed7ef526ade622cdc22ac365a95197ddd1e09fb
Analyze and fix the following issue in the Linux kernel code: spi: fix spelling of `automatically' in documentation
Problem Details: Fix spelling of `automatically' in Documentation/spi/spi-summary. Signed-off-by: Ben Dooks <ben@simtec.co.uk> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/Documentation/spi/spi-summary b/Documentation/spi/spi-summary index 4a02d2508bc8..deab51ddc33e 100644 --- a/Documentation/spi/spi-summary +++ b/Documentation/spi/spi-summary @@ -350,7 +350,7 @@ SPI protocol drivers somewhat resemble platform device drivers: .resume = CHIP_resume, }; -The dr...
e0626e3844e8f430fc1a4417f523a00797df7ca6
Analyze and fix the following issue in the Linux kernel code: spi: prefix modalias with "spi:"
Problem Details: This makes it consistent with other buses (platform, i2c, vio, ...). I'm not sure why we use the prefixes, but there must be a reason. This was easy enough to do it, and I did it. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: David...
```diff diff --git a/drivers/gpio/max7301.c b/drivers/gpio/max7301.c index 7b82eaae2621..480956f1ca50 100644 --- a/drivers/gpio/max7301.c +++ b/drivers/gpio/max7301.c @@ -339,3 +339,4 @@ module_exit(max7301_exit); MODULE_AUTHOR("Juergen Beisert"); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("MAX7301 SPI based GPIO-...
8b2feb10c907b610bf8a739792c6b967c65445b0
Analyze and fix the following issue in the Linux kernel code: ncpfs: fix wrong check in __ncp_ioctl()
Problem Details: We want to check for s_inode's existence, not inode's one (inode is always valid in this function). This takes care of the following entry from Dan's list: fs/ncpfs/ioctl.c +445 __ncp_ioctl(180) warning: variable derefenced before check 'inode' Reported-by: Dan Carpenter <error27@gmail.com> Cc: Juli...
```diff diff --git a/fs/ncpfs/ioctl.c b/fs/ncpfs/ioctl.c index fa038df63ac8..53a7ed7eb9c6 100644 --- a/fs/ncpfs/ioctl.c +++ b/fs/ncpfs/ioctl.c @@ -442,7 +442,7 @@ static int __ncp_ioctl(struct inode *inode, struct file *filp, if (dentry) { struct inode* s_inode = dentry->d_inode; - if (inode) { + i...
c5df59136a55fe08c21d39321679cbb008479edf
Analyze and fix the following issue in the Linux kernel code: ncpfs: read buffer overflow
Problem Details: This function uses signed integers for the unix_date and local variables - if a negative number is supplied and the leap-year condition is not met, month will be 0, leading to a later read of day_n[-1] Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Petr Vandrovec <VANDROVE@vc.cvut.cz> Signed-off...
```diff diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c index 9c590722d87e..b8b5b30d53f0 100644 --- a/fs/ncpfs/dir.c +++ b/fs/ncpfs/dir.c @@ -1241,7 +1241,7 @@ ncp_date_unix2dos(int unix_date, __le16 *time, __le16 *date) month = 2; } else { nl_day = (year & 3) || day <= 59 ? day : day - 1; - for (month = 0; month...
678ad5d8aaf8925cb8465f84e1e47d9b1284666a
Analyze and fix the following issue in the Linux kernel code: /proc/kcore: fix stat.st_size
Problem Details: Presently the size of /proc/kcore which can be read by 'ls -l' is 0. But it's not the correct value. On x86-64, ls -l shows ... root root 140737486266368 2009-09-17 10:29 /proc/kcore Then, 7FFFFFFE02000. This comes from vmalloc area's size. (*) This shows "core" size, not memory size. This patch s...
```diff diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c index 70733780fdd9..3d0485c361c7 100644 --- a/fs/proc/kcore.c +++ b/fs/proc/kcore.c @@ -107,6 +107,8 @@ static void free_kclist_ents(struct list_head *head) */ static void __kcore_update_ram(struct list_head *list) { + int nphdr; + size_t size; struct kcore_l...
90396f96b7da0e2305ffe0266d22b6f8221f28ba
Analyze and fix the following issue in the Linux kernel code: kcore: more fixes for init
Problem Details: proc_kcore_init() doesn't check NULL case. fix it and remove unnecessary comments. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-fo...
```diff diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c index c6a5ec731972..70733780fdd9 100644 --- a/fs/proc/kcore.c +++ b/fs/proc/kcore.c @@ -606,6 +606,10 @@ static int __init proc_kcore_init(void) { proc_root_kcore = proc_create("kcore", S_IRUSR, NULL, &proc_kcore_operations); + if (!proc_root_kcore) {...
81ac3ad9061dd9cd490ee92f0c5316a14d77ce18
Analyze and fix the following issue in the Linux kernel code: kcore: register module area in generic way
Problem Details: Some archs define MODULED_VADDR/MODULES_END which is not in VMALLOC area. This is handled only in x86-64. This patch make it more generic. And we can use vread/vwrite to access the area. Fix it. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Jiri Slaby <jirislaby@gmail.com> C...
```diff diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index d5d23cc24076..5a4398a6006b 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -647,7 +647,7 @@ EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid); #endif /* CONFIG_MEMORY_HOTPLUG */ -static struct kcore_list kcore_modules, kcore_vsy...
26562c59fa9111ae3ea7b78045889662aac9e5ac
Analyze and fix the following issue in the Linux kernel code: kcore: register vmemmap range
Problem Details: Benjamin Herrenschmidt <benh@kernel.crashing.org> pointed out that vmemmap range is not included in KCORE_RAM, KCORE_VMALLOC .... This adds KCORE_VMEMMAP if SPARSEMEM_VMEMMAP is used. By this, vmemmap can be readable via /proc/kcore Because it's not vmalloc area, vread/vwrite cannot be used. But th...
```diff diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c index 802de33d6341..78970e6f715c 100644 --- a/fs/proc/kcore.c +++ b/fs/proc/kcore.c @@ -103,7 +103,7 @@ static void free_kclist_ents(struct list_head *head) } } /* - * Replace all KCORE_RAM information with passed list. + * Replace all KCORE_RAM/KCORE_VMEMMAP i...
cba8aafe1e07dfc8bae5ba78be8e02883bd34d31
Analyze and fix the following issue in the Linux kernel code: fs/proc/base.c: fix proc_fault_inject_write() input sanity check
Problem Details: Remove obfuscated zero-length input check and return -EINVAL instead of -EIO error to make the error message clear to user. Add whitespace stripping. No functionality changes. The old code: echo 1 > /proc/pid/make-it-fail (ok) echo 1foo > /proc/pid/make-it-fail (-bash: echo: write error: Input/ou...
```diff diff --git a/fs/proc/base.c b/fs/proc/base.c index 5bc587049b37..837469a96598 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -1187,17 +1187,16 @@ static ssize_t proc_fault_inject_write(struct file * file, count = sizeof(buffer) - 1; if (copy_from_user(buffer, buf, count)) return -EFAULT; - make_it_...
fb92a4b068be96799da3748c11cbd69760e44d7b
Analyze and fix the following issue in the Linux kernel code: fs/proc/task_mmu.c v1: fix clear_refs_write() input sanity check
Problem Details: Andrew Morton pointed out similar string hacking and obfuscated check for zero-length input at the end of the function, David Rientjes suggested to use strict_strtol to replace simple_strtol, this patch cover above suggestions, add removing of leading and trailing whitespace from user input. It does n...
```diff diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 59e98fea34a4..366b1017a4f1 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -473,21 +473,20 @@ static ssize_t clear_refs_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { struct task_struct *task; - char b...
acef82b873b6899d80e639317228f2104dae79a2
Analyze and fix the following issue in the Linux kernel code: kcore: fix /proc/kcore's stat.st_size
Problem Details: In 9063c61fd5cbd ("x86, 64-bit: Clean up user address masking") Linus fixed the wrong size of /proc/kcore problem. But its size still looks insane, since it never equals the size of physical memory. Signed-off-by: WANG Cong <amwang@redhat.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Tao M...
```diff diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c index f06f45b42181..0cf8a24cf6c3 100644 --- a/fs/proc/kcore.c +++ b/fs/proc/kcore.c @@ -374,9 +374,6 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos) static int __init proc_kcore_init(void) { proc_root_kcore = proc_create("kcor...
cff4edb591c153a779a27a3fd8e7bc1217f2f6b8
Analyze and fix the following issue in the Linux kernel code: proc: fix reported unit for RLIMIT_CPU
Problem Details: /proc/$pid/limits should show RLIMIT_CPU as seconds, which is the unit used in kernel/posix-cpu-timers.c: unsigned long psecs = cputime_to_secs(ptime); ... if (psecs >= sig->rlim[RLIMIT_CPU].rlim_max) { ... __group_send_sig_info(SIGKILL, SEND_SIG...
```diff diff --git a/fs/proc/base.c b/fs/proc/base.c index 55c4c805a756..69bb70351b9b 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -458,7 +458,7 @@ struct limit_names { }; static const struct limit_names lnames[RLIM_NLIMITS] = { - [RLIMIT_CPU] = {"Max cpu time", "ms"}, + [RLIMIT_CPU] = {"Max cpu time", "seco...