LWN.net Logo

Re: [4KSTACK][2.6.6] Stack overflow in radeonfb

From:  Kronos <kronos-AT-kronoz.cjb.net>
To:  Benjamin Herrenschmidt <benh-AT-kernel.crashing.org>
Subject:  Re: [4KSTACK][2.6.6] Stack overflow in radeonfb
Date:  Fri, 14 May 2004 18:41:54 +0200
Cc:  Linux Kernel list <linux-kernel-AT-vger.kernel.org>

Il Fri, May 14, 2004 at 08:55:02AM +1000, Benjamin Herrenschmidt ha scritto: 
> 
> > 
> > int radeonfb_set_par(struct fb_info *info)
> > {
> >         struct radeonfb_info *rinfo = info->par;
> >         struct fb_var_screeninfo *mode = &info->var;
> >         struct radeon_regs newmode;
> >         
> > struct radeon_regs is huge: 2356 bytes
> > Quick fix (I'll test ASAP):
> 
> Wow, this is evil indeed, I didn't expect that struct to be that big,
> but well... I did add a bunch of stuff to it lately.

There are 2 arrays at the end of the struct:

struct radeon_regs {
        ....
        u32             palette[256];
        u32             palette2[256];
};

they take 2KB alone and AFAICS they are not used anywhere. Maybe they
can be removed?

Luca
-- 
Home: http://kronoz.cjb.net
"Sei l'unica donna della mia vita".
(Adamo)
-
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/


(Log in to post comments)

Copyright © 2004, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds