]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/um/drivers/line.c
Merge tag 'v2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / arch / um / drivers / line.c
index 1664cce7b0ac5774313ed2805b58f6cac8058279..050e4ddbbb6516a20416cad7107695862f93f8cd 100644 (file)
@@ -821,12 +821,12 @@ void register_winch_irq(int fd, int tty_fd, int pid, struct tty_struct *tty,
 
 static void unregister_winch(struct tty_struct *tty)
 {
-       struct list_head *ele;
+       struct list_head *ele, *next;
        struct winch *winch;
 
        spin_lock(&winch_handler_lock);
 
-       list_for_each(ele, &winch_handlers) {
+       list_for_each_safe(ele, next, &winch_handlers) {
                winch = list_entry(ele, struct winch, list);
                if (winch->tty == tty) {
                        free_winch(winch, 1);