25 Nov, 2010
1 commit
-
FreeBSD does not like when __STDC__ is defined, use the standard
instead.Signed-off-by: Arnaud Lacombe
Signed-off-by: Michal Marek
12 Nov, 2010
1 commit
-
I noticed fixdep uses ~2% of cpu time in kernel build, in function
use_config()fixdep spends a lot of cpu cycles in linear searches in its internal
string array. With about 400 stored strings per dep file, this begins to
be noticeable.Convert fixdep to use a hash table.
kbuild results on my x86_64 allmodconfig
Before patch :
real 10m30.414s
user 61m51.456s
sys 8m28.200sreal 10m12.334s
user 61m50.236s
sys 8m30.448sreal 10m42.947s
user 61m50.028s
sys 8m32.380sAfter:
real 10m8.180s
user 61m22.506s
sys 8m32.384sreal 10m35.039s
user 61m21.654s
sys 8m32.212sreal 10m14.487s
user 61m23.498s
sys 8m32.312sSigned-off-by: Eric Dumazet
Signed-off-by: Michal Marek
29 Oct, 2010
1 commit
-
Signed-off-by: Mike Frysinger
Signed-off-by: Michal Marek
29 Sep, 2010
3 commits
-
The size of a built-in initramfs is calculated in init/initramfs.c by
"__initramfs_end - __initramfs_start". Those symbols are defined in the
linker script include/asm-generic/vmlinux.lds.h:#define INIT_RAM_FS \
. = ALIGN(PAGE_SIZE); \
VMLINUX_SYMBOL(__initramfs_start) = .; \
*(.init.ramfs) \
VMLINUX_SYMBOL(__initramfs_end) = .;If the initramfs file has an odd number of bytes, the "__initramfs_end"
symbol points to an odd address, for example, the symbols in the
System.map might look like:0000000000572000 T __initramfs_start
00000000005bcd05 T __initramfs_end :
540a9c: eb cf f0 78 00 24 stmg %r12,%r15,120(%r15),
540aa2: c0 10 00 01 8a af larl %r1,572000
540aa8: c0 c0 00 03 e1 2e larl %r12,5bcd04
(Instead of 5bcd05)
...
540abe: 1b c1 sr %r12,%r1To fix the problem, this patch introduces the global variable
__initramfs_size, which is calculated in the "usr/initramfs_data.S" file.
The populate_rootfs() function can then use the start marker of the
.init.ramfs section and the value of __initramfs_size for loading the
initramfs. Because the start marker and size is sufficient, the
__initramfs_end symbol is no longer needed and is removed.Signed-off-by: Michael Holzheu
Signed-off-by: Hendrik Brueckner
Reviewed-by: WANG Cong
Acked-by: Michal Marek
Acked-by: "H. Peter Anvin"
Cc: Heiko Carstens
Cc: Martin Schwidefsky
Signed-off-by: Andrew Morton
Signed-off-by: Michal Marek -
Remove initramfs_data.{lzo,lzma,gz,bz2}.S variants and use a common
implementation in initramfs_data.S. The common implementation expects the
file name of the initramfs to be defined in INITRAMFS_IMAGE.Change the Makefile to set the INITRAMFS_IMAGE define symbol according
to the selected compression method.Signed-off-by: Hendrik Brueckner
Cc: WANG Cong
Acked-by: Michal Marek
Acked-by: "H. Peter Anvin"
Cc: Hendrik Brueckner
Cc: Heiko Carstens
Cc: Martin Schwidefsky
Signed-off-by: Andrew Morton
Signed-off-by: Michal Marek -
As no error was handled, we wouldn't be able to know when an error does
occur. The fix preserves error messages while it doesn't let unnecessary
compiling warnings show up.Signed-off-by: Jean Sacren
Signed-off-by: Michal Marek
13 Sep, 2010
1 commit
06 Sep, 2010
2 commits
-
A tagged repository state isn't enough, git describe only
looks at signed or annotated tags (git tag -a/-s). This
documentation update makes sure the comment matches the
current behaviour.Signed-off-by: Michael Prokop
Signed-off-by: Michal Marek -
The list of patterns for the external modules case was constantly
lagging behind.Signed-off-by: Michal Marek
04 Sep, 2010
1 commit
-
Signed-off-by: Michal Marek
26 Aug, 2010
1 commit
-
The last commits
37ed19d5cce35a40d3913cf9aa208ce9f60db3d7
5003bab82d56754b27be01eef24495a02e00039d
have introduced new behaviour of sec2annotation() method. However, the
commentary inside the method was left as before. Let's fix it accordingly.Signed-off-by: Andy Shevchenko
Cc: Rusty Russell
Cc: Andrew Morton
Acked-by: WANG Cong
Signed-off-by: Michal Marek
13 Aug, 2010
1 commit
-
The manpage for cut says it will return all lines without the delimiter
unless -s is specified.When I backed up my mecurial tree to generate modules, I found that the
scm part of localversion was turning up blank.Signed-off-by: Milton Miller
Cc: Michal Marek
Cc: "Michał Górny"
Signed-off-by: Michal Marek
10 Aug, 2010
1 commit
-
Signed-off-by: Yegor Yefremov
Signed-off-by: Michal Marek
04 Aug, 2010
1 commit
-
Conflicts:
arch/powerpc/Makefile
03 Aug, 2010
5 commits
-
This patch makes modpost able to process object files with more than
64k sections. Needed for huge kernel builds (allyesconfig, for example)
with -ffunction-sections. 64k sections handling is covered, for example,
by this document:"IA-64 gABI Proposal 74: Section Indexes"
http://www.codesourcery.com/public/cxx-abi/abi/prop-74-sindex.htmlSigned-off-by: Denys Vlasenko
Signed-off-by: Anders Kaseorg
Acked-by: Sam Ravnborg
Cc: Rusty Russell
Cc: Andi Kleen
Signed-off-by: Michal Marek -
Signed-off-by: Uwe Kleine-König
Signed-off-by: Michal Marek -
- removed a lot of unused variable assignmnets
- removed unused bootstrap target
- replaced ARCHMODFLAGS with proper KBUILD_{A,C}FLAGS_MODULE assignmnetsThe resuting Makefile has not been tested due to lack of toolchain,
but these were all trivial changes.Signed-off-by: Sam Ravnborg
Cc: David Howells
Signed-off-by: Michal Marek -
It is now possible to assign options to AS and CC
on the command line - which is only used for built-in code.{A,C}FLAGS_KERNEL was used both in the top-level Makefile
in the arch makefiles, thus users had no way to specify
additional options to AS, CC without overriding
the original value.Introduce a new set of variables KBUILD_{A,C}FLAGS_KERNEL
that is used by arch specific files and free up
{A,C}FLAGS_KERNEL so they can be assigned on
the command line.All arch Makefiles that used the old variables has been updated.
Signed-off-by: Sam Ravnborg
Cc: Tony Luck
Cc: Hirokazu Takata
Signed-off-by: Michal Marek -
It is now possible to assign options to AS, CC and LD
on the command line - which is only used when building modules.{A,C,LD}FLAGS_MODULE was all used both in the top-level Makefile
in the arch makefiles, thus users had no way to specify
additional options to AS, CC, LD when building modules
without overriding the original value.Introduce a new set of variables KBUILD_{A,C,LD}FLAGS_MODULE
that is used by arch specific files and free up
{A,C,LD}FLAGS_MODULE so they can be assigned on
the command line.All arch Makefiles that used the old variables has been updated.
Note: Previously we had a MODFLAGS variable for both
AS and CC. But in favour of consistency this was dropped.
So in some cases arch Makefile has one assignmnet replaced by
two assignmnets.Note2: MODFLAGS was not documented and is dropped
without any notice. I do not expect much/any breakage
from this.Signed-off-by: Sam Ravnborg
Cc: Denys Vlasenko
Cc: Haavard Skinnemoen
Cc: Mike Frysinger
Cc: Tony Luck
Cc: Geert Uytterhoeven
Cc: Ralf Baechle
Cc: Benjamin Herrenschmidt
Cc: Martin Schwidefsky
Cc: Chen Liqin
Acked-by: Mike Frysinger [blackfin]
Acked-by: Haavard Skinnemoen [avr32]
Signed-off-by: Michal Marek
02 Aug, 2010
2 commits
-
nfs_commit_inode() needs to be defined irrespectively of whether or not
we are supporting NFSv3 and NFSv4.Allow the compiler to optimise away code in the NFSv2-only case by
converting it into an inlined stub function.Reported-and-tested-by: Ingo Molnar
Signed-off-by: Trond Myklebust
Signed-off-by: Linus Torvalds
31 Jul, 2010
13 commits
-
* master.kernel.org:/home/rmk/linux-2.6-arm:
cyber2000fb: fix console in truecolor modes
cyber2000fb: fix machine hang on module load
SA1111: Eliminate use after free
ARM: Fix Versatile/Realview/VExpress MMC card detection sense
ARM: 6279/1: highmem: fix SMP preemption bug in kmap_high_l1_vipt
ARM: Add barriers to io{read,write}{8,16,32} accessors as well
ARM: 6273/1: Add barriers to the I/O accessors if ARM_DMA_MEM_BUFFERABLE
ARM: 6272/1: Convert L2x0 to use the IO relaxed operations
ARM: 6271/1: Introduce *_relaxed() I/O accessors
ARM: 6275/1: ux500: don't use writeb() in uncompress.h
ARM: 6270/1: clean files in arch/arm/boot/compressed/
ARM: Fix csum_partial_copy_from_user() -
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
NFS: Ensure that writepage respects the nonblock flag
NFS: kswapd must not block in nfs_release_page
nfs: include space for the NUL in root path -
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
drm/edid: Fix the HDTV hack sync adjustment
drm/radeon/kms: fix radeon mid power profile reporting -
Debian's ia64 autobuilders have been seeing kernel freeze or reboot
when running the gdb testsuite (Debian bug 588574): dannf bisected to
2.6.32 62eede62dafb4a6633eae7ffbeb34c60dba5e7b1 "mm: ZERO_PAGE without
PTE_SPECIAL"; and reproduced it with gdb's gcore on a simple target.I'd missed updating the gate_vma handling in __get_user_pages(): that
happens to use vm_normal_page() (nowadays failing on the zero page),
yet reported success even when it failed to get a page - boom when
access_process_vm() tried to copy that to its intermediate buffer.Fix this, resisting cleanups: in particular, leave it for now reporting
success when not asked to get any pages - very probably safe to change,
but let's not risk it without testing exposure.Why did ia64 crash with 16kB pages, but succeed with 64kB pages?
Because setup_gate() pads each 64kB of its gate area with zero pages.Reported-by: Andreas Barth
Bisected-by: dann frazier
Signed-off-by: Hugh Dickins
Tested-by: dann frazier
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds -
Remove the __exit mark from cifs_exit_dns_resolver() as it's called by the
module init routine in case of error, and so may have been discarded during
linkage.Signed-off-by: David Howells
Acked-by: Jeff Layton
Signed-off-by: Linus Torvalds -
Return value was not set to 0 in setcolreg() with truecolor modes. This causes
fb_set_cmap() to abort after first color, resulting in blank palette - and
blank console in 24bpp and 32bpp modes.Signed-off-by: Ondrej Zary
Signed-off-by: Russell King -
I was testing two CyberPro 2000 based PCI cards on x86 and the machine always
hanged completely when the cyber2000fb module was loaded. It seems that the
card hangs when some registers are accessed too quickly after writing RAMDAC
control register. With this patch, both card work.Add delay after RAMDAC control register write to prevent hangs on module load.
Signed-off-by: Ondrej Zary
Signed-off-by: Russell King -
__sa1111_remove always frees its argument, so the subsequent reference to
sachip->saved_state represents a use after free. __sa1111_remove does not
appear to use the saved_state field, so the patch simply frees it first.A simplified version of the semantic patch that finds this problem is as
follows: (http://coccinelle.lip6.fr/)//
@@
expression E,E2;
@@__sa1111_remove(E)
...
(
E = E2
|
* E
)
//Signed-off-by: Julia Lawall
Signed-off-by: Russell King -
The MMC card detection sense has become really confused with negations
at various levels, leading to some platforms not detecting inserted
cards. Fix this by converting everything to positive logic throughout,
thereby getting rid of these negations.Signed-off-by: Russell King
-
smp_processor_id() must not be called from a preemptible context (this
is checked by CONFIG_DEBUG_PREEMPT). kmap_high_l1_vipt() was doing so.
This lead to a problem where the wrong per_cpu kmap_high_l1_vipt_depth
could be incremented, causing a BUG_ON(*depthSigned-off-by: Gary King
Acked-by: Nicolas Pitre
Signed-off-by: Russell King -
Signed-off-by: Trond Myklebust
-
See https://bugzilla.kernel.org/show_bug.cgi?id=16056
If other processes are blocked waiting for kswapd to free up some memory so
that they can make progress, then we cannot allow kswapd to block on those
processes.Signed-off-by: Trond Myklebust
Cc: stable@kernel.org -
In root_nfs_name() it does the following:
if (strlen(buf) + strlen(cp) > NFS_MAXPATHLEN) {
printk(KERN_ERR "Root-NFS: Pathname for remote directory too long.\n");
return -1;
}
sprintf(nfs_export_path, buf, cp);In the original code if (strlen(buf) + strlen(cp) == NFS_MAXPATHLEN)
then the sprintf() would lead to an overflow. Generally the rest of the
code assumes that the path can have NFS_MAXPATHLEN (1024) characters and
a NUL terminator so the fix is to add space to the nfs_export_path[]
buffer.Signed-off-by: Dan Carpenter
Signed-off-by: Trond Myklebust
30 Jul, 2010
6 commits
-
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
[S390] etr: fix clock synchronization race
[S390] Fix IRQ tracing in case of PER -
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
watchdog: update MAINTAINERS entry -
* 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: hda - Add a PC-beep workaround for ASUS P5-V
ALSA: hda - Assume PC-beep as default for Realtek
ALSA: hda - Don't register beep input device when no beep is available
ALSA: hda - Fix pin-detection of Nvidia HDMI -
Fix __task_cred()'s lockdep check by removing the following validation
condition:lockdep_tasklist_lock_is_held()
as commit_creds() does not take the tasklist_lock, and nor do most of the
functions that call it, so this check is pointless and it can prevent
detection of the RCU lock not being held if the tasklist_lock is held.Instead, add the following validation condition:
task->exit_state >= 0
to permit the access if the target task is dead and therefore unable to change
its own credentials.Fix __task_cred()'s comment to:
(1) discard the bit that says that the caller must prevent the target task
from being deleted. That shouldn't need saying.(2) Add a comment indicating the result of __task_cred() should not be passed
directly to get_cred(), but rather than get_task_cred() should be used
instead.Also put a note into the documentation to enforce this point there too.
Signed-off-by: David Howells
Acked-by: Jiri Olsa
Cc: Paul E. McKenney
Signed-off-by: Linus Torvalds -
It's possible for get_task_cred() as it currently stands to 'corrupt' a set of
credentials by incrementing their usage count after their replacement by the
task being accessed.What happens is that get_task_cred() can race with commit_creds():
TASK_1 TASK_2 RCU_CLEANER
-->get_task_cred(TASK_2)
rcu_read_lock()
__cred = __task_cred(TASK_2)
-->commit_creds()
old_cred = TASK_2->real_cred
TASK_2->real_cred = ...
put_cred(old_cred)
call_rcu(old_cred)
[__cred->usage == 0]
get_cred(__cred)
[__cred->usage == 1]
rcu_read_unlock()
-->put_cred_rcu()
[__cred->usage == 1]
panic()However, since a tasks credentials are generally not changed very often, we can
reasonably make use of a loop involving reading the creds pointer and using
atomic_inc_not_zero() to attempt to increment it if it hasn't already hit zero.If successful, we can safely return the credentials in the knowledge that, even
if the task we're accessing has released them, they haven't gone to the RCU
cleanup code.We then change task_state() in procfs to use get_task_cred() rather than
calling get_cred() on the result of __task_cred(), as that suffers from the
same problem.Without this change, a BUG_ON in __put_cred() or in put_cred_rcu() can be
tripped when it is noticed that the usage count is not zero as it ought to be,
for example:kernel BUG at kernel/cred.c:168!
invalid opcode: 0000 [#1] SMP
last sysfs file: /sys/kernel/mm/ksm/run
CPU 0
Pid: 2436, comm: master Not tainted 2.6.33.3-85.fc13.x86_64 #1 0HR330/OptiPlex
745
RIP: 0010:[] [] __put_cred+0xc/0x45
RSP: 0018:ffff88019e7e9eb8 EFLAGS: 00010202
RAX: 0000000000000001 RBX: ffff880161514480 RCX: 00000000ffffffff
RDX: 00000000ffffffff RSI: ffff880140c690c0 RDI: ffff880140c690c0
RBP: ffff88019e7e9eb8 R08: 00000000000000d0 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000040 R12: ffff880140c690c0
R13: ffff88019e77aea0 R14: 00007fff336b0a5c R15: 0000000000000001
FS: 00007f12f50d97c0(0000) GS:ffff880007400000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8f461bc000 CR3: 00000001b26ce000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process master (pid: 2436, threadinfo ffff88019e7e8000, task ffff88019e77aea0)
Stack:
ffff88019e7e9ec8 ffffffff810698cd ffff88019e7e9ef8 ffffffff81069b45
ffff880161514180 ffff880161514480 ffff880161514180 0000000000000000
ffff88019e7e9f28 ffffffff8106aace 0000000000000001 0000000000000246
Call Trace:
[] put_cred+0x13/0x15
[] commit_creds+0x16b/0x175
[] set_current_groups+0x47/0x4e
[] sys_setgroups+0xf6/0x105
[] system_call_fastpath+0x16/0x1b
Code: 48 8d 71 ff e8 7e 4e 15 00 85 c0 78 0b 8b 75 ec 48 89 df e8 ef 4a 15 00
48 83 c4 18 5b c9 c3 55 8b 07 8b 07 48 89 e5 85 c0 74 04 0b eb fe 65 48 8b
04 25 00 cc 00 00 48 3b b8 58 04 00 00 75
RIP [] __put_cred+0xc/0x45
RSP
---[ end trace df391256a100ebdd ]---Signed-off-by: David Howells
Acked-by: Jiri Olsa
Signed-off-by: Linus Torvalds -
Add Mailing-list and website to watchdog MAINTAINERS entry.
Signed-off-by: Wim Van Sebroeck