07 Aug, 2011

1 commit

  • Computers have become a lot faster since we compromised on the
    partial MD4 hash which we use currently for performance reasons.

    MD5 is a much safer choice, and is inline with both RFC1948 and
    other ISS generators (OpenBSD, Solaris, etc.)

    Furthermore, only having 24-bits of the sequence number be truly
    unpredictable is a very serious limitation. So the periodic
    regeneration and 8-bit counter have been removed. We compute and
    use a full 32-bit sequence number.

    For ipv6, DCCP was found to use a 32-bit truncated initial sequence
    number (it needs 43-bits) and that is fixed here as well.

    Reported-by: Dan Kaminsky
    Tested-by: Willy Tarreau
    Signed-off-by: David S. Miller

    David S. Miller
     

05 Aug, 2011

4 commits

  • When support for binding to 'mapped INADDR_ANY (::ffff.0.0.0.0)' was added
    in 0f8d3c7ac3693d7b6c731bf2159273a59bf70e12 the rest of the code
    wasn't told so now it's possible to bind IPv6 datagram socket to
    ::ffff.0.0.0.0, connect it to another IPv4 address and it will all
    work except for getsockhame() which does not return the local address
    as expected.

    To give getsockname() something to work with check for 'mapped INADDR_ANY'
    when connecting and update the in-core source addresses appropriately.

    Signed-off-by: Max Matveev
    Signed-off-by: David S. Miller

    Max Matveev
     
  • The sendmmsg() introduced by commit 228e548e "net: Add sendmmsg socket system
    call" is capable of sending to multiple different destination addresses.

    SMACK is using destination's address for checking sendmsg() permission.
    However, security_socket_sendmsg() is called for only once even if multiple
    different destination addresses are passed to sendmmsg().

    Therefore, we need to call security_socket_sendmsg() for each destination
    address rather than only the first destination address.

    Since calling security_socket_sendmsg() every time when only single destination
    address was passed to sendmmsg() is a waste of time, omit calling
    security_socket_sendmsg() unless destination address of previous datagram and
    that of current datagram differs.

    Signed-off-by: Tetsuo Handa
    Acked-by: Anton Blanchard
    Cc: stable [3.0+]
    Signed-off-by: David S. Miller

    Tetsuo Handa
     
  • To limit the amount of time we can spend in sendmmsg, cap the
    number of elements to UIO_MAXIOV (currently 1024).

    For error handling an application using sendmmsg needs to retry at
    the first unsent message, so capping is simpler and requires less
    application logic than returning EINVAL.

    Signed-off-by: Anton Blanchard
    Cc: stable [3.0+]
    Signed-off-by: David S. Miller

    Anton Blanchard
     
  • sendmmsg uses a similar error return strategy as recvmmsg but it
    turns out to be a confusing way to communicate errors.

    The current code stores the error code away and returns it on the next
    sendmmsg call. This means a call with completely valid arguments could
    get an error from a previous call.

    Change things so we only return an error if no datagrams could be sent.
    If less than the requested number of messages were sent, the application
    must retry starting at the first failed one and if the problem is
    persistent the error will be returned.

    This matches the behaviour of other syscalls like read/write - it
    is not an error if less than the requested number of elements are sent.

    Signed-off-by: Anton Blanchard
    Cc: stable [3.0+]
    Signed-off-by: David S. Miller

    Anton Blanchard
     

04 Aug, 2011

1 commit


03 Aug, 2011

2 commits


02 Aug, 2011

4 commits


01 Aug, 2011

