20 Jun, 2011

1 commit


04 Jun, 2011

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (40 commits)
    tg3: Fix tg3_skb_error_unmap()
    net: tracepoint of net_dev_xmit sees freed skb and causes panic
    drivers/net/can/flexcan.c: add missing clk_put
    net: dm9000: Get the chip in a known good state before enabling interrupts
    drivers/net/davinci_emac.c: add missing clk_put
    af-packet: Add flag to distinguish VID 0 from no-vlan.
    caif: Fix race when conditionally taking rtnl lock
    usbnet/cdc_ncm: add missing .reset_resume hook
    vlan: fix typo in vlan_dev_hard_start_xmit()
    net/ipv4: Check for mistakenly passed in non-IPv4 address
    iwl4965: correctly validate temperature value
    bluetooth l2cap: fix locking in l2cap_global_chan_by_psm
    ath9k: fix two more bugs in tx power
    cfg80211: don't drop p2p probe responses
    Revert "net: fix section mismatches"
    drivers/net/usb/catc.c: Fix potential deadlock in catc_ctrl_run()
    sctp: stop pending timers and purge queues when peer restart asoc
    drivers/net: ks8842 Fix crash on received packet when in PIO mode.
    ip_options_compile: properly handle unaligned pointer
    iwlagn: fix incorrect PCI subsystem id for 6150 devices
    ...

    Linus Torvalds
     
  • …wireless-2.6 into for-davem

    John W. Linville
     

03 Jun, 2011

1 commit

  • Because there is a possibility that skb is kfree_skb()ed and zero cleared
    after ndo_start_xmit, we should not see the contents of skb like skb->len and
    skb->dev->name after ndo_start_xmit. But trace_net_dev_xmit does that
    and causes panic by NULL pointer dereference.
    This patch fixes trace_net_dev_xmit not to see the contents of skb directly.

    If you want to reproduce this panic,

    1. Get tracepoint of net_dev_xmit on
    2. Create 2 guests on KVM
    2. Make 2 guests use virtio_net
    4. Execute netperf from one to another for a long time as a network burden
    5. host will panic(It takes about 30 minutes)

    Signed-off-by: Koki Sanagi
    Signed-off-by: David S. Miller

    Koki Sanagi
     

02 Jun, 2011

6 commits

  • Currently, user-space cannot determine if a 0 tcp_vlan_tci
    means there is no VLAN tag or the VLAN ID was zero.

    Add flag to make this explicit. User-space can check for
    TP_STATUS_VLAN_VALID || tp_vlan_tci > 0, which will be backwards
    compatible. Older could would have just checked for tp_vlan_tci,
    so it will work no worse than before.

    Signed-off-by: Ben Greear
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Ben Greear
     
  • Take the RTNL lock unconditionally when calling dev_close.
    Taking the lock conditionally may cause race conditions.

    Signed-off-by: Sjur Brændeland
    Signed-off-by: David S. Miller

    sjur.brandeland@stericsson.com
     
  • commit 4af429d29b341bb1735f04c2fb960178ed5d52e7 (vlan: lockless
    transmit path) have a typo in vlan_dev_hard_start_xmit(), using
    u64_stats_update_begin() to end the stat update, it should be
    u64_stats_update_end().

    Signed-off-by: Wei Yongjun
    Reviewed-by: WANG Cong
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Wei Yongjun
     
  • Check against mistakenly passing in IPv6 addresses (which would result
    in an INADDR_ANY bind) or similar incompatible sockaddrs.

    Signed-off-by: Marcus Meissner
    Cc: Reinhard Max
    Signed-off-by: David S. Miller

    Marcus Meissner
     
  • read_lock() ... read_unlock_bh() is clearly bogus.
    This was broken by

    commit 23691d75cdc69c3b285211b4d77746aa20a17d18
    Author: Gustavo F. Padovan
    Date: Wed Apr 27 18:26:32 2011 -0300

    Bluetooth: Remove l2cap_sk_list

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • Commit 0a35d36 ("cfg80211: Use capability info to detect mesh beacons")
    assumed that probe response with both ESS and IBSS bits cleared
    means that the frame was sent by a mesh sta.

    However, these capabilities are also being used in the p2p_find phase,
    and the mesh-validation broke it.

    Rename the WLAN_CAPABILITY_IS_MBSS macro, and verify that mesh ies
    exist before assuming this frame was sent by a mesh sta.

    Signed-off-by: Eliad Peller
    Signed-off-by: John W. Linville

    Eliad Peller
     

