1. 20 11月, 2008 10 次提交
    • A
      net: fix tiny output corruption of /proc/net/snmp6 · 5ece6c2d
      Alexey Dobriyan 提交于
      Because "name" is static, it can be occasionally be filled with
      somewhat garbage if two processes read /proc/net/snmp6.
      
      Also, remove useless casts and "-1" -- snprintf() correctly terminates it's
      output.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5ece6c2d
    • B
      ipv6: use seq_release_private for ip6mr.c /proc entries · eedd726e
      Benjamin Thery 提交于
      In ip6mr.c, /proc entries /proc/net/ip6_mr_cache and /proc/net/ip6_mr_vif
      are opened with seq_open_private(), thus seq_release_private() should be 
      used to release them.
      Should fix a small memory leak.
      Signed-off-by: NBenjamin Thery <benjamin.thery@bull.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      eedd726e
    • P
      pkt_sched: fix missing check for packet overrun in qdisc_dump_stab() · 3aa4614d
      Patrick McHardy 提交于
      nla_nest_start() might return NULL, causing a NULL pointer dereference.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3aa4614d
    • B
      TPROXY: supply a struct flowi->flags argument in inet_sk_rebuild_header() · c8283845
      Balazs Scheidler 提交于
          inet_sk_rebuild_header() does a new route lookup if the dst_entry
          associated with a socket becomes stale. However inet_sk_rebuild_header()
          didn't use struct flowi->flags, causing the route lookup to
          fail for foreign-bound IP_TRANSPARENT sockets, causing an error
          state to be set for the sockets in question.
      Signed-off-by: NBalazs Scheidler <bazsi@balabit.hu>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c8283845
    • B
      TPROXY: fill struct flowi->flags in udp_sendmsg() · a134f85c
      Balazs Scheidler 提交于
          udp_sendmsg() didn't fill struct flowi->flags, which means that
          the route lookup would fail for non-local IPs even if the
          IP_TRANSPARENT sockopt was set.
      
          This prevents sendto() to work properly for UDP sockets, whereas
          bind(foreign-ip) + connect() + send() worked fine.
      Signed-off-by: NBalazs Scheidler <bazsi@balabit.hu>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a134f85c
    • U
      reintroduce accept4 · de11defe
      Ulrich Drepper 提交于
      Introduce a new accept4() system call.  The addition of this system call
      matches analogous changes in 2.6.27 (dup3(), evenfd2(), signalfd4(),
      inotify_init1(), epoll_create1(), pipe2()) which added new system calls
      that differed from analogous traditional system calls in adding a flags
      argument that can be used to access additional functionality.
      
      The accept4() system call is exactly the same as accept(), except that
      it adds a flags bit-mask argument.  Two flags are initially implemented.
      (Most of the new system calls in 2.6.27 also had both of these flags.)
      
      SOCK_CLOEXEC causes the close-on-exec (FD_CLOEXEC) flag to be enabled
      for the new file descriptor returned by accept4().  This is a useful
      security feature to avoid leaking information in a multithreaded
      program where one thread is doing an accept() at the same time as
      another thread is doing a fork() plus exec().  More details here:
      http://udrepper.livejournal.com/20407.html "Secure File Descriptor Handling",
      Ulrich Drepper).
      
      The other flag is SOCK_NONBLOCK, which causes the O_NONBLOCK flag
      to be enabled on the new open file description created by accept4().
      (This flag is merely a convenience, saving the use of additional calls
      fcntl(F_GETFL) and fcntl (F_SETFL) to achieve the same result.
      
      Here's a test program.  Works on x86-32.  Should work on x86-64, but
      I (mtk) don't have a system to hand to test with.
      
      It tests accept4() with each of the four possible combinations of
      SOCK_CLOEXEC and SOCK_NONBLOCK set/clear in 'flags', and verifies
      that the appropriate flags are set on the file descriptor/open file
      description returned by accept4().
      
      I tested Ulrich's patch in this thread by applying against 2.6.28-rc2,
      and it passes according to my test program.
      
      /* test_accept4.c
      
        Copyright (C) 2008, Linux Foundation, written by Michael Kerrisk
             <mtk.manpages@gmail.com>
      
        Licensed under the GNU GPLv2 or later.
      */
      #define _GNU_SOURCE
      #include <unistd.h>
      #include <sys/syscall.h>
      #include <sys/socket.h>
      #include <netinet/in.h>
      #include <stdlib.h>
      #include <fcntl.h>
      #include <stdio.h>
      #include <string.h>
      
      #define PORT_NUM 33333
      
      #define die(msg) do { perror(msg); exit(EXIT_FAILURE); } while (0)
      
      /**********************************************************************/
      
      /* The following is what we need until glibc gets a wrapper for
        accept4() */
      
      /* Flags for socket(), socketpair(), accept4() */
      #ifndef SOCK_CLOEXEC
      #define SOCK_CLOEXEC    O_CLOEXEC
      #endif
      #ifndef SOCK_NONBLOCK
      #define SOCK_NONBLOCK   O_NONBLOCK
      #endif
      
      #ifdef __x86_64__
      #define SYS_accept4 288
      #elif __i386__
      #define USE_SOCKETCALL 1
      #define SYS_ACCEPT4 18
      #else
      #error "Sorry -- don't know the syscall # on this architecture"
      #endif
      
      static int
      accept4(int fd, struct sockaddr *sockaddr, socklen_t *addrlen, int flags)
      {
         printf("Calling accept4(): flags = %x", flags);
         if (flags != 0) {
             printf(" (");
             if (flags & SOCK_CLOEXEC)
                 printf("SOCK_CLOEXEC");
             if ((flags & SOCK_CLOEXEC) && (flags & SOCK_NONBLOCK))
                 printf(" ");
             if (flags & SOCK_NONBLOCK)
                 printf("SOCK_NONBLOCK");
             printf(")");
         }
         printf("\n");
      
      #if USE_SOCKETCALL
         long args[6];
      
         args[0] = fd;
         args[1] = (long) sockaddr;
         args[2] = (long) addrlen;
         args[3] = flags;
      
         return syscall(SYS_socketcall, SYS_ACCEPT4, args);
      #else
         return syscall(SYS_accept4, fd, sockaddr, addrlen, flags);
      #endif
      }
      
      /**********************************************************************/
      
      static int
      do_test(int lfd, struct sockaddr_in *conn_addr,
             int closeonexec_flag, int nonblock_flag)
      {
         int connfd, acceptfd;
         int fdf, flf, fdf_pass, flf_pass;
         struct sockaddr_in claddr;
         socklen_t addrlen;
      
         printf("=======================================\n");
      
         connfd = socket(AF_INET, SOCK_STREAM, 0);
         if (connfd == -1)
             die("socket");
         if (connect(connfd, (struct sockaddr *) conn_addr,
                     sizeof(struct sockaddr_in)) == -1)
             die("connect");
      
         addrlen = sizeof(struct sockaddr_in);
         acceptfd = accept4(lfd, (struct sockaddr *) &claddr, &addrlen,
                            closeonexec_flag | nonblock_flag);
         if (acceptfd == -1) {
             perror("accept4()");
             close(connfd);
             return 0;
         }
      
         fdf = fcntl(acceptfd, F_GETFD);
         if (fdf == -1)
             die("fcntl:F_GETFD");
         fdf_pass = ((fdf & FD_CLOEXEC) != 0) ==
                    ((closeonexec_flag & SOCK_CLOEXEC) != 0);
         printf("Close-on-exec flag is %sset (%s); ",
                 (fdf & FD_CLOEXEC) ? "" : "not ",
                 fdf_pass ? "OK" : "failed");
      
         flf = fcntl(acceptfd, F_GETFL);
         if (flf == -1)
             die("fcntl:F_GETFD");
         flf_pass = ((flf & O_NONBLOCK) != 0) ==
                    ((nonblock_flag & SOCK_NONBLOCK) !=0);
         printf("nonblock flag is %sset (%s)\n",
                 (flf & O_NONBLOCK) ? "" : "not ",
                 flf_pass ? "OK" : "failed");
      
         close(acceptfd);
         close(connfd);
      
         printf("Test result: %s\n", (fdf_pass && flf_pass) ? "PASS" : "FAIL");
         return fdf_pass && flf_pass;
      }
      
      static int
      create_listening_socket(int port_num)
      {
         struct sockaddr_in svaddr;
         int lfd;
         int optval;
      
         memset(&svaddr, 0, sizeof(struct sockaddr_in));
         svaddr.sin_family = AF_INET;
         svaddr.sin_addr.s_addr = htonl(INADDR_ANY);
         svaddr.sin_port = htons(port_num);
      
         lfd = socket(AF_INET, SOCK_STREAM, 0);
         if (lfd == -1)
             die("socket");
      
         optval = 1;
         if (setsockopt(lfd, SOL_SOCKET, SO_REUSEADDR, &optval,
                        sizeof(optval)) == -1)
             die("setsockopt");
      
         if (bind(lfd, (struct sockaddr *) &svaddr,
                  sizeof(struct sockaddr_in)) == -1)
             die("bind");
      
         if (listen(lfd, 5) == -1)
             die("listen");
      
         return lfd;
      }
      
      int
      main(int argc, char *argv[])
      {
         struct sockaddr_in conn_addr;
         int lfd;
         int port_num;
         int passed;
      
         passed = 1;
      
         port_num = (argc > 1) ? atoi(argv[1]) : PORT_NUM;
      
         memset(&conn_addr, 0, sizeof(struct sockaddr_in));
         conn_addr.sin_family = AF_INET;
         conn_addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
         conn_addr.sin_port = htons(port_num);
      
         lfd = create_listening_socket(port_num);
      
         if (!do_test(lfd, &conn_addr, 0, 0))
             passed = 0;
         if (!do_test(lfd, &conn_addr, SOCK_CLOEXEC, 0))
             passed = 0;
         if (!do_test(lfd, &conn_addr, 0, SOCK_NONBLOCK))
             passed = 0;
         if (!do_test(lfd, &conn_addr, SOCK_CLOEXEC, SOCK_NONBLOCK))
             passed = 0;
      
         close(lfd);
      
         exit(passed ? EXIT_SUCCESS : EXIT_FAILURE);
      }
      
      [mtk.manpages@gmail.com: rewrote changelog, updated test program]
      Signed-off-by: NUlrich Drepper <drepper@redhat.com>
      Tested-by: NMichael Kerrisk <mtk.manpages@gmail.com>
      Acked-by: NMichael Kerrisk <mtk.manpages@gmail.com>
      Cc: <linux-api@vger.kernel.org>
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      de11defe
    • D
      net: Do not fire linkwatch events until the device is registered. · b4730016
      David S. Miller 提交于
      Several device drivers try to do things like netif_carrier_off()
      before register_netdev() is invoked.  This is bogus, but too many
      drivers do this to fix them all up in one go.
      Reported-by: NFolkert van Heusden <folkert@vanheusden.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b4730016
    • A
      phonet: fix compilation with gcc-3.4 · 566521d6
      Alexey Dobriyan 提交于
        CC [M]  net/phonet/af_phonet.o
      net/phonet/af_phonet.c: In function `pn_socket_create':
      net/phonet/af_phonet.c:38: sorry, unimplemented: inlining failed in call to 'phonet_proto_put': function body not available
      net/phonet/af_phonet.c:99: sorry, unimplemented: called from here
      make[3]: *** [net/phonet/af_phonet.o] Error 1
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      566521d6
    • R
      pktgen: fix multiple queue warning · bfdbc0ac
      Robert Olsson 提交于
      As number of TX queues in unrelated to number of CPU's we remove this test
      and just make sure nxtq never gets exceeded.
      Signed-off-by: NRobert Olsson <robert.olsson@its.uu.se>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bfdbc0ac
    • B
      net: fix ip_mr_init() error path · c3e38896
      Benjamin Thery 提交于
      Similarly to IPv6 ip6_mr_init() (fixed last week), the order of cleanup
      operations in the error/exit section of ip_mr_init() is completely 
      inversed. It should be the other way around.
      Also a del_timer() is missing in the error path.
      
      I should have guessed last week that this same error existed in ipmr.c
      too, as ip6mr.c is largely inspired by ipmr.c.
      Signed-off-by: NBenjamin Thery <benjamin.thery@bull.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c3e38896
  2. 19 11月, 2008 1 次提交
    • J
      mac80211: remove ieee80211_notify_mac · 8e3bad65
      Johannes Berg 提交于
      Before ieee80211_notify_mac() was added, it was presented with the
      use case of using it to tell mac80211 that the association may
      have been lost because the firmware crashed/reset.
      
      Since then, it has also been used by iwlwifi to (slightly) speed
      up re-association after resume, a workaround around the fact that
      mac80211 has no suspend/resume handling yet. It is also not used
      by any other drivers, so clearly it cannot be necessary for "good
      enough" suspend/resume.
      
      Unfortunately, the callback suffers from a severe problem: It only
      works for station mode. If suspend/resume happens while in IBSS or
      any other mode (but station), then the callback is pointless.
      
      Recently, it has created a number of locking issues, first because
      it required rtnl locking rather than RCU due to calling sleeping
      functions within the critical section, and now because it's called
      by iwlwifi from the mac80211 workqueue that may not use the rtnl
      because it is flushed under rtnl.
      (cf. http://bugzilla.kernel.org/show_bug.cgi?id=12046)
      
      I think, therefore, that we should take a step back, remove it
      entirely for now and add the small feature it provided properly.
      For suspend and resume we will need to introduce new hooks, and for
      the case where the firmware was reset the driver will probably
      simply just pretend it has done a suspend/resume cycle to get
      mac80211 to reprogram the hardware completely, not just try to
      connect to the current AP again in station mode. When doing so, we
      will need to take into account locking issues and possibly defer
      to schedule_work from within mac80211 for the resume operation,
      while the suspend operation must be done directly.
      
      Proper suspend/resume should also not necessarily try to reconnect
      to the current AP, the time spent in suspend may have been short
      enough to not be disconnected from the AP, mac80211 will detect
      that the AP went out of range quickly if it did, and if the
      association is lost then the AP will disassoc as soon as a data
      frame is sent. We might also take into account WWOL then, and
      have mac80211 program the hardware into such a mode where it is
      available and requested.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      8e3bad65
  3. 17 11月, 2008 2 次提交
  4. 15 11月, 2008 2 次提交
    • P
      scm: fix scm_fp_list->list initialization made in wrong place · 5421ae01
      Pavel Emelyanov 提交于
      This is the next page of the scm recursion story (the commit 
      f8d570a4 net: Fix recursive descent in __scm_destroy()).
      
      In function scm_fp_dup(), the INIT_LIST_HEAD(&fpl->list) of newly
      created fpl is done *before* the subsequent memcpy from the old 
      structure and thus the freshly initialized list is overwritten.
      
      But that's OK, since this initialization is not required at all,
      since the fpl->list is list_add-ed at the destruction time in any
      case (and is unused in other code), so I propose to drop both
      initializations, rather than moving it after the memcpy.
      
      Please, correct me if I miss something significant.
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5421ae01
    • R
      9p: restrict RDMA usage · 4ff429e6
      Randy Dunlap 提交于
      linux-next:
      
      Make 9p's RDMA option depend on INET since it uses Infiniband rdma_*
      functions and that code depends on INET.  Otherwise 9p can try to
      use symbols which don't exist.
      
      ERROR: "rdma_destroy_id" [net/9p/9pnet_rdma.ko] undefined!
      ERROR: "rdma_connect" [net/9p/9pnet_rdma.ko] undefined!
      ERROR: "rdma_create_id" [net/9p/9pnet_rdma.ko] undefined!
      ERROR: "rdma_create_qp" [net/9p/9pnet_rdma.ko] undefined!
      ERROR: "rdma_resolve_route" [net/9p/9pnet_rdma.ko] undefined!
      ERROR: "rdma_disconnect" [net/9p/9pnet_rdma.ko] undefined!
      ERROR: "rdma_resolve_addr" [net/9p/9pnet_rdma.ko] undefined!
      
      I used an if/endif block so that the menu items would remain
      presented together.
      
      Also correct an article adjective.
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      4ff429e6
  5. 14 11月, 2008 1 次提交
    • I
      lockdep: include/linux/lockdep.h - fix warning in net/bluetooth/af_bluetooth.c · e8f6fbf6
      Ingo Molnar 提交于
      fix this warning:
      
        net/bluetooth/af_bluetooth.c:60: warning: ‘bt_key_strings’ defined but not used
        net/bluetooth/af_bluetooth.c:71: warning: ‘bt_slock_key_strings’ defined but not used
      
      this is a lockdep macro problem in the !LOCKDEP case.
      
      We cannot convert it to an inline because the macro works on multiple types,
      but we can mark the parameter used.
      
      [ also clean up a misaligned tab in sock_lock_init_class_and_name() ]
      
      [ also remove #ifdefs from around af_family_clock_key strings - which
        were certainly added to get rid of the ugly build warnings. ]
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e8f6fbf6
  6. 13 11月, 2008 4 次提交
    • R
      9p: restrict RDMA usage · 1fa989e8
      Randy Dunlap 提交于
      Make 9p's RDMA option depend on INET since it uses Infiniband rdma_*
      functions and that code depends on INET.  Otherwise 9p can try to
      use symbols which don't exist.
      
      ERROR: "rdma_destroy_id" [net/9p/9pnet_rdma.ko] undefined!
      ERROR: "rdma_connect" [net/9p/9pnet_rdma.ko] undefined!
      ERROR: "rdma_create_id" [net/9p/9pnet_rdma.ko] undefined!
      ERROR: "rdma_create_qp" [net/9p/9pnet_rdma.ko] undefined!
      ERROR: "rdma_resolve_route" [net/9p/9pnet_rdma.ko] undefined!
      ERROR: "rdma_disconnect" [net/9p/9pnet_rdma.ko] undefined!
      ERROR: "rdma_resolve_addr" [net/9p/9pnet_rdma.ko] undefined!
      
      I used an if/endif block so that the menu items would remain
      presented together.
      
      Also correct an article adjective.
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1fa989e8
    • A
      net: shy netns_ok check · 9c0188ac
      Alexey Dobriyan 提交于
      Failure to pass netns_ok check is SILENT, except some MIB counter is
      incremented somewhere.
      
      And adding "netns_ok = 1" (after long head-scratching session) is
      usually the last step in making some protocol netns-ready...
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9c0188ac
    • B
      ipv6: routing header fixes · 6e093d9d
      Brian Haley 提交于
      This patch fixes two bugs:
      
      1. setsockopt() of anything but a Type 2 routing header should return
      EINVAL instead of EPERM.  Noticed by Shan Wei
      (shanwei@cn.fujitsu.com).
      
      2. setsockopt()/sendmsg() of a Type 2 routing header with invalid
      length or segments should return EINVAL.  These values are statically
      fixed in RFC 3775, unlike the variable Type 0 was.
      Signed-off-by: NBrian Haley <brian.haley@hp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6e093d9d
    • J
      mac80211: fix notify_mac function · db7fb86b
      Johannes Berg 提交于
      The ieee80211_notify_mac() function uses ieee80211_sta_req_auth() which
      in turn calls ieee80211_set_disassoc() which calls a few functions that
      need to be able to sleep, so ieee80211_notify_mac() cannot use RCU
      locking for the interface list and must use rtnl locking instead.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      db7fb86b
  7. 12 11月, 2008 2 次提交
  8. 11 11月, 2008 8 次提交
  9. 10 11月, 2008 1 次提交
    • M
      net: unix: fix inflight counting bug in garbage collector · 6209344f
      Miklos Szeredi 提交于
      Previously I assumed that the receive queues of candidates don't
      change during the GC.  This is only half true, nothing can be received
      from the queues (see comment in unix_gc()), but buffers could be added
      through the other half of the socket pair, which may still have file
      descriptors referring to it.
      
      This can result in inc_inflight_move_tail() erronously increasing the
      "inflight" counter for a unix socket for which dec_inflight() wasn't
      previously called.  This in turn can trigger the "BUG_ON(total_refs <
      inflight_refs)" in a later garbage collection run.
      
      Fix this by only manipulating the "inflight" counter for sockets which
      are candidates themselves.  Duplicating the file references in
      unix_attach_fds() is also needed to prevent a socket becoming a
      candidate for GC while the skb that contains it is not yet queued.
      Reported-by: NAndrea Bittau <a.bittau@cs.ucl.ac.uk>
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      CC: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6209344f
  10. 07 11月, 2008 4 次提交
  11. 06 11月, 2008 5 次提交
    • 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