mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
uml: DEBUG_SHIRQ fixes
DEBUG_SHIRQ generates spurious interrupts, triggering handlers such as mconsole_interrupt() or line_interrupt(). They expect data to be available to be read from their sockets/pipes, but in the case of spurious interrupts, the host didn't actually send anything, so UML hangs in read() and friends. Setting those fd's as O_NONBLOCK makes DEBUG_SHIRQ-enabled UML kernels boot and run correctly. Signed-off-by: Eduard-Gabriel Munteanu <maxdamage@aladin.ro> 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>
This commit is contained in:
committed by
Linus Torvalds
parent
e18eecb8b3
commit
89df6bfc04
@@ -86,8 +86,9 @@ 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), 0,
|
||||
(struct sockaddr *) req->origin, &req->originlen);
|
||||
req->len = recvfrom(fd, &req->request, sizeof(req->request),
|
||||
MSG_DONTWAIT, (struct sockaddr *) req->origin,
|
||||
&req->originlen);
|
||||
if (req->len < 0)
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user