21 Jun, 2012

1 commit


16 Jun, 2012

1 commit

  • Pull core updates (RCU and locking) from Ingo Molnar:
    "Most of the diffstat comes from the RCU slow boot regression fixes,
    but there's also a debuggability improvements/fixes."

    * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    memblock: Document memblock_is_region_{memory,reserved}()
    rcu: Precompute RCU_FAST_NO_HZ timer offsets
    rcu: Move RCU_FAST_NO_HZ per-CPU variables to rcu_dynticks structure
    rcu: Update RCU_FAST_NO_HZ tracing for lazy callbacks
    rcu: RCU_FAST_NO_HZ detection of callback adoption
    spinlock: Indicate that a lockup is only suspected
    kdump: Execute kmsg_dump(KMSG_DUMP_PANIC) after smp_send_stop()
    panic: Make panic_on_oops configurable

    Linus Torvalds
     

08 Jun, 2012

2 commits

  • Storing NULL values in the btree is illegal and can lead to memory
    corruption and possible other fun as well. Catch it on insert, instead
    of waiting for the inevitable.

    Signed-off-by: Joern Engel
    Signed-off-by: Roland Dreier
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joern Engel
     
  • The memory the parameter __key points to is used as an iterator in
    btree_get_prev(), so if we save off a bkey() pointer in retry_key and
    then assign that to __key, we'll end up corrupting the btree internals
    when we do eg

    longcpy(__key, bkey(geo, node, i), geo->keylen);

    to return the key value. What we should do instead is use longcpy() to
    copy the key value that retry_key points to __key.

    This can cause a btree to get corrupted by seemingly read-only
    operations such as btree_for_each_safe.

    [akpm@linux-foundation.org: avoid the double longcpy()]
    Signed-off-by: Roland Dreier
    Acked-by: Joern Engel
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland Dreier
     

07 Jun, 2012

1 commit


06 Jun, 2012

3 commits

  • On an over-committed KVM system we got a:

    "BUG: spinlock lockup on CPU#2, swapper/2/0"

    message on the heavily contended virtio blk spinlock.

    While we might want to reconsider the locking of virtio-blk
    (lock is held while switching to the host) this patch tries to
    make the message clearer: the lockup is only suspected.

    Signed-off-by: Christian Borntraeger
    Cc: Rusty Russell
    Cc: Michael S. Tsirkin
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1338283124-7063-1-git-send-email-borntraeger@de.ibm.com
    Signed-off-by: Ingo Molnar

    Christian Borntraeger
     
  • Merge two debugging patchlets that were waiting for
    preparatory commits to hit upstream.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • This patch fixes bug in macro radix_tree_for_each_contig().

    If radix_tree_next_slot() sees NULL in next slot it returns NULL, but following
    radix_tree_next_chunk() switches iterating into next chunk. As result iterating
    becomes non-contiguous and breaks vfs "splice" and all its users.

    Signed-off-by: Konstantin Khlebnikov
    Reported-and-bisected-by: Hans de Bruin
    Reported-and-bisected-by: Ondrej Zary
    Reported-bisected-and-tested-by: Toralf Förster
    Link: https://lkml.org/lkml/2012/6/5/64
    Cc: stable # 3.4.x
    Signed-off-by: Linus Torvalds

    Konstantin Khlebnikov
     

03 Jun, 2012

1 commit

  • Pull networking updates from David Miller:

    1) Make syn floods consume significantly less resources by

    a) Not pre-COW'ing routing metrics for SYN/ACKs
    b) Mirroring the device queue mapping of the SYN for the SYN/ACK
    reply.

    Both from Eric Dumazet.

    2) Fix calculation errors in Byte Queue Limiting, from Hiroaki SHIMODA.

    3) Validate the length requested when building a paged SKB for a
    socket, so we don't overrun the page vector accidently. From Jason
    Wang.

    4) When netlabel is disabled, we abort all IP option processing when we
    see a CIPSO option. This isn't the right thing to do, we should
    simply skip over it and continue processing the remaining options
    (if any). Fix from Paul Moore.

    5) SRIOV fixes for the mellanox driver from Jack orgenstein and Marcel
    Apfelbaum.

    6) 8139cp enables the receiver before the ring address is properly
    programmed, which potentially lets the device crap over random
    memory. Fix from Jason Wang.

    7) e1000/e1000e fixes for i217 RST handling, and an improper buffer
    address reference in jumbo RX frame processing from Bruce Allan and
    Sebastian Andrzej Siewior, respectively.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
    fec_mpc52xx: fix timestamp filtering
    mcs7830: Implement link state detection
    e1000e: fix Rapid Start Technology support for i217
    e1000: look into the page instead of skb->data for e1000_tbi_adjust_stats()
    r8169: call netif_napi_del at errpaths and at driver unload
    tcp: reflect SYN queue_mapping into SYNACK packets
    tcp: do not create inetpeer on SYNACK message
    8139cp/8139too: terminate the eeprom access with the right opmode
    8139cp: set ring address before enabling receiver
    cipso: handle CIPSO options correctly when NetLabel is disabled
    net: sock: validate data_len before allocating skb in sock_alloc_send_pskb()
    bql: Avoid possible inconsistent calculation.
    bql: Avoid unneeded limit decrement.
    bql: Fix POSDIFF() to integer overflow aware.
    net/mlx4_core: Fix obscure mlx4_cmd_box parameter in QUERY_DEV_CAP
    net/mlx4_core: Check port out-of-range before using in mlx4_slave_cap
    net/mlx4_core: Fixes for VF / Guest startup flow
    net/mlx4_en: Fix improper use of "port" parameter in mlx4_en_event
    net/mlx4_core: Fix number of EQs used in ICM initialisation
    net/mlx4_core: Fix the slave_id out-of-range test in mlx4_eq_int

    Linus Torvalds
     

01 Jun, 2012

