[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120507194658.GH19417@google.com>
Date: Mon, 7 May 2012 12:46:58 -0700
From: Tejun Heo <tj@...nel.org>
To: Alan Stern <stern@...land.harvard.edu>
Cc: "Eric W. Biederman" <ebiederm@...ssion.com>,
Peter Zijlstra <peterz@...radead.org>,
Kernel development list <linux-kernel@...r.kernel.org>
Subject: Re: Lockdep false positive in sysfs
Hello, Alan.
On Fri, May 04, 2012 at 03:08:53PM -0400, Alan Stern wrote:
> @@ -588,10 +591,15 @@ static ssize_t usb_dev_authorized_store(
> result = sscanf(buf, "%u\n", &val);
> if (result != 1)
> result = -EINVAL;
> - else if (val == 0)
> + else if (val == 0) {
> + void *cookie;
> +
> + cookie = device_start_attribute_infanticide(dev, attr, NULL);
> result = usb_deauthorize_device(usb_dev);
> - else
> + device_end_attribute_infanticide(cookie);
> + } else {
> result = usb_authorize_device(usb_dev);
> + }
I *think* it looks way too huge as lockdep workaround. We're adding a
whole separate lookup interface for this. If looking up afterwards is
difficult, can't we get away with adding a field in struct attribute?
Thanks.
--
tejun
--
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