11 Mar, 2013

1 commit


09 Mar, 2013

1 commit

  • Commit b67bfe0d42ca ("hlist: drop the node parameter from iterators")
    did a lot of nice changes but also contains two small hunks that seem to
    have slipped in accidentally and have no apparent connection to the
    intent of the patch.

    This reverts the two extraneous changes.

    Signed-off-by: Arnd Bergmann
    Cc: Peter Senna Tschudin
    Cc: Paul E. McKenney
    Cc: Sasha Levin
    Cc: Thomas Gleixner
    Cc: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     

07 Mar, 2013

2 commits

  • To use the tracing snapshot feature, writing a '1' into the snapshot
    file causes the snapshot buffer to be allocated if it has not already
    been allocated and dose a 'swap' with the main buffer, so that the
    snapshot now contains what was in the main buffer, and the main buffer
    now writes to what was the snapshot buffer.

    To free the snapshot buffer, a '0' is written into the snapshot file.

    To clear the snapshot buffer, any number but a '0' or '1' is written
    into the snapshot file. But if the file is not allocated it returns
    -EINVAL error code. This is rather pointless. It is better just to
    do nothing and return success.

    Acked-by: Hiraku Toyooka
    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     
  • When cat'ing the snapshot file, instead of showing an empty trace
    header like the trace file does, show how to use the snapshot
    feature.

    Also, this is a good place to show if the snapshot has been allocated
    or not. Users may want to "pre allocate" the snapshot to have a fast
    "swap" of the current buffer. Otherwise, a swap would be slow and might
    fail as it would need to allocate the snapshot buffer, and that might
    fail under tight memory constraints.

    Here's what it looked like before:

    # tracer: nop
    #
    # entries-in-buffer/entries-written: 0/0 #P:4
    #
    # _-----=> irqs-off
    # / _----=> need-resched
    # | / _---=> hardirq/softirq
    # || / _--=> preempt-depth
    # ||| / delay
    # TASK-PID CPU# |||| TIMESTAMP FUNCTION
    # | | | |||| | |

    Here's what it looks like now:

    # tracer: nop
    #
    #
    # * Snapshot is freed *
    #
    # Snapshot commands:
    # echo 0 > snapshot : Clears and frees snapshot buffer
    # echo 1 > snapshot : Allocates snapshot buffer, if not already allocated.
    # Takes a snapshot of the main buffer.
    # echo 2 > snapshot : Clears snapshot buffer (but does not allocate)
    # (Doesn't have to be '2' works with any number that
    # is not a '0' or '1')

    Acked-by: Hiraku Toyooka
    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     

06 Mar, 2013

2 commits

  • Pull irq fixes and cleanups from Thomas Gleixner:
    "Commit e5ab012c3271 ("nohz: Make tick_nohz_irq_exit() irq safe") is
    the first commit in the series and the minimal necessary bugfix, which
    needs to go back into stable.

    The remanining commits enforce irq disabling in irq_exit(), sanitize
    the hardirq/softirq preempt count transition and remove a bunch of no
    longer necessary conditionals."

    I personally love getting rid of the very subtle and confusing
    IRQ_EXIT_OFFSET thing. Even apart from the whole "more lines removed
    than added" thing.

    * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    irq: Don't re-enable interrupts at the end of irq_exit
    irq: Remove IRQ_EXIT_OFFSET workaround
    Revert "nohz: Make tick_nohz_irq_exit() irq safe"
    irq: Sanitize invoke_softirq
    irq: Ensure irq_exit() code runs with interrupts disabled
    nohz: Make tick_nohz_irq_exit() irq safe

    Linus Torvalds
     
  • Pull smpboot bugfix from Thomas Gleixner:
    "A single bugfix for a regression introduced with the conversion of the
    stop machine threads to the generic smpboot thread management
    facility"

    * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    stop_machine: Mark per cpu stopper enabled early

    Linus Torvalds
     

04 Mar, 2013

2 commits

  • Pull more VFS bits from Al Viro:
    "Unfortunately, it looks like xattr series will have to wait until the
    next cycle ;-/

    This pile contains 9p cleanups and fixes (races in v9fs_fid_add()
    etc), fixup for nommu breakage in shmem.c, several cleanups and a bit
    more file_inode() work"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    constify path_get/path_put and fs_struct.c stuff
    fix nommu breakage in shmem.c
    cache the value of file_inode() in struct file
    9p: if v9fs_fid_lookup() gets to asking server, it'd better have hashed dentry
    9p: make sure ->lookup() adds fid to the right dentry
    9p: untangle ->lookup() a bit
    9p: double iput() in ->lookup() if d_materialise_unique() fails
    9p: v9fs_fid_add() can't fail now
    v9fs: get rid of v9fs_dentry
    9p: turn fid->dlist into hlist
    9p: don't bother with private lock in ->d_fsdata; dentry->d_lock will do just fine
    more file_inode() open-coded instances
    selinux: opened file can't have NULL or negative ->f_path.dentry

    (In the meantime, the hlist traversal macros have changed, so this
    required a semantic conflict fixup for the newly hlistified fid->dlist)

    Linus Torvalds
     
  • Pull new ImgTec Meta architecture from James Hogan:
    "This adds core architecture support for Imagination's Meta processor
    cores, followed by some later miscellaneous arch/metag cleanups and
    fixes which I kept separate to ease review:

    - Support for basic Meta 1 (ATP) and Meta 2 (HTP) core architecture
    - A few fixes all over, particularly for symbol prefixes
    - A few privilege protection fixes
    - Several cleanups (setup.c includes, split out a lot of
    metag_ksyms.c)
    - Fix some missing exports
    - Convert hugetlb to use vm_unmapped_area()
    - Copy device tree to non-init memory
    - Provide dma_get_sgtable()"

    * tag 'metag-v3.9-rc1-v4' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag: (61 commits)
    metag: Provide dma_get_sgtable()
    metag: prom.h: remove declaration of metag_dt_memblock_reserve()
    metag: copy devicetree to non-init memory
    metag: cleanup metag_ksyms.c includes
    metag: move mm/init.c exports out of metag_ksyms.c
    metag: move usercopy.c exports out of metag_ksyms.c
    metag: move setup.c exports out of metag_ksyms.c
    metag: move kick.c exports out of metag_ksyms.c
    metag: move traps.c exports out of metag_ksyms.c
    metag: move irq enable out of irqflags.h on SMP
    genksyms: fix metag symbol prefix on crc symbols
    metag: hugetlb: convert to vm_unmapped_area()
    metag: export clear_page and copy_page
    metag: export metag_code_cache_flush_all
    metag: protect more non-MMU memory regions
    metag: make TXPRIVEXT bits explicit
    metag: kernel/setup.c: sort includes
    perf: Enable building perf tools for Meta
    metag: add boot time LNKGET/LNKSET check
    metag: add __init to metag_cache_probe()
    ...

    Linus Torvalds
     

03 Mar, 2013

