01 Aug, 2012

1 commit

  • When hotadd_new_pgdat() is called to create new pgdat for a new node, a
    fallback zonelist should be created for the new node. There's code to try
    to achieve that in hotadd_new_pgdat() as below:

    /*
    * The node we allocated has no zone fallback lists. For avoiding
    * to access not-initialized zonelist, build here.
    */
    mutex_lock(&zonelists_mutex);
    build_all_zonelists(pgdat, NULL);
    mutex_unlock(&zonelists_mutex);

    But it doesn't work as expected. When hotadd_new_pgdat() is called, the
    new node is still in offline state because node_set_online(nid) hasn't
    been called yet. And build_all_zonelists() only builds zonelists for
    online nodes as:

    for_each_online_node(nid) {
    pg_data_t *pgdat = NODE_DATA(nid);

    build_zonelists(pgdat);
    build_zonelist_cache(pgdat);
    }

    Though we hope to create zonelist for the new pgdat, but it doesn't. So
    add a new parameter "pgdat" the build_all_zonelists() to build pgdat for
    the new pgdat too.

    Signed-off-by: Jiang Liu
    Signed-off-by: Xishi Qiu
    Cc: Mel Gorman
    Cc: Michal Hocko
    Cc: Minchan Kim
    Cc: Rusty Russell
    Cc: Yinghai Lu
    Cc: Tony Luck
    Cc: KAMEZAWA Hiroyuki
    Cc: KOSAKI Motohiro
    Cc: David Rientjes
    Cc: Keping Chen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiang Liu
     

27 Jul, 2012

3 commits

  • …usty/linux-2.6-for-linus

    Pull cpumask changes from Rusty Russell:
    "Trivial comment changes to cpumask code. I guess it's getting boring."

    Boring is good.

    * tag 'cpumask-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
    cpumask: cpulist_parse() comments correction
    init: add comments to keep initcall-names in sync with initcall levels
    cpumask: add a few comments of cpumask functions

    Linus Torvalds
     
  • main.c has initcall_level_names[] for parse_args to print in debug messages,
    add comments to keep them in sync with initcalls defined in init.h.

    Also add "loadable" into comment re not using *_initcall macros in
    modules, to disambiguate from kernel/params.c and other builtins.

    Signed-off-by: Jim Cromie
    Acked-by: Borislav Petkov
    Signed-off-by: Rusty Russell

    Jim Cromie
     
  • Pul x86/efi changes from Ingo Molnar:
    "This tree adds an EFI bootloader handover protocol, which, once
    supported on the bootloader side, will make bootup faster and might
    result in simpler bootloaders.

    The other change activates the EFI wall clock time accessors on x86-64
    as well, instead of the legacy RTC readout."

    * 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86, efi: Handover Protocol
    x86-64/efi: Use EFI to deal with platform wall clock

    Linus Torvalds
     

23 Jul, 2012

1 commit

  • ... and schedule_work() for interrupt/kernel_thread callers
    (and yes, now it *is* OK to call from interrupt).

    We are guaranteed that __fput() will be done before we return
    to userland (or exit). Note that for fput() from a kernel
    thread we get an async behaviour; it's almost always OK, but
    sometimes you might need to have __fput() completed before
    you do anything else. There are two mechanisms for that -
    a general barrier (flush_delayed_fput()) and explicit
    __fput_sync(). Both should be used with care (as was the
    case for fput() from kernel threads all along). See comments
    in fs/file_table.c for details.

    Signed-off-by: Al Viro

    Al Viro
     

08 Jun, 2012

