# Re: \[PATCH 1/3\] fbdev: Add framebuffer and display update module support for pnx4008

- From: Antonino A. Daplas \<adaplas@gmail.com\>
- Date: 2006-07-01 08:25:49 
- List: linux-fbdev
- Page: https://ratatoskr.run/linux-fbdev/2006/07/13456419
- Thread: https://ratatoskr.run/linux-fbdev/2006/06/13456409/t.md

```text
Andrew Morton wrote:
> On Sat, 01 Jul 2006 13:18:02 +0800
> "Antonino A. Daplas" [ref] wrote:
> 
>> Andrew Morton wrote:
>>> On Sat, 01 Jul 2006 13:02:19 +0800
>>> "Antonino A. Daplas" [ref] wrote:
>>>
>>>> Andrew Morton wrote:
>>>>> On Fri, 30 Jun 2006 20:00:23 +0800
>>>>> "Antonino A. Daplas" [ref] wrote:
>>>>>
>>>>>> +static struct fb_var_screeninfo rgbfb_var __initdata = {
>>>>> Is that right?  We later do
>>>>>
>>>>> +       info->var = rgbfb_var;
>>>>>
>>>>> but rgbfb_var is about to be unloaded from memory.  I suspect this'll crash
>>>>> if the driver is statically linked into the kernel.
>>>>>
>>>> Should be okay, as the assignment is done during init only.
>>> But we're setting info->var to point at memory which will be freed up by
>>> free_initmem().
>>>
>>> So if anyone _uses_ info->var after free_initmem() they'll reference random
>>> memory or they'll oops.
>> No, rgbfb_var is not a pointer, so the contents or rgbfb_var are copied to
>> info->var.
>>
> 
> oh, ok.  How unusual.  I assume things inside fb_var_screeninfo.var
> get altered at runtime?
> 
> 

For drivers that do allow changing of video modes at startup, yes.  For
drivers that don't, such as this one, they just set a known, minimal working
mode which is copied to info->var.

Tony


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
```
