From: Joel Becker Date: Wed, 24 Jan 2007 01:00:45 +0000 (-0800) Subject: configfs: Zero terminate data in configfs attribute writes. X-Git-Tag: v2.6.21-rc1~92^2~21^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff05d1c4643dd4260eb699396043d7e8009c0de4;p=pandora-kernel.git configfs: Zero terminate data in configfs attribute writes. Attributes in configfs are text files. As such, most handlers expect to be able to call functions like simple_strtoul() without checking the bounds of the buffer. Change the call to zero terminate the buffer before calling the client's ->store() method. This does reduce the attribute size from PAGE_SIZE to PAGE_SIZE-1. Also, change get_zeroed_page() to alloc_page(), as we are handling the termination. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh --- Reading git-diff-tree failed