2 commits

  • commit 8efa88540635 (sch_sfq: avoid giving spurious NET_XMIT_CN signals)
    forgot to call qdisc_tree_decrease_qlen() to signal upper levels that a
    packet (from another flow) was dropped, leading to various problems.

    With help from Michal Soltys and Michal Pokrywka, who did a bisection.

    Bugzilla ref: https://bugzilla.kernel.org/show_bug.cgi?id=39372
    Debian ref: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=631945

    Reported-by: Lucas Bocchi
    Reported-and-bisected-by: Michal Pokrywka
    Signed-off-by: Eric Dumazet
    CC: Michal Soltys
    Acked-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Convert array index from the loop bound to the loop index.

    A simplified version of the semantic patch that fixes this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @@
    expression e1,e2,ar;
    @@

    for(e1 = 0; e1 < e2; e1++) { }
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: David S. Miller

    Julia Lawall
     

29 Jul, 2011

3 commits


28 Jul, 2011

6 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (32 commits)
    tg3: Remove 5719 jumbo frames and TSO blocks
    tg3: Break larger frags into 4k chunks for 5719
    tg3: Add tx BD budgeting code
    tg3: Consolidate code that calls tg3_tx_set_bd()
    tg3: Add partial fragment unmapping code
    tg3: Generalize tg3_skb_error_unmap()
    tg3: Remove short DMA check for 1st fragment
    tg3: Simplify tx bd assignments
    tg3: Reintroduce tg3_tx_ring_info
    ASIX: Use only 11 bits of header for data size
    ASIX: Simplify condition in rx_fixup()
    Fix cdc-phonet build
    bonding: reduce noise during init
    bonding: fix string comparison errors
    net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
    net: add IFF_SKB_TX_SHARED flag to priv_flags
    net: sock_sendmsg_nosec() is static
    forcedeth: fix vlans
    gianfar: fix bug caused by 87c288c6e9aa31720b72e2bc2d665e24e1653c3e
    gro: Only reset frag0 when skb can be pulled
    ...

    Linus Torvalds
     
  • After the last patch, We are left in a state in which only drivers calling
    ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
    hardware call ether_setup for their net_devices and don't hold any state in
    their skbs. There are a handful of drivers that violate this assumption of
    course, and need to be fixed up. This patch identifies those drivers, and marks
    them as not being able to support the safe transmission of skbs by clearning the
    IFF_TX_SKB_SHARING flag in priv_flags

    Signed-off-by: Neil Horman
    CC: Karsten Keil
    CC: "David S. Miller"
    CC: Jay Vosburgh
    CC: Andy Gospodarek
    CC: Patrick McHardy
    CC: Krzysztof Halasa
    CC: "John W. Linville"
    CC: Greg Kroah-Hartman
    CC: Marcel Holtmann
    CC: Johannes Berg
    Signed-off-by: David S. Miller

    Neil Horman
     
  • Pktgen attempts to transmit shared skbs to net devices, which can't be used by
    some drivers as they keep state information in skbs. This patch adds a flag
    marking drivers as being able to handle shared skbs in their tx path. Drivers
    are defaulted to being unable to do so, but calling ether_setup enables this
    flag, as 90% of the drivers calling ether_setup touch real hardware and can
    handle shared skbs. A subsequent patch will audit drivers to ensure that the
    flag is set properly

    Signed-off-by: Neil Horman
    Reported-by: Jiri Pirko
    CC: Robert Olsson
    CC: Eric Dumazet
    CC: Alexey Dobriyan
    CC: David S. Miller
    Signed-off-by: David S. Miller

    Neil Horman
     
  • Signed-off-by: Eric Dumazet
    CC: Anton Blanchard
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • David S. Miller
     
  • * 'nfs-for-3.1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (44 commits)
    NFSv4: Don't use the delegation->inode in nfs_mark_return_delegation()
    nfs: don't use d_move in nfs_async_rename_done
    RDMA: Increasing RPCRDMA_MAX_DATA_SEGS
    SUNRPC: Replace xprt->resend and xprt->sending with a priority queue
    SUNRPC: Allow caller of rpc_sleep_on() to select priority levels
    SUNRPC: Support dynamic slot allocation for TCP connections
    SUNRPC: Clean up the slot table allocation
    SUNRPC: Initalise the struct xprt upon allocation
    SUNRPC: Ensure that we grab the XPRT_LOCK before calling xprt_alloc_slot
    pnfs: simplify pnfs files module autoloading
    nfs: document nfsv4 sillyrename issues
    NFS: Convert nfs4_set_ds_client to EXPORT_SYMBOL_GPL
    SUNRPC: Convert the backchannel exports to EXPORT_SYMBOL_GPL
    SUNRPC: sunrpc should not explicitly depend on NFS config options
    NFS: Clean up - simplify the switch to read/write-through-MDS
    NFS: Move the pnfs write code into pnfs.c
    NFS: Move the pnfs read code into pnfs.c
    NFS: Allow the nfs_pageio_descriptor to signal that a re-coalesce is needed
    NFS: Use the nfs_pageio_descriptor->pg_bsize in the read/write request
    NFS: Cache rpc_ops in struct nfs_pageio_descriptor
    ...

    Linus Torvalds
     

