1. 19 2月, 2010 2 次提交
    • A
      macvtap: rework object lifetime rules · 02df55d2
      Arnd Bergmann 提交于
      This reworks the change done by the previous patch
      in a more complete way.
      
      The original macvtap code has a number of problems
      resulting from the use of RCU for protecting the
      access to struct macvtap_queue from open files.
      
      This includes
      - need for GFP_ATOMIC allocations for skbs
      - potential deadlocks when copy_*_user sleeps
      - inability to work with vhost-net
      
      Changing the lifetime of macvtap_queue to always
      depend on the open file solves all these. The
      RCU reference simply moves one step down to
      the reference on the macvlan_dev, which we
      only need for nonblocking operations.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NSridhar Samudrala <sri@us.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      02df55d2
    • P
      netfilter: nf_defrag_ipv4: fix compilation error with NF_CONNTRACK=n · 37ee3d5b
      Patrick McHardy 提交于
      As reported by Randy Dunlap <randy.dunlap@oracle.com>, compilation
      of nf_defrag_ipv4 fails with:
      
      include/net/netfilter/nf_conntrack.h:94: error: field 'ct_general' has incomplete type
      include/net/netfilter/nf_conntrack.h:178: error: 'const struct sk_buff' has no member named 'nfct'
      include/net/netfilter/nf_conntrack.h:185: error: implicit declaration of function 'nf_conntrack_put'
      include/net/netfilter/nf_conntrack.h:294: error: 'const struct sk_buff' has no member named 'nfct'
      net/ipv4/netfilter/nf_defrag_ipv4.c:45: error: 'struct sk_buff' has no member named 'nfct'
      net/ipv4/netfilter/nf_defrag_ipv4.c:46: error: 'struct sk_buff' has no member named 'nfct'
      
      net/nf_conntrack.h must not be included with NF_CONNTRACK=n, add a
      few #ifdefs. Long term the header file should be fixed to be usable
      even with NF_CONNTRACK=n.
      Tested-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      37ee3d5b
  2. 18 2月, 2010 38 次提交