6 commits

  • Merge misc patches from Andrew Morton:

    - the "misc" tree - stuff from all over the map

    - checkpatch updates

    - fatfs

    - kmod changes

    - procfs

    - cpumask

    - UML

    - kexec

    - mqueue

    - rapidio

    - pidns

    - some checkpoint-restore feature work. Reluctantly. Most of it
    delayed a release. I'm still rather worried that we don't have a
    clear roadmap to completion for this work.

    * emailed from Andrew Morton : (78 patches)
    kconfig: update compression algorithm info
    c/r: prctl: add ability to set new mm_struct::exe_file
    c/r: prctl: extend PR_SET_MM to set up more mm_struct entries
    c/r: procfs: add arg_start/end, env_start/end and exit_code members to /proc/$pid/stat
    syscalls, x86: add __NR_kcmp syscall
    fs, proc: introduce /proc//task//children entry
    sysctl: make kernel.ns_last_pid control dependent on CHECKPOINT_RESTORE
    aio/vfs: cleanup of rw_copy_check_uvector() and compat_rw_copy_check_uvector()
    eventfd: change int to __u64 in eventfd_signal()
    fs/nls: add Apple NLS
    pidns: make killed children autoreap
    pidns: use task_active_pid_ns in do_notify_parent
    rapidio/tsi721: add DMA engine support
    rapidio: add DMA engine support for RIO data transfers
    ipc/mqueue: add rbtree node caching support
    tools/selftests: add mq_perf_tests
    ipc/mqueue: strengthen checks on mqueue creation
    ipc/mqueue: correct mq_attr_ok test
    ipc/mqueue: improve performance of send/recv
    selftests: add mq_open_tests
    ...

    Linus Torvalds
     
  • Previous code was using optimizations which were developed to work well
    even on narrow-word CPUs (by today's standards). But Linux runs only on
    32-bit and wider CPUs. We can use that.

    First: using 32x32->64 multiply and trivial 32-bit shift, we can correctly
    divide by 10 much larger numbers, and thus we can print groups of 9 digits
    instead of groups of 5 digits.

    Next: there are two algorithms to print larger numbers. One is generic:
    divide by 1000000000 and repeatedly print groups of (up to) 9 digits.
    It's conceptually simple, but requires an (unsigned long long) /
    1000000000 division.

    Second algorithm splits 64-bit unsigned long long into 16-bit chunks,
    manipulates them cleverly and generates groups of 4 decimal digits. It so
    happens that it does NOT require long long division.

    If long is > 32 bits, division of 64-bit values is relatively easy, and we
    will use the first algorithm. If long long is > 64 bits (strange
    architecture with VERY large long long), second algorithm can't be used,
    and we again use the first one.

    Else (if long is 32 bits and long long is 64 bits) we use second one.

    And third: there is a simple optimization which takes fast path not only
    for zero as was done before, but for all one-digit numbers.

    In all tested cases new code is faster than old one, in many cases by 30%,
    in few cases by more than 50% (for example, on x86-32, conversion of
    12345678). Code growth is ~0 in 32-bit case and ~130 bytes in 64-bit
    case.

    This patch is based upon an original from Michal Nazarewicz.

    [akpm@linux-foundation.org: checkpatch fixes]
    Signed-off-by: Michal Nazarewicz
    Signed-off-by: Denys Vlasenko
    Cc: Douglas W Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Denys Vlasenko
     
  • The '%p' output of the kernel's vsprintf() uses spec.field_width to
    determine how many digits to output based on 2 * sizeof(void*) so that all
    digits of a pointer are shown. ie. a pointer will be output as
    "001A2B3C" instead of "1A2B3C". However, if the '#' flag is used in the
    format (%#p), then the code doesn't take into account the width of the
    '0x' prefix and will end up outputing "0x1A2B3C" instead of "0x001A2B3C".

    This patch reworks the "pointer()" format hook to include 2 characters for
    the '0x' prefix if the '#' flag is included.

    [akpm@linux-foundation.org: checkpatch fixes]
    Signed-off-by: Grant Likely
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Grant Likely
     
  • dql->num_queued could change while processing dql_completed().
    To provide consistent calculation, added an on stack variable.

    Signed-off-by: Hiroaki SHIMODA
    Cc: Tom Herbert
    Cc: Eric Dumazet
    Cc: Denys Fedoryshchenko
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Hiroaki SHIMODA
     
  • When below pattern is observed,

    TIME
    dql_queued() dql_completed() |
    a) initial state |
    |
    b) X bytes queued V

    c) Y bytes queued
    d) X bytes completed
    e) Z bytes queued
    f) Y bytes completed

    a) dql->limit has already some value and there is no in-flight packet.
    b) X bytes queued.
    c) Y bytes queued and excess limit.
    d) X bytes completed and dql->prev_ovlimit is set and also
    dql->prev_num_queued is set Y.
    e) Z bytes queued.
    f) Y bytes completed. inprogress and prev_inprogress are true.

    At f), according to the comment, all_prev_completed becomes
    true and limit should be increased. But POSDIFF() ignores
    (completed == dql->prev_num_queued) case, so limit is decreased.

    Signed-off-by: Hiroaki SHIMODA
    Cc: Tom Herbert
    Cc: Eric Dumazet
    Cc: Denys Fedoryshchenko
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Hiroaki SHIMODA
     
  • POSDIFF() fails to take into account integer overflow case.

    Signed-off-by: Hiroaki SHIMODA
    Cc: Tom Herbert
    Cc: Eric Dumazet
    Cc: Denys Fedoryshchenko
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Hiroaki SHIMODA
     

30 May, 2012

