30 Nov, 2010

1 commit

  • Its easy to eat all kernel memory and trigger NMI watchdog, using an
    exploit program that queues unix sockets on top of others.

    lkml ref : http://lkml.org/lkml/2010/11/25/8

    This mechanism is used in applications, one choice we have is to have a
    recursion limit.

    Other limits might be needed as well (if we queue other types of files),
    since the passfd mechanism is currently limited by socket receive queue
    sizes only.

    Add a recursion_level to unix socket, allowing up to 4 levels.

    Each time we send an unix socket through sendfd mechanism, we copy its
    recursion level (plus one) to receiver. This recursion level is cleared
    when socket receive queue is emptied.

    Reported-by: Марк Коренберг
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

19 Nov, 2010

2 commits


16 Nov, 2010

2 commits

  • WIPHY_FLAG_IBSS_RSN is BIT(7) as is WIPHY_FLAG_CONTROL_PORT_PROTOCOL. Change
    to BIT(8).

    Signed-off-by: Jussi Kivilinna
    Acked-by: Johannes Berg
    Signed-off-by: John W. Linville

    Jussi Kivilinna
     
  • When b43legacy is compiled on the arm platform, the following errors are seen:

    CC [M] drivers/net/wireless/b43legacy/xmit.o
    In file included from include/net/dst.h:11,
    from drivers/net/wireless/b43legacy/xmit.c:31:
    include/net/dst_ops.h:28: error: expected ':', ',', ';', '}' or '__attribute__'
    before '____cacheline_aligned_in_smp'
    include/net/dst_ops.h: In function 'dst_entries_get_fast':
    include/net/dst_ops.h:33: error: 'struct dst_ops' has no member named
    'pcpuc_entries'
    include/net/dst_ops.h: In function 'dst_entries_get_slow':
    include/net/dst_ops.h:41: error: 'struct dst_ops' has no member named
    'pcpuc_entries'
    include/net/dst_ops.h: In function 'dst_entries_add':
    include/net/dst_ops.h:49: error: 'struct dst_ops' has no member named
    'pcpuc_entries'
    include/net/dst_ops.h: In function 'dst_entries_init':
    include/net/dst_ops.h:55: error: 'struct dst_ops' has no member named
    'pcpuc_entries'
    include/net/dst_ops.h: In function 'dst_entries_destroy':
    include/net/dst_ops.h:60: error: 'struct dst_ops' has no member named
    'pcpuc_entries'
    make[4]: *** [drivers/net/wireless/b43legacy/xmit.o] Error 1
    make[3]: *** [drivers/net/wireless/b43legacy] Error 2
    make[2]: *** [drivers/net/wireless] Error 2
    make[1]: *** [drivers/net] Error 2
    make: *** [drivers] Error 2

    The cause is a missing include of , which is present for
    i386 and x86_64 architectures, but not for arm.

    Signed-off-by: Arnd Hannemann
    Signed-off-by: Larry Finger
    Cc: Stable
    Signed-off-by: John W. Linville

    Arnd Hannemann
     

13 Nov, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (66 commits)
    can-bcm: fix minor heap overflow
    gianfar: Do not call device_set_wakeup_enable() under a spinlock
    ipv6: Warn users if maximum number of routes is reached.
    docs: Add neigh/gc_thresh3 and route/max_size documentation.
    axnet_cs: fix resume problem for some Ax88790 chip
    ipv6: addrconf: don't remove address state on ifdown if the address is being kept
    tcp: Don't change unlocked socket state in tcp_v4_err().
    x25: Prevent crashing when parsing bad X.25 facilities
    cxgb4vf: add call to Firmware to reset VF State.
    cxgb4vf: Fail open if link_start() fails.
    cxgb4vf: flesh out PCI Device ID Table ...
    cxgb4vf: fix some errors in Gather List to skb conversion
    cxgb4vf: fix bug in Generic Receive Offload
    cxgb4vf: don't implement trivial (and incorrect) ndo_select_queue()
    ixgbe: Look inside vlan when determining offload protocol.
    bnx2x: Look inside vlan when determining checksum proto.
    vlan: Add function to retrieve EtherType from vlan packets.
    virtio-net: init link state correctly
    ucc_geth: Fix deadlock
    ucc_geth: Do not bring the whole IF down when TX failure.
    ...

    Linus Torvalds
     

11 Nov, 2010

1 commit

  • Robin Holt tried to boot a 16TB machine and found some limits were
    reached : sysctl_tcp_mem[2], sysctl_udp_mem[2]

    We can switch infrastructure to use long "instead" of "int", now
    atomic_long_t primitives are available for free.

    Signed-off-by: Eric Dumazet
    Reported-by: Robin Holt
    Reviewed-by: Robin Holt
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Eric Dumazet
     

