1. 27 1月, 2020 1 次提交
    • D
      Tools: hv: Reopen the devices if read() or write() returns errors · 9fc3c01a
      Dexuan Cui 提交于
      The state machine in the hv_utils driver can run out of order in some
      corner cases, e.g. if the kvp daemon doesn't call write() fast enough
      due to some reason, kvp_timeout_func() can run first and move the state
      to HVUTIL_READY; next, when kvp_on_msg() is called it returns -EINVAL
      since kvp_transaction.state is smaller than HVUTIL_USERSPACE_REQ; later,
      the daemon's write() gets an error -EINVAL, and the daemon will exit().
      
      We can reproduce the issue by sending a SIGSTOP signal to the daemon, wait
      for 1 minute, and send a SIGCONT signal to the daemon: the daemon will
      exit() quickly.
      
      We can fix the issue by forcing a reset of the device (which means the
      daemon can close() and open() the device again) and doing extra necessary
      clean-up.
      Signed-off-by: NDexuan Cui <decui@microsoft.com>
      Reviewed-by: NMichael Kelley <mikelley@microsoft.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      9fc3c01a
  2. 20 8月, 2019 1 次提交
  3. 18 8月, 2019 2 次提交
  4. 12 11月, 2018 1 次提交
  5. 12 9月, 2018 1 次提交
  6. 07 3月, 2018 1 次提交
  7. 28 11月, 2017 1 次提交
  8. 17 8月, 2017 1 次提交
  9. 18 5月, 2017 1 次提交
  10. 06 12月, 2016 1 次提交
  11. 07 11月, 2016 2 次提交
  12. 31 8月, 2016 1 次提交
  13. 25 5月, 2015 1 次提交
  14. 26 1月, 2015 2 次提交
  15. 12 1月, 2015 1 次提交
  16. 27 11月, 2014 1 次提交
  17. 08 11月, 2014 1 次提交
  18. 09 12月, 2013 1 次提交
  19. 27 9月, 2013 2 次提交
    • O
      Tools: hv: use single send+recv buffer · 269ce62b
      Olaf Hering 提交于
      send_buffer is used only once during registration. To reduce runtime
      memory usage reuse the recv_buffer for registration. Also use
      NLMSG_LENGTH instead of NLMSG_HDRLEN to take alignment into account.
      Signed-off-by: NOlaf Hering <olaf@aepfle.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      269ce62b
    • O
      Tools: hv: cache FQDN in kvp_daemon to avoid timeouts · 58125210
      Olaf Hering 提交于
      kvp_daemon does some operations which take an unpredicable amount of
      time. In addition the kernel driver gives the kvp_daemon a 5 second
      timeout to respond to message from the host. If an operation such as
      getaddrinfo takes a long time and the timeout triggers then netlink
      errors occour. As a result of such errors the daemon just terminates and
      the service becomes unavailable.
      
      Idendifying and fixing these shortcomings in the kernel-userland
      communication protocol will be done in separate patches. This change
      fixes just one obvious timeout bug.
      
      Update kvp_get_domain_name to not return a value, better diagnostic for
      the consumer of the hostname string, remove trailing newline in error
      case, use snprintf to not overrun output buffer, get hostname only once
      and return the cached result.
      Signed-off-by: NOlaf Hering <olaf@aepfle.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      58125210
  20. 13 8月, 2013 2 次提交
  21. 05 8月, 2013 2 次提交
  22. 02 8月, 2013 2 次提交
  23. 17 7月, 2013 1 次提交
  24. 18 6月, 2013 1 次提交
  25. 04 6月, 2013 4 次提交
  26. 16 3月, 2013 3 次提交
  27. 19 1月, 2013 1 次提交
  28. 18 1月, 2013 1 次提交