netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lifeng Sun <lifongsun@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH] Applying inappropriate ioctl operation on socket should return ENOTTY
Date: Thu, 28 Apr 2011 16:49:31 +0800	[thread overview]
Message-ID: <BANLkTikLUssAMHBkPmwKFZja6OMDih_DKQ@mail.gmail.com> (raw)
In-Reply-To: <20110427130904.47331a9f@lxorguk.ukuu.org.uk>

On Wed, Apr 27, 2011 at 8:09 PM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>> diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c
>> index ad6e64a..a427d40 100644
>> --- a/drivers/char/viotape.c
>> +++ b/drivers/char/viotape.c
>> @@ -529,7 +529,7 @@ static int viotap_ioctl(struct inode *inode, struct file *file,
>>
>>       down(&reqSem);
>>
>> -     ret = -EINVAL;
>> +     ret = -ENOTTY;
>
> Again this messes up the returns because code assumes the initial
> default.

> The original code also has bugs too (wrong error off
> copy_*_user() again)

It seems alright.

- Lifeng

      parent reply	other threads:[~2011-04-28  8:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1303882625-28115-1-git-send-email-lifongsun@gmail.com>
2011-04-27  5:58 ` [PATCH] Applying inappropriate ioctl operation on socket should return ENOTTY Eric Dumazet
2011-04-27  6:37   ` Lifeng Sun
2011-04-27  6:55     ` Eric Dumazet
2011-04-27  6:57     ` Eric Dumazet
2011-04-27  8:22       ` Lifeng Sun
2011-04-27  9:32   ` Lifeng Sun
2011-04-27  9:47   ` Alan Cox
2011-04-27 10:45     ` Eric Dumazet
2011-04-27 11:52       ` Alan Cox
2011-04-27 12:09 ` Alan Cox
2011-04-27 13:54   ` Lifeng Sun
2011-04-28  8:04   ` [PATCH 1/5] networking: inappropriate ioctl operation " Lifeng Sun
2011-05-02 22:41     ` David Miller
2011-04-28  8:49   ` Lifeng Sun [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTikLUssAMHBkPmwKFZja6OMDih_DKQ@mail.gmail.com \
    --to=lifongsun@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).