Re: Linux 2.4.22-pre7

From: Dick Streefland (spam@streefland.xs4all.nl)
Date: Sat Jul 19 2003 - 11:27:22 EST


Marcelo Tosatti <marcelo@conectiva.com.br> wrote:
| Here goes -pre7.
|
| This is a feature freeze, only bugfixes will be accepted from now on.

OK, do you accept the following bugfix for /proc/cmdline?

--- linux-2.4.21/fs/proc/proc_misc.c.orig Fri Jun 27 11:35:06 2003
+++ linux-2.4.21/fs/proc/proc_misc.c Fri Jun 27 11:37:15 2003
@@ -423,9 +423,9 @@
                                  int count, int *eof, void *data)
 {
         extern char saved_command_line[];
- int len;
+ int len = 0;
 
- len = snprintf(page, count, "%s\n", saved_command_line);
+ proc_sprintf(page, &off, &len, "%s\n", saved_command_line);
         return proc_calc_metrics(page, start, off, count, eof, len);
 }
 
Since kernel version 2.4.19, a read() from /proc/cmdline with a
non-zero offset doesn't work anymore: try "dd bs=1 < /proc/cmdline".
Because of this bug, the following fails in ash and the busybox shell:

  $ read line < /proc/cmdline

I've posted this fix to lkml in januari, and sent it to you several
times, but got no reaction. Alan Cox included this patch in version
2.4.21pre5-ac4 of his tree. Could you please include this obvious fix
in 2.4.22?

-- 
Dick Streefland                    ////               De Bilt
dick.streefland@xs4all.nl         (@ @)       The Netherlands
------------------------------oOO--(_)--OOo------------------

- 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/



This archive was generated by hypermail 2b29 : Wed Jul 23 2003 - 22:00:37 EST