27 Jul, 2011

8 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
    merge fchmod() and fchmodat() guts, kill ancient broken kludge
    xfs: fix misspelled S_IS...()
    xfs: get rid of open-coded S_ISREG(), etc.
    vfs: document locking requirements for d_move, __d_move and d_materialise_unique
    omfs: fix (mode & S_IFDIR) abuse
    btrfs: S_ISREG(mode) is not mode & S_IFREG...
    ima: fmode_t misspelled as mode_t...
    pci-label.c: size_t misspelled as mode_t
    jffs2: S_ISLNK(mode & S_IFMT) is pointless
    snd_msnd ->mode is fmode_t, not mode_t
    v9fs_iop_get_acl: get rid of unused variable
    vfs: dont chain pipe/anon/socket on superblock s_inodes list
    Documentation: Exporting: update description of d_splice_alias
    fs: add missing unlock in default_llseek()

    Linus Torvalds
     
  • This allows us to move duplicated code in
    (atomic_inc_not_zero() for now) to

    Signed-off-by: Arun Sharma
    Reviewed-by: Eric Dumazet
    Cc: Ingo Molnar
    Cc: David Miller
    Cc: Eric Dumazet
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Sharma
     
  • …wireless-next-2.6 into for-davem

    John W. Linville
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (23 commits)
    ceph: document unlocked d_parent accesses
    ceph: explicitly reference rename old_dentry parent dir in request
    ceph: document locking for ceph_set_dentry_offset
    ceph: avoid d_parent in ceph_dentry_hash; fix ceph_encode_fh() hashing bug
    ceph: protect d_parent access in ceph_d_revalidate
    ceph: protect access to d_parent
    ceph: handle racing calls to ceph_init_dentry
    ceph: set dir complete frag after adding capability
    rbd: set blk_queue request sizes to object size
    ceph: set up readahead size when rsize is not passed
    rbd: cancel watch request when releasing the device
    ceph: ignore lease mask
    ceph: fix ceph_lookup_open intent usage
    ceph: only link open operations to directory unsafe list if O_CREAT|O_TRUNC
    ceph: fix bad parent_inode calc in ceph_lookup_open
    ceph: avoid carrying Fw cap during write into page cache
    libceph: don't time out osd requests that haven't been received
    ceph: report f_bfree based on kb_avail rather than diffing.
    ceph: only queue capsnap if caps are dirty
    ceph: fix snap writeback when racing with writes
    ...

    Linus Torvalds
     
  • Just a typo fix changing regulaotry to regulatory.

    Signed-off-by: Mihai Moldovan
    CC: John W. Linville
    CC: Mohammed Shafi
    Signed-off-by: John W. Linville

    Mihai Moldovan
     
  • At the beginning of wiphy_update_regulatory() a check is performed
    whether the request is to be ignored. Then the request is sent to
    the driver nevertheless. This happens even if last_request points
    to NULL, leading to a crash in the driver:

    [] (lbs_set_11d_domain_info+0x28/0x1e4 [libertas]) from [] (wiphy_update_regulatory+0x4d0/0x4f4)
    [] (wiphy_update_regulatory+0x4d0/0x4f4) from [] (wiphy_register+0x354/0x420)
    [] (wiphy_register+0x354/0x420) from [] (lbs_cfg_register+0x80/0x164 [libertas])
    [] (lbs_cfg_register+0x80/0x164 [libertas]) from [] (lbs_start_card+0x20/0x88 [libertas])
    [] (lbs_start_card+0x20/0x88 [libertas]) from [] (if_sdio_probe+0x898/0x9c0 [libertas_sdio])

    Fix this by returning early. Also remove the out: label as it is
    not any longer needed.

    Signed-off-by: Sven Neumann
    Cc: linux-wireless@vger.kernel.org
    Cc: Johannes Berg
    Cc: Daniel Mack
    Cc: stable@kernel.org
    Signed-off-by: John W. Linville

    Sven Neumann
     
  • Keep track of when an outgoing message is ACKed (i.e., the server fully
    received it and, presumably, queued it for processing). Time out OSD
    requests only if it's been too long since they've been received.

    This prevents timeouts and connection thrashing when the OSDs are simply
    busy and are throttling the requests they read off the network.

    Reviewed-by: Yehuda Sadeh
    Signed-off-by: Sage Weil

    Sage Weil
     
  • Workloads using pipes and sockets hit inode_sb_list_lock contention.

    superblock s_inodes list is needed for quota, dirty, pagecache and
    fsnotify management. pipe/anon/socket fs are clearly not candidates for
    these.

    Signed-off-by: Eric Dumazet
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Eric Dumazet
     

26 Jul, 2011

9 commits

  • * 'for-3.1' of git://linux-nfs.org/~bfields/linux:
    nfsd: don't break lease on CLAIM_DELEGATE_CUR
    locks: rename lock-manager ops
    nfsd4: update nfsv4.1 implementation notes
    nfsd: turn on reply cache for NFSv4
    nfsd4: call nfsd4_release_compoundargs from pc_release
    nfsd41: Deny new lock before RECLAIM_COMPLETE done
    fs: locks: remove init_once
    nfsd41: check the size of request
    nfsd41: error out when client sets maxreq_sz or maxresp_sz too small
    nfsd4: fix file leak on open_downgrade
    nfsd4: remember to put RW access on stateid destruction
    NFSD: Added TEST_STATEID operation
    NFSD: added FREE_STATEID operation
    svcrpc: fix list-corrupting race on nfsd shutdown
    rpc: allow autoloading of gss mechanisms
    svcauth_unix.c: quiet sparse noise
    svcsock.c: include sunrpc.h to quiet sparse noise
    nfsd: Remove deprecated nfsctl system call and related code.
    NFSD: allow OP_DESTROY_CLIENTID to be only op in COMPOUND

    Fix up trivial conflicts in Documentation/feature-removal-schedule.txt

    Linus Torvalds
     
  • * Merge akpm patch series: (122 commits)
    drivers/connector/cn_proc.c: remove unused local
    Documentation/SubmitChecklist: add RCU debug config options
    reiserfs: use hweight_long()
    reiserfs: use proper little-endian bitops
    pnpacpi: register disabled resources
    drivers/rtc/rtc-tegra.c: properly initialize spinlock
    drivers/rtc/rtc-twl.c: check return value of twl_rtc_write_u8() in twl_rtc_set_time()
    drivers/rtc: add support for Qualcomm PMIC8xxx RTC
    drivers/rtc/rtc-s3c.c: support clock gating
    drivers/rtc/rtc-mpc5121.c: add support for RTC on MPC5200
    init: skip calibration delay if previously done
    misc/eeprom: add eeprom access driver for digsy_mtc board
    misc/eeprom: add driver for microwire 93xx46 EEPROMs
    checkpatch.pl: update $logFunctions
    checkpatch: make utf-8 test --strict
    checkpatch.pl: add ability to ignore various messages
    checkpatch: add a "prefer __aligned" check
    checkpatch: validate signature styles and To: and Cc: lines
    checkpatch: add __rcu as a sparse modifier
    checkpatch: suggest using min_t or max_t
    ...

    Did this as a merge because of (trivial) conflicts in
    - Documentation/feature-removal-schedule.txt
    - arch/xtensa/include/asm/uaccess.h
    that were just easier to fix up in the merge than in the patch series.

    Linus Torvalds
     
  • We presently define all kinds of notifiers in notifier.h. This is not
    necessary at all, since different subsystems use different notifiers, they
    are almost non-related with each other.

    This can also save much build time. Suppose I add a new netdevice event,
    really I don't have to recompile all the source, just network related.
    Without this patch, all the source will be recompiled.

    I move the notify events near to their subsystem notifier registers, so
    that they can be found more easily.

    This patch:

    It is not necessary to share the same notifier.h.

    Signed-off-by: WANG Cong
    Cc: David Miller
    Cc: "Rafael J. Wysocki"
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Amerigo Wang
     
  • No need to use int, its uses are boolean.
    May save a few bytes one day.

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     
  • From: Randy Dunlap

    Fix new kernel-doc warning in eth.c:

    Warning(net/ethernet/eth.c:237): No description found for parameter 'type'

    Signed-off-by: Randy Dunlap
    Signed-off-by: David S. Miller

    Randy Dunlap
     
  • If a device event generates gratuitous ARP messages, only primary
    address is used for sending. This patch iterates through the whole
    list. Tested with 2 IP addresses configuration on bonding interface.

    Signed-off-by: Zoltan Kiss
    Signed-off-by: David S. Miller

    Zoltan Kiss
     
  • Original commit 2bda8a0c8af... "Disable router anycast
    address for /127 prefixes" says:

    | No need for matching code in addrconf_leave_anycast() as it
    | will silently ignore any attempt to leave an unknown anycast
    | address.

    After analysis, because 1) we may add two or more prefixes on the
    same interface, or 2)user may have manually joined that anycast,
    we may hit chances to have anycast address which as if we had
    generated one by /127 prefix and we should not leave from subnet-
    router anycast address unconditionally.

    CC: Bjørn Mork
    CC: Brian Haley
    Signed-off-by: YOSHIFUJI Hideaki
    Signed-off-by: David S. Miller

    YOSHIFUJI Hideaki
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
    fs: Merge split strings
    treewide: fix potentially dangerous trailing ';' in #defined values/expressions
    uwb: Fix misspelling of neighbourhood in comment
    net, netfilter: Remove redundant goto in ebt_ulog_packet
    trivial: don't touch files that are removed in the staging tree
    lib/vsprintf: replace link to Draft by final RFC number
    doc: Kconfig: `to be' -> `be'
    doc: Kconfig: Typo: square -> squared
    doc: Konfig: Documentation/power/{pm => apm-acpi}.txt
    drivers/net: static should be at beginning of declaration
    drivers/media: static should be at beginning of declaration
    drivers/i2c: static should be at beginning of declaration
    XTENSA: static should be at beginning of declaration
    SH: static should be at beginning of declaration
    MIPS: static should be at beginning of declaration
    ARM: static should be at beginning of declaration
    rcu: treewide: Do not use rcu_read_lock_held when calling rcu_dereference_check
    Update my e-mail address
    PCIe ASPM: forcedly -> forcibly
    gma500: push through device driver tree
    ...

    Fix up trivial conflicts:
    - arch/arm/mach-ep93xx/dma-m2p.c (deleted)
    - drivers/gpio/gpio-ep93xx.c (renamed and context nearby)
    - drivers/net/r8169.c (just context changes)

    Linus Torvalds
     
  • Our performance team has noticed that increasing
    RPCRDMA_MAX_DATA_SEGS from 8 to 64 significantly
    increases throughput when using the RDMA transport.

    Signed-off-by: Steve Dickson
    Signed-off-by: Trond Myklebust

    Steve Dickson