mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guilherme Giacomo Simoes <trintaeoitogc@gmail.com>
To: trintaeoitogc@gmail.com
Cc: axboe@kernel.dk, bvanassche@acm.org, josef@toxicpanda.com,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	nbd@other.debian.org,
	syzbot+d7d72f3d467710442af0@syzkaller.appspotmail.com
Subject: Re: [PATCH] nbd: fix circular lock dependency
Date: Wed, 11 Nov 2026 08:38:14 -0300	[thread overview]
Message-ID: <20261111113814.221685-1-trintaeoitogc@gmail.com> (raw)
In-Reply-To: <20261111101919.215767-1-trintaeoitogc@gmail.com>

Guilherme Giacomo Simoes <trintaeoitogc@gmail.com> wrote:
> > There is no real circular lock dependency here. This patch addresses a
> > lockdep false positive caused by the missing socket reclassification in
> > the reconnect path. Please change the subject into something like
> > "nbd: Also reclassify sockets in the reconnect path".
> > 
> >  > instead of the NBD-specific class leading to a possible lock dependency.
> > 
> > Please change "possible lock dependency" into "lockdep false positive".
> > 
> >  > Reported-by: syzbot+d7d72f3d467710442af0@syzkaller.appspotmail.com
> >  > Link: https://syzkaller.appspot.com/bug?extid=d7d72f3d467710442af0
> > 
> > Please use Closes: instead of Link: for the syzbot report.
> Ok, I will send a V2
What do you think:
```
nbd: must reclassify socket when socket is created

When we need to connect or reconnect a new socket, we need to call
nbd_reclassify_socket() to ensure that a false positive lock_dep
circular warning fires. Inside nbd_add_socket(), after nbd_get_socket()
call he already call nbd_reclassify_socket(). However inside
nbd_genl_reconnect_sock_cb() the nbd_reclassify_socket() must be called
too and this is not doing.

To ensure that even when nbd_get_socket() is called the
nbd_reclassify_socket() will be called to, put the
nbd_reclassify_socket() inside nbd_get_socket().

Move the nbd_get_socket() bellow of nbd_reclassify_socket().

nbd_add_socket() no longer needs to do it.
```
?

> > If the reclassification should happen in nbd_get_socket(), please move
> > nbd_reclassify_socket() up instead of moving nbd_get_socket() down.
> I was have moved nbd_reclassify_socket up, just like you suggested, but git
> don't understanded this very well. But I will find way to get it
No , I couldn't do it :(

thanks, 
Guilherme

      parent reply	other threads:[~2026-11-11 11:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10 21:57 Guilherme Giacomo Simoes
2026-11-11  0:40 ` Bart Van Assche
2026-11-11 10:19   ` Guilherme Giacomo Simoes
2026-11-11 11:29     ` Timo Joannin
2026-11-11 11:38     ` Guilherme Giacomo Simoes [this message]

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=20261111113814.221685-1-trintaeoitogc@gmail.com \
    --to=trintaeoitogc@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=josef@toxicpanda.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nbd@other.debian.org \
    --cc=syzbot+d7d72f3d467710442af0@syzkaller.appspotmail.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®