On Thu, 26 Jun 2008 12:49:23 +0200 "Rafael J. Wysocki" <[EMAIL PROTECTED]> 
wrote:
>
> > I guess this got in through Rusty's tree, right?
> > 
> > Does the patch below fix it please?
> 
> Yes, it does.

I have applied this patch to today's linux-next tree.

Rusty can you put this in you tree (or amend the patch that needs this)?

> > From: Jiri Kosina <[EMAIL PROTECTED]>
> > Subject: [PATCH] module: fix NULL pointer dereference in find_symbol()
> > 
> > The patch that introduces each_symbol() iterator forgets to
> > test the NULL value of the output parameters (which the original
> > code did).
> > 
> > This patch restores the correct checks.
> > 
> > Signed-off-by: Jiri Kosina <[EMAIL PROTECTED]>
> > ---
> >   kernel/module.c |    6 ++++--
> >   1 files changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/kernel/module.c b/kernel/module.c
> > index 880409f..a3354ca 100644
> > --- a/kernel/module.c
> > +++ b/kernel/module.c
> > @@ -304,8 +304,10 @@ static unsigned long find_symbol(const char *name,
> >     fsa.warn = warn;
> > 
> >     if (each_symbol(find_symbol_in_section, &fsa)) {
> > -           *owner = fsa.owner;
> > -           *crc = fsa.crc;
> > +           if (owner)
> > +                   *owner = fsa.owner;
> > +           if (crc)
> > +                   *crc = fsa.crc;
> >             return fsa.value;
> >     }

-- 
Cheers,
Stephen Rothwell                    [EMAIL PROTECTED]
http://www.canb.auug.org.au/~sfr/

Attachment: pgpldm4kSRLrR.pgp
Description: PGP signature

Reply via email to