1. 11 11月, 2008 1 次提交
  2. 08 11月, 2008 4 次提交
  3. 07 11月, 2008 6 次提交
    • H
      phonet: sparse annotations of protocol, remove forward declaration · 5c7f0333
      Harvey Harrison 提交于
      net/phonet/af_phonet.c:38:36: error: marked inline, but without a definition
      net/phonet/pep-gprs.c:63:10: warning: incorrect type in return expression (different base types)
      net/phonet/pep-gprs.c:63:10:    expected int
      net/phonet/pep-gprs.c:63:10:    got restricted __be16 [usertype] <noident>
      net/phonet/pep-gprs.c:65:10: warning: incorrect type in return expression (different base types)
      net/phonet/pep-gprs.c:65:10:    expected int
      net/phonet/pep-gprs.c:65:10:    got restricted __be16 [usertype] <noident>
      net/phonet/pep-gprs.c:124:16: warning: incorrect type in assignment (different base types)
      net/phonet/pep-gprs.c:124:16:    expected restricted __be16 [usertype] protocol
      net/phonet/pep-gprs.c:124:16:    got unsigned short [unsigned] [usertype] protocol
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5c7f0333
    • H
      ipvs: oldlen, newlen should be be16, not be32 · ca62059b
      Harvey Harrison 提交于
      Noticed by sparse:
      net/netfilter/ipvs/ip_vs_proto_tcp.c:195:6: warning: incorrect type in argument 5 (different base types)
      net/netfilter/ipvs/ip_vs_proto_tcp.c:195:6:    expected restricted __be16 [usertype] oldlen
      net/netfilter/ipvs/ip_vs_proto_tcp.c:195:6:    got restricted __be32 [usertype] <noident>
      net/netfilter/ipvs/ip_vs_proto_tcp.c:196:6: warning: incorrect type in argument 6 (different base types)
      net/netfilter/ipvs/ip_vs_proto_tcp.c:196:6:    expected restricted __be16 [usertype] newlen
      net/netfilter/ipvs/ip_vs_proto_tcp.c:196:6:    got restricted __be32 [usertype] <noident>
      net/netfilter/ipvs/ip_vs_proto_tcp.c:270:6: warning: incorrect type in argument 5 (different base types)
      net/netfilter/ipvs/ip_vs_proto_tcp.c:270:6:    expected restricted __be16 [usertype] oldlen
      net/netfilter/ipvs/ip_vs_proto_tcp.c:270:6:    got restricted __be32 [usertype] <noident>
      net/netfilter/ipvs/ip_vs_proto_tcp.c:271:6: warning: incorrect type in argument 6 (different base types)
      net/netfilter/ipvs/ip_vs_proto_tcp.c:271:6:    expected restricted __be16 [usertype] newlen
      net/netfilter/ipvs/ip_vs_proto_tcp.c:271:6:    got restricted __be32 [usertype] <noident>
      net/netfilter/ipvs/ip_vs_proto_udp.c:206:6: warning: incorrect type in argument 5 (different base types)
      net/netfilter/ipvs/ip_vs_proto_udp.c:206:6:    expected restricted __be16 [usertype] oldlen
      net/netfilter/ipvs/ip_vs_proto_udp.c:206:6:    got restricted __be32 [usertype] <noident>
      net/netfilter/ipvs/ip_vs_proto_udp.c:207:6: warning: incorrect type in argument 6 (different base types)
      net/netfilter/ipvs/ip_vs_proto_udp.c:207:6:    expected restricted __be16 [usertype] newlen
      net/netfilter/ipvs/ip_vs_proto_udp.c:207:6:    got restricted __be32 [usertype] <noident>
      net/netfilter/ipvs/ip_vs_proto_udp.c:282:6: warning: incorrect type in argument 5 (different base types)
      net/netfilter/ipvs/ip_vs_proto_udp.c:282:6:    expected restricted __be16 [usertype] oldlen
      net/netfilter/ipvs/ip_vs_proto_udp.c:282:6:    got restricted __be32 [usertype] <noident>
      net/netfilter/ipvs/ip_vs_proto_udp.c:283:6: warning: incorrect type in argument 6 (different base types)
      net/netfilter/ipvs/ip_vs_proto_udp.c:283:6:    expected restricted __be16 [usertype] newlen
      net/netfilter/ipvs/ip_vs_proto_udp.c:283:6:    got restricted __be32 [usertype] <noident>
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Acked-by: NSimon Horman <horms@verge.net.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ca62059b
    • A
      net: mark flow_cache_cpu_prepare() as __init · 76acfdb9
      Alexey Dobriyan 提交于
      It's called from __init code only. And__devinit in generic networking code
      is pretty strange :^)
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      76acfdb9
    • D
      net: Fix recursive descent in __scm_destroy(). · 3b53fbf4
      David S. Miller 提交于
      __scm_destroy() walks the list of file descriptors in the scm_fp_list
      pointed to by the scm_cookie argument.
      
      Those, in turn, can close sockets and invoke __scm_destroy() again.
      
      There is nothing which limits how deeply this can occur.
      
      The idea for how to fix this is from Linus.  Basically, we do all of
      the fput()s at the top level by collecting all of the scm_fp_list
      objects hit by an fput().  Inside of the initial __scm_destroy() we
      keep running the list until it is empty.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3b53fbf4
    • D
      net: Fix recursive descent in __scm_destroy(). · f8d570a4
      David Miller 提交于
      __scm_destroy() walks the list of file descriptors in the scm_fp_list
      pointed to by the scm_cookie argument.
      
      Those, in turn, can close sockets and invoke __scm_destroy() again.
      
      There is nothing which limits how deeply this can occur.
      
      The idea for how to fix this is from Linus.  Basically, we do all of
      the fput()s at the top level by collecting all of the scm_fp_list
      objects hit by an fput().  Inside of the initial __scm_destroy() we
      keep running the list until it is empty.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f8d570a4
    • J
      Fix logic error in rfkill_check_duplicity · 4a9d9167
      Jonathan McDowell 提交于
      > I'll have a prod at why the [hso] rfkill stuff isn't working next
      
      Ok, I believe this is due to the addition of rfkill_check_duplicity in
      rfkill and the fact that test_bit actually returns a negative value
      rather than the postive one expected (which is of course equally true).
      So when the second WLAN device (the hso device, with the EEE PC WLAN
      being the first) comes along rfkill_check_duplicity returns a negative
      value and so rfkill_register returns an error. Patch below fixes this
      for me.
      Signed-Off-By: NJonathan McDowell <noodles@earth.li>
      Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      4a9d9167
  4. 06 11月, 2008 11 次提交
    • B
      bonding: send IPv6 neighbor advertisement on failover · 305d552a
      Brian Haley 提交于
      This patch adds better IPv6 failover support for bonding devices,
      especially when in active-backup mode and there are only IPv6 addresses
      configured, as reported by Alex Sidorenko.
      
      - Creates a new file, net/drivers/bonding/bond_ipv6.c, for the
         IPv6-specific routines.  Both regular bonds and VLANs over bonds
         are supported.
      
      - Adds a new tunable, num_unsol_na, to limit the number of unsolicited
         IPv6 Neighbor Advertisements that are sent on a failover event.
         Default is 1.
      
      - Creates two new IPv6 neighbor discovery functions:
      
         ndisc_build_skb()
         ndisc_send_skb()
      
         These were required to support VLANs since we have to be able to
         add the VLAN id to the skb since ndisc_send_na() and friends
         shouldn't be asked to do this.  These two routines are basically
         __ndisc_send() split into two pieces, in a slightly different order.
      
      - Updates Documentation/networking/bonding.txt and bumps the rev of bond
         support to 3.4.0.
      
      On failover, this new code will generate one packet:
      
      - An unsolicited IPv6 Neighbor Advertisement, which helps the switch
         learn that the address has moved to the new slave.
      
      Testing has shown that sending just the NA results in pretty good
      behavior when in active-back mode, I saw no lost ping packets for example.
      Signed-off-by: NBrian Haley <brian.haley@hp.com>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      305d552a
    • E
      net: Don't leak packets when a netns is going down · 0a36b345
      Eric W. Biederman 提交于
      I have been tracking for a while a case where when the
      network namespace exits the cleanup gets stck in an
      endless precessess of:
      
      unregister_netdevice: waiting for lo to become free. Usage count = 3
      unregister_netdevice: waiting for lo to become free. Usage count = 3
      unregister_netdevice: waiting for lo to become free. Usage count = 3
      unregister_netdevice: waiting for lo to become free. Usage count = 3
      unregister_netdevice: waiting for lo to become free. Usage count = 3
      unregister_netdevice: waiting for lo to become free. Usage count = 3
      unregister_netdevice: waiting for lo to become free. Usage count = 3
      
      It turns out that if you listen on a multicast address an unsubscribe
      packet is sent when the network device goes down.   If you shutdown
      the network namespace without carefully cleaning up this can trigger
      the unsubscribe packet to be sent over the loopback interface while
      the network namespace is going down.
      
      All of which is fine except when we drop the packet and forget to
      free it leaking the skb and the dst entry attached to.  As it
      turns out the dst entry hold a reference to the idev which holds
      the dev and keeps everything from being cleaned up.  Yuck!
      
      By fixing my earlier thinko and add the needed kfree_skb and everything
      cleans up beautifully. 
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0a36b345
    • E
      net: Guaranetee the proper ordering of the loopback device. · ae33bc40
      Eric W. Biederman 提交于
      I was recently hunting a bug that occurred in network namespace
      cleanup.  In looking at the code it became apparrent that we have
      and will continue to have cases where if we have anything going
      on in a network namespace there will be assumptions that the
      loopback device is present.   Things like sending igmp unsubscribe
      messages when we bring down network devices invokes the routing
      code which assumes that at least the loopback driver is present.
      
      Therefore to avoid magic initcall ordering hackery that is hard
      to follow and hard to get right insert a call to register the
      loopback device directly from net_dev_init().    This guarantes
      that the loopback device is the first device registered and
      the last network device to go away.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ae33bc40
    • E
      netns: Delete virtual interfaces during namespace cleanup · d0c082ce
      Eric W. Biederman 提交于
      When physical devices are inside of network namespace and that
      network namespace terminates we can not make them go away.  We
      have to keep them and moving them to the initial network namespace
      is the best we can do.
      
      For virtual devices left in a network namespace that is exiting
      we have no need to preserve them and we now have the infrastructure
      that allows us to delete them.  So delete virtual devices when we
      exit a network namespace.  Keeping the necessary user space clean up
      after a network namespace exits much more tractable.
      Acked-by: NDaniel Lezcano <dlezcano@fr.ibm.com>
      Acked-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d0c082ce
    • R
      net/9p: fix printk format warnings · b0d5fdef
      Randy Dunlap 提交于
      Fix printk format warnings in net/9p.
      Built cleanly on 7 arches.
      
      net/9p/client.c:820: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'u64'
      net/9p/client.c:820: warning: format '%llx' expects type 'long long unsigned int', but argument 5 has type 'u64'
      net/9p/client.c:867: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'u64'
      net/9p/client.c:867: warning: format '%llx' expects type 'long long unsigned int', but argument 5 has type 'u64'
      net/9p/client.c:932: warning: format '%llx' expects type 'long long unsigned int', but argument 5 has type 'u64'
      net/9p/client.c:932: warning: format '%llx' expects type 'long long unsigned int', but argument 6 has type 'u64'
      net/9p/client.c:982: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'u64'
      net/9p/client.c:982: warning: format '%llx' expects type 'long long unsigned int', but argument 5 has type 'u64'
      net/9p/client.c:1025: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'u64'
      net/9p/client.c:1025: warning: format '%llx' expects type 'long long unsigned int', but argument 5 has type 'u64'
      net/9p/client.c:1227: warning: format '%llx' expects type 'long long unsigned int', but argument 7 has type 'u64'
      net/9p/client.c:1227: warning: format '%llx' expects type 'long long unsigned int', but argument 12 has type 'u64'
      net/9p/client.c:1227: warning: format '%llx' expects type 'long long unsigned int', but argument 8 has type 'u64'
      net/9p/client.c:1227: warning: format '%llx' expects type 'long long unsigned int', but argument 13 has type 'u64'
      net/9p/client.c:1252: warning: format '%llx' expects type 'long long unsigned int', but argument 7 has type 'u64'
      net/9p/client.c:1252: warning: format '%llx' expects type 'long long unsigned int', but argument 12 has type 'u64'
      net/9p/client.c:1252: warning: format '%llx' expects type 'long long unsigned int', but argument 8 has type 'u64'
      net/9p/client.c:1252: warning: format '%llx' expects type 'long long unsigned int', but argument 13 has type 'u64'
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      b0d5fdef
    • R
      unsigned fid->fid cannot be negative · 9f3e9bbe
      Roel Kluin 提交于
      Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      9f3e9bbe
    • H
      9p: rdma: remove duplicated #include · 1558c621
      Huang Weiyi 提交于
      Removed duplicated #include <rdma/ib_verbs.h> in
      net/9p/trans_rdma.c.
      Signed-off-by: NHuang Weiyi <weiyi.huang@gmail.com>
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      1558c621
    • T
      p9: Fix leak of waitqueue in request allocation path · 45abdf1c
      Tom Tucker 提交于
      If a T or R fcall cannot be allocated, the function returns an error
      but neglects to free the wait queue that was successfully allocated.
      
      If it comes through again a second time this wq will be overwritten
      with a new allocation and the old allocation will be leaked.
      
      Also, if the client is subsequently closed, the close path will
      attempt to clean up these allocations, so set the req fields to
      NULL to avoid duplicate free.
      Signed-off-by: NTom Tucker <tom@opengridcomputing.com>
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      45abdf1c
    • T
      9p: Remove unneeded free of fcall for Flush · 82b189ea
      Tom Tucker 提交于
      T and R fcall are reused until the client is destroyed. There does
      not need to be a special case for Flush
      Signed-off-by: NTom Tucker <tom@opengridcomputing.com>
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      82b189ea
    • T
      9p: Make all client spin locks IRQ safe · cac23d65
      Tom Tucker 提交于
      The client lock must be IRQ safe. Some of the lock acquisition paths
      took regular spin locks.
      Signed-off-by: NTom Tucker <tom@opengridcomputing.com>
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      cac23d65
    • T
      9p: rdma: Set trans prior to requesting async connection ops · 517ac45a
      Tom Tucker 提交于
      The RDMA connection manager is fundamentally asynchronous.
      Since the async callback context is the client pointer, the
      transport in the client struct needs to be set prior to calling
      the first async op.
      Signed-off-by: NTom Tucker <tom@opengridcomputing.com>
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      517ac45a
  5. 05 11月, 2008 12 次提交
    • D
      tcp: Fix recvmsg MSG_PEEK influence of blocking behavior. · 518a09ef
      David S. Miller 提交于
      Vito Caputo noticed that tcp_recvmsg() returns immediately from
      partial reads when MSG_PEEK is used.  In particular, this means that
      SO_RCVLOWAT is not respected.
      
      Simply remove the test.  And this matches the behavior of several
      other systems, including BSD.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      518a09ef
    • A
      netfilter: netns ct: walk netns list under RTNL · efb9a8c2
      Alexey Dobriyan 提交于
      netns list (just list) is under RTNL. But helper and proto unregistration
      happen during rmmod when RTNL is not held, and that's how it was tested:
      modprobe/rmmod vs clone(CLONE_NEWNET)/exit.
      
      BUG: unable to handle kernel paging request at 0000000000100100	<===
      IP: [<ffffffffa009890f>] nf_conntrack_l4proto_unregister+0x96/0xae [nf_conntrack]
      PGD 15e300067 PUD 15e1d8067 PMD 0
      Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
      last sysfs file: /sys/kernel/uevent_seqnum
      CPU 0
      Modules linked in: nf_conntrack_proto_sctp(-) nf_conntrack_proto_dccp(-) af_packet iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 iptable_filter ip_tables xt_tcpudp ip6table_filter ip6_tables x_tables ipv6 sr_mod cdrom [last unloaded: nf_conntrack_proto_sctp]
      Pid: 16758, comm: rmmod Not tainted 2.6.28-rc2-netns-xfrm #3
      RIP: 0010:[<ffffffffa009890f>]  [<ffffffffa009890f>] nf_conntrack_l4proto_unregister+0x96/0xae [nf_conntrack]
      RSP: 0018:ffff88015dc1fec8  EFLAGS: 00010212
      RAX: 0000000000000000 RBX: 00000000001000f8 RCX: 0000000000000000
      RDX: ffffffffa009575c RSI: 0000000000000003 RDI: ffffffffa00956b5
      RBP: ffff88015dc1fed8 R08: 0000000000000002 R09: 0000000000000000
      R10: 0000000000000000 R11: ffff88015dc1fe48 R12: ffffffffa0458f60
      R13: 0000000000000880 R14: 00007fff4c361d30 R15: 0000000000000880
      FS:  00007f624435a6f0(0000) GS:ffffffff80521580(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      CR2: 0000000000100100 CR3: 0000000168969000 CR4: 00000000000006e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process rmmod (pid: 16758, threadinfo ffff88015dc1e000, task ffff880179864218)
      Stack:
       ffffffffa0459100 0000000000000000 ffff88015dc1fee8 ffffffffa0457934
       ffff88015dc1ff78 ffffffff80253fef 746e6e6f635f666e 6f72705f6b636172
       00707463735f6f74 ffffffff8024cb30 00000000023b8010 0000000000000000
      Call Trace:
       [<ffffffffa0457934>] nf_conntrack_proto_sctp_fini+0x10/0x1e [nf_conntrack_proto_sctp]
       [<ffffffff80253fef>] sys_delete_module+0x19f/0x1fe
       [<ffffffff8024cb30>] ? trace_hardirqs_on_caller+0xf0/0x114
       [<ffffffff803ea9b2>] ? trace_hardirqs_on_thunk+0x3a/0x3f
       [<ffffffff8020b52b>] system_call_fastpath+0x16/0x1b
      Code: 13 35 e0 e8 c4 6c 1a e0 48 8b 1d 6d c6 46 e0 eb 16 48 89 df 4c 89 e2 48 c7 c6 fc 85 09 a0 e8 61 cd ff ff 48 8b 5b 08 48 83 eb 08 <48> 8b 43 08 0f 18 08 48 8d 43 08 48 3d 60 4f 50 80 75 d3 5b 41
      RIP  [<ffffffffa009890f>] nf_conntrack_l4proto_unregister+0x96/0xae [nf_conntrack]
       RSP <ffff88015dc1fec8>
      CR2: 0000000000100100
      ---[ end trace bde8ac82debf7192 ]---
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      efb9a8c2
    • B
      ipv6: fix run pending DAD when interface becomes ready · e3ec6cfc
      Benjamin Thery 提交于
      With some net devices types, an IPv6 address configured while the
      interface was down can stay 'tentative' forever, even after the interface
      is set up. In some case, pending IPv6 DADs are not executed when the
      device becomes ready.
      
      I observed this while doing some tests with kvm. If I assign an IPv6 
      address to my interface eth0 (kvm driver rtl8139) when it is still down
      then the address is flagged tentative (IFA_F_TENTATIVE). Then, I set
      eth0 up, and to my surprise, the address stays 'tentative', no DAD is
      executed and the address can't be pinged.
      
      I also observed the same behaviour, without kvm, with virtual interfaces
      types macvlan and veth.
      
      Some easy steps to reproduce the issue with macvlan:
      
      1. ip link add link eth0 type macvlan
      2. ip -6 addr add 2003::ab32/64 dev macvlan0
      3. ip addr show dev macvlan0
         ... 
         inet6 2003::ab32/64 scope global tentative
         ...
      4. ip link set macvlan0 up
      5. ip addr show dev macvlan0
         ...
         inet6 2003::ab32/64 scope global tentative
         ...
         Address is still tentative
      
      I think there's a bug in net/ipv6/addrconf.c, addrconf_notify():
      addrconf_dad_run() is not always run when the interface is flagged IF_READY.
      Currently it is only run when receiving NETDEV_CHANGE event. Looks like
      some (virtual) devices doesn't send this event when becoming up.
      
      For both NETDEV_UP and NETDEV_CHANGE events, when the interface becomes
      ready, run_pending should be set to 1. Patch below.
      
      'run_pending = 1' could be moved below the if/else block but it makes 
      the code less readable.
      Signed-off-by: NBenjamin Thery <benjamin.thery@bull.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e3ec6cfc
    • E
      net: sk_free_datagram() should use sk_mem_reclaim_partial() · 270acefa
      Eric Dumazet 提交于
      I noticed a contention on udp_memory_allocated on regular UDP applications.
      
      While tcp_memory_allocated is seldom used, it appears each incoming UDP frame
      is currently touching udp_memory_allocated when queued, and when received by
      application.
      
      One possible solution is to use sk_mem_reclaim_partial() instead of
      sk_mem_reclaim(), so that we keep a small reserve (less than one page)
      of memory for each UDP socket.
      
      We did something very similar on TCP side in commit
      9993e7d3
      ([TCP]: Do not purge sk_forward_alloc entirely in tcp_delack_timer())
      
      A more complex solution would need to convert prot->memory_allocated to
      use a percpu_counter with batches of 64 or 128 pages.
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      270acefa
    • R
      net/9p: fix printk format warnings · b22cecdd
      Randy Dunlap 提交于
      Fix printk format warnings in net/9p.
      Built cleanly on 7 arches.
      
      net/9p/client.c:820: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'u64'
      net/9p/client.c:820: warning: format '%llx' expects type 'long long unsigned int', but argument 5 has type 'u64'
      net/9p/client.c:867: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'u64'
      net/9p/client.c:867: warning: format '%llx' expects type 'long long unsigned int', but argument 5 has type 'u64'
      net/9p/client.c:932: warning: format '%llx' expects type 'long long unsigned int', but argument 5 has type 'u64'
      net/9p/client.c:932: warning: format '%llx' expects type 'long long unsigned int', but argument 6 has type 'u64'
      net/9p/client.c:982: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'u64'
      net/9p/client.c:982: warning: format '%llx' expects type 'long long unsigned int', but argument 5 has type 'u64'
      net/9p/client.c:1025: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'u64'
      net/9p/client.c:1025: warning: format '%llx' expects type 'long long unsigned int', but argument 5 has type 'u64'
      net/9p/client.c:1227: warning: format '%llx' expects type 'long long unsigned int', but argument 7 has type 'u64'
      net/9p/client.c:1227: warning: format '%llx' expects type 'long long unsigned int', but argument 12 has type 'u64'
      net/9p/client.c:1227: warning: format '%llx' expects type 'long long unsigned int', but argument 8 has type 'u64'
      net/9p/client.c:1227: warning: format '%llx' expects type 'long long unsigned int', but argument 13 has type 'u64'
      net/9p/client.c:1252: warning: format '%llx' expects type 'long long unsigned int', but argument 7 has type 'u64'
      net/9p/client.c:1252: warning: format '%llx' expects type 'long long unsigned int', but argument 12 has type 'u64'
      net/9p/client.c:1252: warning: format '%llx' expects type 'long long unsigned int', but argument 8 has type 'u64'
      net/9p/client.c:1252: warning: format '%llx' expects type 'long long unsigned int', but argument 13 has type 'u64'
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b22cecdd
    • G
      dccp: Cleanup routines for feature negotiation · d99a7bd2
      Gerrit Renker 提交于
      This inserts the required de-allocation routines for memory allocated
      by feature negotiation in the socket destructors, replacing
      dccp_feat_clean() in one instance.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: NIan McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d99a7bd2
    • G
      dccp: Per-socket initialisation of feature negotiation · ac75773c
      Gerrit Renker 提交于
      This provides feature-negotiation initialisation for both DCCP sockets
      and DCCP request_sockets, to support feature negotiation during
      connection setup.
      
      It also resolves a FIXME regarding the congestion control
      initialisation.
      
      Thanks to Wei Yongjun for help with the IPv6 side of this patch.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: NIan McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ac75773c
    • G
      dccp: List management for new feature negotiation · 61e6473e
      Gerrit Renker 提交于
      This adds list initial fields and list management functions for the
      new feature negotiation implementation.
      
      Thanks to Arnaldo for suggestions and improvements.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: NIan McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      61e6473e
    • G
      dccp: Implement lookup table for feature-negotiation information · 7d43d1a0
      Gerrit Renker 提交于
      A lookup table for feature-negotiation information, extracted from RFC
      4340/42, is provided by this patch. All currently known features can
      be found in this table, along with their feature location, their
      default value, and type.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: NIan McDonald <ian.mcdonald@jandi.co.nz>
      Acked-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7d43d1a0
    • G
      dccp: Basic data structure for feature negotiation · bd012f2e
      Gerrit Renker 提交于
      This patch prepares for the new and extended feature-negotiation
      routines.
      
      The following feature-negotiation data structures are provided:
      	* a container for the various (SP or NN) values,
      	* symbolic state names to track feature states,
      	* an entry struct which holds all current information together,
      	* elementary functions to fill in and process these structures.
      
      Entry structs are arranged as FIFO for the following reason: RFC 4340
      specifies that if multiple options of the same type are present, they
      are processed in the order of their appearance in the packet; which
      means that this order needs to be preserved in the local data
      structure (the later insertion code also respects this order).
      
      The struct list_head has been chosen for the following reasons: the most
      frequent operations are
      
       * add new entry at tail (when receiving Change or setting socket
         options);
       * delete entry (when Confirm has been received);
       * deep copy of entire list (cloning from listening socket onto
         request socket).
      
      The NN value has been set to 64 bit, which is a currently sufficient
      upper limit (Sequence Window feature has 48 bit).
      
      Thanks to Arnaldo, who contributed the streamlined layout of the entry
      struct.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bd012f2e
    • P
      net: fix packet socket delivery in rx irq handler · 9b22ea56
      Patrick McHardy 提交于
      The changes to deliver hardware accelerated VLAN packets to packet
      sockets (commit bc1d0411) caused a warning for non-NAPI drivers.
      The __vlan_hwaccel_rx() function is called directly from the drivers
      RX function, for non-NAPI drivers that means its still in RX IRQ
      context:
      
      [   27.779463] ------------[ cut here ]------------
      [   27.779509] WARNING: at kernel/softirq.c:136 local_bh_enable+0x37/0x81()
      ...
      [   27.782520]  [<c0264755>] netif_nit_deliver+0x5b/0x75
      [   27.782590]  [<c02bba83>] __vlan_hwaccel_rx+0x79/0x162
      [   27.782664]  [<f8851c1d>] atl1_intr+0x9a9/0xa7c [atl1]
      [   27.782738]  [<c0155b17>] handle_IRQ_event+0x23/0x51
      [   27.782808]  [<c015692e>] handle_edge_irq+0xc2/0x102
      [   27.782878]  [<c0105fd5>] do_IRQ+0x4d/0x64
      
      Split hardware accelerated VLAN reception into two parts to fix this:
      
      - __vlan_hwaccel_rx just stores the VLAN TCI and performs the VLAN
        device lookup, then calls netif_receive_skb()/netif_rx()
      
      - vlan_hwaccel_do_receive(), which is invoked by netif_receive_skb()
        in softirq context, performs the real reception and delivery to
        packet sockets.
      Reported-and-tested-by: NRamon Casellas <ramon.casellas@cttc.es>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9b22ea56
    • A
      xfrm: Have af-specific init_tempsel() initialize family field of temporary selector · 79654a76
      Andreas Steffen 提交于
      While adding MIGRATE support to strongSwan, Andreas Steffen noticed that
      the selectors provided in XFRM_MSG_ACQUIRE have their family field
      uninitialized (those in MIGRATE do have their family set).
      
      Looking at the code, this is because the af-specific init_tempsel()
      (called via afinfo->init_tempsel() in xfrm_init_tempsel()) do not set
      the value.
      Reported-by: NAndreas Steffen <andreas.steffen@strongswan.org>
      Acked-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NArnaud Ebalard <arno@natisbad.org>
      79654a76
  6. 04 11月, 2008 6 次提交