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]
Date:	Wed, 12 Mar 2008 11:40:35 +0100
From:	Holger Macht <hmacht@...e.de>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
	Kristen Carlson Accardi <kristen.c.accardi@...el.com>,
	Len Brown <lenb@...nel.org>, stable@...nel.org
Subject: Re: [PATCH] ACPI: Set flag DOCK_UNDOCKING when triggered via sysfs

On Di 11. Mär - 22:35:22, Andrew Morton wrote:
> On Wed, 12 Mar 2008 01:07:27 +0100 Holger Macht <hmacht@...e.de> wrote:
> 
> > begin_undock() is only called when triggered via a acpi notify handler
> > (pressing the undock button on the dock station), but complete_undock() is
> > always called after the eject. So if a undock is triggered through a sysfs
> > write, the flag DOCK_UNDOCKING has to be set for the dock station,
> > too. Otherwise this will freeze the system hard.
> > 
> 
> We prefer not to make systems freeze hard.
> 
> > ---
> > 
> > diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
> > index 307cef6..fa44fb9 100644
> > --- a/drivers/acpi/dock.c
> > +++ b/drivers/acpi/dock.c
> > @@ -710,6 +710,7 @@ static ssize_t write_undock(struct device *dev, struct device_attribute *attr,
> >  	if (!count)
> >  		return -EINVAL;
> >  
> > +	begin_undock(dock_station);
> >  	ret = handle_eject_request(dock_station, ACPI_NOTIFY_EJECT_REQUEST);
> >  	return ret ? ret: count;
> >  }
> 
> I assume that this is needed in 2.6.24.x as well?

I tested this, and no, I weren't able to reproduce on 2.6.24.

Moreover, it seems that the freeze is related to some libata issue because
it only freezes when a drive is in the dock station.

Nevertheless, I think the patch is correct. Maybe there's a race involved
somewhere I'm not aware of. I really like to wait for Kristen to comment
before pushing it into more trees.

Thanks,
	Holger
--
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