1. 15 11月, 2007 4 次提交
    • P
      [NET]: Remove notifier block from chain when register_netdevice_notifier fails · c67625a1
      Pavel Emelyanov 提交于
      Commit fcc5a03a:
      
      	[NET]: Allow netdev REGISTER/CHANGENAME events to fail
      
      makes the register_netdevice_notifier() handle the error from the
      NETDEV_REGISTER event, sent to the registering block.
      
      The bad news is that in this case the notifier block is 
      not removed from the list, but the error is returned to the 
      caller. In case the caller is in module init function and 
      handles this error this can abort the module loading. The
      notifier block will be then removed from the kernel, but 
      will be left in the list. Oops :(
      
      I think that the notifier block should be removed from the
      chain in case of error, regardless whether this error is 
      handled by the caller or not. In the worst case (the error 
      is _not_ handled) module will not receive the events any 
      longer.
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Acked-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c67625a1
    • J
      [FS_ENET]: Fix module build. · 8a856397
      Jochen Friedrich 提交于
      If fs_enet is build as module, on PPC_CPM_NEW_BINDING platforms
      mii-fec/mii-bitbang should be build as module, as well. On other
      platforms, mii-fec/mii-bitbang must be included into the main module.
      Otherwise some symbols remain undefined. Additionally, fs_enet uses
      libphy, so add a select PHYLIB.
      
        Building modules, stage 2.
        MODPOST 5 modules
      ERROR: "fs_scc_ops" [drivers/net/fs_enet/fs_enet.ko] undefined!
      make[1]: *** [__modpost] Error 1
      make: *** [modules] Error 2
      Signed-off-by: NJochen Friedrich <jochen@scram.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8a856397
    • I
      [TCP]: Make sure write_queue_from does not begin with NULL ptr · 96a2d41a
      Ilpo Jrvinen 提交于
      NULL ptr can be returned from tcp_write_queue_head to cached_skb
      and then assigned to skb if packets_out was zero. Without this,
      system is vulnerable to a carefully crafted ACKs which obviously
      is remotely triggerable.
      
      Besides, there's very little that needs to be done in sacktag
      if there weren't any packets outstanding, just skipping the rest
      doesn't hurt.
      Signed-off-by: NIlpo Jrvinen <ilpo.jarvinen@helsinki.fi>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      96a2d41a
    • H
      [TCP]: Fix size calculation in sk_stream_alloc_pskb · fb93134d
      Herbert Xu 提交于
      We round up the header size in sk_stream_alloc_pskb so that
      TSO packets get zero tail room.  Unfortunately this rounding
      up is not coordinated with the select_size() function used by
      TCP to calculate the second parameter of sk_stream_alloc_pskb.
      
      As a result, we may allocate more than a page of data in the
      non-TSO case when exactly one page is desired.
      
      In fact, rounding up the head room is detrimental in the non-TSO
      case because it makes memory that would otherwise be available to
      the payload head room.  TSO doesn't need this either, all it wants
      is the guarantee that there is no tail room.
      
      So this patch fixes this by adjusting the skb_reserve call so that
      exactly the requested amount (which all callers have calculated in
      a precise way) is made available as tail room.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fb93134d
  2. 14 11月, 2007 16 次提交
  3. 13 11月, 2007 20 次提交