From: "Thomas Weißschuh" <linux@weissschuh.net>
To: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rfkill: return ENOTTY on invalid ioctl
Date: Thu, 2 Nov 2023 20:14:19 +0100 [thread overview]
Message-ID: <613039a4-41af-48ff-8113-3b0ee8077bcf@t-8ch.de> (raw)
In-Reply-To: <a069393c-86b3-ef79-82dd-0b60caf2a907@intel.com>
Hi!
On 2023-11-02 09:57:45+0100, Przemek Kitszel wrote:
> On 11/1/23 20:41, Thomas Weißschuh wrote:
> > For unknown ioctls the correct error is
> > ENOTTY "Inappropriate ioctl for device".
>
> For sure!
>
> I would like to learn more of why this is not an UAPI breaking change?
"break" would mean that some user application worked correctly before
but does not do so anymore with this change.
This seems highly unlikely and I was not able to find such an
application via Debian code search.
In general I did *not* mark this change for stable so if some
application would indeed break it gets detected before the patch hits
a release.
> >
> > ENOSYS as returned before should only be used to indicate that a syscall
> > is not available at all.
> >
> > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> > ---
> > net/rfkill/core.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/net/rfkill/core.c b/net/rfkill/core.c
> > index 14cc8fe8584b..c3feb4f49d09 100644
> > --- a/net/rfkill/core.c
> > +++ b/net/rfkill/core.c
> > @@ -1351,11 +1351,11 @@ static long rfkill_fop_ioctl(struct file *file, unsigned int cmd,
> > unsigned long arg)
> > {
> > struct rfkill_data *data = file->private_data;
> > - int ret = -ENOSYS;
> > + int ret = -ENOTTY;
> > u32 size;
> > if (_IOC_TYPE(cmd) != RFKILL_IOC_MAGIC)
> > - return -ENOSYS;
> > + return -ENOTTY;
> > mutex_lock(&data->mtx);
> > switch (_IOC_NR(cmd)) {
> >
> > ---
> > base-commit: 7d461b291e65938f15f56fe58da2303b07578a76
> > change-id: 20231101-rfkill-ioctl-enosys-00a2bb0a4ab1
> >
> > Best regards,
>
next prev parent reply other threads:[~2023-11-02 19:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-01 19:41 Thomas Weißschuh
2023-11-02 8:57 ` Przemek Kitszel
2023-11-02 19:14 ` Thomas Weißschuh [this message]
2023-11-06 10:30 ` Przemek Kitszel
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=613039a4-41af-48ff-8113-3b0ee8077bcf@t-8ch.de \
--to=linux@weissschuh.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
/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
all inboxes | Powered by JetHome®