linguist@masterlinkcorp.com wrote: > This is just a random observation, I don't know this piece of code > or the kernel in general, but instinct tells me that where is says > "if (!fd) return -EBADF", it should say "if (!file) return -EBADF". > Just a heads up. > > Regards, > Rich > > static int tiocgdev(unsigned fd, unsigned cmd, unsigned int *ptr) > { > > struct file *file = fget(fd); > struct tty_struct *real_tty; > > if (!fd) > return -EBADF; Yup, looks like a real bug to me... good catch. Untested but obvious patch attached. Jeff