Skip to content

Commit

Permalink
uml: fix mconsole stop
Browse files Browse the repository at this point in the history
Bring back the functionality of stopping user mode linux with the help of
mconsole.

[jdike - the bug being fixed is that the mconsole file descriptor is already
set O_NONBLOCK or not, depending on whether we want no blocking (the normal
case) or we want blocking (when an mconsole stop is in effect), so the
MSG_DONTWAIT is redundant in the normal case, and wrong when we want to
block.]

Signed-off-by: Karol Swietlicki <magotari@gmail.com>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Karol Swietlicki authored and Linus Torvalds committed Feb 5, 2008
1 parent 2dc5802 commit 7b5cc6e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions arch/um/drivers/mconsole_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,8 @@ int mconsole_get_request(int fd, struct mc_request *req)
int len;

req->originlen = sizeof(req->origin);
req->len = recvfrom(fd, &req->request, sizeof(req->request),
MSG_DONTWAIT, (struct sockaddr *) req->origin,
&req->originlen);
req->len = recvfrom(fd, &req->request, sizeof(req->request), 0,
(struct sockaddr *) req->origin, &req->originlen);
if (req->len < 0)
return 0;

Expand Down

0 comments on commit 7b5cc6e

Please sign in to comment.