4 commits

  • Pull sigprocmask compat fix from Al Viro:
    "generic compat_sys_rt_sigprocmask() had a very dumb braino; I'd spent
    quite a while staring at the offending commit before finally managing
    to spot the idiocy ;-/"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal:
    fix compat_sys_rt_sigprocmask()

    Linus Torvalds
     
  • Converting bitmask to 32bit granularity is fine, but we'd better
    _do_ something with the result. Such as "copy it to userland"...

    Signed-off-by: Al Viro

    Al Viro
     
  • Some 32 bit architectures require 64 bit values to be aligned (for
    example Meta which has 64 bit read/write instructions). These require 8
    byte alignment of event data too, so use
    !CONFIG_HAVE_64BIT_ALIGNED_ACCESS instead of !CONFIG_64BIT ||
    CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS to decide alignment, and align
    buffer_data_page::data accordingly.

    Signed-off-by: James Hogan
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Acked-by: Steven Rostedt (previous version subtly different)

    James Hogan
     
  • Pull KGDB/KDB fixes and cleanups from Jason Wessel:
    "For a change we removed more code than we added. If people aren't
    using it we shouldn't be carrying it. :-)

    Cleanups:
    - Remove kdb ssb command - there is no in kernel disassembler to
    support it

    - Remove kdb ll command - Always caused a kernel oops and there were
    no bug reports so no one was using this command

    - Use kernel ARRAY_SIZE macro instead of array computations

    Fixes:
    - Stop oops in kdb if user executes kdb_defcmd with args

    - kdb help command truncated text

    - ppc64 support for kgdbts

    - Add missing kconfig option from original kdb port for dealing with
    catastrophic kernel crashes such that you can reboot automatically
    on continue from kdb"

    * tag 'for_linux-3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/kgdb:
    kdb: Remove unhandled ssb command
    kdb: Prevent kernel oops with kdb_defcmd
    kdb: Remove the ll command
    kdb_main: fix help print
    kdb: Fix overlap in buffers with strcpy
    Fixed dead ifdef block by adding missing Kconfig option.
    kdb: Setup basic kdb state before invoking commands via kgdb
    kdb: use ARRAY_SIZE where possible
    kgdb/kgdbts: support ppc64
    kdb: A fix for kdb command table expansion

    Linus Torvalds
     

02 Mar, 2013

