public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: v9fs-developer@lists.sourceforge.net
Cc: Greg Kurz <groug@kaod.org>,
	Dominique Martinet <asmadeus@codewreck.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: 9p/trans_fd lockup
Date: Thu, 6 Aug 2020 21:08:26 +1000	[thread overview]
Message-ID: <9d8a8abf-7968-2752-89e7-bac39ae91999@ozlabs.ru> (raw)

Hi!

I am seeing another bug in 9p under syzkaller, the reprocase is:

r0 = open$dir(&(0x7f0000000040)='./file0\x00', 0x88142, 0x182)

r1 = openat$null(0xffffffffffffff9c, &(0x7f0000000640)='/dev/null\x00',
0x0, 0x0)
mount$9p_fd(0x0, &(0x7f0000000000)='./file0\x00',
&(0x7f00000000c0)='9p\x00', 0x0, &(0x7f0000000100)={'trans=fd,',
{'rfdno', 0x3d, r1}, 0x2$, {'wfdno', 0x3d, r0}})



The default behaviour of syzkaller is to call syscalls concurrently (I
think), at least it forks by default and executes the same sequence in
both threads.

In this example both threads makes it to:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/9p/client.c?h=v5.8#n757

and sit there with the only difference which is thread#1 goes via

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/9p/client.c?h=v5.8#n767

I am pretty sure things should not have gone that far but I cannot
clearly see what needs fixing. Ideas? Thanks,


-- 
Alexey

             reply	other threads:[~2020-08-06 12:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-06 11:08 Alexey Kardashevskiy [this message]
2020-08-06 12:38 ` 9p/trans_fd lockup Dominique Martinet
2020-08-07  1:43   ` Alexey Kardashevskiy

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=9d8a8abf-7968-2752-89e7-bac39ae91999@ozlabs.ru \
    --to=aik@ozlabs.ru \
    --cc=asmadeus@codewreck.org \
    --cc=groug@kaod.org \
    --cc=netdev@vger.kernel.org \
    --cc=v9fs-developer@lists.sourceforge.net \
    /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