Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261983AbVD0Ttl (ORCPT ); Wed, 27 Apr 2005 15:49:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261984AbVD0Ttl (ORCPT ); Wed, 27 Apr 2005 15:49:41 -0400 Received: from rproxy.gmail.com ([64.233.170.201]:50981 "EHLO rproxy.gmail.com") by vger.kernel.org with ESMTP id S261983AbVD0Ttj convert rfc822-to-8bit (ORCPT ); Wed, 27 Apr 2005 15:49:39 -0400 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=e93hcZ6PGgGy9Ub7k4ks2PfTXpG9JRGW71puA0NWkbj+Rq0YAsDb/vzFgn3pS7Jwpz7jnCu8hJ0B0qYLwfV73l/tCMod/ckAnO/O0z9yfYBTjKsVct+4gRwizaT3SdlW8lZ377lS3TE6aRjxVLm5DelZIfI3K2KCu6XCpKYwJXg= Message-ID: Date: Wed, 27 Apr 2005 14:49:38 -0500 From: Dmitry Torokhov Reply-To: dtor_core@ameritech.net To: Greg KH Subject: Re: [03/07] I2C: Fix incorrect sysfs file permissions in it87 and via686a drivers Cc: khali@linux-fr.org, sensors@stimpy.netroedge.com, linux-kernel@vger.kernel.org, stable@kernel.org, Justin Forbes , Zwane Mwaikambo , Cliff White , "Theodore Ts'o" , "Randy.Dunlap" , Chuck Wolber , torvalds@osdl.org, akpm@osdl.org, alan@lxorguk.ukuu.org.uk In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Content-Disposition: inline References: <20050427171446.GA3195@kroah.com> <20050427171617.GD3195@kroah.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1059 Lines: 32 On 4/27/05, Dmitry Torokhov wrote: > On 4/27/05, Greg KH wrote: > > > > -stable review patch. If anyone has any objections, please let us know. > > > > While the patch is correct I'd have something like this as well: > > --- linux-2.6.11.orig/fs/sysfs/file.c > +++ linux-2.6.11/fs/sysfs/file.c > @@ -36,7 +36,7 @@ subsys_attr_store(struct kobject * kobj, > { > struct subsystem * s = to_subsys(kobj); > struct subsys_attribute * sattr = to_sattr(attr); > - ssize_t ret = 0; > + ssize_t ret = -ENOSYS; > > if (sattr->store) > ret = sattr->store(s,page,count); > > So writes without store handler would return "not implemented". > Obviously driver_sysfs_ops, bus_sysfs_ops, etc need the same treatment... -- Dmitry - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/