tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: MODULAR: Add support for load-time options

On Feb 9, 2008, at 10:56 AM, David Laight wrote:

On Sat, Feb 09, 2008 at 09:40:22AM +0100, Julio M. Merino Vidal wrote:
+handle_modctl_load(void *arg)
+       modctl_load_t *ml = (modctl_load_t *)arg;
+       char params[4096];
+       error = copyinstr(ml->ml_params, params, sizeof(params), NULL);

An on-stack 4k buffer doesn't seem like an especially bright idea!

Agh, true.  Forgot to address that before sending... :P

It might be better to get the user to pass in the length.

OK. Any other possibility that I may be missing, that is specific to the handling of proplib dictionaries?

Oh, and by the way. The patch I posted failed to do some prop_object_release on the dictionaries, so some memory was leaked. I have fixed that here.

Home | Main Index | Thread Index | Old Index