Re: [Patch] add check to /proc/devices read routines

From: Dave Jones
Date: Tue Apr 26 2005 - 20:21:59 EST

On Tue, Apr 26, 2005 at 09:08:27PM -0400, Neil Horman wrote:
> Patch to add check to get_chrdev_list and get_blkdev_list to prevent reads of
> /proc/devices from spilling over the provided page if more than 4096 bytes of
> string data are generated from all the registered character and block devices in
> a system
> Signed-off-by: Neil Horman <nhorman@xxxxxxxxxx>
> fs/char_dev.c | 13 ++++++++++++-
> fs/proc/proc_misc.c | 2 +-
> include/linux/genhd.h | 2 +-
> 3 files changed, 14 insertions(+), 3 deletions(-)

Missing changes to drivers/block/genhd.c perhaps ?
You changed the prototype of get_blkdev_list(), but not
the implementation, which still takes a single arg.

I've not looked at this code at all, but it smells like
something that perhaps needs converting to use seq_file() and friends ?


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at