01 Jun, 2011

2 commits

  • If the peer restart the asoc, we should not only fail any unsent/unacked
    data, but also stop the T3-rtx, SACK, T4-rto timers, and teardown ASCONF
    queues.

    Signed-off-by: Wei Yongjun
    Signed-off-by: David S. Miller

    Wei Yongjun
     
  • The current code takes an unaligned pointer and does htonl() on it to
    make it big-endian, then does a memcpy(). The problem is that the
    compiler decides that since the pointer is to a __be32, it is legal
    to optimize the copy into a processor word store. However, on an
    architecture that does not handled unaligned writes in kernel space,
    this produces an unaligned exception fault.

    The solution is to track the pointer as a "char *" (which removes a bunch
    of unpleasant casts in any case), and then just use put_unaligned_be32()
    to write the value to memory.

    Signed-off-by: Chris Metcalf
    Signed-off-by: David S. Miller

    Chris Metcalf
     

30 May, 2011

4 commits

  • * 'pnfs-submit' of git://git.open-osd.org/linux-open-osd: (32 commits)
    pnfs-obj: pg_test check for max_io_size
    NFSv4.1: define nfs_generic_pg_test
    NFSv4.1: use pnfs_generic_pg_test directly by layout driver
    NFSv4.1: change pg_test return type to bool
    NFSv4.1: unify pnfs_pageio_init functions
    pnfs-obj: objlayout_encode_layoutcommit implementation
    pnfs: encode_layoutcommit
    pnfs-obj: report errors and .encode_layoutreturn Implementation.
    pnfs: encode_layoutreturn
    pnfs: layoutret_on_setattr
    pnfs: layoutreturn
    pnfs-obj: osd raid engine read/write implementation
    pnfs: support for non-rpc layout drivers
    pnfs-obj: define per-inode private structure
    pnfs: alloc and free layout_hdr layoutdriver methods
    pnfs-obj: objio_osd device information retrieval and caching
    pnfs-obj: decode layout, alloc/free lseg
    pnfs-obj: pnfs_osd XDR client implementation
    pnfs-obj: pnfs_osd XDR definitions
    pnfs-obj: objlayoutdriver module skeleton
    ...

    Linus Torvalds
     
  • * 'for-2.6.40' of git://linux-nfs.org/~bfields/linux: (22 commits)
    nfsd: make local functions static
    NFSD: Remove unused variable from nfsd4_decode_bind_conn_to_session()
    NFSD: Check status from nfsd4_map_bcts_dir()
    NFSD: Remove setting unused variable in nfsd_vfs_read()
    nfsd41: error out on repeated RECLAIM_COMPLETE
    nfsd41: compare request's opcnt with session's maxops at nfsd4_sequence
    nfsd v4.1 lOCKT clientid field must be ignored
    nfsd41: add flag checking for create_session
    nfsd41: make sure nfs server process OPEN with EXCLUSIVE4_1 correctly
    nfsd4: fix wrongsec handling for PUTFH + op cases
    nfsd4: make fh_verify responsibility of nfsd_lookup_dentry caller
    nfsd4: introduce OPDESC helper
    nfsd4: allow fh_verify caller to skip pseudoflavor checks
    nfsd: distinguish functions of NFSD_MAY_* flags
    svcrpc: complete svsk processing on cb receive failure
    svcrpc: take advantage of tcp autotuning
    SUNRPC: Don't wait for full record to receive tcp data
    svcrpc: copy cb reply instead of pages
    svcrpc: close connection if client sends short packet
    svcrpc: note network-order types in svc_process_calldir
    ...

    Linus Torvalds
     
  • * 'nfs-for-2.6.40' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
    SUNRPC: Support for RPC over AF_LOCAL transports
    SUNRPC: Remove obsolete comment
    SUNRPC: Use AF_LOCAL for rpcbind upcalls
    SUNRPC: Clean up use of curly braces in switch cases
    NFS: Revert NFSROOT default mount options
    SUNRPC: Rename xs_encode_tcp_fragment_header()
    nfs,rcu: convert call_rcu(nfs_free_delegation_callback) to kfree_rcu()
    nfs41: Correct offset for LAYOUTCOMMIT
    NFS: nfs_update_inode: print current and new inode size in debug output
    NFSv4.1: Fix the handling of NFS4ERR_SEQ_MISORDERED errors
    NFSv4: Handle expired stateids when the lease is still valid
    SUNRPC: Deal with the lack of a SYN_SENT sk->sk_state_change callback...

    Linus Torvalds
     
  • Initialize xdr_stream and xdr_buf using an array of page pointers
    and length of buffer.

    Signed-off-by: Benny Halevy

    Benny Halevy
     

