Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7fa57a0cd98bdd163eeb5f15cbe234c3a0cf68a1
Commit:     7fa57a0cd98bdd163eeb5f15cbe234c3a0cf68a1
Parent:     1ddd439ef987c9f0209e6ce824b67518f2afe67b
Author:     Jiri Slaby <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 22 20:45:13 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Oct 23 08:32:06 2007 -0700

    Char: cyclades, fix potential NULL dereference
    
    ztxdone is jumped to even if tty is NULL and tty_wakeup placed after
    this label doesn't expect NULLed parameter, so this will cause an oops
    in some situations (why they scheduled a wakeup there before remove
    bottom half processing patch?).
    
    wakeup only in the case when we have non-null tty struct.
    
    Spotted by Adrian Bunk.
    
    Signed-off-by: Jiri Slaby <[EMAIL PROTECTED]>
    Cc: Adrian Bunk <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/char/cyclades.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index d1bd0f0..e4f579c 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -1602,8 +1602,8 @@ static void cyz_handle_tx(struct cyclades_port *info,
                        info->icount.tx++;
                }
 #endif
-ztxdone:
                tty_wakeup(tty);
+ztxdone:
                /* Update tx_put */
                cy_writel(&buf_ctrl->tx_put, tx_put);
        }
-
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