From: Jeremiah Mahler <jmmahler@gmail.com>
To: Adrien Schildknecht <adrien+dev@schischi.me>
Cc: rui.zhang@intel.com, rjw@rjwysocki.net, lenb@kernel.org,
hdegoede@redhat.com, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ACPI / video: driver must be registered before checking for keypresses
Date: Wed, 6 Jan 2016 09:38:11 -0800 [thread overview]
Message-ID: <20160106173811.GA4561@hudson.localdomain> (raw)
In-Reply-To: <1451946148-24948-1-git-send-email-adrien+dev@schischi.me>
all,
On Mon, Jan 04, 2016 at 11:22:28PM +0100, Adrien Schildknecht wrote:
> acpi_video_handles_brightness_key_presses() may use an uninitialized mutex.
> The error has been reported by lockdep: DEBUG_LOCKS_WARN_ON(l->magic != l).
> The function assumes that the video driver has been registered before being
> called. As explained in the comment of acpi_video_init(), the registration
> of the video class may be defered and thus may not take place in the init
> function of the module.
>
> Use completion mechanisms to make sure that
> acpi_video_handles_brightness_key_presses() wait for the completion of
> acpi_video_register() before using the mutex.
> Also get rid of register_count since task completion can replace it.
>
> Signed-off-by: Adrien Schildknecht <adrien+dev@schischi.me>
> ---
> drivers/acpi/acpi_video.c | 27 ++++++++++++++-------------
> 1 file changed, 14 insertions(+), 13 deletions(-)
>
[...]
This patch does fix the problem I was having [1]. Thanks for the fix.
[1]: https://lkml.org/lkml/2016/1/4/791
Tested-by: Jeremiah Mahler <jmmahler@gmail.com>
--
- Jeremiah Mahler
prev parent reply other threads:[~2016-01-06 17:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-04 22:22 [PATCH] ACPI / video: driver must be registered before checking for keypresses Adrien Schildknecht
2016-01-05 11:43 ` Hans de Goede
2016-01-05 12:51 ` Rafael J. Wysocki
2016-01-14 8:00 ` Hans de Goede
2016-01-06 17:38 ` Jeremiah Mahler [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=20160106173811.GA4561@hudson.localdomain \
--to=jmmahler@gmail.com \
--cc=adrien+dev@schischi.me \
--cc=hdegoede@redhat.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=rui.zhang@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