28 May, 2011

15 commits

  • TI-RPC introduces the capability of performing RPC over AF_LOCAL
    sockets. It uses this mainly for registering and unregistering
    local RPC services securely with the local rpcbind, but we could
    also conceivably use it as a generic upcall mechanism.

    This patch provides a client-side only implementation for the moment.
    We might also consider a server-side implementation to provide
    AF_LOCAL access to NLM (for statd downcalls, and such like).

    Autobinding is not supported on kernel AF_LOCAL transports at this
    time. Kernel ULPs must specify the pathname of the remote endpoint
    when an AF_LOCAL transport is created. rpcbind supports registering
    services available via AF_LOCAL, so the kernel could handle it with
    some adjustment to ->rpcbind and ->set_port. But we don't need this
    feature for doing upcalls via well-known named sockets.

    This has not been tested with ULPs that move a substantial amount of
    data. Thus, I can't attest to how robust the write_space and
    congestion management logic is.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Chuck Lever
     
  • Clean up. The documenting comment at the top of net/sunrpc/clnt.c is
    out of date. We adopted BSD's RTO estimation mechanism years ago.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Chuck Lever
     
  • As libtirpc does in user space, have our registration API try using an
    AF_LOCAL transport first when registering and unregistering.

    This means we don't chew up privileged ports, and our registration is
    bound to an "owner" (the effective uid of the process on the sending
    end of the transport). Only that "owner" may unregister the service.

    The kernel could probe rpcbind via an rpcbind query to determine
    whether rpcbind has an AF_LOCAL service. For simplicity, we use the
    same technique that libtirpc uses: simply fail over to network
    loopback if creating an AF_LOCAL transport to the well-known rpcbind
    service socket fails.

    This means we open-code the pathname of the rpcbind socket in the
    kernel. For now we have to do that anyway because the kernel's
    RPC over AF_LOCAL implementation does not support autobind. That may
    be undesirable in the long term.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Chuck Lever
     
  • Clean up. Preferred style is not to use curly braces around
    switch cases. I'm about to add another case that needs a third
    type cast.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Chuck Lever
     
  • Clean up: Use a more generic name for xs_encode_tcp_fragment_header();
    it's appropriate to use for all stream transport types. We're about
    to add new stream transport.

    Also, move it to a place where it is more easily shared amongst the
    various send_request methods. And finally, replace the "htonl" macro
    invocation with its modern equivalent.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Chuck Lever
     
  • The TCP connection state code depends on the state_change() callback
    being called when the SYN_SENT state is set. However the networking layer
    doesn't actually call us back in that case.

    Signed-off-by: Trond Myklebust
    Cc: stable@kernel.org

    Trond Myklebust
     
  • John W. Linville
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    net: Kill ratelimit.h dependency in linux/net.h
    net: Add linux/sysctl.h includes where needed.
    net: Kill ether_table[] declaration.
    inetpeer: fix race in unused_list manipulations
    atm: expose ATM device index in sysfs
    IPVS: bug in ip_vs_ftp, same list heaad used in all netns.
    bug.h: Move ratelimit warn interfaces to ratelimit.h
    bonding: cleanup module option descriptions
    net:8021q:vlan.c Fix pr_info to just give the vlan fullname and version.
    net: davinci_emac: fix dev_err use at probe
    can: convert to %pK for kptr_restrict support
    net: fix ETHTOOL_SFEATURES compatibility with old ethtool_ops.set_flags
    netfilter: Fix several warnings in compat_mtw_from_user().
    netfilter: ipset: fix ip_set_flush return code
    netfilter: ipset: remove unused variable from type_pf_tdel()
    netfilter: ipset: Use proper timeout value to jiffies conversion

    Linus Torvalds
     
  • Ingo Molnar noticed that we have this unnecessary ratelimit.h
    dependency in linux/net.h, which hid compilation problems from
    people doing builds only with CONFIG_NET enabled.

    Move this stuff out to a seperate net/net_ratelimit.h file and
    include that in the only two places where this thing is needed.

    Signed-off-by: David S. Miller
    Acked-by: Ingo Molnar

    David S. Miller
     
  • Several crashes in cleanup_once() were reported in recent kernels.

    Commit d6cc1d642de9 (inetpeer: various changes) added a race in
    unlink_from_unused().

    One way to avoid taking unused_peers.lock before doing the list_empty()
    test is to catch 0->1 refcnt transitions, using full barrier atomic
    operations variants (atomic_cmpxchg() and atomic_inc_return()) instead
    of previous atomic_inc() and atomic_add_unless() variants.

    We then call unlink_from_unused() only for the owner of the 0->1
    transition.

    Add a new atomic_add_unless_return() static helper

    With help from Arun Sharma.

    Refs: https://bugzilla.kernel.org/show_bug.cgi?id=32772

    Reported-by: Arun Sharma
    Reported-by: Maximilian Engelhardt
    Reported-by: Yann Dupont
    Reported-by: Denys Fedoryshchenko
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
    [S390] mm: add ZONE_DMA to 31-bit config again
    [S390] mm: add page fault retry handling
    [S390] mm: handle kernel caused page fault oom situations
    [S390] delay: implement ndelay
    [S390] topology,sched: fix cpu_coregroup_mask/cpu_book_mask definitions
    [S390] hwsampler: allow cpu hotplug
    [S390] uaccess: turn __access_ok() into a define
    [S390] irq: merge irq.c and s390_ext.c
    [S390] irq: fix service signal external interrupt handling
    [S390] pfault: always enable service signal interrupt

    Linus Torvalds
     
  • It's currently exposed only through /proc which, besides requiring
    screen-scraping, doesn't allow userspace to distinguish between two
    identical ATM adapters with different ATM indexes. The ATM device index
    is required when using PPPoATM on a system with multiple ATM adapters.

    Signed-off-by: Dan Williams
    Reviewed-by: Eric Dumazet
    Tested-by: David Woodhouse
    Cc: stable@kernel.org
    Signed-off-by: David S. Miller

    Dan Williams
     
  • David S. Miller
     
  • Commit 79f460ca49d8d5700756ab7071c951311c7f29cc add a duplicate
    linux/slab.h include to net/mac80211/scan.c - remove it.

    Signed-off-by: Jesper Juhl
    Acked-by: Luciano Coelho
    Signed-off-by: John W. Linville

    Jesper Juhl
     
  • local->ps_data wasn't cleared on disassociation, which
    (in some corner cases) caused reconnections to enter
    psm before association completed.

    Signed-off-by: Eliad Peller
    Signed-off-by: John W. Linville

    Eliad Peller
     

