Linux filesystem development
 help / color / mirror / Atom feed
From: Paulo Alcantara <pc@manguebit.com>
To: David Howells <dhowells@redhat.com>
Cc: dhowells@redhat.com, Song Liu <song@kernel.org>,
	netfs@lists.linux.dev, linux-fsdevel@vger.kernel.org,
	kernel-team@fb.com
Subject: Re: [PATCH] netfs: Let netfs depends on PROC_FS
Date: Tue, 08 Apr 2025 12:05:52 -0300	[thread overview]
Message-ID: <05f5b9f694ca9b1573ea8e1801098b65@manguebit.com> (raw)
In-Reply-To: <1478622.1744097510@warthog.procyon.org.uk>

David Howells <dhowells@redhat.com> writes:

> Paulo Alcantara <pc@manguebit.com> wrote:
>
>> (2) There's a wrong assumption in the API that @netfs_request_pool and
>> @netfs_subrequest_pool will always be initialized.  For example, we
>> should return an error from netfs_alloc_[sub]rquest() functions in case
>> @mempool == NULL.
>
> No.  The assumption is correct.  The problem is that if the module is built in
> (ie. CONFIG_NETFS_SUPPORT=y), then there is no consequence of netfs_init()
> failing - and fail it does if CONFIG_PROC_FS=n - and 9p, afs and cifs will
> call into it anyway, despite the fact it deinitialised itself.
>
> It should marked be module_init(), not fs_initcall().

Makes sense, thanks.  I tried to reproduce it with cifs.ko and it didn't
oops as netfslib ended up not using the default memory pools as cifs.ko
already provide its own memory pools via netfs_request_ops.

  reply	other threads:[~2025-04-08 15:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-07 18:47 [PATCH] netfs: Let netfs depends on PROC_FS Song Liu
2025-04-07 19:18 ` Paulo Alcantara
     [not found] ` <notmuch-sha1-7bf7bb81673494d9bbe96c6cfbeaf9005a6bd491>
2025-04-08  0:51   ` Paulo Alcantara
2025-04-08  7:31     ` David Howells
2025-04-08 15:05       ` Paulo Alcantara [this message]
2025-04-08 16:14         ` Song Liu
2025-04-09 11:56           ` David Howells
2025-04-09 15:03       ` David Howells

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=05f5b9f694ca9b1573ea8e1801098b65@manguebit.com \
    --to=pc@manguebit.com \
    --cc=dhowells@redhat.com \
    --cc=kernel-team@fb.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=netfs@lists.linux.dev \
    --cc=song@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