2 commits

  • 9fb48c744ba6a ("params: add 3rd arg to option handler callback
    signature") added similar lines to dmesg:

    initlevel:0=early, 4 registered initcalls
    initlevel:1=core, 31 registered initcalls
    initlevel:2=postcore, 11 registered initcalls
    initlevel:3=arch, 7 registered initcalls
    initlevel:4=subsys, 40 registered initcalls
    initlevel:5=fs, 30 registered initcalls
    initlevel:6=device, 250 registered initcalls
    initlevel:7=late, 35 registered initcalls

    but they don't contain any info for the general user staring at dmesg.
    I'm very doubtful the count of initcalls registered per level helps
    anyone so drop that output completely.

    Cc: Jim Cromie
    Cc: Rusty Russell
    Cc: Jason Baron
    Signed-off-by: Borislav Petkov
    Signed-off-by: Rusty Russell

    Borislav Petkov
     
  • Commit 026cee0086fe1df4cf74691cf273062cc769617d "params:
    _initcall-like kernel parameters" set old-style module
    parameters to level 0. And we call those level 0 calls where we used
    to, early in start_kernel().

    We also loop through the initcall levels and call the levelled
    module_params before the corresponding initcall. Unfortunately level
    0 is early_init(), so we call the standard module_param calls twice.

    (Turns out most things don't care, but at least ubi.mtd does).

    Change the level to -1 for standard module_param calls.

    Reported-by: Benoît Thébaudeau
    Signed-off-by: Rusty Russell
    Cc: stable@kernel.org

    Rusty Russell
     

06 Jun, 2012

1 commit

  • Other than ix86, x86-64 on EFI so far didn't set the
    {g,s}et_wallclock accessors to the EFI routines, thus
    incorrectly using raw RTC accesses instead.

    Simply removing the #ifdef around the respective code isn't
    enough, however: While so far early get-time calls were done in
    physical mode, this doesn't work properly for x86-64, as virtual
    addresses would still need to be set up for all runtime regions
    (which wasn't the case on the system I have access to), so
    instead the patch moves the call to efi_enter_virtual_mode()
    ahead (which in turn allows to drop all code related to calling
    efi-get-time in physical mode).

    Additionally the earlier calling of efi_set_executable()
    requires the CPA code to cope, i.e. during early boot it must be
    avoided to call cpa_flush_array(), as the first thing this
    function does is a BUG_ON(irqs_disabled()).

    Also make the two EFI functions in question here static -
    they're not being referenced elsewhere.

    Signed-off-by: Jan Beulich
    Tested-by: Matt Fleming
    Acked-by: Matthew Garrett
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/4FBFBF5F020000780008637F@nat28.tlf.novell.com
    Signed-off-by: Ingo Molnar

    Jan Beulich
     

23 May, 2012

1 commit

  • Pull driver core updates from Greg Kroah-Hartman:
    "Here's the driver core, and other driver subsystems, pull request for
    the 3.5-rc1 merge window.

    Outside of a few minor driver core changes, we ended up with the
    following different subsystem and core changes as well, due to
    interdependancies on the driver core:
    - hyperv driver updates
    - drivers/memory being created and some drivers moved into it
    - extcon driver subsystem created out of the old Android staging
    switch driver code
    - dynamic debug updates
    - printk rework, and /dev/kmsg changes

    All of this has been tested in the linux-next releases for a few weeks
    with no reported problems.

    Signed-off-by: Greg Kroah-Hartman "

    Fix up conflicts in drivers/extcon/extcon-max8997.c where git noticed
    that a patch to the deleted drivers/misc/max8997-muic.c driver needs to
    be applied to this one.

    * tag 'driver-core-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (90 commits)
    uio_pdrv_genirq: get irq through platform resource if not set otherwise
    memory: tegra{20,30}-mc: Remove empty *_remove()
    printk() - isolate KERN_CONT users from ordinary complete lines
    sysfs: get rid of some lockdep false positives
    Drivers: hv: util: Properly handle version negotiations.
    Drivers: hv: Get rid of an unnecessary check in vmbus_prep_negotiate_resp()
    memory: tegra{20,30}-mc: Use dev_err_ratelimited()
    driver core: Add dev_*_ratelimited() family
    Driver Core: don't oops with unregistered driver in driver_find_device()
    printk() - restore prefix/timestamp printing for multi-newline strings
    printk: add stub for prepend_timestamp()
    ARM: tegra30: Make MC optional in Kconfig
    ARM: tegra20: Make MC optional in Kconfig
    ARM: tegra30: MC: Remove unnecessary BUG*()
    ARM: tegra20: MC: Remove unnecessary BUG*()
    printk: correctly align __log_buf
    ARM: tegra30: Add Tegra Memory Controller(MC) driver
    ARM: tegra20: Add Tegra Memory Controller(MC) driver
    printk() - restore timestamp printing at console output
    printk() - do not merge continuation lines of different threads
    ...

    Linus Torvalds
     

22 May, 2012

1 commit

  • During early boot, when the scheduler hasn't really been fully set up,
    we really can't do blocking allocations because with certain (dubious)
    configurations the "might_resched()" calls can actually result in
    scheduling events.

    We could just make such users always use GFP_ATOMIC, but quite often the
    code that does the allocation isn't really aware of the fact that the
    scheduler isn't up yet, and forcing that kind of random knowledge on the
    initialization code is just annoying and not good for anybody.

    And we actually have a the 'gfp_allowed_mask' exactly for this reason:
    it's just that the kernel init sequence happens to set it to allow
    blocking allocations much too early.

    So move the 'gfp_allowed_mask' initialization from 'start_kernel()'
    (which is some of the earliest init code, and runs with preemption
    disabled for good reasons) into 'kernel_init()'. kernel_init() is run
    in the newly created thread that will become the 'init' process, as
    opposed to the early startup code that runs within the context of what
    will be the first idle thread.

    So by the time we reach 'kernel_init()', we know that the scheduler must
    be at least limping along, because we've already scheduled from the idle
    thread into the init thread.

    Reported-by: Steven Rostedt
    Cc: David Rientjes
    Cc: stable@vger.kernel.org
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

03 May, 2012

1 commit


01 May, 2012

1 commit

  • Add a 3rd arg, named "doing", to unknown-options callbacks invoked
    from parse_args(). The arg is passed as:

    "Booting kernel" from start_kernel(),
    initcall_level_names[i] from do_initcall_level(),
    mod->name from load_module(), via parse_args(), parse_one()

    parse_args() already has the "name" parameter, which is renamed to
    "doing" to better reflect current uses 1,2 above. parse_args() passes
    it to an altered parse_one(), which now passes it down into the
    unknown option handler callbacks.

    The mod->name will be needed to handle dyndbg for loadable modules,
    since params passed by modprobe are not qualified (they do not have a
    "$modname." prefix), and by the time the unknown-param callback is
    called, the module name is not otherwise available.

    Minor tweaks:

    Add param-name to parse_one's pr_debug(), current message doesnt
    identify the param being handled, add it.

    Add a pr_info to print current level and level_name of the initcall,
    and number of registered initcalls at that level. This adds 7 lines
    to dmesg output, like:

    initlevel:6=device, 172 registered initcalls

    Drop "parameters" from initcall_level_names[], its unhelpful in the
    pr_info() added above. This array is passed into parse_args() by
    do_initcall_level().

    CC: Rusty Russell
    Signed-off-by: Jim Cromie
    Acked-by: Jason Baron
    Signed-off-by: Greg Kroah-Hartman

    Jim Cromie
     

25 Apr, 2012

1 commit

  • Commit 026cee0086f had the side-effect of dropping the '=' from
    the unknown boot arguments that are passed to init as environment
    variables. This is because parse_args() puts a NUL in the string
    where the '=' was when it passes the "param" and "val" pointers
    to the parsing subfunctions. Previously, unknown_bootoption() was
    the last parse_args() subfunction to run, and it carefully put back
    the '=' character. Now the ignore_unknown_bootoption() is the last
    one to run, and it wasn't doing the necessary repair, so the
    envp params ended up with the embedded NUL and were no longer
    seen as valid environment variables by init.

    Tested-by: Woody Suwalski
    Acked-by: Pawel Moll
    Signed-off-by: Chris Metcalf

    Chris Metcalf
     

29 Mar, 2012

2 commits

  • …m/linux/kernel/git/dhowells/linux-asm_system

    Pull "Disintegrate and delete asm/system.h" from David Howells:
    "Here are a bunch of patches to disintegrate asm/system.h into a set of
    separate bits to relieve the problem of circular inclusion
    dependencies.

    I've built all the working defconfigs from all the arches that I can
    and made sure that they don't break.

    The reason for these patches is that I recently encountered a circular
    dependency problem that came about when I produced some patches to
    optimise get_order() by rewriting it to use ilog2().

    This uses bitops - and on the SH arch asm/bitops.h drags in
    asm-generic/get_order.h by a circuituous route involving asm/system.h.

    The main difficulty seems to be asm/system.h. It holds a number of
    low level bits with no/few dependencies that are commonly used (eg.
    memory barriers) and a number of bits with more dependencies that
    aren't used in many places (eg. switch_to()).

    These patches break asm/system.h up into the following core pieces:

    (1) asm/barrier.h

    Move memory barriers here. This already done for MIPS and Alpha.

    (2) asm/switch_to.h

    Move switch_to() and related stuff here.

    (3) asm/exec.h

    Move arch_align_stack() here. Other process execution related bits
    could perhaps go here from asm/processor.h.

    (4) asm/cmpxchg.h

    Move xchg() and cmpxchg() here as they're full word atomic ops and
    frequently used by atomic_xchg() and atomic_cmpxchg().

    (5) asm/bug.h

    Move die() and related bits.

    (6) asm/auxvec.h

    Move AT_VECTOR_SIZE_ARCH here.

    Other arch headers are created as needed on a per-arch basis."

    Fixed up some conflicts from other header file cleanups and moving code
    around that has happened in the meantime, so David's testing is somewhat
    weakened by that. We'll find out anything that got broken and fix it..

    * tag 'split-asm_system_h-for-linus-20120328' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-asm_system: (38 commits)
    Delete all instances of asm/system.h
    Remove all #inclusions of asm/system.h
    Add #includes needed to permit the removal of asm/system.h
    Move all declarations of free_initmem() to linux/mm.h
    Disintegrate asm/system.h for OpenRISC
    Split arch_align_stack() out from asm-generic/system.h
    Split the switch_to() wrapper out of asm-generic/system.h
    Move the asm-generic/system.h xchg() implementation to asm-generic/cmpxchg.h
    Create asm-generic/barrier.h
    Make asm-generic/cmpxchg.h #include asm-generic/cmpxchg-local.h
    Disintegrate asm/system.h for Xtensa
    Disintegrate asm/system.h for Unicore32 [based on ver #3, changed by gxt]
    Disintegrate asm/system.h for Tile
    Disintegrate asm/system.h for Sparc
    Disintegrate asm/system.h for SH
    Disintegrate asm/system.h for Score
    Disintegrate asm/system.h for S390
    Disintegrate asm/system.h for PowerPC
    Disintegrate asm/system.h for PA-RISC
    Disintegrate asm/system.h for MN10300
    ...

    Linus Torvalds
     
  • Move all declarations of free_initmem() to linux/mm.h so that there's only one
    and it's used by everything.

    Signed-off-by: David Howells
    cc: linux-c6x-dev@linux-c6x.org
    cc: microblaze-uclinux@itee.uq.edu.au
    cc: linux-sh@vger.kernel.org
    cc: sparclinux@vger.kernel.org
    cc: x86@kernel.org
    cc: linux-mm@kvack.org

    David Howells
     

26 Mar, 2012

1 commit

  • This patch adds a set of macros that can be used to declare
    kernel parameters to be parsed _before_ initcalls at a chosen
    level are executed. We rename the now-unused "flags" field of
    struct kernel_param as the level. It's signed, for when we
    use this for early params as well, in future.

    Linker macro collating init calls had to be modified in order
    to add additional symbols between levels that are later used
    by the init code to split the calls into blocks.

    Signed-off-by: Pawel Moll
    Signed-off-by: Rusty Russell

    Pawel Moll
     

21 Mar, 2012

1 commit

  • Pull trivial tree from Jiri Kosina:
    "It's indeed trivial -- mostly documentation updates and a bunch of
    typo fixes from Masanari.

    There are also several linux/version.h include removals from Jesper."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (101 commits)
    kcore: fix spelling in read_kcore() comment
    constify struct pci_dev * in obvious cases
    Revert "char: Fix typo in viotape.c"
    init: fix wording error in mm_init comment
    usb: gadget: Kconfig: fix typo for 'different'
    Revert "power, max8998: Include linux/module.h just once in drivers/power/max8998_charger.c"
    writeback: fix fn name in writeback_inodes_sb_nr_if_idle() comment header
    writeback: fix typo in the writeback_control comment
    Documentation: Fix multiple typo in Documentation
    tpm_tis: fix tis_lock with respect to RCU
    Revert "media: Fix typo in mixer_drv.c and hdmi_drv.c"
    Doc: Update numastat.txt
    qla4xxx: Add missing spaces to error messages
    compiler.h: Fix typo
    security: struct security_operations kerneldoc fix
    Documentation: broken URL in libata.tmpl
    Documentation: broken URL in filesystems.tmpl
    mtd: simplify return logic in do_map_probe()
    mm: fix comment typo of truncate_inode_pages_range
    power: bq27x00: Fix typos in comment
    ...

    Linus Torvalds
     

15 Mar, 2012

1 commit


01 Mar, 2012

1 commit


13 Jan, 2012

1 commit


12 Jan, 2012

1 commit

  • * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/numa: Add constraints check for nid parameters
    mm, x86: Remove debug_pagealloc_enabled
    x86/mm: Initialize high mem before free_all_bootmem()
    arch/x86/kernel/e820.c: quiet sparse noise about plain integer as NULL pointer
    arch/x86/kernel/e820.c: Eliminate bubble sort from sanitize_e820_map()
    x86: Fix mmap random address range
    x86, mm: Unify zone_sizes_init()
    x86, mm: Prepare zone_sizes_init() for unification
    x86, mm: Use max_low_pfn for ZONE_NORMAL on 64-bit
    x86, mm: Wrap ZONE_DMA32 with CONFIG_ZONE_DMA32
    x86, mm: Use max_pfn instead of highend_pfn
    x86, mm: Move zone init from paging_init() on 64-bit
    x86, mm: Use MAX_DMA_PFN for ZONE_DMA on 32-bit

    Linus Torvalds
     

06 Dec, 2011

2 commits

  • When (no)bootmem finish operation, it pass pages to buddy
    allocator. Since debug_pagealloc_enabled is not set, we will do
    not protect pages, what is not what we want with
    CONFIG_DEBUG_PAGEALLOC=y.

    To fix remove debug_pagealloc_enabled. That variable was
    introduced by commit 12d6f21e "x86: do not PSE on
    CONFIG_DEBUG_PAGEALLOC=y" to get more CPA (change page
    attribude) code testing. But currently we have CONFIG_CPA_DEBUG,
    which test CPA.

    Signed-off-by: Stanislaw Gruszka
    Acked-by: Mel Gorman
    Cc: linux-mm@kvack.org
    Link: http://lkml.kernel.org/r/1322582711-14571-1-git-send-email-sgruszka@redhat.com
    Signed-off-by: Ingo Molnar

    Stanislaw Gruszka
     
  • This patch fixes a lockdep warning on ARM platforms:

    [ 0.000000] WARNING: lockdep init error! Arch code didn't call lockdep_init() early enough?
    [ 0.000000] Call stack leading to lockdep invocation was:
    [ 0.000000] [] save_stack_trace_tsk+0x0/0x90
    [ 0.000000] [] 0xffffffff

    The warning is caused by printk inside smp_setup_processor_id().

    It is safe to do this because lockdep_init() doesn't depend on
    smp_setup_processor_id(), so improve things that printk can be
    called as early as possible without lockdep complaint.

    Signed-off-by: Ming Lei
    Reviewed-by: Yong Zhang
    Signed-off-by: Peter Zijlstra
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Link: http://lkml.kernel.org/r/1321508072-23853-1-git-send-email-tom.leiming@gmail.com
    Signed-off-by: Ingo Molnar

    Ming Lei
     

07 Nov, 2011

1 commit

  • …/kernel/git/jeremy/xen

    * 'upstream/jump-label-noearly' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen:
    jump-label: initialize jump-label subsystem much earlier
    x86/jump_label: add arch_jump_label_transform_static()
    s390/jump-label: add arch_jump_label_transform_static()
    jump_label: add arch_jump_label_transform_static() to optimise non-live code updates
    sparc/jump_label: drop arch_jump_label_text_poke_early()
    x86/jump_label: drop arch_jump_label_text_poke_early()
    jump_label: if a key has already been initialized, don't nop it out
    stop_machine: make stop_machine safe and efficient to call early
    jump_label: use proper atomic_t initializer

    Conflicts:
    - arch/x86/kernel/jump_label.c
    Added __init_or_module to arch_jump_label_text_poke_early vs
    removal of that function entirely
    - kernel/stop_machine.c
    same patch ("stop_machine: make stop_machine safe and efficient
    to call early") merged twice, with whitespace fix in one version

    Linus Torvalds
     

26 Oct, 2011

2 commits


30 Sep, 2011

1 commit

  • Commit d5767c53535a ("bootup: move 'usermodehelper_enable()' to the end
    of do_basic_setup()") moved 'usermodehelper_enable()' to end of
    do_basic_setup() to after the initcalls. But then I get failed to let
    uvesafb work on my computer, and lose the splash boot.

    So maybe we could start usermodehelper_enable a little early to make
    some task work that need eary init with the help of user mode.

    [ I would *really* prefer that initcalls not call into user space - even
    the real 'init' hasn't been execve'd yet, after all! But for uvesafb
    it really does look like we don't have much choice.

    I considered doing this when we mount the root filesystem, but
    depending on config options that is in multiple places. We could do
    the usermode helper enable as a rootfs_initcall()..

    So I'm just using wang yanqing's trivial patch. It's not wonderful,
    but it's simple and should work. We should revisit this some day,
    though. - Linus ]

    Signed-off-by: Linus Torvalds

    wangyanqing
     

29 Sep, 2011

1 commit

  • Doing it just before starting to call into cpu_idle() made a sick kind
    of sense only because the original bug we fixed (see commit
    288d5abec831: "Boot up with usermodehelper disabled") was about problems
    with some scheduler data structures not being initialized, and they had
    better be initialized at that point.

    But it really didn't make any other conceptual sense, and doing it after
    the initial "schedule()" call for the idle thread actually opened up a
    race: what if the main initialization thread did everything without
    needing to sleep, and got all the way into user land too? Without
    actually having scheduled back to the idle thread?

    Now, in normal circumstances that doesn't ever happen, but it looks like
    Richard Cochran triggered exactly that on his ARM IXP4xx machines:

    "I have some ARM IXP4xx based machines that use the two on chip MAC
    ports (aka NPEs). The NPE needs a firmware in order to function.
    Ever since the following commit [that 288d5abec831 one], it is no
    longer possible to bring up the interfaces during the init scripts."

    with a call trace showing an ioctl coming from user space. Richard says:

    "The init is busybox, and the startup script does mount, syslogd, and
    then ifup, so that all can go by quickly."

    The fix is to move the usermodehelper_enable() into the main 'init'
    thread, and just put it after we've done all our initcalls. By then,
    everything really should be up, but we've obviously not actually started
    the user-mode portion of init yet.

    Reported-and-tested-by: Richard Cochran
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

22 Sep, 2011

1 commit

  • When a malformed loglevel value (for example "${abc}") is passed on the
    kernel cmdline, the loglevel itself is being set to 0.

    That then suppresses all following messages, including all the errors
    and crashes caused by other malformed cmdline options. This could make
    debugging process quite tricky.

    This patch leaves the previous value of loglevel if the new value is
    incorrect and reports an error code in this case.

    Signed-off-by: Alexander Sverdlin
    Signed-off-by: Linus Torvalds

    Alexander Sverdlin
     

04 Aug, 2011

2 commits

  • The core device layer sends tons of uevent notifications for each device
    it finds, and if the kernel has been built with a non-empty
    CONFIG_UEVENT_HELPER_PATH that will make us try to execute the usermode
    helper binary for all these events very early in the boot.

    Not only won't the root filesystem even be mounted at that point, we
    literally won't have necessarily even initialized all the process
    handling data structures at that point, which causes no end of silly
    problems even when the usermode helper doesn't actually succeed in
    executing.

    So just use our existing infrastructure to disable the usermodehelpers
    to make the kernel start out with them disabled. We enable them when
    we've at least initialized stuff a bit.

    Problems related to an uninitialized

    init_ipc_ns.ids[IPC_SHM_IDS].rw_mutex

    reported by various people.

    Reported-by: Manuel Lauss
    Reported-by: Richard Weinberger
    Reported-by: Marc Zyngier
    Acked-by: Kay Sievers
    Cc: Andrew Morton
    Cc: Vasiliy Kulikov
    Cc: Greg KH
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • While it's at its least, make a number of boring nitpicky cleanups to
    shmem.c, mostly for consistency of variable naming. Things like "swap"
    instead of "entry", "pgoff_t index" instead of "unsigned long idx".

    And since everything else here is prefixed "shmem_", better change
    init_tmpfs() to shmem_init().

    Signed-off-by: Hugh Dickins
    Acked-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     

17 Jun, 2011

1 commit

  • There is a problem that kdump(2nd kernel) sometimes hangs up due
    to a pending IPI from 1st kernel. Kernel panic occurs because IPI
    comes before call_single_queue is initialized.

    To fix the crash, rename init_call_single_data() to call_function_init()
    and call it in start_kernel() so that call_single_queue can be
    initialized before enabling interrupts.

    The details of the crash are:

    (1) 2nd kernel boots up

    (2) A pending IPI from 1st kernel comes when irqs are first enabled
    in start_kernel().

    (3) Kernel tries to handle the interrupt, but call_single_queue
    is not initialized yet at this point. As a result, in the
    generic_smp_call_function_single_interrupt(), NULL pointer
    dereference occurs when list_replace_init() tries to access
    &q->list.next.

    Therefore this patch changes the name of init_call_single_data()
    to call_function_init() and calls it before local_irq_enable()
    in start_kernel().

    Signed-off-by: Takao Indoh
    Reviewed-by: WANG Cong
    Acked-by: Neil Horman
    Acked-by: Vivek Goyal
    Acked-by: Peter Zijlstra
    Cc: Milton Miller
    Cc: Jens Axboe
    Cc: Paul E. McKenney
    Cc: kexec@lists.infradead.org
    Link: http://lkml.kernel.org/r/D6CBEE2F420741indou.takao@jp.fujitsu.com
    Signed-off-by: Ingo Molnar

    Takao Indoh
     

30 May, 2011

1 commit

  • Thomas Gleixner reports that we now have a boot crash triggered by
    CONFIG_CPUMASK_OFFSTACK=y:

    BUG: unable to handle kernel NULL pointer dereference at (null)
    IP: [] find_next_bit+0x55/0xb0
    Call Trace:
    [] cpumask_any_but+0x2a/0x70
    [] flush_tlb_mm+0x2b/0x80
    [] pud_populate+0x35/0x50
    [] pgd_alloc+0x9a/0xf0
    [] mm_init+0xec/0x120
    [] mm_alloc+0x53/0xd0

    which was introduced by commit de03c72cfce5 ("mm: convert
    mm->cpu_vm_cpumask into cpumask_var_t"), and is due to wrong ordering of
    mm_init() vs mm_init_cpumask

    Thomas wrote a patch to just fix the ordering of initialization, but I
    hate the new double allocation in the fork path, so I ended up instead
    doing some more radical surgery to clean it all up.

    Reported-by: Thomas Gleixner
    Reported-by: Ingo Molnar
    Cc: KOSAKI Motohiro
    Cc: Andrew Morton
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

25 May, 2011

2 commits

  • On larger systems, because of the numerous ACPI, Bootmem and EFI messages,
    the static log buffer overflows before the larger one specified by the
    log_buf_len param is allocated. Minimize the overflow by allocating the
    new log buffer as soon as possible.

    On kernels without memblock, a later call to setup_log_buf from
    kernel/init.c is the fallback.

    [akpm@linux-foundation.org: coding-style fixes]
    [akpm@linux-foundation.org: fix CONFIG_PRINTK=n build]
    Signed-off-by: Mike Travis
    Cc: Yinghai Lu
    Cc: "H. Peter Anvin"
    Cc: Jack Steiner
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Travis
     
  • cpumask_t is very big struct and cpu_vm_mask is placed wrong position.
    It might lead to reduce cache hit ratio.

    This patch has two change.
    1) Move the place of cpumask into last of mm_struct. Because usually cpumask
    is accessed only front bits when the system has cpu-hotplug capability
    2) Convert cpu_vm_mask into cpumask_var_t. It may help to reduce memory
    footprint if cpumask_size() will use nr_cpumask_bits properly in future.

    In addition, this patch change the name of cpu_vm_mask with cpu_vm_mask_var.
    It may help to detect out of tree cpu_vm_mask users.

    This patch has no functional change.

    [akpm@linux-foundation.org: build fix]
    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: KOSAKI Motohiro
    Cc: David Howells
    Cc: Koichi Yasutake
    Cc: Hugh Dickins
    Cc: Chris Metcalf
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KOSAKI Motohiro
     

20 May, 2011

1 commit

  • Kmemleak frees objects via RCU and when CONFIG_DEBUG_OBJECTS_RCU_HEAD
    is enabled, the RCU callback triggers a call to free_object() in
    lib/debugobjects.c. Since kmemleak is initialised before debug objects
    initialisation, it may result in a kernel panic during booting. This
    patch moves the kmemleak_init() call after debug_objects_mem_init().

    Reported-by: Marcin Slusarz
    Tested-by: Tejun Heo
    Signed-off-by: Catalin Marinas
    Cc:

    Catalin Marinas
     

24 Mar, 2011

1 commit

  • This patchset is a cleanup and a preparation to unshare the pid namespace.
    These prerequisites prepare for Eric's patchset to give a file descriptor
    to a namespace and join an existing namespace.

    This patch:

    It turns out that the existing assignment in copy_process of the
    child_reaper can handle the initial assignment of child_reaper we just
    need to generalize the test in kernel/fork.c

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Daniel Lezcano
    Cc: Oleg Nesterov
    Cc: Alexey Dobriyan
    Acked-by: Serge E. Hallyn
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     

23 Mar, 2011

1 commit

  • Move setup_nr_cpu_ids(), smp_init() and some other SMP boot parameter
    setup functions from init/main.c to kenrel/smp.c, saves some #ifdef
    CONFIG_SMP.

    Signed-off-by: WANG Cong
    Cc: Rakib Mullick
    Cc: David Howells
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Tejun Heo
    Cc: Arnd Bergmann
    Cc: Akinobu Mita
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Amerigo Wang
     

20 Jan, 2011

1 commit

  • During early boot, local IRQ is disabled until IRQ subsystem is
    properly initialized. During this time, no one should enable
    local IRQ and some operations which usually are not allowed with
    IRQ disabled, e.g. operations which might sleep or require
    communications with other processors, are allowed.

    lockdep tracked this with early_boot_irqs_off/on() callbacks.
    As other subsystems need this information too, move it to
    init/main.c and make it generally available. While at it,
    toggle the boolean to early_boot_irqs_disabled instead of
    enabled so that it can be initialized with %false and %true
    indicates the exceptional condition.

    Signed-off-by: Tejun Heo
    Acked-by: Peter Zijlstra
    Acked-by: Pekka Enberg
    Cc: Linus Torvalds
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Tejun Heo
     

08 Jan, 2011

1 commit

  • * 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: (33 commits)
    usb: don't use flush_scheduled_work()
    speedtch: don't abuse struct delayed_work
    media/video: don't use flush_scheduled_work()
    media/video: explicitly flush request_module work
    ioc4: use static work_struct for ioc4_load_modules()
    init: don't call flush_scheduled_work() from do_initcalls()
    s390: don't use flush_scheduled_work()
    rtc: don't use flush_scheduled_work()
    mmc: update workqueue usages
    mfd: update workqueue usages
    dvb: don't use flush_scheduled_work()
    leds-wm8350: don't use flush_scheduled_work()
    mISDN: don't use flush_scheduled_work()
    macintosh/ams: don't use flush_scheduled_work()
    vmwgfx: don't use flush_scheduled_work()
    tpm: don't use flush_scheduled_work()
    sonypi: don't use flush_scheduled_work()
    hvsi: don't use flush_scheduled_work()
    xen: don't use flush_scheduled_work()
    gdrom: don't use flush_scheduled_work()
    ...

    Fixed up trivial conflict in drivers/media/video/bt8xx/bttv-input.c
    as per Tejun.

    Linus Torvalds