Thread (9 messages) 9 messages, 3 authors, 2011-04-27

Re: [PATCH] Applying inappropriate ioctl operation on socket should return ENOTTY

From: Eric Dumazet <hidden>
Date: 2011-04-27 05:58:39
Also in: lkml

Possibly related (same subject, not in this thread)

Le mercredi 27 avril 2011 à 13:37 +0800, Lifeng Sun a écrit :
ioctl() calls against a socket with an inappropriate ioctl operation
are incorrectly returning EINVAL rather than ENOTTY:

  [ENOTTY]
      Inappropriate I/O control operation.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=33992

This bug is not limited to socket, it also occurs in a lot of, maybe
some hundred, other ioctl operations, while in the patch I only fixed
about a dozen of additional ones in pipe, fifo and character device
drivers.
Really ?

EINVAL is ok too : Request or argp is not valid.

I would say, its not a bug as you claim. 

Its really too late to make such change and risk regressions.

isatty(fd) performs well. Please use it instead.

Also, networking patches should be sent to netdev@vger.kernel.org and
David Miller, as mentioned in MAINTAINERS file.


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help