13 Apr, 2012

1 commit

  • Pull networking fixes from David Miller:

    1) Fix bluetooth userland regression reported by Keith Packard, from
    Gustavo Padovan.

    2) Revert ath9k PS idle change, from Sujith Manoharan.

    3) Correct default TCP memory limits (again), from Eric Dumazet.

    4) Fix tcp_rcv_rtt_update() accidental use of unscaled RTT, from Neal
    Cardwell.

    5) We made a facility for layers like wireless to say how much tailroom
    they need in the SKB for link layer stuff such as wireless
    encryption etc., but TCP works hard to fill every SKB out to the end
    defeating this specification.

    This leads to every TCP packet getting reallocated by the wireless
    code in order to have the right amount of tailroom available.

    Fix TCP to only fill SKBs out to the real amount of data area it
    asked for during the allocation, this way it won't eat into the
    slack added for the device's tailroom needs.

    Reported by Marc Merlin and fixed by Eric Dumazet.

    6) Leaks, endian bugs, and new device IDs in bluetooth from Santosh
    Nayak, João Paulo Rechi Vita, Cho, Yu-Chen, Andrei Emeltchenko,
    AceLan Kao, and Andrei Emeltchenko.

    7) OOPS on tty_close fix in bluetooth's hci_ldisc from Johan Hovold.

    8) netfilter erroneously scales TCP window twice, fix from Changli Gao.

    9) Memleak fix in wext-core from Julia Lawall.

    10) Consistently handle invalid TCP packets in ipv4 vs. ipv6 conntrack,
    from Jozsef Kadlecsik.

    11) Validate IP header length properly in netfilter conntrack's
    ipv4_get_l4proto().

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (39 commits)
    NFC: Fix the LLCP Tx fragmentation loop
    rtlwifi: Add missing DMA buffer unmapping for PCI drivers
    rtlwifi: Preallocate USB read buffers and eliminate kalloc in read routine
    tcp: avoid order-1 allocations on wifi and tx path
    net: allow pskb_expand_head() to get maximum tailroom
    bridge: Do not send queries on multicast group leaves
    MAINTAINERS: Mark NATSEMI driver as orphan'd.
    tcp: fix tcp_rcv_rtt_update() use of an unscaled RTT sample
    tcp: restore correct limit
    Revert "ath9k: fix going to full-sleep on PS idle"
    rt2x00: Fix rfkill_polling register function.
    bcma: fix build error on MIPS; implicit pcibios_enable_device
    netfilter: nf_conntrack: fix incorrect logic in nf_conntrack_init_net
    netfilter: nf_ct_ipv4: packets with wrong ihl are invalid
    netfilter: nf_ct_ipv4: handle invalid IPv4 and IPv6 packets consistently
    net/wireless/wext-core.c: add missing kfree
    rtlwifi: Fix oops on rate-control failure
    mac80211: Convert WARN_ON to WARN_ON_ONCE
    rtlwifi: rtl8192de: Fix firmware initialization
    nl80211: ensure interface is up in various APIs
    ...

    Linus Torvalds
     

12 Apr, 2012

2 commits


11 Apr, 2012

