Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cc0be0fb3fd4bd2c363ef1b5c968cd6f2ce478cf
Commit:     cc0be0fb3fd4bd2c363ef1b5c968cd6f2ce478cf
Parent:     ab26a5276c1b0945c3281a73b3a89d025906c880
Author:     Karol Swietlicki <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 4 22:31:25 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Feb 5 09:44:31 2008 -0800

    uml: fix infinite mconsole loop
    
    This patch takes care of a problem with the stopping code.
    
    The function inside the while condition returns 0 to signify a problem.  A
    problem could be for example a bad command or a bad version of the mconsole
    client.  A bad command would terminate the stopping loop and resume the
    kernel.  This is a problem.
    
    A better solution is to make the loop infinite and don't leave it until we 
are
    explicitly told to.
    
    Signed-off-by: Karol Swietlicki <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Dike <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/um/drivers/mconsole_kern.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c
index c953e14..949037e 100644
--- a/arch/um/drivers/mconsole_kern.c
+++ b/arch/um/drivers/mconsole_kern.c
@@ -305,7 +305,9 @@ void mconsole_stop(struct mc_request *req)
        deactivate_fd(req->originating_fd, MCONSOLE_IRQ);
        os_set_fd_block(req->originating_fd, 1);
        mconsole_reply(req, "stopped", 0, 0);
-       while (mconsole_get_request(req->originating_fd, req)) {
+       for (;;) {
+               if (!mconsole_get_request(req->originating_fd, req))
+                       continue;
                if (req->cmd->handler == mconsole_go)
                        break;
                if (req->cmd->handler == mconsole_stop) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to