05 Feb, 2013

27 commits

  • We recently refactored the driver source, this patch will take care of
    updating copyright date and adding it to newly added files.

    Signed-off-by: Jitendra Kalsaria
    Signed-off-by: David S. Miller

    Jitendra Kalsaria
     
  • Commit ee873fda3bec7c668407b837fc5519eb961fcd37

    "gianfar: Pack struct gfar_priv_grp into three cachelines"

    causes the following null dereference at driver init on sbc8548:

    libphy: Freescale PowerQUICC MII Bus: probed
    Unable to handle kernel paging request for data at address 0x00000000
    Faulting instruction address: 0xc01d6a38
    Oops: Kernel access of bad area, sig: 11 [#1]
    [...]
    NIP [c01d6a38] gfar_parse_group+0x228/0x280
    LR [c01d6a34] gfar_parse_group+0x224/0x280
    Call Trace:
    [ef82dd60] [c01d6a34] gfar_parse_group+0x224/0x280 (unreliable)
    [ef82dd90] [c01d73a4] gfar_probe+0x284/0xfe0

    The reason is that the commit also changed the allocation of the
    Rx and error handling irq structs to be skipped for !MQ_MG_MODE.
    In the !MQ_MG_MODE case, only the Tx irq struct is allocated.

    Digging further, we see that MQ_MG_MODE is set only if we find
    the OF compatible string "fsl,etsec2".

    A quick grep in the dts directory shows lots of boards that support
    Rx/Tx/Err, but without this specific compat string. And hence they
    go after the unallocated Rx/Error structs and cause the above oops.

    Hence such a change can not be deployed until all the dts files
    are updated and sufficiently deployed. Further, the optimization
    is of limited value, since the kmalloc'd struct in question has only
    a single unsigned int, and an (IFNAMSIZ + 6) sized string.

    Note that no changes to the freeing code are needed here, as it
    already did an unconditional free of Rx/Tx/Error gfar_irqinfo.

    Cc: Claudiu Manoil
    Signed-off-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Paul Gortmaker
     
  • This module is namespace aware, netns_ok was just disabled by default
    for sanity.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • BUG: spinlock bad magic on CPU#1, swapper/0/1
    lock: 0xbfae0f8c, .magic: 00000000, .owner: /-1, .owner_cpu: 0
    Backtrace:
    [] (dump_backtrace+0x0/0x10c) from [] (dump_stack+0x18/0x1c)
    r6:bfae0000 r5:bfae0f8c r4:00000000 r3:806c1310
    [] (dump_stack+0x0/0x1c) from [] (spin_dump+0x80/0x94)
    [] (spin_dump+0x0/0x94) from [] (spin_bug+0x2c/0x30)
    r5:805f6f8c r4:bfae0f8c
    [] (spin_bug+0x0/0x30) from [] (do_raw_spin_lock+0x170/0x1b0 )
    r5:806b4950 r4:bfae0f8c
    [] (do_raw_spin_lock+0x0/0x1b0) from [] (_raw_spin_lock_irqs ave+0x18/0x20)
    [] (_raw_spin_lock_irqsave+0x0/0x20) from [] (fec_ptp_start_ cyclecounter+0x3c/0x120)
    r4:bfae0f8c r3:00000002
    [] (fec_ptp_start_cyclecounter+0x0/0x120) from [] (fec_resta rt+0x56c/0x5f8)
    r8:00000000 r7:806e6f48 r6:00000112 r5:806b4950 r4:bfae0000
    [] (fec_restart+0x0/0x5f8) from [] (fec_probe+0x508/0xa48)

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

    Frank Li
     
  • In case port is leaving the team, set the option "activeport" as changed
    so the change can be properly propagated to userspace

    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jiri Pirko
     
  • In team_port_del(), there is need to be do all the cleanup related
    things first and netlink event notifiers should be called after that.
    This fixes two problems:
    team carrier is now correctly set (port is removed from list first)
    mode can set option as changed in .port_leave op

    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jiri Pirko
     
  • Essentially do the same thing with port list as with option list.
    Multipart netlink message.
    Side effect is that port event message can send port which is not longer
    in team->port_list.

    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jiri Pirko
     
  • ip_eth_mc_map function can't be used when CONFIG_INET isn't defined.
    Fixed compilation error by adding CONFIG_INET define check before using the
    function.

    Signed-off-by: Hadar Hen Zion
    Signed-off-by: David S. Miller

    Hadar Hen Zion
     
  • Propagate return value of mlx4_en_ethtool_add_mac_rule_by_ipv4 in case of
    failure.

    Signed-off-by: Hadar Hen Zion
    Signed-off-by: David S. Miller

    Hadar Hen Zion
     
  • With the loop, don't check 'rv' twice in a row. Without the loop, 'rv'
    doesn't even need to be checked.

    Make the comment more grammar-friendly.

    Signed-off-by: Jean Sacren
    Signed-off-by: David S. Miller

    Jean Sacren
     
  • As in del_timer() there has already placed a timer_pending() function
    to check whether the timer to be deleted is pending or not, it's
    unnecessary to check timer pending state again before del_timer() is
    called.

    Signed-off-by: Ying Xue
    Cc: Eric Dumazet
    Signed-off-by: David S. Miller

    Ying Xue
     
  • Signed-off-by: Sathya Perla
    Signed-off-by: David S. Miller

    Sathya Perla
     
  • Currently, when the PF driver is unloaded and re-loaded while VFs are attached
    to VMs, it loses control of its VFs.

    The PF driver now uses the newly defined/created GET_IFACE_LIST cmd
    (available in FW ver >= 4.6) to query the if_id of the VFs
    (enabled in its previous life). The PF driver then uses the if_id for
    further VF configuration.

    The GET_IFACE_MAC_LIST cmd has also implemented in BE3 FW for PF to
    query pmac-ids used by its VFs.

    Signed-off-by: Sathya Perla
    Signed-off-by: David S. Miller

    Sathya Perla
     
  • alloc failures already get standardized OOM
    messages and a dump_stack.

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

    Joe Perches
     
  • alloc failures already get standardized OOM
    messages and a dump_stack.

    Convert kzalloc's with multiplies to kcalloc.
    Convert kmalloc's with multiplies to kmalloc_array.
    Remove now unused variables.
    Remove unnecessary memset after kzalloc->kcalloc.
    Whitespace cleanups for these changes.

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

    Joe Perches
     
  • alloc failures already get standardized OOM
    messages and a dump_stack.

    Convert kzalloc's with multiplies to kcalloc.
    Remove now unused size variables.

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

    Joe Perches
     
  • alloc failures already get standardized OOM
    messages and a dump_stack.

    Hoist assigns from if tests.

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

    Joe Perches
     
  • alloc failures already get standardized OOM
    messages and a dump_stack.

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

    Joe Perches
     
  • alloc failures already get standardized OOM
    messages and a dump_stack.

    Convert kzalloc's with multiplies to kcalloc.
    Convert kmalloc's with multiplies to kmalloc_array.
    Fix a few whitespace defects.
    Convert a constant 6 to ETH_ALEN.
    Use parentheses around sizeof.
    Convert vmalloc/memset to vzalloc.
    Remove now unused size variables.

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

    Joe Perches
     
  • alloc failures already get standardized OOM
    messages and a dump_stack.

    Signed-off-by: Joe Perches
    Acked-by: Marc Kleine-Budde
    Signed-off-by: David S. Miller

    Joe Perches
     
  • alloc failures already get standardized OOM
    messages and a dump_stack.

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

    Joe Perches
     
  • It seems due to RCU usage, i.e. within SCTP's address binding list,
    a, say, ``behavioral change'' was introduced which does actually
    not conform to the RFC anymore. In particular consider the following
    (fictional) scenario to demonstrate this:

    do:
    Two SOCK_SEQPACKET-style sockets are opened (S1, S2)
    S1 is bound to 127.0.0.1, port 1024 [server]
    S2 is bound to 127.0.0.1, port 1025 [client]
    listen(2) is invoked on S1
    From S2 we call one sendmsg(2) with msg.msg_name and
    msg.msg_namelen parameters set to the server's
    address
    S1, S2 are closed
    goto do

    The first pass of this loop passes successful, while the second round
    fails during binding of S1 (address still in use). What is happening?
    In the first round, the initial handshake is being done, and, at the
    time close(2) is called on S1, a non-graceful shutdown is performed via
    ABORT since in S1's receive queue an unprocessed packet is present,
    thus stating an error condition. This can be considered as a correct
    behavior.

    During close also all bound addresses are freed, thus nothing *must*
    be active anymore. In reference to RFC2960:

    After checking the Verification Tag, the receiving endpoint shall
    remove the association from its record, and shall report the
    termination to its upper layer. (9.1 Abort of an Association)

    Also, no half-open states are supported, thus after an ungraceful
    shutdown, we leave nothing behind. However, this seems not to be
    happening though. In a real-world scenario, this is exactly where
    it breaks the lksctp-tools functional test suite, *for instance*:

    ./test_sockopt
    test_sockopt.c 1 PASS : getsockopt(SCTP_STATUS) on a socket with no assoc
    test_sockopt.c 2 PASS : getsockopt(SCTP_STATUS)
    test_sockopt.c 3 PASS : getsockopt(SCTP_STATUS) with invalid associd
    test_sockopt.c 4 PASS : getsockopt(SCTP_STATUS) with NULL associd
    test_sockopt.c 5 BROK : bind: Address already in use

    The underlying problem is that sctp_endpoint_destroy() hasn't been
    triggered yet while the next bind attempt is being done. It will be
    triggered eventually (but too late) by sctp_transport_destroy_rcu()
    after one RCU grace period:

    sctp_transport_destroy()
    sctp_transport_destroy_rcu() ----.
    sctp_association_put() [*] sctp_packet_free()
    sctp_association_destroy() [...]
    sctp_endpoint_put() skb->destructor
    sctp_endpoint_destroy() sctp_wfree()
    sctp_bind_addr_free() sctp_association_put() [*]

    Thus, we move out the condition with sctp_association_put() as well as
    the sctp_packet_free() invocation and the issue can be solved. We also
    better free the SCTP chunks first before putting the ref of the association.

    With this patch, the example above (which simulates a similar scenario
    as in the implementation of this test case) and therefore also the test
    suite run successfully through. Tested by myself.

    Cc: Vlad Yasevich
    Signed-off-by: Daniel Borkmann
    Acked-by: Vlad Yasevich
    Acked-by: Neil Horman
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • Signed-off-by: Divy Le Ray
    Signed-off-by: Vipul Pandya
    Signed-off-by: David S. Miller

    Vipul Pandya
     
  • reduce the permission check of bond device's ioctl.
    allow the userns root to control the bond device.

    Signed-off-by: Gao feng
    Signed-off-by: David S. Miller

    Gao feng
     
  • since the mdb table is belong to bridge device,and the
    bridge device can only be seen in one netns.
    So it's safe to allow unprivileged user which is the
    creator of userns and netns to modify the mdb table.

    Signed-off-by: Gao feng
    Signed-off-by: David S. Miller

    Gao feng
     
  • ebt_table is a private resource of netns, operating ebtables
    in one netns will not affect other netns, we can allow the
    creator user of userns and netns to change the ebtables.

    Signed-off-by: Gao feng
    Signed-off-by: David S. Miller

    Gao feng
     
  • Right now,only ixgdb,macvlan,vxlan and bridge implement
    fdb_add/fdb_del operations.

    these operations only operate the private data of net
    device. So allowing the unprivileged users who creates
    the userns and netns to add/del fdb entries will do no
    harm to other netns.

    Signed-off-by: Gao feng
    Signed-off-by: David S. Miller

    Gao feng
     

04 Feb, 2013

1 commit


03 Feb, 2013

4 commits

  • Paul Gortmaker says:

    ====================
    The removal of wanrouter code was originally listed in the (now
    gone) feature removal file since May 2012, and an RFC of the
    deletion was posted[1] in late 2012. The overall concept was given
    an OK, but defconfig contamination, build failures, etc. meant that
    it didn't quite make it into mainline for 3.8.

    Since that time, Dan discovered (via code audit) a runtime bug that
    proves nobody has been using this for over four years[2]. With that
    new information, I think it makes sense for someone to follow through
    on Joe's original RFC and get this done for the 3.9 release.

    In addition to resolving the build failures of the RFC by keeping
    stub headers, this also splits the change into two parts, just like
    the token ring removal did. Part #1 decouples the mainline kernel
    from the expired subsystem, and part #2 does the large scale
    deletion of the subsystem content.

    The advantage of the above, is that a "git blame" will never lead
    you to a 4000+ line deletion commit. The large scale deletion will
    never show up in a "git blame" and hence the same advantages that we
    get from the "--irreversible-delete" in the review stage of "git
    format-patch" are also embedded into the git history itself. This
    may seem like a moot point to some, but for those who spend a
    considerable amount of time data mining in the git history, this is
    probably worth doing.

    I have done build tests of all[mod/yes]config for both the stage 1
    (Makefile and Kconfig) and stage 2 (full driver delete) as a sanity
    check, and the issues with the previously posted RFC should be gone.

    Speaking of "--irreversible-delete" -- these patches were created
    with that option, so if you want to use them locally, you are going
    to have to pull (location below) the content instead of doing a
    "git am" of the mailed out content.

    [1] http://patchwork.ozlabs.org/patch/198794/
    [2] http://www.spinics.net/lists/netdev/msg218670.html
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • We actually store the MAC address as well as the board_name here. The
    longest board_name is 75 characters so there is more than enough room
    to hold the 17 character MAC and the ": " divider. But making this
    buffer larger silences a static checker warning.

    Signed-off-by: Dan Carpenter
    Acked-By: Jitendra Kalsaria
    Signed-off-by: David S. Miller

    Dan Carpenter
     
  • When the interface does not have carrier but when it's put into
    loopback mode (for tests), it does not make sense to not have
    the carrier. So force it!

    Signed-off-by: Mahesh Bandewar
    Acked-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Mahesh Bandewar
     
  • Jeff Kirsher says:

    ====================
    This series contains updates to ixgbe and e1000e. The ixgbe patches are
    a mix of fixes, cleanup and added functionality. The first fix is for
    traffic classes, where if the mapping has changed reset the NIC. The other
    ixgbe fix resolves an issue where the device lookup neglected to do a
    pci_dev_put() to decrement the device reference count.

    The ixgbe cleanup was done by Josh, where the auto-negotiation variables
    were renamed/cleaned up and refactored.

    The remaining patches are from Bruce to do additional cleanup on e1000e as
    well as bump the driver version. Most notably is the cleanup to use the
    kernel IEEE MII definitions where possible instead of the local MII
    definitions.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     

01 Feb, 2013

8 commits