7 commits

  • Marc Merlin reported many order-1 allocations failures in TX path on its
    wireless setup, that dont make any sense with MTU=1500 network, and non
    SG capable hardware.

    After investigation, it turns out TCP uses sk_stream_alloc_skb() and
    used as a convention skb_tailroom(skb) to know how many bytes of data
    payload could be put in this skb (for non SG capable devices)

    Note : these skb used kmalloc-4096 (MTU=1500 + MAX_HEADER +
    sizeof(struct skb_shared_info) being above 2048)

    Later, mac80211 layer need to add some bytes at the tail of skb
    (IEEE80211_ENCRYPT_TAILROOM = 18 bytes) and since no more tailroom is
    available has to call pskb_expand_head() and request order-1
    allocations.

    This patch changes sk_stream_alloc_skb() so that only
    sk->sk_prot->max_header bytes of headroom are reserved, and use a new
    skb field, avail_size to hold the data payload limit.

    This way, order-0 allocations done by TCP stack can leave more than 2 KB
    of tailroom and no more allocation is performed in mac80211 layer (or
    any layer needing some tailroom)

    avail_size is unioned with mark/dropcount, since mark will be set later
    in IP stack for output packets. Therefore, skb size is unchanged.

    Reported-by: Marc MERLIN
    Tested-by: Marc MERLIN
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Marc Merlin reported many order-1 allocations failures in TX path on its
    wireless setup, that dont make any sense with MTU=1500 network, and non
    SG capable hardware.

    Turns out part of the problem comes from pskb_expand_head() not using
    ksize() to get exact head size given by kmalloc(). Doing the same thing
    than __alloc_skb() allows more tailroom in skb and can prevent future
    reallocations.

    As a bonus, struct skb_shared_info becomes cache line aligned.

    Reported-by: Marc MERLIN
    Tested-by: Marc MERLIN
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • As it stands the bridge IGMP snooping system will respond to
    group leave messages with queries for remaining membership.
    This is both unnecessary and undesirable. First of all any
    multicast routers present should be doing this rather than us.
    What's more the queries that we send may end up upsetting other
    multicast snooping swithces in the system that are buggy.

    In fact, we can simply remove the code that send these queries
    because the existing membership expiry mechanism doesn't rely
    on them anyway.

    So this patch simply removes all code associated with group
    queries in response to group leave messages.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • Pull dmaengine fixes from Dan Williams:

    1/ regression fix for Xen as it now trips over a broken assumption
    about the dma address size on 32-bit builds

    2/ new quirk for netdma to ignore dma channels that cannot meet
    netdma alignment requirements

    3/ fixes for two long standing issues in ioatdma (ring size overflow)
    and iop-adma (potential stack corruption)

    * tag 'dmaengine-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/dmaengine:
    netdma: adding alignment check for NETDMA ops
    ioatdma: DMA copy alignment needed to address IOAT DMA silicon errata
    ioat: ring size variables need to be 32bit to avoid overflow
    iop-adma: Corrected array overflow in RAID6 Xscale(R) test.
    ioat: fix size of 'completion' for Xen

    Linus Torvalds
     
  • Fix a code path in tcp_rcv_rtt_update() that was comparing scaled and
    unscaled RTT samples.

    The intent in the code was to only use the 'm' measurement if it was a
    new minimum. However, since 'm' had not yet been shifted left 3 bits
    but 'new_sample' had, this comparison would nearly always succeed,
    leading us to erroneously set our receive-side RTT estimate to the 'm'
    sample when that sample could be nearly 8x too high to use.

    The overall effect is to often cause the receive-side RTT estimate to
    be significantly too large (up to 40% too large for brief periods in
    my tests).

    Signed-off-by: Neal Cardwell
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Neal Cardwell
     
  • Commit c43b874d5d714f (tcp: properly initialize tcp memory limits) tried
    to fix a regression added in commits 4acb4190 & 3dc43e3,
    but still get it wrong.

    Result is machines with low amount of memory have too small tcp_rmem[2]
    value and slow tcp receives : Per socket limit being 1/1024 of memory
    instead of 1/128 in old kernels, so rcv window is capped to small
    values.

    Fix this to match comment and previous behavior.

    Signed-off-by: Eric Dumazet
    Cc: Jason Wang
    Cc: Glauber Costa
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • David S. Miller
     

10 Apr, 2012

7 commits


09 Apr, 2012

2 commits


07 Apr, 2012