08 Nov, 2010

1 commit

  • Presently the b43legacy build fails on an sh randconfig:

    In file included from include/net/dst.h:12,
    from drivers/net/wireless/b43legacy/xmit.c:32:
    include/net/dst_ops.h:28: error: expected ':', ',', ';', '}' or '__attribute__' before '____cacheline_aligned_in_smp'
    include/net/dst_ops.h: In function 'dst_entries_get_fast':
    include/net/dst_ops.h:33: error: 'struct dst_ops' has no member named 'pcpuc_entries'
    include/net/dst_ops.h: In function 'dst_entries_get_slow':
    include/net/dst_ops.h:41: error: 'struct dst_ops' has no member named 'pcpuc_entries'
    include/net/dst_ops.h: In function 'dst_entries_add':
    include/net/dst_ops.h:49: error: 'struct dst_ops' has no member named 'pcpuc_entries'
    include/net/dst_ops.h: In function 'dst_entries_init':
    include/net/dst_ops.h:55: error: 'struct dst_ops' has no member named 'pcpuc_entries'
    include/net/dst_ops.h: In function 'dst_entries_destroy':
    include/net/dst_ops.h:60: error: 'struct dst_ops' has no member named 'pcpuc_entries'
    make[5]: *** [drivers/net/wireless/b43legacy/xmit.o] Error 1
    make[5]: *** Waiting for unfinished jobs....

    Signed-off-by: Paul Mundt
    Signed-off-by: David S. Miller

    Paul Mundt
     

06 Nov, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (41 commits)
    inet_diag: Make sure we actually run the same bytecode we audited.
    netlink: Make nlmsg_find_attr take a const nlmsghdr*.
    fib: fib_result_assign() should not change fib refcounts
    netfilter: ip6_tables: fix information leak to userspace
    cls_cgroup: Fix crash on module unload
    memory corruption in X.25 facilities parsing
    net dst: fix percpu_counter list corruption and poison overwritten
    rds: Remove kfreed tcp conn from list
    rds: Lost locking in loop connection freeing
    de2104x: fix panic on load
    atl1 : fix panic on load
    netxen: remove unused firmware exports
    caif: Remove noisy printout when disconnecting caif socket
    caif: SPI-driver bugfix - incorrect padding.
    caif: Bugfix for socket priority, bindtodev and dbg channel.
    smsc911x: Set Ethernet EEPROM size to supported device's size
    ipv4: netfilter: ip_tables: fix information leak to userland
    ipv4: netfilter: arp_tables: fix information leak to userland
    cxgb4vf: remove call to stop TX queues at load time.
    cxgb4: remove call to stop TX queues at load time.
    ...

    Linus Torvalds
     

05 Nov, 2010

1 commit


04 Nov, 2010

2 commits


30 Oct, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (34 commits)
    b43: Fix warning at drivers/mmc/core/core.c:237 in mmc_wait_for_cmd
    mac80211: fix failure to check kmalloc return value in key_key_read
    libertas: Fix sd8686 firmware reload
    ath9k: Fix incorrect access of rate flags in RC
    netfilter: xt_socket: Make tproto signed in socket_mt6_v1().
    stmmac: enable/disable rx/tx in the core with a single write.
    net: atarilance - flags should be unsigned long
    netxen: fix kdump
    pktgen: Limit how much data we copy onto the stack.
    net: Limit socket I/O iovec total length to INT_MAX.
    USB: gadget: fix ethernet gadget crash in gether_setup
    fib: Fix fib zone and its hash leak on namespace stop
    cxgb3: Fix panic in free_tx_desc()
    cxgb3: fix crash due to manipulating queues before registration
    8390: Don't oops on starting dev queue
    dccp ccid-2: Stop polling
    dccp: Refine the wait-for-ccid mechanism
    dccp: Extend CCID packet dequeueing interface
    dccp: Return-value convention of hc_tx_send_packet()
    igbvf: fix panic on load
    ...

    Linus Torvalds
     

29 Oct, 2010

