1. 04 11月, 2011 10 次提交
    • P
      be2net: Add detect UE feature for Lancer · e1cfb67a
      Padmanabh Ratnakar 提交于
      Add code to detect UE in case of Lancer.
      Signed-off-by: NPadmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e1cfb67a
    • P
      be2net: Prevent CQ full condition for Lancer · 9372cacb
      Padmanabh Ratnakar 提交于
      Indicate to HW that the CQ is cleaned up before posting new RX buffers.
      This prevents the HW to go into CQ full error condition.
      Signed-off-by: NPadmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9372cacb
    • P
      be2net: Fix disabling multicast promiscous mode · 1610c79f
      Padmanabh Ratnakar 提交于
      If user tries to disable multicast promiscous mode, the adapter remains
      in this mode as resetting the multicast promiscous mode was missing
      in RX filter command. Fixed this.
      Signed-off-by: NPadmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1610c79f
    • P
      be2net: Fix endian issue in RX filter command · 016f97b1
      Padmanabh Ratnakar 提交于
      Use cpu_to_le32() for mcast_num field in RX filter command as this
      field is of type u32.
      Signed-off-by: NPadmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      016f97b1
    • D
      5b67b3c0
    • O
      af_packet: de-inline some helper functions · eea49cc9
      Olof Johansson 提交于
      This popped some compiler errors due to mismatched prototypes. Just
      remove most manual inlines, the compiler should be able to figure out
      what makes sense to inline and not.
      
      net/packet/af_packet.c:252: warning: 'prb_curr_blk_in_use' declared inline after being called
      net/packet/af_packet.c:252: warning: previous declaration of 'prb_curr_blk_in_use' was here
      net/packet/af_packet.c:258: warning: 'prb_queue_frozen' declared inline after being called
      net/packet/af_packet.c:258: warning: previous declaration of 'prb_queue_frozen' was here
      net/packet/af_packet.c:248: warning: 'packet_previous_frame' declared inline after being called
      net/packet/af_packet.c:248: warning: previous declaration of 'packet_previous_frame' was here
      net/packet/af_packet.c:251: warning: 'packet_increment_head' declared inline after being called
      net/packet/af_packet.c:251: warning: previous declaration of 'packet_increment_head' was here
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      Cc: Chetan Loke <loke.chetan@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      eea49cc9
    • O
      MAINTAINERS: Add can-gw include to maintained files · c49b82da
      Oliver Hartkopp 提交于
      Commit c1aabdf3 (can-gw: add netlink based
      CAN routing) added a new include file that's neither referenced by any of
      the CAN maintainers.
      Signed-off-by: NOliver Hartkopp <socketcan@hartkopp.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c49b82da
    • T
      net: Add back alignment for size for __alloc_skb · bc417e30
      Tony Lindgren 提交于
      Commit 87fb4b7b (net: more
      accurate skb truesize) changed the alignment of size. This
      can cause problems at least on some machines with NFS root:
      
      Unhandled fault: alignment exception (0x801) at 0xc183a43a
      Internal error: : 801 [#1] PREEMPT
      Modules linked in:
      CPU: 0    Not tainted  (3.1.0-08784-g5eeee4a #733)
      pc : [<c02fbba0>]    lr : [<c02fbb9c>]    psr: 60000013
      sp : c180fef8  ip : 00000000  fp : c181f580
      r10: 00000000  r9 : c044b28c  r8 : 00000001
      r7 : c183a3a0  r6 : c1835be0  r5 : c183a412  r4 : 000001f2
      r3 : 00000000  r2 : 00000000  r1 : ffffffe6  r0 : c183a43a
      Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
      Control: 0005317f  Table: 10004000  DAC: 00000017
      Process swapper (pid: 1, stack limit = 0xc180e270)
      Stack: (0xc180fef8 to 0xc1810000)
      fee0:                                                       00000024 00000000
      ff00: 00000000 c183b9c0 c183b8e0 c044b28c c0507ccc c019dfc4 c180ff2c c0503cf8
      ff20: c180ff4c c180ff4c 00000000 c1835420 c182c740 c18349c0 c05233c0 00000000
      ff40: 00000000 c00e6bb8 c180e000 00000000 c04dd82c c0507e7c c050cc18 c183b9c0
      ff60: c05233c0 00000000 00000000 c01f34f4 c0430d70 c019d364 c04dd898 c04dd898
      ff80: c04dd82c c0507e7c c180e000 00000000 c04c584c c01f4918 c04dd898 c04dd82c
      ffa0: c04ddd28 c180e000 00000000 c0008758 c181fa60 3231d82c 00000037 00000000
      ffc0: 00000000 c04dd898 c04dd82c c04ddd28 00000013 00000000 00000000 00000000
      ffe0: 00000000 c04b2224 00000000 c04b21a0 c001056c c001056c 00000000 00000000
      Function entered at [<c02fbba0>] from [<c019dfc4>]
      Function entered at [<c019dfc4>] from [<c01f34f4>]
      Function entered at [<c01f34f4>] from [<c01f4918>]
      Function entered at [<c01f4918>] from [<c0008758>]
      Function entered at [<c0008758>] from [<c04b2224>]
      Function entered at [<c04b2224>] from [<c001056c>]
      Code: e1a00005 e3a01028 ebfa7cb0 e35a0000 (e5858028)
      
      Here PC is at __alloc_skb and &shinfo->dataref is unaligned because
      skb->end can be unaligned without this patch.
      
      As explained by Eric Dumazet <eric.dumazet@gmail.com>, this happens
      only with SLOB, and not with SLAB or SLUB:
      
      * Eric Dumazet <eric.dumazet@gmail.com> [111102 15:56]:
      >
      > Your patch is absolutely needed, I completely forgot about SLOB :(
      >
      > since, kmalloc(386) on SLOB gives exactly ksize=386 bytes, not nearest
      > power of two.
      >
      > [   60.305763] malloc(size=385)->ffff880112c11e38 ksize=386 -> nsize=2
      > [   60.305921] malloc(size=385)->ffff88007c92ce28 ksize=386 -> nsize=2
      > [   60.306898] malloc(size=656)->ffff88007c44ad28 ksize=656 -> nsize=272
      > [   60.325385] malloc(size=656)->ffff88007c575868 ksize=656 -> nsize=272
      > [   60.325531] malloc(size=656)->ffff88011c777230 ksize=656 -> nsize=272
      > [   60.325701] malloc(size=656)->ffff880114011008 ksize=656 -> nsize=272
      > [   60.346716] malloc(size=385)->ffff880114142008 ksize=386 -> nsize=2
      > [   60.346900] malloc(size=385)->ffff88011c777690 ksize=386 -> nsize=2
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bc417e30
    • E
      net: add missing bh_unlock_sock() calls · 918eb399
      Eric Dumazet 提交于
      Simon Kirby reported lockdep warnings and following messages :
      
      [104661.897577] huh, entered softirq 3 NET_RX ffffffff81613740
      preempt_count 00000101, exited with 00000102?
      
      [104661.923653] huh, entered softirq 3 NET_RX ffffffff81613740
      preempt_count 00000101, exited with 00000102?
      
      Problem comes from commit 0e734419
      (ipv4: Use inet_csk_route_child_sock() in DCCP and TCP.)
      
      If inet_csk_route_child_sock() returns NULL, we should release socket
      lock before freeing it.
      
      Another lock imbalance exists if __inet_inherit_port() returns an error
      since commit 093d2823 ( tproxy: fix hash locking issue when using
      port redirection in __inet_inherit_port()) a backport is also needed for
      >= 2.6.37 kernels.
      Reported-by: NSimon Kirby <sim@hostway.ca>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Tested-by: NEric Dumazet <eric.dumazet@gmail.com>
      CC: Balazs Scheidler <bazsi@balabit.hu>
      CC: KOVACS Krisztian <hidden@balabit.hu>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Tested-by: NSimon Kirby <sim@hostway.ca>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      918eb399
    • E
      l2tp: fix race in l2tp_recv_dequeue() · e2e210c0
      Eric Dumazet 提交于
      Misha Labjuk reported panics occurring in l2tp_recv_dequeue()
      
      If we release reorder_q.lock, we must not keep a dangling pointer (tmp),
      since another thread could manipulate reorder_q.
      
      Instead we must restart the scan at beginning of list.
      Reported-by: NMisha Labjuk <spiked.yar@gmail.com>
      Tested-by: NMisha Labjuk <spiked.yar@gmail.com>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e2e210c0
  2. 03 11月, 2011 10 次提交
  3. 02 11月, 2011 10 次提交
    • S
      net: fix typo in drivers/net/ethernet/xilinx/ll_temac_main.c · 2edcd4ca
      Stephen Rothwell 提交于
      Commit 9e903e08 ("net: add skb frag size accessors") used frag_size
      instead of skb_frag_size in this file.
      
      Fixes this build error:
      
      drivers/net/ethernet/xilinx/ll_temac_main.c: In function 'temac_start_xmit':
      drivers/net/ethernet/xilinx/ll_temac_main.c:717:3: error: implicit declaration of function 'frag_size' [-Werror=implicit-function-declaration]
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2edcd4ca
    • E
      udp: fix a race in encap_rcv handling · 0ad92ad0
      Eric Dumazet 提交于
      udp_queue_rcv_skb() has a possible race in encap_rcv handling, since
      this pointer can be changed anytime.
      
      We should use ACCESS_ONCE() to close the race.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0ad92ad0
    • D
      x25: Fix NULL dereference in x25_recvmsg · 501e89d3
      Dave Jones 提交于
      commit cb101ed2 in 3.0 introduced a bug in x25_recvmsg()
      When passed bogus junk from userspace, x25->neighbour can be NULL,
      as shown in this oops..
      
      BUG: unable to handle kernel NULL pointer dereference at 000000000000001c
      IP: [<ffffffffa05482bd>] x25_recvmsg+0x4d/0x280 [x25]
      PGD 1015f3067 PUD 105072067 PMD 0
      Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
      CPU 0
      Pid: 27928, comm: iknowthis Not tainted 3.1.0+ #2 Gigabyte Technology Co., Ltd. GA-MA78GM-S2H/GA-MA78GM-S2H
      RIP: 0010:[<ffffffffa05482bd>]  [<ffffffffa05482bd>] x25_recvmsg+0x4d/0x280 [x25]
      RSP: 0018:ffff88010c0b7cc8  EFLAGS: 00010282
      RAX: 0000000000000000 RBX: ffff88010c0b7d78 RCX: 0000000000000c02
      RDX: ffff88010c0b7d78 RSI: ffff88011c93dc00 RDI: ffff880103f667b0
      RBP: ffff88010c0b7d18 R08: 0000000000000000 R09: 0000000000000000
      R10: 0000000000000000 R11: 0000000000000000 R12: ffff880103f667b0
      R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
      FS:  00007f479ce7f700(0000) GS:ffff88012a600000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      CR2: 000000000000001c CR3: 000000010529e000 CR4: 00000000000006f0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process iknowthis (pid: 27928, threadinfo ffff88010c0b6000, task ffff880103faa4f0)
      Stack:
       0000000000000c02 0000000000000c02 ffff88010c0b7d18 ffffff958153cb37
       ffffffff8153cb60 0000000000000c02 ffff88011c93dc00 0000000000000000
       0000000000000c02 ffff88010c0b7e10 ffff88010c0b7de8 ffffffff815372c2
      Call Trace:
       [<ffffffff8153cb60>] ? sock_update_classid+0xb0/0x180
       [<ffffffff815372c2>] sock_aio_read.part.10+0x142/0x150
       [<ffffffff812d6752>] ? inode_has_perm+0x62/0xa0
       [<ffffffff815372fd>] sock_aio_read+0x2d/0x40
       [<ffffffff811b05e2>] do_sync_read+0xd2/0x110
       [<ffffffff812d3796>] ? security_file_permission+0x96/0xb0
       [<ffffffff811b0a91>] ? rw_verify_area+0x61/0x100
       [<ffffffff811b103d>] vfs_read+0x16d/0x180
       [<ffffffff811b109d>] sys_read+0x4d/0x90
       [<ffffffff81657282>] system_call_fastpath+0x16/0x1b
      Code: 8b 66 20 4c 8b 32 48 89 d3 48 89 4d b8 45 89 c7 c7 45 cc 95 ff ff ff 4d 85 e4 0f 84 ed 01 00 00 49 8b 84 24 18 05 00 00 4c 89 e7
       78 1c 01 45 19 ed 31 f6 e8 d5 37 ff e0 41 0f b6 44 24 0e 41
      Signed-off-by: NDave Jones <davej@redhat.com>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      501e89d3
    • G
      net/ethernet: Move mac89x0.c from apple to cirrus · 0a3360e1
      Geert Uytterhoeven 提交于
      Macintosh CS89x0 based ethernet cards use a Crystal Semiconductor (Now
      Cirrus Logic) CS89x0 chip, so the mac89x0 driver should be in
      drivers/net/ethernet/cirrus instead of drivers/net/ethernet/apple.
      
      This also fixes a build problem, as the driver needs a header file from the
      cirrus directory:
      
      drivers/net/ethernet/apple/mac89x0.c:107:20: error: cs89x0.h: No such file or directory
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0a3360e1
    • C
      net/ethernet: sc92031 is not Realtek · 1b6b7172
      Cesar Eduardo Barros 提交于
      While the SC92031 could be found on fake "Realtek" NICs, it has no
      relationship to Realtek, and is actually from Silan.
      
      Create a new subdirectory for silan and move sc92031 there.
      Signed-off-by: NCesar Eduardo Barros <cesarb@cesarb.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1b6b7172
    • P
      isdn: hisax: Fix typo 'HISAX_DE_AOC' · 048ca169
      Paul Bolle 提交于
      That should probably be 'CONFIG_DE_AOC'.
      Signed-off-by: NPaul Bolle <pebolle@tiscali.nl>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      048ca169
    • A
      net: make the tcp and udp file_operations for the /proc stuff const · 73cb88ec
      Arjan van de Ven 提交于
      the tcp and udp code creates a set of struct file_operations at runtime
      while it can also be done at compile time, with the added benefit of then
      having these file operations be const.
      
      the trickiest part was to get the "THIS_MODULE" reference right; the naive
      method of declaring a struct in the place of registration would not work
      for this reason.
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      73cb88ec
    • W
      bonding:update speed/duplex for NETDEV_CHANGE · 98f41f69
      Weiping Pan 提交于
      Zheng Liang(lzheng@redhat.com) found a bug that if we config bonding with
      arp monitor, sometimes bonding driver cannot get the speed and duplex from
      its slaves, it will assume them to be 100Mb/sec and Full, please see
      /proc/net/bonding/bond0.
      But there is no such problem when uses miimon.
      
      (Take igb for example)
      I find that the reason is that after dev_open() in bond_enslave(),
      bond_update_speed_duplex() will call igb_get_settings()
      , but in that function,
      it runs ethtool_cmd_speed_set(ecmd, -1); ecmd->duplex = -1;
      because igb get an error value of status.
      So even dev_open() is called, but the device is not really ready to get its
      settings.
      
      Maybe it is safe for us to call igb_get_settings() only after
      this message shows up, that is "igb: p4p1 NIC Link is Up 1000 Mbps Full Duplex,
      Flow Control: RX".
      
      So I prefer to update the speed and duplex for a slave when reseices
      NETDEV_CHANGE/NETDEV_UP event.
      
      Changelog
      V2:
      1 remove the "fake 100/Full" logic in bond_update_speed_duplex(),
        set speed and duplex to -1 when it gets error value of speed and duplex.
      2 delete the warning in bond_enslave() if bond_update_speed_duplex() returns
        error.
      3 make bond_info_show_slave() handle bad values of speed and duplex.
      Signed-off-by: NWeiping Pan <wpan@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      98f41f69
    • M
      vlan: Don't propagate flag changes on down interfaces. · deede2fa
      Matthijs Kooijman 提交于
      When (de)configuring a vlan interface, the IFF_ALLMULTI ans IFF_PROMISC
      flags are cleared or set on the underlying interface. So, if these flags
      are changed on a vlan interface that is not up, the flags underlying
      interface might be set or cleared twice.
      
      Only propagating flag changes when a device is up makes sure this does
      not happen. It also makes sure that an underlying device is not set to
      promiscuous or allmulti mode for a vlan device that is down.
      Signed-off-by: NMatthijs Kooijman <matthijs@stdin.nl>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      deede2fa
    • D
      neigh: Kill bogus SMP protected debugging message. · 045f7b3b
      David S. Miller 提交于
      Whatever situations make this state legitimate when SMP
      also would be legitimate when !SMP and f.e. preemption is
      enabled.
      
      This is dubious enough that we should just delete it entirely.  If we
      want to add debugging for neigh timer races, better more thorough
      mechanisms are needed.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      045f7b3b
  4. 01 11月, 2011 10 次提交