Linux Framebuffer Layer development
 help / color / mirror / Atom feed
From: krzysztof.h1@poczta.fm
To: Geert Uytterhoeven <geert@linux-m68k.org>,
	Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Linux-fbdev-devel <linux-fbdev-devel@lists.sourceforge.net>
Subject: Re: [PATCH 2/2] tdfxfb: fix frame buffer name overrun
Date: 28 Aug 2008 10:20:19 +0200	[thread overview]
Message-ID: <20080828082020.525E411410@f07.poczta.interia.pl> (raw)

> On Wed, 27 Aug 2008, Krzysztof Helt wrote:
> > From: Krzysztof Helt <krzysztof.h1@wp.pl>
> > 
> > If there are more then one graphics card handled 
> > by the tdfxfb driver the name of the frame buffer 
> > overruns reserved name size.
> 
> Nice spot! Multiple strcat() will start overwriting other fields in
> fb_fix_screeninfo.
> 
> 
> At first I thought: but this doesn't fix all problems with multiple
> cards, as tdfx_fix is still shared among all of them? But that's not
> true (tdfx_fix is copied to info->fix later), so it is correct.
> 
> IMHO, as tdfx_fix is used as some `temporary' variable in tdfxfb_probe()
> only,
> a better fix would be to change the operation mode from:
> 
>     info = framebuffer_alloc(...);
>     tdfx_fix.foo = ...; /* depends on probe value */
>     tdfx_fix.bar = ...; /* depends on probe value */
>     info->fix = tdfx_fix;
> 
> to
> 
>     info = framebuffer_alloc(...);
>     info->fix = tdfx_fix;
>     info->fix.foo = ...; /* depends on probe value */
>     info->fix.bar = ...; /* depends on probe value */
> 
> and make tdfx_fix const. Then you don't have to initialize tdfx_fix.id
> for every card, and make it clear that tdfx_fix is just used as a
> template.
> 

Ok.

Andrew, please drop this patch. I will prepare next version (with signed-off-by as well). I started playing with git and I haven't notice that I need "-s" option while generating patches.

Regards,
Krzysztof


---------------------------------------------------------------
Nasilaja sie kradzieze.
Mieszkancy osiedli zaniepokojeni.
Prosimy o pomoc w tej sprawie >>> http://link.interia.pl/f1eef



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

             reply	other threads:[~2008-08-28  8:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-28  8:20 krzysztof.h1 [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-08-27 19:07 [PATCH 2/2] tdfxfb: fix frame buffer name overrun Krzysztof Helt
2008-08-28  7:01 ` Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080828082020.525E411410@f07.poczta.interia.pl \
    --to=krzysztof.h1@poczta.fm \
    --cc=akpm@linux-foundation.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox