You need to sign in or sign up before continuing.
提交 10c2b5ae 编写于 作者: J Johannes Berg 提交者: Richard Weinberger

um: virtio: fix handling of messages without payload

If we have a message without payload, we call full_read() with
len set to 0, which causes it to return -ECONNRESET. Catch this
case and explicitly return 0 for it so we can actually use the
zero-size config-changed message.
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
Signed-off-by: NRichard Weinberger <richard@nod.at>
上级 74e919d2
...@@ -97,6 +97,9 @@ static int full_read(int fd, void *buf, int len, bool abortable) ...@@ -97,6 +97,9 @@ static int full_read(int fd, void *buf, int len, bool abortable)
{ {
int rc; int rc;
if (!len)
return 0;
do { do {
rc = os_read_file(fd, buf, len); rc = os_read_file(fd, buf, len);
if (rc > 0) { if (rc > 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册