1 commit

  • When we stop a namespace we flush the table and free one, but the
    added fn_zone-s (and their hashes if grown) are leaked. Need to free.
    Tries releases all its stuff in the flushing code.

    Shame on us - this bug exists since the very first make-fib-per-net
    patches in 2.6.27 :(

    Signed-off-by: Pavel Emelyanov
    Signed-off-by: David S. Miller

    Pavel Emelyanov
     

28 Oct, 2010

12 commits

  • SYNOPSIS
    size[4] Tfsync tag[2] fid[4] datasync[4]

    size[4] Rfsync tag[2]

    DESCRIPTION

    The Tfsync transaction transfers ("flushes") all modified in-core data of
    file identified by fid to the disk device (or other permanent storage
    device) where that file resides.

    If datasync flag is specified data will be fleshed but does not flush
    modified metadata unless that metadata is needed in order to allow a
    subsequent data retrieval to be correctly handled.

    Signed-off-by: Venkateswararao Jujjuri
    Signed-off-by: Eric Van Hensbergen

    Venkateswararao Jujjuri (JV)
     
  • Synopsis

    size[4] TReadlink tag[2] fid[4]
    size[4] RReadlink tag[2] target[s]

    Description
    Readlink is used to return the contents of the symoblic link
    referred by fid. Contents of symboic link is returned as a
    response.

    target[s] - Contents of the symbolic link referred by fid.

    Signed-off-by: M. Mohan Kumar
    Reviewed-by: Aneesh Kumar K.V
    Signed-off-by: Venkateswararao Jujjuri
    Signed-off-by: Eric Van Hensbergen

    M. Mohan Kumar
     
  • Synopsis

    size[4] TGetlock tag[2] fid[4] getlock[n]
    size[4] RGetlock tag[2] getlock[n]

    Description

    TGetlock is used to test for the existence of byte range posix locks on a file
    identified by given fid. The reply contains getlock structure. If the lock could
    be placed it returns F_UNLCK in type field of getlock structure. Otherwise it
    returns the details of the conflicting locks in the getlock structure

    getlock structure:
    type[1] - Type of lock: F_RDLCK, F_WRLCK
    start[8] - Starting offset for lock
    length[8] - Number of bytes to check for the lock
    If length is 0, check for lock in all bytes starting at the location
    'start' through to the end of file
    pid[4] - PID of the process that wants to take lock/owns the task
    in case of reply
    client[4] - Client id of the system that owns the process which
    has the conflicting lock

    Signed-off-by: M. Mohan Kumar
    Signed-off-by: Aneesh Kumar K.V
    Signed-off-by: Venkateswararao Jujjuri
    Signed-off-by: Eric Van Hensbergen

    M. Mohan Kumar
     
  • Synopsis

    size[4] TLock tag[2] fid[4] flock[n]
    size[4] RLock tag[2] status[1]

    Description

    Tlock is used to acquire/release byte range posix locks on a file
    identified by given fid. The reply contains status of the lock request

    flock structure:
    type[1] - Type of lock: F_RDLCK, F_WRLCK, F_UNLCK
    flags[4] - Flags could be either of
    P9_LOCK_FLAGS_BLOCK - Blocked lock request, if there is a
    conflicting lock exists, wait for that lock to be released.
    P9_LOCK_FLAGS_RECLAIM - Reclaim lock request, used when client is
    trying to reclaim a lock after a server restrart (due to crash)
    start[8] - Starting offset for lock
    length[8] - Number of bytes to lock
    If length is 0, lock all bytes starting at the location 'start'
    through to the end of file
    pid[4] - PID of the process that wants to take lock
    client_id[4] - Unique client id

    status[1] - Status of the lock request, can be
    P9_LOCK_SUCCESS(0), P9_LOCK_BLOCKED(1), P9_LOCK_ERROR(2) or
    P9_LOCK_GRACE(3)
    P9_LOCK_SUCCESS - Request was successful
    P9_LOCK_BLOCKED - A conflicting lock is held by another process
    P9_LOCK_ERROR - Error while processing the lock request
    P9_LOCK_GRACE - Server is in grace period, it can't accept new lock
    requests in this period (except locks with
    P9_LOCK_FLAGS_RECLAIM flag set)

    Signed-off-by: M. Mohan Kumar
    Signed-off-by: Aneesh Kumar K.V
    Signed-off-by: Venkateswararao Jujjuri
    Signed-off-by: Eric Van Hensbergen

    M. Mohan Kumar
     
  • SYNOPSIS
    size[4] Tfsync tag[2] fid[4]

    size[4] Rfsync tag[2]

    DESCRIPTION

    The Tfsync transaction transfers ("flushes") all modified in-core data of
    file identified by fid to the disk device (or other permanent storage
    device) where that file resides.

    Signed-off-by: Venkateswararao Jujjuri
    Signed-off-by: Eric Van Hensbergen

    Venkateswararao Jujjuri (JV)
     
  • Signed-off-by: Arun R Bharadwaj
    Signed-off-by: Venkateswararao Jujjuri
    Signed-off-by: Eric Van Hensbergen

    Arun R Bharadwaj
     
  • Signed-off-by: Sjur Braendeland
    Signed-off-by: David S. Miller

    Amarnath Revanna
     
  • Adds __rcu annotations to inetpeer
    (struct inet_peer)->avl_left
    (struct inet_peer)->avl_right

    This is a tedious cleanup, but removes one smp_wmb() from link_to_pool()
    since we now use more self documenting rcu_assign_pointer().

    Note the use of RCU_INIT_POINTER() instead of rcu_assign_pointer() in
    all cases we dont need a memory barrier.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Adds __rcu annotation to (struct fib_rule)->ctarget

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Add __rcu annotations to :
    (struct ip_tunnel)->prl
    (struct ip_tunnel_prl_entry)->next
    (struct xfrm_tunnel)->next
    struct xfrm_tunnel *tunnel4_handlers
    struct xfrm_tunnel *tunnel64_handlers

    And use appropriate rcu primitives to reduce sparse warnings if
    CONFIG_SPARSE_RCU_POINTER=y

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Add __rcu annotations to :
    struct net_protocol *inet_protos
    struct net_protocol *inet6_protos

    And use appropriate casts to reduce sparse warnings if
    CONFIG_SPARSE_RCU_POINTER=y

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Add __rcu annotations to :
    (struct dst_entry)->rt_next
    (struct rt_hash_bucket)->chain

    And use appropriate rcu primitives to reduce sparse warnings if
    CONFIG_SPARSE_RCU_POINTER=y

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

26 Oct, 2010

5 commits


24 Oct, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1699 commits)
    bnx2/bnx2x: Unsupported Ethtool operations should return -EINVAL.
    vlan: Calling vlan_hwaccel_do_receive() is always valid.
    tproxy: use the interface primary IP address as a default value for --on-ip
    tproxy: added IPv6 support to the socket match
    cxgb3: function namespace cleanup
    tproxy: added IPv6 support to the TPROXY target
    tproxy: added IPv6 socket lookup function to nf_tproxy_core
    be2net: Changes to use only priority codes allowed by f/w
    tproxy: allow non-local binds of IPv6 sockets if IP_TRANSPARENT is enabled
    tproxy: added tproxy sockopt interface in the IPV6 layer
    tproxy: added udp6_lib_lookup function
    tproxy: added const specifiers to udp lookup functions
    tproxy: split off ipv6 defragmentation to a separate module
    l2tp: small cleanup
    nf_nat: restrict ICMP translation for embedded header
    can: mcp251x: fix generation of error frames
    can: mcp251x: fix endless loop in interrupt handler if CANINTF_MERRF is set
    can-raw: add msg_flags to distinguish local traffic
    9p: client code cleanup
    rds: make local functions/variables static
    ...

    Fix up conflicts in net/core/dev.c, drivers/net/pcmcia/smc91c92_cs.c and
    drivers/net/wireless/ath/ath9k/debug.c as per David

    Linus Torvalds
     

