Re: 2.6.13-mm1

From: gcoady
Date: Fri Sep 02 2005 - 19:16:17 EST


On Fri, 2 Sep 2005 14:45:52 -0700, Andrew Morton <akpm@xxxxxxxx> wrote:

>"J.A. Magallon" <jamagallon@xxxxxxx> wrote:
>>
[...]
>> Still the same result, system bocks starting udev...
>>
>
>OK, thanks. Nothing from sysrq-t? Does the below help?
>
>--- devel/fs/sysfs/file.c~gregkh-driver-sysfs-strip_leading_trailing_whitespace-fix 2005-09-02 04:01:40.000000000 -0700
>+++ devel-akpm/fs/sysfs/file.c 2005-09-02 04:05:02.000000000 -0700
>@@ -202,13 +202,14 @@ fill_write_buffer(struct sysfs_buffer *
> * passing the buffer that we acquired in fill_write_buffer().
> */
>
>-static int
>-flush_write_buffer(struct dentry * dentry, struct sysfs_buffer * buffer, size_t count)
>+static int flush_write_buffer(struct dentry *dentry,
>+ struct sysfs_buffer *buffer, size_t count_in)
> {
> struct attribute * attr = to_attr(dentry);
> struct kobject * kobj = to_kobj(dentry->d_parent);
> struct sysfs_ops * ops = buffer->ops;
> char *x;
>+ size_t count = count_in;
>
> /* locate trailing white space */
> while ((count > 0) && isspace(buffer->page[count - 1]))
>@@ -224,7 +225,8 @@ flush_write_buffer(struct dentry * dentr
> /* terminate the string */
> x[count] = '\0';
>
>- return ops->store(kobj, attr, x, count);
>+ ops->store(kobj, attr, x, count);
>+ return count_in;
> }
>
>
Hi Andrew,
Patch above fixes problem with sysfs writes to adm9240 driver
locking up console in last three -mm kernels.

Grant.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/