Linux-USB Archive on lore.kernel.org
 help / color / Atom feed
From: Anthony Mallet <anthony.mallet@laas.fr>
To: Johan Hovold <johan@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Oliver Neukum <oneukum@suse.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: [PATCH 1/3] Revert "USB: cdc-acm: fix rounding error in TIOCSSERIAL"
Date: Wed, 7 Apr 2021 13:04:31 +0200
Message-ID: <24685.37311.759816.776098@gargle.gargle.HOWL> (raw)
In-Reply-To: <20210407102845.32720-2-johan@kernel.org>

On Wednesday  7 Apr 2021, at 12:28, Johan Hovold wrote:
> With HZ=250, the default 0.5 second value of close_delay is converted to
> 125 jiffies when set and is converted back to 50 centiseconds by
> TIOCGSERIAL as expected (not 12 cs as was claimed).

It was "12" (instead of 50) because the conversion gor TIOCGSERIAL was
initially broken, and that was fixed in the previous commit
633e2b2ded739a34bd0fb1d8b5b871f7e489ea29

> For completeness: With different default values for these parameters or
> with a HZ value not divisible by two, the lack of rounding when setting
> the default values in tty_port_init() could result in an -EPERM being
> returned, but this is hardly something we need to worry about.

The -EPERM is harmful when a regular user wants to update other
members of serial_struct without changing the close delays,
e.g. ASYNC_LOW_LATENCY, which is granted to regular users.

Best,
Anthony

  reply index

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-07 10:28 [PATCH 0/3] USB: cdc-acm: TIOCSSERIAL fixes Johan Hovold
2021-04-07 10:28 ` [PATCH 1/3] Revert "USB: cdc-acm: fix rounding error in TIOCSSERIAL" Johan Hovold
2021-04-07 11:04   ` Anthony Mallet [this message]
2021-04-07 11:25     ` Johan Hovold
2021-04-07 10:28 ` [PATCH 2/3] USB: cdc-acm: fix unprivileged TIOCCSERIAL Johan Hovold
2021-04-08  7:48   ` Oliver Neukum
2021-04-08  9:42     ` Johan Hovold
2021-04-08 11:35       ` Oliver Neukum
2021-04-07 10:28 ` [PATCH 3/3] USB: cdc-acm: fix TIOCGSERIAL implementation Johan Hovold
2021-04-08  8:36   ` Oliver Neukum
2021-04-08  9:48     ` Johan Hovold
2021-04-08 11:34       ` Oliver Neukum
2021-04-08 11:54         ` Johan Hovold
2021-04-08 11:59           ` Oliver Neukum
2021-04-08 12:07             ` Greg Kroah-Hartman

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=24685.37311.759816.776098@gargle.gargle.HOWL \
    --to=anthony.mallet@laas.fr \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=oneukum@suse.com \
    --cc=stable@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

Linux-USB Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-usb/0 linux-usb/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-usb linux-usb/ https://lore.kernel.org/linux-usb \
		linux-usb@vger.kernel.org
	public-inbox-index linux-usb

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-usb


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git