[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BANLkTikLUssAMHBkPmwKFZja6OMDih_DKQ@mail.gmail.com>
Date: Thu, 28 Apr 2011 16:49:31 +0800
From: Lifeng Sun <lifongsun@...il.com>
To: Alan Cox <alan@...rguk.ukuu.org.uk>
Cc: linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] Applying inappropriate ioctl operation on socket should
return ENOTTY
On Wed, Apr 27, 2011 at 8:09 PM, Alan Cox <alan@...rguk.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists