mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
parent
74e919d230
commit
10c2b5aeb2
1 changed files with 3 additions and 0 deletions
|
@ -97,6 +97,9 @@ static int full_read(int fd, void *buf, int len, bool abortable)
|
|||
{
|
||||
int rc;
|
||||
|
||||
if (!len)
|
||||
return 0;
|
||||
|
||||
do {
|
||||
rc = os_read_file(fd, buf, len);
|
||||
if (rc > 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue