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] [day] [month] [year] [list]
Message-ID: <1AE640813FDE7649BE1B193DEA596E883BC082AA@SHSMSX101.ccr.corp.intel.com>
Date:	Mon, 1 Aug 2016 00:35:31 +0000
From:	"Zheng, Lv" <lv.zheng@...el.com>
To:	Benjamin Tissoires <benjamin.tissoires@...hat.com>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>
CC:	"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2] ACPI / button: remove pointer to old lid_sysfs on
 unbind

Hi, Benjamin

> From: Benjamin Tissoires [mailto:benjamin.tissoires@...hat.com]
> Subject: [PATCH v2] ACPI / button: remove pointer to old lid_sysfs on
> unbind
> 
> When we removed the procfs dir on error or if the driver is
> unbound, the two variables acpi_lid_dir and acpi_button_dir
> were not reset. On the next rebind, those static variables
> were not null and we couldn't re-register the device again.
> 
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@...hat.com>
[Lv Zheng] 
Looks good.
Acked-by: Lv Zheng <lv.zheng@...el.com>

Chhers
Lv

> 
> --
> changes in v2:
> - put the NULL assignments at their correct place
> ---
>  drivers/acpi/button.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
> index 5c3b091..a3873b3 100644
> --- a/drivers/acpi/button.c
> +++ b/drivers/acpi/button.c
> @@ -191,8 +191,10 @@ remove_dev_dir:
>  	acpi_device_dir(device) = NULL;
>  remove_lid_dir:
>  	remove_proc_entry(ACPI_BUTTON_SUBCLASS_LID,
> acpi_button_dir);
> +	acpi_lid_dir = NULL;
>  remove_button_dir:
>  	remove_proc_entry(ACPI_BUTTON_CLASS, acpi_root_dir);
> +	acpi_button_dir = NULL;
>  	goto done;
>  }
> 
> @@ -209,7 +211,9 @@ static int acpi_button_remove_fs(struct
> acpi_device *device)
>  			  acpi_lid_dir);
>  	acpi_device_dir(device) = NULL;
>  	remove_proc_entry(ACPI_BUTTON_SUBCLASS_LID,
> acpi_button_dir);
> +	acpi_lid_dir = NULL;
>  	remove_proc_entry(ACPI_BUTTON_CLASS, acpi_root_dir);
> +	acpi_button_dir = NULL;
> 
>  	return 0;
>  }
> --
> 2.5.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