Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750747AbWJVSje (ORCPT ); Sun, 22 Oct 2006 14:39:34 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750763AbWJVSje (ORCPT ); Sun, 22 Oct 2006 14:39:34 -0400 Received: from mx2.suse.de ([195.135.220.15]:60395 "EHLO mx2.suse.de") by vger.kernel.org with ESMTP id S1750747AbWJVSjd (ORCPT ); Sun, 22 Oct 2006 14:39:33 -0400 Date: Sun, 22 Oct 2006 11:39:24 -0700 From: Greg KH To: Thomas Maier Cc: linux-kernel@vger.kernel.org, akpm@osdl.org Subject: Re: [PATCH] 2.6.19-rc2-mm2 sysfs: sysfs_write_file() writes zero terminated data Message-ID: <20061022183924.GA18032@suse.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 813 Lines: 24 On Sun, Oct 22, 2006 at 07:17:47PM +0200, Thomas Maier wrote: > Hello, > > since most of the files in sysfs are text files, > it would be nice, if the "store" function called > during sysfs_write_file() gets a zero terminated > string / data. > The current implementation seems not to ensure this. > (But only if it is the first time the zeroed buffer > page is allocated.) Have you seen sysfs buffers being passed to the store() function in a non-null terminated manner? How? Are you seeking backward and then writing again to the file somehow? thanks, greg k-h - 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/