25 Mar, 2010

24 commits

  • cpuset_mem_spread_node() returns an offline node, and causes an oops.

    This patch fixes it by initializing task->mems_allowed to
    node_states[N_HIGH_MEMORY], and updating task->mems_allowed when doing
    memory hotplug.

    Signed-off-by: Miao Xie
    Acked-by: David Rientjes
    Reported-by: Nick Piggin
    Tested-by: Nick Piggin
    Cc: Paul Menage
    Cc: Li Zefan
    Cc: Ingo Molnar
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miao Xie
     
  • commit 3f226aa1c (mempolicy: support mpol=local tmpfs mount option) added
    new mpol=local mount option. but it didn't add a documentation.

    This patch does it.

    Signed-off-by: KOSAKI Motohiro
    Cc: Ravikiran Thirumalai
    Cc: Christoph Lameter
    Cc: Mel Gorman
    Acked-by: Lee Schermerhorn
    Cc: Hugh Dickins
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KOSAKI Motohiro
     
  • mpol_parse_str() made lots 'err' variable related bug. Because it is ugly
    and reviewing unfriendly.

    This patch simplifies it.

    Signed-off-by: KOSAKI Motohiro
    Cc: Ravikiran Thirumalai
    Cc: Christoph Lameter
    Cc: Mel Gorman
    Acked-by: Lee Schermerhorn
    Cc: Hugh Dickins
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KOSAKI Motohiro
     
  • commit 71fe804b6d5 (mempolicy: use struct mempolicy pointer in
    shmem_sb_info) added mpol=local mount option. but its feature is broken
    since it was born. because such code always return 1 (i.e. mount
    failure).

    This patch fixes it.

    Signed-off-by: KOSAKI Motohiro
    Cc: Ravikiran Thirumalai
    Cc: Christoph Lameter
    Cc: Mel Gorman
    Acked-by: Lee Schermerhorn
    Cc: Hugh Dickins
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KOSAKI Motohiro
     
  • Currently, following mount operation cause mount error.

    % mount -t tmpfs -ompol=bind:0 none /tmp

    Because commit 71fe804b6d5 (mempolicy: use struct mempolicy pointer in
    shmem_sb_info) corrupted MPOL_BIND parse code.

    This patch restore the needed one.

    Signed-off-by: KOSAKI Motohiro
    Cc: Ravikiran Thirumalai
    Cc: Christoph Lameter
    Cc: Mel Gorman
    Acked-by: Lee Schermerhorn
    Cc: Hugh Dickins
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KOSAKI Motohiro
     
  • Fix an 'oops' when a tmpfs mount point is mounted with the mpol=default
    mempolicy.

    Upon remounting a tmpfs mount point with 'mpol=default' option, the mount
    code crashed with a null pointer dereference. The initial problem report
    was on 2.6.27, but the problem exists in mainline 2.6.34-rc as well. On
    examining the code, we see that mpol_new returns NULL if default mempolicy
    was requested. This 'NULL' mempolicy is accessed to store the node mask
    resulting in oops.

    The following patch fixes it.

    Signed-off-by: Ravikiran Thirumalai
    Signed-off-by: KOSAKI Motohiro
    Cc: Christoph Lameter
    Cc: Mel Gorman
    Acked-by: Lee Schermerhorn
    Cc: Hugh Dickins
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ravikiran G Thirumalai
     
  • Use IS_ERR() instead of comparing to NULL.

    [akpm@linux-foundation.org: preserve the error code]
    Signed-off-by: Jani Nikula
    Cc: Vegard Nossum
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jani Nikula
     
  • ksm.c's write_protect_page implements a lockless means of verifying a page
    does not have any users of the page which are not accounted for via other
    kernel tracking means. It does this by removing the writable pte with TLB
    flushes, checking the page_count against the total known users, and then
    using set_pte_at_notify to make it a read-only entry.

    An unneeded mmu_notifier callout is made in the case where the known users
    does not match the page_count. In that event, we are inserting the
    identical pte and there is no need for the set_pte_at_notify, but rather
    the simpler set_pte_at suffices.

    Signed-off-by: Robin Holt
    Acked-by: Izik Eidus
    Acked-by: Andrea Arcangeli
    Acked-by: Hugh Dickins
    Cc: Chris Wright
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robin Holt
     
  • Fix a fatal error in scripts/kernel-doc when a function signature uses
    __init_or_module (just ignore that string):

    Error(drivers/base/platform.c:568): cannot understand prototype: 'struct platform_device * __init_or_module platform_create_bundle(struct platform_driver *driver, int (*probe)(struct platform_device *), struct resource *res, unsigned int n_res, const void *data, size_t size) '

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • This patch renames PCI/PCI-DMA-mapping.txt to DMA-API-HOWTO.txt.

    The commit 51e7364ef281e540371f084008732b13292622f0 "Documentation: rename
    PCI-DMA-mapping.txt to DMA-API-HOWTO.txt" was supposed to do this but it
    didn't.

    Signed-off-by: FUJITA Tomonori
    Acked-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     
  • include/linux/kfifo.h first defines and then undefines __kfifo_initializer
    which is used by INIT_KFIFO (which is also a macro, so building a module
    which uses INIT_KFIFO will fail).

    Signed-off-by: David Härdeman
    Acked-by: Stefani Seibold
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Härdeman
     
  • Fix an incorrect comment in the do_mmap_shared_file(). If a mapping is
    requested MAP_SHARED, then a private copy cannot be made and still provide
    correct semantics.

    Signed-off-by: David Howells
    Reported-by: Dave Hudson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     
  • Keeps MAINTAINERS a bit more consistent.
    done via sed -r -i -e 's/^([A-Z]):[ \t]+/\1:\t/g' MAINTAINERS

    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • According to the header in max730x it is licensed GPLv2.

    Add a MODULE_LICENSE to avoid getting the kernel tainted.

    [w.sang@pengutronix.de: add MODULE_AUTHOR and MODULE_DESCRIPTION also]
    Signed-off-by: Richard Röjfors
    Signed-off-by: Wolfram Sang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Richard Röjfors
     
  • Update memory.txt to be more consistent: s/swapiness/swappiness/

    Signed-off-by: Greg Thelen
    Acked-by: Balbir Singh
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Greg Thelen
     
  • Commit 22dd5b0cba50a197aaa3bd2790a29ee2e8e4e372 (fix perlcritic warnings)
    broke the ability to handle STDIN because the three argument version of
    open() cannot handle standard IO-streams (which is mentioned in
    PerlBestPractices, too).

    Signed-off-by: Wolfram Sang
    Cc: Stephen Hemminger
    Acked-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wolfram Sang
     
  • We see only one section mismatch now after thousands of randconfigs, and a
    bug has been filed about that one.

    Signed-off-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     
  • cpu_relax() is documented in volatile-considered-harmful.txt to be a
    memory barrier. However, everyone with the exception of Blackfin and
    possibly ia64 defines cpu_relax() to be a compiler barrier.

    Make the documentation reflect the general concensus.

    Linus sayeth:

    : I don't think it was ever the intention that it would be seen as anything
    : but a compiler barrier, although it is obviously implied that it might
    : well perform some per-architecture actions that have "memory barrier-like"
    : semantics.
    :
    : After all, the whole and only point of the "cpu_relax()" thing is to tell
    : the CPU that we're busy-looping on some event.
    :
    : And that "event" might be (and often is) about reading the same memory
    : location over and over until it changes to what we want it to be. So it's
    : quite possible that on various architectures the "cpu_relax()" could be
    : about making sure that such a tight loop on loads doesn't starve cache
    : transactions, for example - and as such look a bit like a memory barrier
    : from a CPU standpoint.
    :
    : But it's not meant to have any kind of architectural memory ordering
    : semantics as far as the kernel is concerned - those must come from other
    : sources.

    Signed-off-by: Russell King
    Cc:
    Acked-by: Linus Torvalds
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Russell King
     
  • fs/binfmt_aout.c: In function `aout_core_dump':
    fs/binfmt_aout.c:125: warning: passing argument 2 of `dump_write' makes pointer from integer without a cast
    include/linux/coredump.h:12: note: expected `const void *' but argument is of type `long unsigned int'
    fs/binfmt_aout.c:132: warning: passing argument 2 of `dump_write' makes pointer from integer without a cast
    include/linux/coredump.h:12: note: expected `const void *' but argument is of type `long unsigned int'

    due to dump_write() expecting a user void *. Fold casts into the
    START_DATA/START_STACK macros and shut up the warnings.

    Signed-off-by: Borislav Petkov
    Cc: Daisuke HATAYAMA
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Borislav Petkov
     
  • scripts/kernel-doc erroneously says:

    Warning(include/linux/skbuff.h:410): Excess struct/union/enum/typedef member 'cb' description in 'sk_buff'

    on this line in struct sk_buff:
    char cb[48] __aligned(8);

    due to treating the last field as the struct member name, so teach
    kernel-doc to ignore __aligned(x) in structs.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • This was introduced by v2.6.34-rc1~38:

    4c014e8 (rtc/mc13783: protect rtc {,un}registration by mc13783 lock)

    Signed-off-by: Uwe Kleine-König
    Reported-by: Dan Carpenter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Uwe Kleine-König
     
  • There was a potential null deref introduced in c62b1a3b31b5 ("memcg: use
    generic percpu instead of private implementation").

    Signed-off-by: Dan Carpenter
    Acked-by: KAMEZAWA Hiroyuki
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Carpenter
     
  • commit e6a1105b ("cgroups: subsystem module loading interface") and commit
    c50cc752 ("sched, cgroups: Fix module export") result in duplicate
    including of module.h

    Signed-off-by: Li Zefan
    Acked-by: Paul Menage
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Li Zefan
     
  • In commit 02491447 ("memcg: move charges of anonymous swap"), I tried to
    disable move charge feature in no mmu case by enclosing all the related
    functions with "#ifdef CONFIG_MMU", but the commit places these ifdefs in
    wrong place. (it seems that it's mangled while handling some fixes...)

    This patch fixes it up.

    Signed-off-by: Daisuke Nishimura
    Cc: Balbir Singh
    Cc: KAMEZAWA Hiroyuki
    Cc: Daisuke Nishimura
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daisuke Nishimura
     

23 Mar, 2010

8 commits

  • Commit 45575f5a426c ("ppc64 sys_ipc breakage in 2.6.34-rc2") fixed the
    definition of the sys_ipc() helper, but didn't fix the prototype in

    Reported-and-tested-by: Andreas Schwab
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
    virtio: console: Check if port is valid in resize_console
    virtio: console: Generate a kobject CHANGE event on adding 'name' attribute

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (38 commits)
    ip_gre: include route header_len in max_headroom calculation
    if_tunnel.h: add missing ams/byteorder.h include
    ipv4: Don't drop redirected route cache entry unless PTMU actually expired
    net: suppress lockdep-RCU false positive in FIB trie.
    Bluetooth: Fix kernel crash on L2CAP stress tests
    Bluetooth: Convert debug files to actually use debugfs instead of sysfs
    Bluetooth: Fix potential bad memory access with sysfs files
    netfilter: ctnetlink: fix reliable event delivery if message building fails
    netlink: fix NETLINK_RECV_NO_ENOBUFS in netlink_set_err()
    NET_DMA: free skbs periodically
    netlink: fix unaligned access in nla_get_be64()
    tcp: Fix tcp_mark_head_lost() with packets == 0
    net: ipmr/ip6mr: fix potential out-of-bounds vif_table access
    KS8695: update ksp->next_rx_desc_read at the end of rx loop
    igb: Add support for 82576 ET2 Quad Port Server Adapter
    ixgbevf: Message formatting cleanups
    ixgbevf: Shorten up delay timer for watchdog task
    ixgbevf: Fix VF Stats accounting after reset
    ixgbe: Set IXGBE_RSC_CB(skb)->DMA field to zero after unmapping the address
    ixgbe: fix for real_num_tx_queues update issue
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
    edac, mce: Filter out invalid values

    Linus Torvalds
     
  • alloc_skb() can return NULL.

    Signed-off-by: Tetsuo Handa
    Signed-off-by: David Howells
    Signed-off-by: Linus Torvalds

    Tetsuo Handa
     
  • It seems clear from the surrounding code that xpermits is allowed to be
    NULL here.

    Signed-off-by: Dan Carpenter
    Signed-off-by: David Howells
    Signed-off-by: Linus Torvalds

    Dan Carpenter
     
  • I chased down a fail on ppc64 on 2.6.34-rc2 where an application that
    uses shared memory was getting a SEGV.

    Commit baed7fc9b580bd3fb8252ff1d9b36eaf1f86b670 ("Add generic sys_ipc
    wrapper") changed the second argument from an unsigned long to an int.
    When we call shmget the system call wrappers for sys_ipc will sign
    extend second (ie the size) which truncates it. It took a while to
    track down because the call succeeds and strace shows the untruncated
    size :)

    The patch below changes second from an int to an unsigned long which
    fixes shmget on ppc64 (and I assume s390, sparc64 and mips64).

    Signed-off-by: Anton Blanchard
    --

    I assume the function prototypes for the other IPC methods would cause us
    to sign or zero extend second where appropriate (avoiding any security
    issues). Come to think of it, the syscall wrappers for each method should do
    that for us as well.
    Signed-off-by: Linus Torvalds

    Anton Blanchard
     
  • Commit 3f6da3905398826d85731247e7fbcf53400c18bd
    (perf: Rework and fix the arch CPU-hotplug hooks) broke suspend to
    RAM on my HP nx6325 (and most likely on other AMD-based boxes too)
    by allowing amd_pmu_cpu_offline() to be executed for CPUs that are
    going offline as part of the suspend process. The problem is that
    cpuhw->amd_nb may be NULL already, so the function should make sure
    it's not NULL before accessing the object pointed to by it.

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     

22 Mar, 2010

8 commits

  • Print the CPU associated with the error only when the field is valid.

    Cc: # .32.x .33.x
    Signed-off-by: Borislav Petkov

    Borislav Petkov
     
  • The console port could have been hot-unplugged. Check if it is valid
    before working on it.

    Signed-off-by: Amit Shah
    Signed-off-by: Michael S. Tsirkin

    Amit Shah
     
  • When the host lets us know what 'name' a port is assigned, we create the
    sysfs 'name' attribute. Generate a 'change' event after this so that
    udev wakes up and acts on the rules for virtio-ports (currently there's
    only one rule that creates a symlink from the 'name' to the actual char
    device).

    Signed-off-by: Amit Shah
    Signed-off-by: Michael S. Tsirkin

    Amit Shah
     
  • Taking route's header_len into account, and updating gre device
    needed_headroom will give better hints on upper bound of required
    headroom. This is useful if the gre traffic is xfrm'ed.

    Signed-off-by: Timo Teras
    Acked-by: Herbert Xu
    Signed-off-by: David S. Miller

    Timo Teräs
     
  • When compiling userspace application which includes
    if_tunnel.h and uses GRE_* defines you will get undefined
    reference to __cpu_to_be16.

    Fix this by adding missing #include

    Cc: stable@kernel.org
    Signed-off-by: Paulius Zaleckas
    Signed-off-by: David S. Miller

    Paulius Zaleckas
     
  • TCP sessions over IPv4 can get stuck if routers between endpoints
    do not fragment packets but implement PMTU instead, and we are using
    those routers because of an ICMP redirect.

    Setup is as follows

    MTU1 MTU2 MTU1
    A--------B------C------D

    with MTU1 > MTU2. A and D are endpoints, B and C are routers. B and C
    implement PMTU and drop packets larger than MTU2 (for example because
    DF is set on all packets). TCP sessions are initiated between A and D.
    There is packet loss between A and D, causing frequent TCP
    retransmits.

    After the number of retransmits on a TCP session reaches tcp_retries1,
    tcp calls dst_negative_advice() prior to each retransmit. This results
    in route cache entries for the peer to be deleted in
    ipv4_negative_advice() if the Path MTU is set.

    If the outstanding data on an affected TCP session is larger than
    MTU2, packets sent from the endpoints will be dropped by B or C, and
    ICMP NEEDFRAG will be returned. A and D receive NEEDFRAG messages and
    update PMTU.

    Before the next retransmit, tcp will again call dst_negative_advice(),
    causing the route cache entry (with correct PMTU) to be deleted. The
    retransmitted packet will be larger than MTU2, causing it to be
    dropped again.

    This sequence repeats until the TCP session aborts or is terminated.

    Problem is fixed by removing redirected route cache entries in
    ipv4_negative_advice() only if the PMTU is expired.

    Signed-off-by: Guenter Roeck
    Signed-off-by: David S. Miller

    Guenter Roeck
     
  • David S. Miller
     
  • Allow fib_find_node() to be called either under rcu_read_lock()
    protection or with RTNL held.

    Signed-off-by: Paul E. McKenney
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Paul E. McKenney