11 commits

  • Pull IOMMU updates from Joerg Roedel:
    "Not much stuff this time. The only change to the IOMMU core code is
    the addition of a handle to the fault handling code. A few updates to
    the AMD IOMMU driver to work around new errata. The other patches are
    mostly fixes and enhancements to the existing ARM IOMMU drivers and
    documentation updates.

    A new IOMMU driver for the Exynos platform was also underway but got
    merged via the Samsung tree and is not part of this tree."

    * tag 'iommu-updates-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
    Documentation: kernel-parameters.txt Add amd_iommu_dump
    iommu/core: pass a user-provided token to fault handlers
    iommu/tegra: gart: Fix register offset correctly
    iommu: OMAP: device detach on domain destroy
    iommu: tegra/gart: Add device tree support
    iommu: tegra/gart: use correct gart_device
    iommu/tegra: smmu: Print device name correctly
    iommu/amd: Add workaround for event log erratum
    iommu/amd: Check for the right TLP prefix bit
    dma-debug: release free_entries_lock before saving stack trace

    Linus Torvalds
     
  • Joerg Roedel
     
  • number()'s behaviour is slighly changed: 0 becomes "0" instead of "00"
    when using the flag SPECIAL and base 8.

    Before:
    Number\Format %o %#o %x %#x
    0 0 00 0 0x0
    1 1 01 1 0x1
    16 20 020 10 0x10

    After:
    Number\Format %o %#o %x %#x
    0 0 0 0 0x0
    1 1 01 1 0x1
    16 20 020 10 0x10

    Signed-off-by: Pierre Carrier
    Acked-by: Stephen Rothwell
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pierre Carrier
     
  • We are not preallocating a sufficient number of nodes.

    Signed-off-by: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • When a spinlock warning is printed we usually get

    BUG: spinlock bad magic on CPU#0, modprobe/111
    lock: 0xdff09f38, .magic: 00000000, .owner: /0, .owner_cpu: 0

    but it's nicer to print the symbol for the lock if we have it so that we
    can avoid 'grep dff09f38 /proc/kallsyms' to find out which lock it was.
    Use kallsyms to print the symbol name so we get something a bit easier to
    read

    BUG: spinlock bad magic on CPU#0, modprobe/112
    lock: test_lock, .magic: 00000000, .owner: /-1, .owner_cpu: 0

    If the lock is not in kallsyms %ps will fall back to printing the address
    directly.

    Signed-off-by: Stephen Boyd
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Boyd
     
  • Using %ps in a printk format will sometimes fail silently and print the
    empty string if the address passed in does not match a symbol that
    kallsyms knows about. But using %pS will fall back to printing the full
    address if kallsyms can't find the symbol. Make %ps act the same as %pS
    by falling back to printing the address.

    While we're here also make %ps print the module that a symbol comes from
    so that it matches what %pS already does. Take this simple function for
    example (in a module):

    static void test_printk(void)
    {
    int test;
    pr_info("with pS: %pS\n", &test);
    pr_info("with ps: %ps\n", &test);
    }

    Before this patch:

    with pS: 0xdff7df44
    with ps:

    After this patch:

    with pS: 0xdff7df44
    with ps: 0xdff7df44

    Signed-off-by: Stephen Boyd
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Boyd
     
  • The code comments for bscnl_emit() and bitmap_scnlistprintf() are
    describing snprintf() return semantics, but these functions use
    scnprintf() return semantics. Fix that, and document the
    bitmap_scnprintf() return value as well.

    Cc: Ryota Ozaki
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Moving these arrays into static storage shrinks the kernel a bit:

    text data bss dec hex filename
    723 112 64 899 383 lib/string_helpers.o
    516 272 64 852 354 lib/string_helpers.o

    Cc: James Bottomley
    Cc: "Aneesh Kumar K.V"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • As long as there is no other non-const variable marked __initdata in the
    same compilation unit it doesn't hurt. If there were one however
    compilation would fail with

    error: $variablename causes a section type conflict

    because a section containing const variables is marked read only and so
    cannot contain non-const variables.

    Signed-off-by: Uwe Kleine-König
    Cc: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Uwe Kleine-König
     
  • We were bitten by this at one point and added an additional sanity test
    for DEBUG_LIST. You can't validly add a list_head to a list where either
    prev or next is the same as the thing you're adding.

    Signed-off-by: Chris Metcalf
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Metcalf
     
  • Print swiotlb info in a style consistent with the %pR style used elsewhere
    in the kernel. For example:

    -Placing 64MB software IO TLB between ffff88007a662000 - ffff88007e662000
    -software IO TLB at phys 0x7a662000 - 0x7e662000
    +software IO TLB [mem 0x7a662000-0x7e661fff] (64MB) mapped at [ffff88007a662000-ffff88007e661fff]

    Signed-off-by: Bjorn Helgaas
    Cc: Yinghai Lu
    Cc: Konrad Rzeszutek Wilk
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     

