Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1479642

Re: [PATCH v4 1/4] firmware: Move umh locking code into fw_load_from_user_helper()

From Ming Lei <ming.lei@canonical.com>
Newsgroups linux.kernel
Subject Re: [PATCH v4 1/4] firmware: Move umh locking code into fw_load_from_user_helper()
Date 2016-09-09 06:20 +0200
Message-ID <sflse-6CL-13@gated-at.bofh.it> (permalink)
References (1 earlier) <seGIq-5QI-13@gated-at.bofh.it> <sf9AK-7xA-29@gated-at.bofh.it> <sfdXH-20B-1@gated-at.bofh.it> <sfiNH-4Sd-1@gated-at.bofh.it> <sflse-6CL-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Sep 9, 2016 at 11:39 AM, Luis R. Rodriguez <mcgrof@kernel.org> wrote:
> On Sep 8, 2016 6:22 PM, "Ming Lei" <ming.lei@canonical.com> wrote:
>>
>> On Fri, Sep 9, 2016 at 4:11 AM, Luis R. Rodriguez <mcgrof@kernel.org>
>> wrote:
>> > On Thu, Sep 08, 2016 at 11:37:54PM +0800, Ming Lei wrote:
>> >> On Wed, Sep 7, 2016 at 4:45 PM, Daniel Wagner <wagi@monom.org> wrote:
>> >> > From: Daniel Wagner <daniel.wagner@bmw-carit.de>
>> >> >
>> >> > When we load the firmware directly we don't need to take the umh
>> >> > lock.
>> >>
>> >> I am wondering if it can be wrong.
>> >
>> > If you disable the firmware UMH why would we need to lock if the lock is
>> > being
>> > shown only used for the firmare UMH ?
>> >
>> >> Actually in case of firmware loading, the usermode helper lock doesn't
>> >> only mean the user helper is usable, and it also may serve to mark the
>> >> filesystem/block device is ready for firmware loading, and of couse
>> >> direct
>> >> loading need fs/block to be ready too.
>> >
>> > Yes but that's a race I've identified a while ago present even if you
>> > use initramfs *and*
>> > use kernel_read_file_from_path() on any part of the kernel [0], I
>> > proposed a possible
>>
>> Actualy I mean the situation of suspend vs. resume, and some drivers
>> still may not benefit from firmware loading cache when requesting loading
>> in .resume(), at that time it is still too early for direct loading.
>> With UMH lock,
>> we can get a warning or avoid the issue.
>
> Agreed, but that would seem odd and perhaps misleading to have a try lock
> for UMH when no firmware UMH code is enabled. This should probably made
> clear in comments for now as to why we have it then and we should just mark

That is very helpful, :-)

> a TODO item to generalize this to a common freezer check. Surprised we don't
> have one yet. Rafael ?
>
>   Luis

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 0/4] firmware: encapsulate firmware loading status Daniel Wagner <wagi@monom.org> - 2016-09-07 10:50 +0200
  [PATCH v4 2/4] firmware: encapsulate firmware loading status Daniel Wagner <wagi@monom.org> - 2016-09-07 10:50 +0200
    Re: [PATCH v4 2/4] firmware: encapsulate firmware loading status "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-09-08 03:40 +0200
      Re: [PATCH v4 2/4] firmware: encapsulate firmware loading status Daniel Wagner <daniel.wagner@bmw-carit.de> - 2016-09-08 10:10 +0200
        Re: [PATCH v4 2/4] firmware: encapsulate firmware loading status Daniel Wagner <wagi@monom.org> - 2016-09-08 11:50 +0200
    Re: [PATCH v4 2/4] firmware: encapsulate firmware loading status Ming Lei <ming.lei@canonical.com> - 2016-09-08 13:30 +0200
      Re: [PATCH v4 2/4] firmware: encapsulate firmware loading status Daniel Wagner <wagi@monom.org> - 2016-09-08 14:30 +0200
        Re: [PATCH v4 2/4] firmware: encapsulate firmware loading status Ming Lei <ming.lei@canonical.com> - 2016-09-08 17:50 +0200
          Re: [PATCH v4 2/4] firmware: encapsulate firmware loading status Daniel Wagner <daniel.wagner@bmw-carit.de> - 2016-09-09 13:50 +0200
    Re: [PATCH v4 2/4] firmware: encapsulate firmware loading status Daniel Wagner <daniel.wagner@bmw-carit.de> - 2016-09-08 14:40 +0200
  [PATCH v4 4/4] firmware: Do not use fw_lock for fw_status protection Daniel Wagner <wagi@monom.org> - 2016-09-07 10:50 +0200
  [PATCH v4 1/4] firmware: Move umh locking code into fw_load_from_user_helper() Daniel Wagner <wagi@monom.org> - 2016-09-07 10:50 +0200
    Re: [PATCH v4 1/4] firmware: Move umh locking code into  fw_load_from_user_helper() "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-09-08 01:40 +0200
      Re: [PATCH v4 1/4] firmware: Move umh locking code into  fw_load_from_user_helper() Daniel Wagner <daniel.wagner@bmw-carit.de> - 2016-09-08 14:50 +0200
        Re: [PATCH v4 1/4] firmware: Move umh locking code into  fw_load_from_user_helper() "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-09-08 17:00 +0200
    Re: [PATCH v4 1/4] firmware: Move umh locking code into fw_load_from_user_helper() Ming Lei <ming.lei@canonical.com> - 2016-09-08 17:40 +0200
      Re: [PATCH v4 1/4] firmware: Move umh locking code into  fw_load_from_user_helper() "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-09-08 22:20 +0200
        Re: [PATCH v4 1/4] firmware: Move umh locking code into fw_load_from_user_helper() Ming Lei <ming.lei@canonical.com> - 2016-09-09 03:30 +0200
          Re: [PATCH v4 1/4] firmware: Move umh locking code into fw_load_from_user_helper() Ming Lei <ming.lei@canonical.com> - 2016-09-09 06:20 +0200
            Re: [PATCH v4 1/4] firmware: Move umh locking code into  fw_load_from_user_helper() "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-09-10 00:20 +0200
              Re: [PATCH v4 1/4] firmware: Move umh locking code into  fw_load_from_user_helper() "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-09-15 17:50 +0200

csiph-web