9 commits

  • Pull new ARC architecture from Vineet Gupta:
    "Initial ARC Linux port with some fixes on top for 3.9-rc1:

    I would like to introduce the Linux port to ARC Processors (from
    Synopsys) for 3.9-rc1. The patch-set has been discussed on the public
    lists since Nov and has received a fair bit of review, specially from
    Arnd, tglx, Al and other subsystem maintainers for DeviceTree, kgdb...

    The arch bits are in arch/arc, some asm-generic changes (acked by
    Arnd), a minor change to PARISC (acked by Helge).

    The series is a touch bigger for a new port for 2 main reasons:

    1. It enables a basic kernel in first sub-series and adds
    ptrace/kgdb/.. later

    2. Some of the fallout of review (DeviceTree support, multi-platform-
    image support) were added on top of orig series, primarily to
    record the revision history.

    This updated pull request additionally contains

    - fixes due to our GNU tools catching up with the new syscall/ptrace
    ABI

    - some (minor) cross-arch Kconfig updates."

    * tag 'arc-v3.9-rc1-late' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: (82 commits)
    ARC: split elf.h into uapi and export it for userspace
    ARC: Fixup the current ABI version
    ARC: gdbserver using regset interface possibly broken
    ARC: Kconfig cleanup tracking cross-arch Kconfig pruning in merge window
    ARC: make a copy of flat DT
    ARC: [plat-arcfpga] DT arc-uart bindings change: "baud" => "current-speed"
    ARC: Ensure CONFIG_VIRT_TO_BUS is not enabled
    ARC: Fix pt_orig_r8 access
    ARC: [3.9] Fallout of hlist iterator update
    ARC: 64bit RTSC timestamp hardware issue
    ARC: Don't fiddle with non-existent caches
    ARC: Add self to MAINTAINERS
    ARC: Provide a default serial.h for uart drivers needing BASE_BAUD
    ARC: [plat-arcfpga] defconfig for fully loaded ARC Linux
    ARC: [Review] Multi-platform image #8: platform registers SMP callbacks
    ARC: [Review] Multi-platform image #7: SMP common code to use callbacks
    ARC: [Review] Multi-platform image #6: cpu-to-dma-addr optional
    ARC: [Review] Multi-platform image #5: NR_IRQS defined by ARC core
    ARC: [Review] Multi-platform image #4: Isolate platform headers
    ARC: [Review] Multi-platform image #3: switch to board callback
    ...

    Linus Torvalds
     
  • The 'ssb' command can only be handled when we have a disassembler, to check for
    branches, so remove the 'ssb' command for now.

    Signed-off-by: Vincent Stehlé
    Signed-off-by: Jason Wessel

    Vincent
     
  • The kdb_defcmd can only be used to display the available command aliases
    while using the kernel debug shell. If you try to define a new macro
    while the kernel debugger is active it will oops. The debug shell
    macros must use pre-allocated memory set aside at the time kdb_init()
    is run, and the kdb_defcmd is restricted to only working at the time
    that the kdb_init sequence is being run, which only occurs if you
    actually activate the kernel debugger.

    Signed-off-by: Jason Wessel

    Jason Wessel
     
  • Recently some code inspection was done after fixing a problem with
    kmalloc used while in the kernel debugger context (which is not
    legal), and it turned up the fact that kdb ll command will oops the
    kernel.

    Given that there have been zero bug reports on the command combined
    with the fact it will oops the kernel it is clearly not being used.
    Instead of fixing it, it will be removed.

    Signed-off-by: Jason Wessel

    Jason Wessel
     
  • The help command was chopping all the usage instructions such that
    they were not readable.

    Example:

    bta [D|R|S|T|C|Z|E|U|I| Backtrace all processes matching state flag
    per_cpu [] [ [] []
    Display per_cpu variables

    All that is needed is to check the how long the cmd_usage is and jump
    to the next line when appropriate.

    Signed-off-by: Jason Wessel

    Jason Wessel
     
  • Maxime reported that strcpy(s->usage, s->usage+1) has no definitive
    guarantee that it will work on all archs the same way when you have
    overlapping memory. The fix is simple for the kdb code because we
    still have the original string memory in the function scope, so we
    just have to use that as the argument instead.

    Reported-by: Maxime Villard
    Signed-off-by: Jason Wessel

    Jason Wessel
     
  • Although invasive kdb commands are not supported via kgdb, some useful
    non-invasive commands like bt* require basic kdb state to be setup before
    calling into the kdb code. Factor out some of this code and call it before
    and after executing kdb commands via kgdb.

    Signed-off-by: Matt Klein
    Signed-off-by: Jason Wessel

    Matt Klein
     
  • Signed-off-by: Sasha Levin
    Signed-off-by: Jason Wessel

    Sasha Levin
     
  • When locally adding in some additional kdb commands, I stumbled
    across an issue with the dynamic expansion of the kdb command table.
    When the number of kdb commands exceeds the size of the statically
    allocated kdb_base_commands[] array, additional space is allocated in
    the kdb_register_repeat() routine.

    The unused portion of the newly allocated array was not being initialized
    to zero properly and this would result in segfaults when help '?' was
    executed or when a search for a non-existing command would traverse the
    command table beyond the end of valid command entries and then attempt
    to use the non-zeroed area as actual command entries.

    Signed-off-by: John Blackwood
    Signed-off-by: Jason Wessel

    John Blackwood
     

01 Mar, 2013

3 commits

  • Pull thermal management updates from Zhang Rui:
    "Highlights:

    - introduction of Dove thermal sensor driver.

    - introduction of Kirkwood thermal sensor driver.

    - introduction of intel_powerclamp thermal cooling device driver.

    - add interrupt and DT support for rcar thermal driver.

    - add thermal emulation support which allows platform thermal driver
    to do software/hardware emulation for thermal issues."

    * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (36 commits)
    thermal: rcar: remove __devinitconst
    thermal: return an error on failure to register thermal class
    Thermal: rename thermal governor Kconfig option to avoid generic naming
    thermal: exynos: Use the new thermal trend type for quick cooling action.
    Thermal: exynos: Add support for temperature falling interrupt.
    Thermal: Dove: Add Themal sensor support for Dove.
    thermal: Add support for the thermal sensor on Kirkwood SoCs
    thermal: rcar: add Device Tree support
    thermal: rcar: remove machine_power_off() from rcar_thermal_notify()
    thermal: rcar: add interrupt support
    thermal: rcar: add read/write functions for common/priv data
    thermal: rcar: multi channel support
    thermal: rcar: use mutex lock instead of spin lock
    thermal: rcar: enable CPCTL to use hardware TSC deciding
    thermal: rcar: use parenthesis on macro
    Thermal: fix a build warning when CONFIG_THERMAL_EMULATION cleared
    Thermal: fix a wrong comment
    thermal: sysfs: Add a new sysfs node emul_temp for thermal emulation
    PM: intel_powerclamp: off by one in start_power_clamp()
    thermal: exynos: Miscellaneous fixes to support falling threshold interrupt
    ...

    Linus Torvalds
     
  • Pull block IO core bits from Jens Axboe:
    "Below are the core block IO bits for 3.9. It was delayed a few days
    since my workstation kept crashing every 2-8h after pulling it into
    current -git, but turns out it is a bug in the new pstate code (divide
    by zero, will report separately). In any case, it contains:

    - The big cfq/blkcg update from Tejun and and Vivek.

    - Additional block and writeback tracepoints from Tejun.

    - Improvement of the should sort (based on queues) logic in the plug
    flushing.

    - _io() variants of the wait_for_completion() interface, using
    io_schedule() instead of schedule() to contribute to io wait
    properly.

    - Various little fixes.

    You'll get two trivial merge conflicts, which should be easy enough to
    fix up"

    Fix up the trivial conflicts due to hlist traversal cleanups (commit
    b67bfe0d42ca: "hlist: drop the node parameter from iterators").

    * 'for-3.9/core' of git://git.kernel.dk/linux-block: (39 commits)
    block: remove redundant check to bd_openers()
    block: use i_size_write() in bd_set_size()
    cfq: fix lock imbalance with failed allocations
    drivers/block/swim3.c: fix null pointer dereference
    block: don't select PERCPU_RWSEM
    block: account iowait time when waiting for completion of IO request
    sched: add wait_for_completion_io[_timeout]
    writeback: add more tracepoints
    block: add block_{touch|dirty}_buffer tracepoint
    buffer: make touch_buffer() an exported function
    block: add @req to bio_{front|back}_merge tracepoints
    block: add missing block_bio_complete() tracepoint
    block: Remove should_sort judgement when flush blk_plug
    block,elevator: use new hashtable implementation
    cfq-iosched: add hierarchical cfq_group statistics
    cfq-iosched: collect stats from dead cfqgs
    cfq-iosched: separate out cfqg_stats_reset() from cfq_pd_reset_stats()
    blkcg: make blkcg_print_blkgs() grab q locks instead of blkcg lock
    block: RCU free request_queue
    blkcg: implement blkg_[rw]stat_recursive_sum() and blkg_[rw]stat_merge()
    ...

    Linus Torvalds
     
  • Commit 74eed0163d0def3fce27228d9ccf3d36e207b286
    "irq: Ensure irq_exit() code runs with interrupts disabled"
    restore interrupts flags in the end of irq_exit() for archs
    that don't define __ARCH_IRQ_EXIT_IRQS_DISABLED.

    However always returning from irq_exit() with interrupts
    disabled should not be a problem for these archs. Prior to
    this commit this was already happening anytime we processed
    pending softirqs anyway.

    Suggested-by: Linus Torvalds
    Signed-off-by: Frederic Weisbecker
    Cc: Linus Torvalds
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Paul E. McKenney

    Frederic Weisbecker
     

28 Feb, 2013

16 commits

  • Merge third patch-bumb from Andrew Morton:
    "This wraps me up for -rc1.
    - Lots of misc stuff and things which were deferred/missed from
    patchbombings 1 & 2.
    - ocfs2 things
    - lib/scatterlist
    - hfsplus
    - fatfs
    - documentation
    - signals
    - procfs
    - lockdep
    - coredump
    - seqfile core
    - kexec
    - Tejun's large IDR tree reworkings
    - ipmi
    - partitions
    - nbd
    - random() things
    - kfifo
    - tools/testing/selftests updates
    - Sasha's large and pointless hlist cleanup"

    * emailed patches from Andrew Morton : (163 commits)
    hlist: drop the node parameter from iterators
    kcmp: make it depend on CHECKPOINT_RESTORE
    selftests: add a simple doc
    tools/testing/selftests/Makefile: rearrange targets
    selftests/efivarfs: add create-read test
    selftests/efivarfs: add empty file creation test
    selftests: add tests for efivarfs
    kfifo: fix kfifo_alloc() and kfifo_init()
    kfifo: move kfifo.c from kernel/ to lib/
    arch Kconfig: centralise CONFIG_ARCH_NO_VIRT_TO_BUS
    w1: add support for DS2413 Dual Channel Addressable Switch
    memstick: move the dereference below the NULL test
    drivers/pps/clients/pps-gpio.c: use devm_kzalloc
    Documentation/DMA-API-HOWTO.txt: fix typo
    include/linux/eventfd.h: fix incorrect filename is a comment
    mtd: mtd_stresstest: use prandom_bytes()
    mtd: mtd_subpagetest: convert to use prandom library
    mtd: mtd_speedtest: use prandom_bytes
    mtd: mtd_pagetest: convert to use prandom library
    mtd: mtd_oobtest: convert to use prandom library
    ...

    Linus Torvalds
     
  • I'm not sure why, but the hlist for each entry iterators were conceived

    list_for_each_entry(pos, head, member)

    The hlist ones were greedy and wanted an extra parameter:

    hlist_for_each_entry(tpos, pos, head, member)

    Why did they need an extra pos parameter? I'm not quite sure. Not only
    they don't really need it, it also prevents the iterator from looking
    exactly like the list iterator, which is unfortunate.

    Besides the semantic patch, there was some manual work required:

    - Fix up the actual hlist iterators in linux/list.h
    - Fix up the declaration of other iterators based on the hlist ones.
    - A very small amount of places were using the 'node' parameter, this
    was modified to use 'obj->member' instead.
    - Coccinelle didn't handle the hlist_for_each_entry_safe iterator
    properly, so those had to be fixed up manually.

    The semantic patch which is mostly the work of Peter Senna Tschudin is here:

    @@
    iterator name hlist_for_each_entry, hlist_for_each_entry_continue, hlist_for_each_entry_from, hlist_for_each_entry_rcu, hlist_for_each_entry_rcu_bh, hlist_for_each_entry_continue_rcu_bh, for_each_busy_worker, ax25_uid_for_each, ax25_for_each, inet_bind_bucket_for_each, sctp_for_each_hentry, sk_for_each, sk_for_each_rcu, sk_for_each_from, sk_for_each_safe, sk_for_each_bound, hlist_for_each_entry_safe, hlist_for_each_entry_continue_rcu, nr_neigh_for_each, nr_neigh_for_each_safe, nr_node_for_each, nr_node_for_each_safe, for_each_gfn_indirect_valid_sp, for_each_gfn_sp, for_each_host;

    type T;
    expression a,c,d,e;
    identifier b;
    statement S;
    @@

    -T b;

    [akpm@linux-foundation.org: drop bogus change from net/ipv4/raw.c]
    [akpm@linux-foundation.org: drop bogus hunk from net/ipv6/raw.c]
    [akpm@linux-foundation.org: checkpatch fixes]
    [akpm@linux-foundation.org: fix warnings]
    [akpm@linux-foudnation.org: redo intrusive kvm changes]
    Tested-by: Peter Senna Tschudin
    Acked-by: Paul E. McKenney
    Signed-off-by: Sasha Levin
    Cc: Wu Fengguang
    Cc: Marcelo Tosatti
    Cc: Gleb Natapov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sasha Levin
     
  • Since kcmp syscall has been implemented (initially on x86 architecture) a
    number of other archs wire it up as well: xtensa, sparc, sh, s390, mips,
    microblaze, m68k (not taking into account those who uses
    for syscall numbers definitions).

    But the Makefile, which turns kcmp.o generation on still depends on former
    config-x86. Thus get rid of this limitation and make kcmp.o depend on
    CHECKPOINT_RESTORE option.

    Signed-off-by: Cyrill Gorcunov
    Cc: Pavel Emelyanov
    Cc: Andrey Vagin
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Cyrill Gorcunov
     
  • Move kfifo.c from kernel/ to lib/

    Signed-off-by: Stefani Seibold
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stefani Seibold
     
  • Fix the wrong comment about the return value of clone_uts_ns()

    Signed-off-by: Yuanhan Liu
    Acked-by: Serge Hallyn
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yuanhan Liu
     
  • Put get/get_uts() into CONFIG_PROC_SYSCTL code block as they are used
    only when CONFIG_PROC_SYSCTL is enabled.

    Signed-off-by: Yuanhan Liu
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yuanhan Liu
     
  • The null check of `strchr() + 1' is broken, which is always non-null,
    leading to OOB read. Instead, check the result of strchr().

    Signed-off-by: Xi Wang
    Cc: "Eric W. Biederman"
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Xi Wang
     
  • Convert to the much saner new idr interface.

    Signed-off-by: Tejun Heo
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • Convert to the much saner new idr interface.

    Signed-off-by: Tejun Heo
    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    Cc: Ingo Molnar
    Cc: Arnaldo Carvalho de Melo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • Convert to the much saner new idr interface.

    Signed-off-by: Tejun Heo
    Acked-by: Li Zefan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • idr_destroy() can destroy idr by itself and idr_remove_all() is being
    deprecated. Drop its usage.

    Signed-off-by: Tejun Heo
    Acked-by: Li Zefan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • Though there is no error if we free a NULL pointer, I think we could
    avoid this behaviour. Change the code a little in kimage_crash_alloc()
    could avoid this kind of unnecessary free.

    Signed-off-by: Zhang Yanfei
    Cc: "Eric W. Biederman"
    Cc: Sasha Levin
    Reviewed-by: Simon Horman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zhang Yanfei
     
  • If kimage_normal_alloc() fails to alloc pages for image->swap_page, it
    should call kimage_free_page_list() to free allocated pages in
    image->control_pages list before it frees image.

    Signed-off-by: Zhang Yanfei
    Cc: "Eric W. Biederman"
    Cc: Sasha Levin
    Reviewed-by: Simon Horman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zhang Yanfei
     
  • If kimage_normal_alloc() fails to initialize an allocated kimage, it will
    free the image but would still set 'rimage', as a result kexec_load will
    try to free it again.

    This would explode as part of the freeing process is accessing internal
    members which point to uninitialized memory.

    Signed-off-by: Sasha Levin
    Cc: "Eric W. Biederman"
    Cc: Zhang Yanfei
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sasha Levin
     
  • This patch exports a PG_hwpoison into vmcoreinfo when
    CONFIG_MEMORY_FAILURE is defined. "makedumpfile" needs to read
    information of memory, such as 'mem_section', 'zone', 'pageflags' from
    vmcore.

    We introduce a function into "makedumpfile" to exclude hwpoison page from
    vmcore dump. In order to introduce this function, PG_hwpoison flag have
    to export into vmcoreinfo.

    Signed-off-by: Mitsuhiro Tanino
    Acked-by: "Eric W. Biederman"
    Cc: Mitsuhiro Tanino
    Cc: Vivek Goyal
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mitsuhiro Tanino
     
  • hole_end has been checked to make sure it is
    Reviewed-by: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zhang Yanfei