2.2 currently ignores the return value of f_op->fasync().
This patch fixes that oversight.

Index: fs/ioctl.c
--- fs/ioctl.c.prev
+++ fs/ioctl.c  Sat Jun 17 17:48:10 2000
@@ -85,6 +85,10 @@ asmlinkage int sys_ioctl(unsigned int fd
                        if ((flag ^ filp->f_flags) & FASYNC) {
                                if (filp->f_op && filp->f_op->fasync)
-                                       filp->f_op->fasync(fd, filp, on); 
+                                       error = filp->f_op->fasync(fd, filp, on);
+                               else error = -ENOTTY;
                        }
+                       if (error != 0)
+                               break;
+
                        if (on)
                                filp->f_flags |= FASYNC;

-- 
Chip Salzenberg              - a.k.a. -              <[EMAIL PROTECTED]>
"I wanted to play hopscotch with the impenetrable mystery of existence,
    but he stepped in a wormhole and had to go in early."  // MST3K
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to