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, 28 Aug 2013 10:55:41 -0600
From:	Toshi Kani <toshi.kani@...com>
To:	Gu Zheng <guz.fnst@...fujitsu.com>
Cc:	"Rafael J. Wysocki" <rjw@...k.pl>,
	ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Yasuaki Ishimatsu <isimatu.yasuaki@...fujitsu.com>,
	Tejun Heo <tj@...nel.org>
Subject: Re: [PATCH] driver core / ACPI: Avoid device removal locking
 problems

On Wed, 2013-08-28 at 10:12 +0800, Gu Zheng wrote:
> On 08/28/2013 05:38 AM, Toshi Kani wrote:
 :
> >>
> >> What about changing device_hotplug_lock and acpi_scan_lock to rwsem? like the
> >> attached one(With a preliminary test, it also can make the splat go away).:)
> > 
> > I am curious how msleep(10) & restart_syscall() work in the change
> > below.  Doesn't the msleep() make s_active held longer time, which can
> > lead the thread holding device_hotplug_lock to wait it for deletion?
> 
> Yes, but it can avoid busy waiting. 

I know, but it's kinda unfortunate to sleep with s_active held in this
situation.  But I am fine with the 5ms Rafael used in this latest
patchset since this is a rare case anyway.

> > Also, does restart_syscall() release s_active and reopen this file
> > again?
> 
> Sure, it just set a TIF_SIGPENDING flag and return an -ERESTARTNOINTR error, s_active/file
> will be released/closed in the failed path. And when do_signal() catches the -ERESTARTNOINTR,
> it will change the regs to restart the syscall.

I see.  This is a clever functionality. 

Thanks,
-Toshi


--
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