1 commit

  • Pull networking updates from David Miller:

    1) Fix inaccuracies in network driver interface documentation, from Ben
    Hutchings.

    2) Fix handling of negative offsets in BPF JITs, from Jan Seiffert.

    3) Compile warning, locking, and refcounting fixes in netfilter's
    xt_CT, from Pablo Neira Ayuso.

    4) phonet sendmsg needs to validate user length just like any other
    datagram protocol, fix from Sasha Levin.

    5) Ipv6 multicast code uses wrong loop index, from RongQing Li.

    6) Link handling and firmware fixes in bnx2x driver from Yaniv Rosner
    and Yuval Mintz.

    7) mlx4 erroneously allocates 4 pages at a time, regardless of page
    size, fix from Thadeu Lima de Souza Cascardo.

    8) SCTP socket option wasn't extended in a backwards compatible way,
    fix from Thomas Graf.

    9) Add missing address change event emissions to bonding, from Shlomo
    Pongratz.

    10) /proc/net/dev regressed because it uses a private offset to track
    where we are in the hash table, but this doesn't track the offset
    pullback that the seq_file code does resulting in some entries being
    missed in large dumps.

    Fix from Eric Dumazet.

    11) do_tcp_sendpage() unloads the send queue way too fast, because it
    invokes tcp_push() when it shouldn't. Let the natural sequence
    generated by the splice paths, and the assosciated MSG_MORE
    settings, guide the tcp_push() calls.

    Otherwise what goes out of TCP is spaghetti and doesn't batch
    effectively into GSO/TSO clusters.

    From Eric Dumazet.

    12) Once we put a SKB into either the netlink receiver's queue or a
    socket error queue, it can be consumed and freed up, therefore we
    cannot touch it after queueing it like that.

    Fixes from Eric Dumazet.

    13) PPP has this annoying behavior in that for every transmit call it
    immediately stops the TX queue, then calls down into the next layer
    to transmit the PPP frame.

    But if that next layer can take it immediately, it just un-stops the
    TX queue right before returning from the transmit method.

    Besides being useless work, it makes several facilities unusable, in
    particular things like the equalizers. Well behaved devices should
    only stop the TX queue when they really are full, and in PPP's case
    when it gets backlogged to the downstream device.

    David Woodhouse therefore fixed PPP to not stop the TX queue until
    it's downstream can't take data any more.

    14) IFF_UNICAST_FLT got accidently lost in some recent stmmac driver
    changes, re-add. From Marc Kleine-Budde.

    15) Fix link flaps in ixgbe, from Eric W. Multanen.

    16) Descriptor writeback fixes in e1000e from Matthew Vick.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (47 commits)
    net: fix a race in sock_queue_err_skb()
    netlink: fix races after skb queueing
    doc, net: Update ndo_start_xmit return type and values
    doc, net: Remove instruction to set net_device::trans_start
    doc, net: Update netdev operation names
    doc, net: Update documentation of synchronisation for TX multiqueue
    doc, net: Remove obsolete reference to dev->poll
    ethtool: Remove exception to the requirement of holding RTNL lock
    MAINTAINERS: update for Marvell Ethernet drivers
    bonding: properly unset current_arp_slave on slave link up
    phonet: Check input from user before allocating
    tcp: tcp_sendpages() should call tcp_push() once
    ipv6: fix array index in ip6_mc_add_src()
    mlx4: allocate just enough pages instead of always 4 pages
    stmmac: re-add IFF_UNICAST_FLT for dwmac1000
    bnx2x: Clear MDC/MDIO warning message
    bnx2x: Fix BCM57711+BCM84823 link issue
    bnx2x: Clear BCM84833 LED after fan failure
    bnx2x: Fix BCM84833 PHY FW version presentation
    bnx2x: Fix link issue for BCM8727 boards.
    ...

    Linus Torvalds
     

06 Apr, 2012

7 commits

  • As soon as an skb is queued into socket error queue, another thread
    can consume it, so we are not allowed to reference skb anymore, or risk
    use after free.

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

    Eric Dumazet
     
  • As soon as an skb is queued into socket receive_queue, another thread
    can consume it, so we are not allowed to reference skb anymore, or risk
    use after free.

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

    Eric Dumazet
     
  • A phonet packet is limited to USHRT_MAX bytes, this is never checked during
    tx which means that the user can specify any size he wishes, and the kernel
    will attempt to allocate that size.

    In the good case, it'll lead to the following warning, but it may also cause
    the kernel to kick in the OOM and kill a random task on the server.

    [ 8921.744094] WARNING: at mm/page_alloc.c:2255 __alloc_pages_slowpath+0x65/0x730()
    [ 8921.749770] Pid: 5081, comm: trinity Tainted: G W 3.4.0-rc1-next-20120402-sasha #46
    [ 8921.756672] Call Trace:
    [ 8921.758185] [] warn_slowpath_common+0x87/0xb0
    [ 8921.762868] [] warn_slowpath_null+0x15/0x20
    [ 8921.765399] [] __alloc_pages_slowpath+0x65/0x730
    [ 8921.769226] [] ? zone_watermark_ok+0x1a/0x20
    [ 8921.771686] [] ? get_page_from_freelist+0x625/0x660
    [ 8921.773919] [] __alloc_pages_nodemask+0x1f8/0x240
    [ 8921.776248] [] kmalloc_large_node+0x70/0xc0
    [ 8921.778294] [] __kmalloc_node_track_caller+0x34/0x1c0
    [ 8921.780847] [] ? sock_alloc_send_pskb+0xbc/0x260
    [ 8921.783179] [] __alloc_skb+0x75/0x170
    [ 8921.784971] [] sock_alloc_send_pskb+0xbc/0x260
    [ 8921.787111] [] ? release_sock+0x7e/0x90
    [ 8921.788973] [] sock_alloc_send_skb+0x10/0x20
    [ 8921.791052] [] pep_sendmsg+0x60/0x380
    [ 8921.792931] [] ? pn_socket_bind+0x156/0x180
    [ 8921.794917] [] ? pn_socket_autobind+0x3f/0x90
    [ 8921.797053] [] pn_socket_sendmsg+0x4f/0x70
    [ 8921.798992] [] sock_aio_write+0x187/0x1b0
    [ 8921.801395] [] ? sub_preempt_count+0xae/0xf0
    [ 8921.803501] [] ? __lock_acquire+0x42c/0x4b0
    [ 8921.805505] [] ? __sock_recv_ts_and_drops+0x140/0x140
    [ 8921.807860] [] do_sync_readv_writev+0xbc/0x110
    [ 8921.809986] [] ? might_fault+0x97/0xa0
    [ 8921.811998] [] ? security_file_permission+0x1e/0x90
    [ 8921.814595] [] do_readv_writev+0xe2/0x1e0
    [ 8921.816702] [] ? do_setitimer+0x1ac/0x200
    [ 8921.818819] [] ? get_parent_ip+0x11/0x50
    [ 8921.820863] [] ? sub_preempt_count+0xae/0xf0
    [ 8921.823318] [] vfs_writev+0x46/0x60
    [ 8921.825219] [] sys_writev+0x4f/0xb0
    [ 8921.827127] [] system_call_fastpath+0x16/0x1b
    [ 8921.829384] ---[ end trace dffe390f30db9eb7 ]---

    Signed-off-by: Sasha Levin
    Acked-by: Rémi Denis-Courmont
    Signed-off-by: David S. Miller

    Sasha Levin
     
  • commit 2f533844242 (tcp: allow splice() to build full TSO packets) added
    a regression for splice() calls using SPLICE_F_MORE.

    We need to call tcp_flush() at the end of the last page processed in
    tcp_sendpages(), or else transmits can be deferred and future sends
    stall.

    Add a new internal flag, MSG_SENDPAGE_NOTLAST, acting like MSG_MORE, but
    with different semantic.

    For all sendpage() providers, its a transparent change. Only
    sock_sendpage() and tcp_sendpages() can differentiate the two different
    flags provided by pipe_to_sendpage()

    Reported-by: Tom Herbert
    Cc: Nandita Dukkipati
    Cc: Neal Cardwell
    Cc: Tom Herbert
    Cc: Yuchung Cheng
    Cc: H.K. Jerry Chu
    Cc: Maciej Żenczykowski
    Cc: Mahesh Bandewar
    Cc: Ilpo Järvinen
    Signed-off-by: Eric Dumazet com>
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Merge batch of fixes from Andrew Morton:
    "The simple_open() cleanup was held back while I wanted for laggards to
    merge things.

    I still need to send a few checkpoint/restore patches. I've been
    wobbly about merging them because I'm wobbly about the overall
    prospects for success of the project. But after speaking with Pavel
    at the LSF conference, it sounds like they're further toward
    completion than I feared - apparently davem is at the "has stopped
    complaining" stage regarding the net changes. So I need to go back
    and re-review those patchs and their (lengthy) discussion."

    * emailed from Andrew Morton : (16 patches)
    memcg swap: use mem_cgroup_uncharge_swap fix
    backlight: add driver for DA9052/53 PMIC v1
    C6X: use set_current_blocked() and block_sigmask()
    MAINTAINERS: add entry for sparse checker
    MAINTAINERS: fix REMOTEPROC F: typo
    alpha: use set_current_blocked() and block_sigmask()
    simple_open: automatically convert to simple_open()
    scripts/coccinelle/api/simple_open.cocci: semantic patch for simple_open()
    libfs: add simple_open()
    hugetlbfs: remove unregister_filesystem() when initializing module
    drivers/rtc/rtc-88pm860x.c: fix rtc irq enable callback
    fs/xattr.c:setxattr(): improve handling of allocation failures
    fs/xattr.c:listxattr(): fall back to vmalloc() if kmalloc() failed
    fs/xattr.c: suppress page allocation failure warnings from sys_listxattr()
    sysrq: use SEND_SIG_FORCED instead of force_sig()
    proc: fix mount -t proc -o AAA

    Linus Torvalds
     
  • This is the fallout from adding memcpy alignment workaround for certain
    IOATDMA hardware. NetDMA will only use DMA engine that can handle byte align
    ops.

    Acked-by: David S. Miller
    Signed-off-by: Dave Jiang
    Signed-off-by: Dan Williams

    Dave Jiang
     
  • Many users of debugfs copy the implementation of default_open() when
    they want to support a custom read/write function op. This leads to a
    proliferation of the default_open() implementation across the entire
    tree.

    Now that the common implementation has been consolidated into libfs we
    can replace all the users of this function with simple_open().

    This replacement was done with the following semantic patch:

    @ open @
    identifier open_f != simple_open;
    identifier i, f;
    @@
    -int open_f(struct inode *i, struct file *f)
    -{
    (
    -if (i->i_private)
    -f->private_data = i->i_private;
    |
    -f->private_data = i->i_private;
    )
    -return 0;
    -}

    @ has_open depends on open @
    identifier fops;
    identifier open.open_f;
    @@
    struct file_operations fops = {
    ...
    -.open = open_f,
    +.open = simple_open,
    ...
    };

    [akpm@linux-foundation.org: checkpatch fixes]
    Signed-off-by: Stephen Boyd
    Cc: Greg Kroah-Hartman
    Cc: Al Viro
    Cc: Julia Lawall
    Acked-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Boyd
     

