linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@kernel.org>
To: Dianne Skoll <dianne@skoll.ca>,
	linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: N_HDLC line discipline: Race condition
Date: Wed, 15 May 2024 12:33:24 +0200	[thread overview]
Message-ID: <c937cd80-ecd5-4d41-ad72-668661898039@kernel.org> (raw)
In-Reply-To: <20240425140127.6504ade1@gato.skoll.ca>

Hi,

On 25. 04. 24, 20:01, Dianne Skoll wrote:
> I have (somewhat) narrowed down when the kernel bug appeared by installing
> Debian 10, 11 and 12 in KVM virtual machines.
> 
> The bug is NOT present in Debian 10, kernel version 4.19.67.

I can repro even with 4.19:
posix_openpt = 3
grantpt(3)  = 0
unlockpt(3) = 0
ptsname(3) = /dev/pts/2
open(/dev/pts/2) = 4
ioctl(3, TIOCSETD) = 0
ioctl(4, TIOCSETD) = 0
write(3, Hello , 6) = 6
write(3, world, 5) = 5
read(4, buf, 2048) = 6
buf = |Hello |
read(4, buf, 2048) = 5
buf = |world|
read(4, buf, 2048) = -1
write(3, Hello , 6) = 6
write(3, world, 5) = 5
read(4, buf, 2048) = 11
buf = |Hello world|
HAHA!  Try #2: The two writes were combined in a single read!


Could you recheck?

> The bug IS present in Debian 11, kernel version 5.10.209
> 
> The bug IS present in Debian 12, kernel version 6.1.85
> 
> So I guess it was introduced sometime between 4.19.67 and 5.10.209.  I'll
> take a look to see if I can do a git bisect.

Were you able to do so?

thanks,
-- 
js
suse labs


  reply	other threads:[~2024-05-15 10:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-24 21:31 N_HDLC line discipline: Race condition Dianne Skoll
2024-04-25 18:01 ` Dianne Skoll
2024-05-15 10:33   ` Jiri Slaby [this message]
2024-05-15 13:42     ` Dianne Skoll
2024-05-15 15:44       ` Dianne Skoll
2024-05-21 10:47   ` Jiri Slaby
2024-05-21 14:15     ` Dianne Skoll
2024-05-23  8:01       ` Jiri Slaby
2024-05-23 12:44         ` Dianne Skoll

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=c937cd80-ecd5-4d41-ad72-668661898039@kernel.org \
    --to=jirislaby@kernel.org \
    --cc=dianne@skoll.ca \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@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).