lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5472545.fTVKdflT9H@vostro.rjw.lan>
Date:	Tue, 05 Jan 2016 13:51:17 +0100
From:	"Rafael J. Wysocki" <rjw@...ysocki.net>
To:	Hans de Goede <hdegoede@...hat.com>
Cc:	Adrien Schildknecht <adrien+dev@...ischi.me>, rui.zhang@...el.com,
	lenb@...nel.org, linux-acpi@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Pali Rohár <pali.rohar@...il.com>,
	jmmahler@...il.com, ibm-acpi@....eng.br
Subject: Re: [PATCH] ACPI / video: driver must be registered before checking for keypresses

On Tuesday, January 05, 2016 12:43:54 PM Hans de Goede wrote:
> Hi,
> 
> On 04-01-16 23:22, 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@...ischi.me>
> 
> Thanks for the fix, my first instinct was that there should be an easier
> fix, but thinking more about it this and how this function is used
> in thinkpad_acpi. this is indeed the correct way to fix this:
> 
> Reviewed-by: Hans de Goede <hdegoede@...hat.com>
> 
> Rafael, can you please add this fix to acpi-next ?

I will, thanks!

Rafael

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