28 May, 2012

2 commits

  • Make the recovery functions static to fix the following sparse warnings:

    lib/raid6/recov.c:25:6: warning: symbol 'raid6_2data_recov_intx1' was
    not declared. Should it be static?
    lib/raid6/recov.c:69:6: warning: symbol 'raid6_datap_recov_intx1' was
    not declared. Should it be static?
    lib/raid6/recov_ssse3.c:22:6: warning: symbol 'raid6_2data_recov_ssse3'
    was not declared. Should it be static?
    lib/raid6/recov_ssse3.c:197:6: warning: symbol 'raid6_datap_recov_ssse3'
    was not declared. Should it be static?

    Reported-by: Fengguang Wu
    Signed-off-by: Jim Kukunas
    Signed-off-by: NeilBrown

    Jim Kukunas
     
  • The aligned_byte_mask() definition is wrong for 32-bit big-endian
    machines: the "7-(n)" part of the definition assumes a long is 8
    bytes. This fixes it by using BITS_PER_LONG - 8 instead of 8*7.
    Tested on 32-bit and 64-bit PowerPC.

    Signed-off-by: Paul Mackerras
    Acked-by: David S. Miller
    Signed-off-by: Linus Torvalds

    Paul Mackerras
     

27 May, 2012

4 commits

  • This makes actually live up to its promise of
    allowing architectures to help tune the string functions that do their
    work a word at a time.

    David had already taken the x86 strncpy_from_user() function, modified
    it to work on sparc, and then done the extra work to make it generically
    useful. This then expands on that work by making x86 use that generic
    version, completing the circle.

    But more importantly, it fixes up the word-at-a-time interfaces so that
    it's now easy to also support things like strnlen_user(), and pretty
    much most random string functions.

    David reports that it all works fine on sparc, and Jonas Bonn reported
    that an earlier version of this worked on OpenRISC too. It's pretty
    easy for architectures to add support for this and just replace their
    private versions with the generic code.

    * generic-string-functions:
    sparc: use the new generic strnlen_user() function
    x86: use the new generic strnlen_user() function
    lib: add generic strnlen_user() function
    word-at-a-time: make the interfaces truly generic
    x86: use generic strncpy_from_user routine

    Linus Torvalds
     
  • Pull arm-soc stmp-dev library code from Olof Johansson:
    "A number of devices are using a common register layout, this adds
    support code for it in lib/stmp_device.c so we do not need to
    duplicate it in each driver."

    Fix up trivial conflicts in drivers/i2c/busses/i2c-mxs.c and
    lib/Makefile

    * tag 'stmp-dev' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    i2c: mxs: use global reset function
    lib: add support for stmp-style devices

    Linus Torvalds
     
  • This adds a new generic optimized strnlen_user() function that uses the
    infrastructure to portably do efficient string
    handling.

    In many ways, strnlen is much simpler than strncpy, and in particular we
    can always pre-align the words we load from memory. That means that all
    the worries about alignment etc are a non-issue, so this one can easily
    be used on any architecture. You obviously do have to do the
    appropriate word-at-a-time.h macros.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • This changes the interfaces in to be a bit more
    complicated, but a lot more generic.

    In particular, it allows us to really do the operations efficiently on
    both little-endian and big-endian machines, pretty much regardless of
    machine details. For example, if you can rely on a fast population
    count instruction on your architecture, this will allow you to make your
    optimized file with that.

    NOTE! The "generic" version in include/asm-generic/word-at-a-time.h is
    not truly generic, it actually only works on big-endian. Why? Because
    on little-endian the generic algorithms are wasteful, since you can
    inevitably do better. The x86 implementation is an example of that.

    (The only truly non-generic part of the asm-generic implementation is
    the "find_zero()" function, and you could make a little-endian version
    of it. And if the Kbuild infrastructure allowed us to pick a particular
    header file, that would be lovely)

    The functions are as follows:

    - WORD_AT_A_TIME_CONSTANTS: specific constants that the algorithm
    uses.

    - has_zero(): take a word, and determine if it has a zero byte in it.
    It gets the word, the pointer to the constant pool, and a pointer to
    an intermediate "data" field it can set.

    This is the "quick-and-dirty" zero tester: it's what is run inside
    the hot loops.

    - "prep_zero_mask()": take the word, the data that has_zero() produced,
    and the constant pool, and generate an *exact* mask of which byte had
    the first zero. This is run directly *outside* the loop, and allows
    the "has_zero()" function to answer the "is there a zero byte"
    question without necessarily getting exactly *which* byte is the
    first one to contain a zero.

    If you do multiple byte lookups concurrently (eg "hash_name()", which
    looks for both NUL and '/' bytes), after you've done the prep_zero_mask()
    phase, the result of those can be or'ed together to get the "either
    or" case.

    - The result from "prep_zero_mask()" can then be fed into "find_zero()"
    (to find the byte offset of the first byte that was zero) or into
    "zero_bytemask()" (to find the bytemask of the bytes preceding the
    zero byte).

    The existence of zero_bytemask() is optional, and is not necessary
    for the normal string routines. But dentry name hashing needs it, so
    if you enable DENTRY_WORD_AT_A_TIME you need to expose it.

    This changes the generic strncpy_from_user() function and the dentry
    hashing functions to use these modified word-at-a-time interfaces. This
    gets us back to the optimized state of the x86 strncpy that we lost in
    the previous commit when moving over to the generic version.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

25 May, 2012

2 commits

  • Pull sparc changes from David S. Miller:
    "This has the generic strncpy_from_user() implementation architectures
    can now use, which we've been developing on linux-arch over the past
    few days.

    For good measure I ran both a 32-bit and a 64-bit glibc testsuite run,
    and the latter of which pointed out an adjustment I needed to make to
    sparc's user_addr_max() definition. Linus, you were right, STACK_TOP
    was not the right thing to use, even on sparc itself :-)

    From Sam Ravnborg, we have a conversion of sparc32 over to the common
    alloc_thread_info_node(), since the aspect which originally blocked
    our doing so (sun4c) has been removed."

    Fix up trivial arch/sparc/Kconfig and lib/Makefile conflicts.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
    sparc: Fix user_addr_max() definition.
    lib: Sparc's strncpy_from_user is generic enough, move under lib/
    kernel: Move REPEAT_BYTE definition into linux/kernel.h
    sparc: Increase portability of strncpy_from_user() implementation.
    sparc: Optimize strncpy_from_user() zero byte search.
    sparc: Add full proper error handling to strncpy_from_user().
    sparc32: use the common implementation of alloc_thread_info_node()

    Linus Torvalds
     
  • To use this, an architecture simply needs to:

    1) Provide a user_addr_max() implementation via asm/uaccess.h

    2) Add "select GENERIC_STRNCPY_FROM_USER" to their arch Kcnfig

    3) Remove the existing strncpy_from_user() implementation and symbol
    exports their architecture had.

    Signed-off-by: David S. Miller
    Acked-by: David Howells

    David S. Miller
     

24 May, 2012

