Re: [PATCH] scanlog_init cleanup, minor fixes

2008-03-26 Thread Michael Ellerman
On Wed, 2008-03-26 at 18:09 -0500, Nathan Lynch wrote: > Michael Ellerman wrote: > > > + /* Ideally we could allocate a buffer < 4G */ > > > + data = kzalloc(RTAS_DATA_BUF_SIZE, GFP_KERNEL); > > > + if (!data) > > > + goto err; > > > > Not your bug, but what happens if data is > 4G? Kaboom

Re: [PATCH] scanlog_init cleanup, minor fixes

2008-03-26 Thread Nathan Lynch
Michael Ellerman wrote: > > + /* Ideally we could allocate a buffer < 4G */ > > + data = kzalloc(RTAS_DATA_BUF_SIZE, GFP_KERNEL); > > + if (!data) > > + goto err; > > Not your bug, but what happens if data is > 4G? Kaboom? An old RPA doc (scan-log-dump isn't specified in PAPR) say

Re: [PATCH] scanlog_init cleanup, minor fixes

2008-03-26 Thread Michael Ellerman
On Sun, 2008-03-23 at 17:51 -0500, Nathan Lynch wrote: > scanlog_init() could use some love. > diff --git a/arch/powerpc/platforms/pseries/scanlog.c > b/arch/powerpc/platforms/pseries/scanlog.c > index 8e1ef16..e5b0ea8 100644 > --- a/arch/powerpc/platforms/pseries/scanlog.c > +++ b/arch/powerpc/p

[PATCH] scanlog_init cleanup, minor fixes

2008-03-23 Thread Nathan Lynch
scanlog_init() could use some love. * properly return -ENODEV if this system doesn't support scan-log-dump * don't printk if scan-log-dump not present; only older systems have it * convert from create_proc_entry() to preferred proc_create() * allocate zeroed data buffer * fix potential memory leak