22 Oct, 2010

1 commit

  • * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (52 commits)
    sched: fix RCU lockdep splat from task_group()
    rcu: using ACCESS_ONCE() to observe the jiffies_stall/rnp->qsmask value
    sched: suppress RCU lockdep splat in task_fork_fair
    net: suppress RCU lockdep false positive in sock_update_classid
    rcu: move check from rcu_dereference_bh to rcu_read_lock_bh_held
    rcu: Add advice to PROVE_RCU_REPEATEDLY kernel config parameter
    rcu: Add tracing data to support queueing models
    rcu: fix sparse errors in rcutorture.c
    rcu: only one evaluation of arg in rcu_dereference_check() unless sparse
    kernel: Remove undead ifdef CONFIG_DEBUG_LOCK_ALLOC
    rcu: fix _oddness handling of verbose stall warnings
    rcu: performance fixes to TINY_PREEMPT_RCU callback checking
    rcu: upgrade stallwarn.txt documentation for CPU-bound RT processes
    vhost: add __rcu annotations
    rcu: add comment stating that list_empty() applies to RCU-protected lists
    rcu: apply TINY_PREEMPT_RCU read-side speedup to TREE_PREEMPT_RCU
    rcu: combine duplicate code, courtesy of CONFIG_PREEMPT_RCU
    rcu: Upgrade srcu_read_lock() docbook about SRCU grace periods
    rcu: document ways of stalling updates in low-memory situations
    rcu: repair code-duplication FIXMEs
    ...

    Linus Torvalds
     

21 Oct, 2010

7 commits