2 commits

  • Pull md updates from NeilBrown:
    "It's been a busy cycle for md - lots of fun stuff here.. if you like
    this kind of thing :-)

    Main features:
    - RAID10 arrays can be reshaped - adding and removing devices and
    changing chunks (not 'far' array though)
    - allow RAID5 arrays to be reshaped with a backup file (not tested
    yet, but the priciple works fine for RAID10).
    - arrays can be reshaped while a bitmap is present - you no longer
    need to remove it first
    - SSSE3 support for RAID6 syndrome calculations

    and of course a number of minor fixes etc."

    * tag 'md-3.5' of git://neil.brown.name/md: (56 commits)
    md/bitmap: record the space available for the bitmap in the superblock.
    md/raid10: Remove extras after reshape to smaller number of devices.
    md/raid5: improve removal of extra devices after reshape.
    md: check the return of mddev_find()
    MD RAID1: Further conditionalize 'fullsync'
    DM RAID: Use md_error() in place of simply setting Faulty bit
    DM RAID: Record and handle missing devices
    DM RAID: Set recovery flags on resume
    md/raid5: Allow reshape while a bitmap is present.
    md/raid10: resize bitmap when required during reshape.
    md: allow array to be resized while bitmap is present.
    md/bitmap: make sure reshape request are reflected in superblock.
    md/bitmap: add bitmap_resize function to allow bitmap resizing.
    md/bitmap: use DIV_ROUND_UP instead of open-code
    md/bitmap: create a 'struct bitmap_counts' substructure of 'struct bitmap'
    md/bitmap: make bitmap bitops atomic.
    md/bitmap: make _page_attr bitops atomic.
    md/bitmap: merge bitmap_file_unmap and bitmap_file_put.
    md/bitmap: remove async freeing of bitmap file.
    md/bitmap: convert some spin_lock_irqsave to spin_lock_irq
    ...

    Linus Torvalds
     
  • …', 'x86-debug-for-linus' and 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

    Pull initial trivial x86 stuff from Ingo Molnar.

    Various random cleanups and trivial fixes.

    * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86-64: Eliminate dead ia32 syscall handlers

    * 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/pci-calgary_64.c: Remove obsoleted simple_strtoul() usage
    x86: Don't continue booting if we can't load the specified initrd
    x86: kernel/dumpstack.c simple_strtoul cleanup
    x86: kernel/check.c simple_strtoul cleanup
    debug: Add CONFIG_READABLE_ASM
    x86: spinlock.h: Remove REG_PTR_MODE

    * 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/cache_info: Fix setup of l2/l3 ids

    * 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86: Avoid double stack traces with show_regs()

    * 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86, microcode: microcode_core.c simple_strtoul cleanup

    Linus Torvalds
     

23 May, 2012

2 commits

  • Pull trivial updates from Jiri Kosina:
    "As usual, it's mostly typo fixes, redundant code elimination and some
    documentation updates."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (57 commits)
    edac, mips: don't change code that has been removed in edac/mips tree
    xtensa: Change mail addresses of Hannes Weiner and Oskar Schirmer
    lib: Change mail address of Oskar Schirmer
    net: Change mail address of Oskar Schirmer
    arm/m68k: Change mail address of Sebastian Hess
    i2c: Change mail address of Oskar Schirmer
    net: Fix tcp_build_and_update_options comment in struct tcp_sock
    atomic64_32.h: fix parameter naming mismatch
    Kconfig: replace "--- help ---" with "---help---"
    c2port: fix bogus Kconfig "default no"
    edac: Fix spelling errors.
    qla1280: Remove redundant NULL check before release_firmware() call
    remoteproc: remove redundant NULL check before release_firmware()
    qla2xxx: Remove redundant NULL check before release_firmware() call.
    aic94xx: Get rid of redundant NULL check before release_firmware() call
    tehuti: delete redundant NULL check before release_firmware()
    qlogic: get rid of a redundant test for NULL before call to release_firmware()
    bna: remove redundant NULL test before release_firmware()
    tg3: remove redundant NULL test before release_firmware() call
    typhoon: get rid of redundant conditional before all to release_firmware()
    ...

    Linus Torvalds
     
  • 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

2 commits