Linux-FPGA Archive mirror
 help / color / mirror / Atom feed
From: Marco Pagani <marpagan@redhat.com>
To: Xu Yilun <yilun.xu@linux.intel.com>
Cc: Moritz Fischer <mdf@kernel.org>, Wu Hao <hao.wu@intel.com>,
	Xu Yilun <yilun.xu@intel.com>, Tom Rix <trix@redhat.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Alan Tull <atull@opensource.altera.com>,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-fpga@vger.kernel.org
Subject: Re: [RFC PATCH v5 1/1] fpga: add an owner and use it to take the low-level module's refcount
Date: Mon, 4 Mar 2024 23:26:58 +0100	[thread overview]
Message-ID: <e4c54951-0e7d-4307-9266-2d6b984c967a@redhat.com> (raw)
In-Reply-To: <ZeXRWDGvd8P7KhxJ@yilunxu-OptiPlex-7050>



On 2024-03-04 14:49, Xu Yilun wrote:
>> Just to be sure that I understood correctly, you want to split the
>> changes into two patches, like:
>>
>> a) add module owner to the manager struct and take it in
>> __fpga_mgr_get(); move put_device() from __fpga_mgr_get() to
>> fpga_mgr_get() and of_fpga_mgr_get().
>>
>> b) add the mutex and the unregistered flag for protection against races.
>>
>> So that (b) can be reverted if try_module_get_safe() will be accepted?
> 
> Yes, that's what I mean.
> 

On second thought, I would prefer to send only the patches (a) for the
manager, bridge, and region for the moment. As you said, the chances of
having a race are slim (no crash has ever been reported to date). So,
after (a), I think it is worth focusing first on try_module_get_safe()
since it could also be useful for other subsystems. The (b) patches
could always be applied later if try_module_get_safe() is not accepted.
Thanks,
Marco


      reply	other threads:[~2024-03-04 22:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-11 16:02 [RFC PATCH v5 0/1] fpga: improve protection against low-level control module unloading Marco Pagani
2024-01-11 16:02 ` [RFC PATCH v5 1/1] fpga: add an owner and use it to take the low-level module's refcount Marco Pagani
2024-01-30  4:31   ` Xu Yilun
2024-02-02 17:44     ` Marco Pagani
2024-02-04  5:15       ` Xu Yilun
2024-02-05 17:47         ` Marco Pagani
2024-02-18 10:05           ` Xu Yilun
2024-02-20 11:11             ` Marco Pagani
2024-02-21 14:37               ` Xu Yilun
2024-02-27 11:49                 ` Marco Pagani
2024-02-28  7:10                   ` Xu Yilun
2024-02-29 10:37                     ` Marco Pagani
2024-03-01 15:12                       ` Xu Yilun
2024-03-01 16:29                         ` Marco Pagani
2024-03-04 11:51                     ` Marco Pagani
2024-03-04 13:49                       ` Xu Yilun
2024-03-04 22:26                         ` Marco Pagani [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=e4c54951-0e7d-4307-9266-2d6b984c967a@redhat.com \
    --to=marpagan@redhat.com \
    --cc=atull@opensource.altera.com \
    --cc=corbet@lwn.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=hao.wu@intel.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fpga@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mdf@kernel.org \
    --cc=trix@redhat.com \
    --cc=yilun.xu@intel.com \
    --cc=yilun.xu@linux.intel.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).