All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>,
	Harshal Chaudhari <harshalchau04@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] char: ppdev: check if ioctl argument is present and valid
Date: Sat, 10 Oct 2020 10:10:37 +0100	[thread overview]
Message-ID: <CADVatmOf18xUEvjWFzenut=KsHtoEZ5OSZF1oCqFJsbkx_Mb9g@mail.gmail.com> (raw)
In-Reply-To: <CADVatmONWsfsj4-WKhNAcXjKXbUrgyD6UpK+ML6TNpqtp8be9A@mail.gmail.com>

On Sat, Oct 10, 2020 at 1:08 AM Sudip Mukherjee
<sudipm.mukherjee@gmail.com> wrote:
>
> On Fri, Oct 9, 2020 at 5:57 AM Greg KH <gregkh@linuxfoundation.org> wrote:
> >
> > On Thu, Oct 08, 2020 at 11:57:13PM +0530, Harshal Chaudhari wrote:
> > > Checking the argument passed to the ioctl is valid
> > > or not. if not then return -EINVAL.
> >
> > Along the the comments that Arnd made, this is not the correct value to
> > be returning from an ioctl when you don't pass in the correct command.
> >
> > And it doesn't match what your patch says, please be consistent.
> >
> > And do you have this device to be able to test your changes?
>
> I will test this tomorrow. But from an initial look, its going to
> break ppdev. There are few ioctls which don't need any arguments.

No, sorry. I missed the check for _IOC_NONE.
Tested on a desktop which has a parallel port with a very basic test
code of open->claim->write->release->close and it still works.


-- 
Regards
Sudip

  reply	other threads:[~2020-10-10 22:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-08 18:27 [PATCH] char: ppdev: check if ioctl argument is present and valid Harshal Chaudhari
2020-10-08 19:35 ` Arnd Bergmann
2020-10-09  4:57 ` Greg KH
2020-10-10  0:08   ` Sudip Mukherjee
2020-10-10  9:10     ` Sudip Mukherjee [this message]
2020-10-13  9:01       ` harshal chaudhari
2020-10-13 10:58         ` Greg KH
2020-10-13 11:12         ` David Laight
     [not found]           ` <CAFEvwu=76mPtXSEgpwSoRC0rC0tkU5BiEx1X5O2VwVSPJ7m4Rw@mail.gmail.com>
2020-10-24 19:21             ` Arnd Bergmann
2020-10-24 20:16               ` harshal chaudhari
2020-10-24 21:22               ` David Laight

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='CADVatmOf18xUEvjWFzenut=KsHtoEZ5OSZF1oCqFJsbkx_Mb9g@mail.gmail.com' \
    --to=sudipm.mukherjee@gmail.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=harshalchau04@gmail.com \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.