All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: "Krzysztof Wilczyński" <kw@linux.com>
Cc: "Bjorn Helgaas" <bhelgaas@google.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Daniel Vetter" <daniel.vetter@ffwll.ch>,
	"Kees Cook" <keescook@chromium.org>,
	"Pali Rohár" <pali@kernel.org>,
	"Oliver O'Halloran" <oohall@gmail.com>,
	"Linux PCI" <linux-pci@vger.kernel.org>
Subject: Re: [PATCH 1/2] sysfs: Invoke iomem_get_mapping() from the sysfs open callback
Date: Fri, 25 Jun 2021 16:53:03 -0700	[thread overview]
Message-ID: <CAPcyv4iUcuVsSVcBVwZeHpV=XG1Vss-dWjCdQRJgNiUef0VHxQ@mail.gmail.com> (raw)
In-Reply-To: <20210625233118.2814915-2-kw@linux.com>

On Fri, Jun 25, 2021 at 4:31 PM Krzysztof Wilczyński <kw@linux.com> wrote:
>
> Defer invocation of the iomem_get_mapping() to the sysfs open callback
> so that it can be executed as needed when the binary sysfs object has
> been accessed.
>
> To do that, convert the "mapping" member of the struct bin_attribute
> from a pointer to the struct address_space into a function pointer with
> a signature that requires the same return type, and then updates the
> sysfs_kf_bin_open() to invoke provided function should the function
> pointer be valid.
>
> Thus, this change removes the need for the fs_initcalls to complete
> before any other sub-system that uses the iomem_get_mapping() would be
> able to invoke it safely without leading to a failure and an Oops
> related to an invalid iomem_get_mapping() access.
>
> Co-authored-by: Dan Williams <dan.j.williams@intel.com>

Go ahead and replace this with:

Signed-off-by: Dan Williams <dan.j.williams@intel.com>

  reply	other threads:[~2021-06-25 23:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-25 23:31 [PATCH 0/2] Allow deferred execution of iomem_get_mapping() Krzysztof Wilczyński
2021-06-25 23:31 ` [PATCH 1/2] sysfs: Invoke iomem_get_mapping() from the sysfs open callback Krzysztof Wilczyński
2021-06-25 23:53   ` Dan Williams [this message]
2021-06-28 10:09   ` Christoph Hellwig
2021-06-28 10:41     ` Krzysztof Wilczy??ski
2021-06-28 17:36     ` Dan Williams
2021-06-28 18:06       ` Krzysztof Wilczyński
2021-06-28 18:29         ` Dan Williams
2021-06-25 23:31 ` [PATCH 2/2] PCI/sysfs: Pass iomem_get_mapping() as a function pointer Krzysztof Wilczyński
2021-06-25 23:56   ` Dan Williams
2021-06-26 13:07     ` Krzysztof Wilczyński
2021-06-28 10:15   ` Christoph Hellwig
2021-06-28 10:24     ` Krzysztof Wilczy??ski
2021-06-28 11:09       ` Greg Kroah-Hartman

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='CAPcyv4iUcuVsSVcBVwZeHpV=XG1Vss-dWjCdQRJgNiUef0VHxQ@mail.gmail.com' \
    --to=dan.j.williams@intel.com \
    --cc=bhelgaas@google.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=gregkh@linuxfoundation.org \
    --cc=keescook@chromium.org \
    --cc=kw@linux.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=oohall@gmail.com \
    --cc=pali@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 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.