Skip to content
Snippets Groups Projects
  1. Jun 09, 2013
    • Nadav Har'El's avatar
      Implement shutdown() on unix domain sockets · 30f6e9dd
      Nadav Har'El authored
      The existing shutdown() code only worked with AF_INET sockets, and returned
      ENOTSOCK for AT_LOCAL sockets, because we implemented the latter sockets in
      completely different code (in af_local.cc).
      
      So in uipc_syscalls_wrap.c, the same place we call a the special af-local
      socketpair(), we also need to call the special af-local shutdown().
      
      The way we do it is a bit ugly, but effective: shutdown() first calls
      shutdown_af_local(), and if that returns ENOTSOCK (so it's not an af_local
      socket), we continue trying the regular socket shutdown code.
      
      A better way would have been to add shutdown() to the fileops table -
      either the generic one (why not?), or invent a new mechanism whereby
      certain file types (in this case, "sockets" of all types) can have additional
      ops tables including in this case a shutdown() operation. Linux has
      something of this sort for implementing shutdown().
      30f6e9dd
  2. May 31, 2013
  3. May 30, 2013
  4. May 28, 2013
    • Nadav Har'El's avatar
      Fix getsockname() failure · 98a1fd2b
      Nadav Har'El authored
      getsockname() used to fail because by the time the call chain reached
      kern_getsockname() it got addrlen=0. The problem is getsockname1()
      which gives it an initialized local variable instead of the given
      addrlen.
      
      Most of these layers and copies are redundant, and are only left because
      of previous incarnations of the code which had copies from user space -
      but we need to at least get the unnecessary copies right ;-)
      98a1fd2b
  5. May 27, 2013
  6. May 26, 2013
    • Guy Zana's avatar
      bsd: rewrite callout mechanism to avoid a race · c5dbdcc8
      Guy Zana authored
      the old implementation used threads for dispatching callouts, each callout
      owned a thread and it suffered from a race where a callout structure could have
      been deleted before the callout thread even begun.
      
      the current implementation is dispatching all callouts in a single callout
      dispatcher thread, it maintains an ordered list of callouts to achieve that.
      
      this patch solve a crash with the TCPDownloadFile test, that now proceeds.
      c5dbdcc8
    • Guy Zana's avatar
      uma: fix order to finit/dtor in uma_zfree() · 357d68d7
      Guy Zana authored
      the mbuf ext buffer is freed in the dtor, so it should be called before finit.
      this is fixing a crash that surfaced by using the conf-memory-debug=1
      357d68d7
    • Guy Zana's avatar
      bsd: zero a few uninitialized structures · 62712056
      Guy Zana authored
      this haven't caused a real bug, I just noticed it while tracing.
      it may be dangerous if in some flow, the stack will not be zeroed
      62712056
    • Guy Zana's avatar
      bsd: implement panic() · 91db62cf
      Guy Zana authored
      91db62cf
  7. May 24, 2013
Loading