All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Kent <raven@themaw.net>
To: Fedor Pchelkin <pchelkin@ispras.ru>
Cc: Matthew Wilcox <willy@infradead.org>,
	Andrei Vagin <avagin@gmail.com>,
	Takeshi Misawa <jeliantsurux@gmail.com>,
	autofs@vger.kernel.org, linux-kernel@vger.kernel.org,
	Alexey Khoroshilov <khoroshilov@ispras.ru>,
	lvc-project@linuxtesting.org
Subject: Re: [PATCH 0/1] autofs: fix memory leak of waitqueues in autofs_catatonic_mode
Date: Mon, 13 Feb 2023 09:25:59 +0800	[thread overview]
Message-ID: <0011cfb4-5dee-a1f9-ae6d-2c9e71842a52@themaw.net> (raw)
In-Reply-To: <20230211195950.452364-1-pchelkin@ispras.ru>

On 12/2/23 03:59, Fedor Pchelkin wrote:
> Syzkaller reports the leak [1]. It is reproducible.
>
> The following patch fixes the leak. It was proposed by Takeshi Misawa and
> tested by Syzbot.
>
> In other places of the code the waitqueue is freed when its wait_ctr
> becomes zero (see autofs_wait_release). So I think it is not actually
> supposed that inside autofs_catatonic_mode wait_ctr cannot be decreased to
> zero. Please correct me if I'm wrong.

Clearly there's a problem here but I'll need to think about what's going

a bit more myself.


>
> Also, looking at the discussion [2] of the '[PATCH] autofs4: use wake_up()
> instead of wake_up_interruptible', shouldn't wake_up_interruptible()
> inside autofs_catatonic_mode() be replaced with wake_up()?

Yes, I think so but that also deserves a bit of thought.


Ian

  parent reply	other threads:[~2023-02-13  1:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-11 19:59 [PATCH 0/1] autofs: fix memory leak of waitqueues in autofs_catatonic_mode Fedor Pchelkin
2023-02-11 19:59 ` [PATCH 1/1] " Fedor Pchelkin
2023-02-13  1:25 ` Ian Kent [this message]
2023-02-13  4:27 ` [PATCH 0/1] " Ian Kent
2023-02-13  4:37   ` Ian Kent
2023-03-10 17:56     ` Fedor Pchelkin
2023-03-11  7:01       ` Ian Kent

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=0011cfb4-5dee-a1f9-ae6d-2c9e71842a52@themaw.net \
    --to=raven@themaw.net \
    --cc=autofs@vger.kernel.org \
    --cc=avagin@gmail.com \
    --cc=jeliantsurux@gmail.com \
    --cc=khoroshilov@ispras.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lvc-project@linuxtesting.org \
    --cc=pchelkin@ispras.ru \
    --cc=willy@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.