27 May, 2011

9 commits

  • When ip_vs was adapted to netns the ftp application was not adapted
    in a correct way.
    However this is a fix to avoid kernel errors. In the long term another solution
    might be chosen. I.e the ports that the ftp appl, uses should be per netns.

    Signed-off-by: Hans Schillstrom
    Acked-by: Julian Anastasov
    Signed-off-by: Pablo Neira Ayuso

    Hans Schillstrom
     
  • * 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
    gfs2: Drop __TIME__ usage
    isdn/diva: Drop __TIME__ usage
    atm: Drop __TIME__ usage
    dlm: Drop __TIME__ usage
    wan/pc300: Drop __TIME__ usage
    parport: Drop __TIME__ usage
    hdlcdrv: Drop __TIME__ usage
    baycom: Drop __TIME__ usage
    pmcraid: Drop __DATE__ usage
    edac: Drop __DATE__ usage
    rio: Drop __DATE__ usage
    scsi/wd33c93: Drop __TIME__ usage
    scsi/in2000: Drop __TIME__ usage
    aacraid: Drop __TIME__ usage
    media/cx231xx: Drop __TIME__ usage
    media/radio-maxiradio: Drop __TIME__ usage
    nozomi: Drop __TIME__ usage
    cyclades: Drop __TIME__ usage

    Linus Torvalds
     
  • Stop tx queues before updating rate control to ensure
    proper rate selection. Otherwise packets can be transmitted
    in 40 Mhz whereas hw is configured in HT20.

    Signed-off-by: Rajkumar Manoharan
    Signed-off-by: John W. Linville

    Rajkumar Manoharan
     
  • In both trigger_scan and sched_scan operations, we were checking for
    the SSID length before assigning the value correctly. Since the
    memory was just kzalloc'ed, the check was always failing and SSID with
    over 32 characters were allowed to go through.

    This was causing a buffer overflow when copying the actual SSID to the
    proper place.

    This bug has been there since 2.6.29-rc4.

    Cc: stable@kernel.org
    Signed-off-by: Luciano Coelho
    Signed-off-by: John W. Linville

    Luciano Coelho
     
  • …nel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

    * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    seqlock: Get rid of SEQLOCK_UNLOCKED

    * 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    irq: Remove smp_affinity_list when unregister irq proc

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
    RDMA/cma: Save PID of ID's owner
    RDMA/cma: Add support for netlink statistics export
    RDMA/cma: Pass QP type into rdma_create_id()
    RDMA: Update exported headers list
    RDMA/cma: Export enum cma_state in
    RDMA/nes: Add a check for strict_strtoul()
    RDMA/cxgb3: Don't post zero-byte read if endpoint is going away
    RDMA/cxgb4: Use completion objects for event blocking
    IB/srp: Fix integer -> pointer cast warnings
    IB: Add devnode methods to cm_class and umad_class
    IB/mad: Return EPROTONOSUPPORT when an RDMA device lacks the QP required
    IB/uverbs: Add devnode method to set path/mode
    RDMA/ucma: Add .nodename/.mode to tell userspace where to create device node
    RDMA: Add netlink infrastructure
    RDMA: Add error handling to ib_core_init()

    Linus Torvalds
     
  • As reported by Ingo Molnar, we still have configuration combinations
    where use of the WARN_RATELIMIT interfaces break the build because
    dependencies don't get met.

    Instead of going down the long road of trying to make it so that
    ratelimit.h can get included by kernel.h or asm-generic/bug.h,
    just move the interface into ratelimit.h and make users have
    to include that.

    Reported-by: Ingo Molnar
    Signed-off-by: David S. Miller
    Acked-by: Randy Dunlap

    David S. Miller
     
  • The below patch removes vlan_buggyright and vlan_copyright from vlan_proto_init,
    so that it prints out just the fullname of vlan and the version number.

    before:

    [ 30.438203] 802.1Q VLAN Support v1.8 Ben Greear
    [ 30.441542] All bugs added by David S. Miller

    after:

    [ 31.513910] 802.1Q VLAN Support v1.8

    Signed-off-by: Justin P. Mattock
    CC: Joe Perches
    CC: David S. Miller
    CC: Ben Greear
    Signed-off-by: David S. Miller

    Justin Mattock
     
  • As these pointers have been printed without using %p they were missed in the
    big network kptr_restrict conversion patch %p -> %pK from Dan Rosenberg.

    Signed-off-by: Oliver Hartkopp
    Signed-off-by: David S. Miller

    Oliver Hartkopp