05 Apr, 2012

2 commits

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

    And remove the void type conversion to ip6_mc_del1_src() return
    code, seem it is unnecessary, since ip6_mc_del1_src() does not
    use __must_check similar attribute, no compiler will report the
    warning when it is removed.

    v2: enrich the commit header

    Signed-off-by: RongQing.Li
    Signed-off-by: David S. Miller

    RongQing.Li
     
  • getsockopt(..., SCTP_EVENTS, ...) performs a length check and returns
    an error if the user provides less bytes than the size of struct
    sctp_event_subscribe.

    Struct sctp_event_subscribe needs to be extended by an u8 for every
    new event or notification type that is added.

    This obviously makes getsockopt fail for binaries that are compiled
    against an older versions of which do not contain
    all event types.

    This patch changes getsockopt behaviour to no longer return an error
    if not enough bytes are being provided by the user. Instead, it
    returns as much of sctp_event_subscribe as fits into the provided buffer.

    This leads to the new behavior that users see what they have been aware
    of at compile time.

    The setsockopt(..., SCTP_EVENTS, ...) API is already behaving like this.

    Signed-off-by: Thomas Graf
    Acked-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Thomas Graf
     

04 Apr, 2012

7 commits

  • We have to decrement the conntrack counter if we fail to access the
    zone extension.

    Reported-by: Tetsuo Handa
    Signed-off-by: Pablo Neira Ayuso
    Signed-off-by: David S. Miller

    Pablo Neira Ayuso
     
  • The error path misses putting the timeout object. This patch adds
    new function xt_ct_tg_timeout_put() to put the timeout object.

    Reported-by: Tetsuo Handa
    Signed-off-by: Pablo Neira Ayuso
    Signed-off-by: David S. Miller

    Pablo Neira Ayuso
     
  • Reported-by: Tetsuo Handa
    Signed-off-by: Pablo Neira Ayuso
    Signed-off-by: David S. Miller

    Pablo Neira Ayuso
     
  • David S. Miller
     
  • The function is renamed to make it a little more clear what it does.
    It is not added to any .h because it is not for general consumption, only for
    bpf internal use (and so by the jits).

    Signed-of-by: Jan Seiffert
    Acked-by: Eric Dumazet

    Signed-off-by: David S. Miller

    Jan Seiffert
     
  • vmsplice()/splice(pipe, socket) call do_tcp_sendpages() one page at a
    time, adding at most 4096 bytes to an skb. (assuming PAGE_SIZE=4096)

    The call to tcp_push() at the end of do_tcp_sendpages() forces an
    immediate xmit when pipe is not already filled, and tso_fragment() try
    to split these skb to MSS multiples.

    4096 bytes are usually split in a skb with 2 MSS, and a remaining
    sub-mss skb (assuming MTU=1500)

    This makes slow start suboptimal because many small frames are sent to
    qdisc/driver layers instead of big ones (constrained by cwnd and packets
    in flight of course)

    In fact, applications using sendmsg() (adding an additional memory copy)
    instead of vmsplice()/splice()/sendfile() are a bit faster because of
    this anomaly, especially if serving small files in environments with
    large initial [c]wnd.

    Call tcp_push() only if MSG_MORE is not set in the flags parameter.

    This bit is automatically provided by splice() internals but for the
    last page, or on all pages if user specified SPLICE_F_MORE splice()
    flag.

    In some workloads, this can reduce number of sent logical packets by an
    order of magnitude, making zero-copy TCP actually faster than
    one-copy :)

    Reported-by: Tom Herbert
    Cc: Nandita Dukkipati
    Cc: Neal Cardwell
    Cc: Tom Herbert
    Cc: Yuchung Cheng
    Cc: H.K. Jerry Chu
    Cc: Maciej Żenczykowski
    Cc: Mahesh Bandewar
    Cc: Ilpo Järvinen
    Signed-off-by: Eric Dumazet com>
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Commit f04565ddf52 (dev: use name hash for dev_seq_ops) added a second
    regression, as some devices are missing from /proc/net/dev if many
    devices are defined.

    When seq_file buffer is filled, the last ->next/show() method is
    canceled (pos value is reverted to value prior ->next() call)

    Problem is after above commit, we dont restart the lookup at right
    position in ->start() method.

    Fix this by removing the internal 'pos' pointer added in commit, since
    we need to use the 'loff_t *pos' provided by seq_file layer.

    This also reverts commit 5cac98dd0 (net: Fix corruption
    in /proc/*/net/dev_mcast), since its not needed anymore.

    Reported-by: Ben Greear
    Signed-off-by: Eric Dumazet
    Cc: Mihai Maruseac
    Tested-by: Ben Greear
    Signed-off-by: David S. Miller

    Eric Dumazet
     

03 Apr, 2012

2 commits

  • If CONFIG_NF_CONNTRACK_TIMEOUT=n we have following warning :

    CC [M] net/netfilter/xt_CT.o
    net/netfilter/xt_CT.c: In function ‘xt_ct_tg_check_v1’:
    net/netfilter/xt_CT.c:284: warning: label ‘err4’ defined but not used

    Reported-by: Eric Dumazet
    Signed-off-by: Pablo Neira Ayuso

    Pablo Neira Ayuso
     
  • Pull networking fixes from David Miller:

    1) Provide device string properly for USB i2400m wimax devices, also
    don't OOPS when providing firmware string. From Phil Sutter.

    2) Add support for sh_eth SH7734 chips, from Nobuhiro Iwamatsu.

    3) Add another device ID to USB zaurus driver, from Guan Xin.

    4) Loop index start in pool vector iterator is wrong causing MAC to not
    get configured in bnx2x driver, fix from Dmitry Kravkov.

    5) EQL driver assumes HZ=100, fix from Eric Dumazet.

    6) Now that skb_add_rx_frag() can specify the truesize increment
    separately, do so in f_phonet and cdc_phonet, also from Eric
    Dumazet.

    7) virtio_net accidently uses net_ratelimit() not only on the kernel
    warning but also the statistic bump, fix from Rick Jones.

    8) ip_route_input_mc() uses fixed init_net namespace, oops, use
    dev_net(dev) instead. Fix from Benjamin LaHaise.

    9) dev_forward_skb() needs to clear the incoming interface index of the
    SKB so that it looks like a new incoming packet, also from Benjamin
    LaHaise.

    10) iwlwifi mistakenly initializes a channel entry as 2GHZ instead of
    5GHZ, fix from Stanislav Yakovlev.

    11) Missing kmalloc() return value checks in orinoco, from Santosh
    Nayak.

    12) ath9k doesn't check for HT capabilities in the right way, it is
    checking ht_supported instead of the ATH9K_HW_CAP_HT flag. Fix from
    Sujith Manoharan.

    13) Fix x86 BPF JIT emission of 16-bit immediate field of AND
    instructions, from Feiran Zhuang.

    14) Avoid infinite loop in GARP code when registering sysfs entries.
    From David Ward.

    15) rose protocol uses memcpy instead of memcmp in a device address
    comparison, oops. Fix from Daniel Borkmann.

    16) Fix build of lpc_eth due to dev_hw_addr_rancom() interface being
    renamed to eth_hw_addr_random(). From Roland Stigge.

    17) Make ipv6 RTM_GETROUTE interpret RTA_IIF attribute the same way
    that ipv4 does. Fix from Shmulik Ladkani.

    18) via-rhine has an inverted bit test, causing suspend/resume
    regressions. Fix from Andreas Mohr.

    19) RIONET assumes 4K page size, fix from Akinobu Mita.

    20) Initialization of imask register in sky2 is buggy, because bits are
    "or'd" into an uninitialized local variable. Fix from Lino
    Sanfilippo.

    21) Fix FCOE checksum offload handling, from Yi Zou.

    22) Fix VLAN processing regression in e1000, from Jiri Pirko.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (52 commits)
    sky2: dont overwrite settings for PHY Quick link
    tg3: Fix 5717 serdes powerdown problem
    net: usb: cdc_eem: fix mtu
    net: sh_eth: fix endian check for architecture independent
    usb/rtl8150 : Remove duplicated definitions
    rionet: fix page allocation order of rionet_active
    via-rhine: fix wait-bit inversion.
    ipv6: Fix RTM_GETROUTE's interpretation of RTA_IIF to be consistent with ipv4
    net: lpc_eth: Fix rename of dev_hw_addr_random
    net/netfilter/nfnetlink_acct.c: use linux/atomic.h
    rose_dev: fix memcpy-bug in rose_set_mac_address
    Fix non TBI PHY access; a bad merge undid bug fix in a previous commit.
    net/garp: avoid infinite loop if attribute already exists
    x86 bpf_jit: fix a bug in emitting the 16-bit immediate operand of AND
    bonding: emit event when bonding changes MAC
    mac80211: fix oper channel timestamp updation
    ath9k: Use HW HT capabilites properly
    MAINTAINERS: adding maintainer for ipw2x00
    net: orinoco: add error handling for failed kmalloc().
    net/wireless: ipw2x00: fix a typo in wiphy struct initilization
    ...

    Linus Torvalds
     

02 Apr, 2012

2 commits

  • In IPv4, if an RTA_IIF attribute is specified within an RTM_GETROUTE
    message, then a route is searched as if a packet was received on the
    specified 'iif' interface.

    However in IPv6, RTA_IIF is not interpreted in the same way:
    'inet6_rtm_getroute()' always calls 'ip6_route_output()', regardless the
    RTA_IIF attribute.

    As a result, in IPv6 there's no way to use RTM_GETROUTE in order to look
    for a route as if a packet was received on a specific interface.

    Fix 'inet6_rtm_getroute()' so that RTA_IIF is interpreted as "lookup a
    route as if a packet was received on the specified interface", similar
    to IPv4's 'inet_rtm_getroute()' interpretation.

    Reported-by: Ami Koren
    Signed-off-by: Shmulik Ladkani
    Signed-off-by: David S. Miller

    Shmulik Ladkani
     
  • There's no known problem here, but this is one of only two non-arch files
    in the kernel which use asm/atomic.h instead of linux/atomic.h.

    Acked-by: Pablo Neira Ayuso
    Cc: Patrick McHardy
    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Andrew Morton