<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/video, branch v2.6.31</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>xenfb: connect to backend before registering fb</title>
<updated>2009-08-27T19:31:18+00:00</updated>
<author>
<name>Jeremy Fitzhardinge</name>
<email>jeremy@goop.org</email>
</author>
<published>2009-08-27T19:22:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0a80fb10239b04c45e5e80aad8d4b2ca5ac407b2'/>
<id>0a80fb10239b04c45e5e80aad8d4b2ca5ac407b2</id>
<content type='text'>
As soon as the framebuffer is registered, our methods may be called by the
kernel. This leads to a crash as xenfb_refresh() gets called before we have
the irq.

Connect to the backend before registering our framebuffer with the kernel.

[ Fixes bug http://bugzilla.kernel.org/show_bug.cgi?id=14059 ]

Signed-off-by: Michal Schmidt &lt;mschmidt@redhat.com&gt;
Signed-off-by: Jeremy Fitzhardinge &lt;jeremy.fitzhardinge@citrix.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As soon as the framebuffer is registered, our methods may be called by the
kernel. This leads to a crash as xenfb_refresh() gets called before we have
the irq.

Connect to the backend before registering our framebuffer with the kernel.

[ Fixes bug http://bugzilla.kernel.org/show_bug.cgi?id=14059 ]

Signed-off-by: Michal Schmidt &lt;mschmidt@redhat.com&gt;
Signed-off-by: Jeremy Fitzhardinge &lt;jeremy.fitzhardinge@citrix.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sh: skip disabled LCDC channels</title>
<updated>2009-08-15T03:58:42+00:00</updated>
<author>
<name>Magnus Damm</name>
<email>damm@igel.co.jp</email>
</author>
<published>2009-08-15T02:53:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=21bc1f024d0d4ea43fc0f2a43504e759261c7b18'/>
<id>21bc1f024d0d4ea43fc0f2a43504e759261c7b18</id>
<content type='text'>
This patch updates the SuperH Mobile LCDC driver to skip
over disabled channels. Without this patch suspend-to-ram
operation will crash if deferred io is enabled.

Signed-off-by: Magnus Damm &lt;damm@igel.co.jp&gt;
Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch updates the SuperH Mobile LCDC driver to skip
over disabled channels. Without this patch suspend-to-ram
operation will crash if deferred io is enabled.

Signed-off-by: Magnus Damm &lt;damm@igel.co.jp&gt;
Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i.MX31: fix framebuffer locking regressions</title>
<updated>2009-08-07T17:39:56+00:00</updated>
<author>
<name>Guennadi Liakhovetski</name>
<email>g.liakhovetski@gmx.de</email>
</author>
<published>2009-08-06T22:07:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=20de03dae54e10271ffd308654dfb4a117f4789d'/>
<id>20de03dae54e10271ffd308654dfb4a117f4789d</id>
<content type='text'>
Recent framebuffer locking patches first made affected systems unbootable,
then the dead-lock has been fixed but as of 2.6.31-rc4 the framebuffer on
mx3 machines doesn't work. Fix this.

Signed-off-by: Guennadi Liakhovetski &lt;g.liakhovetski@gmx.de&gt;
Cc: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Cc: Krzysztof Helt &lt;krzysztof.h1@poczta.fm&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Recent framebuffer locking patches first made affected systems unbootable,
then the dead-lock has been fixed but as of 2.6.31-rc4 the framebuffer on
mx3 machines doesn't work. Fix this.

Signed-off-by: Guennadi Liakhovetski &lt;g.liakhovetski@gmx.de&gt;
Cc: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Cc: Krzysztof Helt &lt;krzysztof.h1@poczta.fm&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fbcon: don't use vc_resize() on initialization</title>
<updated>2009-08-07T17:39:56+00:00</updated>
<author>
<name>Johannes Weiner</name>
<email>hannes@cmpxchg.org</email>
</author>
<published>2009-08-06T22:07:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0035fe00f77d2b0a1a2d001f7442136d1ec5aefa'/>
<id>0035fe00f77d2b0a1a2d001f7442136d1ec5aefa</id>
<content type='text'>
Catalin and kmemleak spotted a leak of a VC screen buffer in
vc_allocate() due to the following chain of events:

	vc_allocate()
	  visual_init(init=1)
	    vc-&gt;vc_sw-&gt;con_init(init=1)
              fbcon_init()
	        vc_resize()
	          vc-&gt;screen_buf = kmalloc()
	  vc-&gt;screen_buf = kmalloc()

The common way for the VC drivers is to set the screen dimension
parameters manually in the init case and only call vc_resize() for
!init - which allocates a screen buffer according to the new
dimensions.

fbcon instead would do vc_resize() unconditionally and afterwards set
the dimensions manually (again) for !init - i.e. completely upside
down.  The vc_resize() allocated buffer would then get lost by
vc_allocate() allocating a fresh one.

Use vc_resize() only for actual resizing to close the leak.

Set the dimensions manually only in initialization mode to remove the
redundant setting in resize mode.

The kmemleak trace from Catalin:

unreferenced object 0xde158000 (size 12288):
  comm "Xorg", pid 1439, jiffies 4294961016
  hex dump (first 32 bytes):
    20 00 20 00 20 00 20 00 20 00 20 00 20 00 20 00   . . . . . . . .
    20 00 20 00 20 00 20 00 20 00 20 00 20 00 20 00   . . . . . . . .
  backtrace:
    [&lt;c006f74b&gt;] __save_stack_trace+0x17/0x1c
    [&lt;c006f81d&gt;] create_object+0xcd/0x188
    [&lt;c01f5457&gt;] kmemleak_alloc+0x1b/0x3c
    [&lt;c006e303&gt;] __kmalloc+0xdb/0xe8
    [&lt;c012cc4b&gt;] vc_do_resize+0x73/0x1e0
    [&lt;c012cdf1&gt;] vc_resize+0x15/0x18
    [&lt;c011afc1&gt;] fbcon_init+0x1f9/0x2b8
    [&lt;c0129e87&gt;] visual_init+0x9f/0xdc
    [&lt;c012aff3&gt;] vc_allocate+0x7f/0xfc
    [&lt;c012b087&gt;] con_open+0x17/0x80
    [&lt;c0120e43&gt;] tty_open+0x1f7/0x2e4
    [&lt;c0072fa1&gt;] chrdev_open+0x101/0x118
    [&lt;c006ffad&gt;] __dentry_open+0x105/0x1cc
    [&lt;c00700fd&gt;] nameidata_to_filp+0x2d/0x38
    [&lt;c00788cd&gt;] do_filp_open+0x2c1/0x54c
    [&lt;c006fdff&gt;] do_sys_open+0x3b/0xb4

Reported-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Johannes Weiner &lt;hannes@cmpxchg.org&gt;
Tested-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Cc: Pekka Enberg &lt;penberg@cs.helsinki.fi&gt;
Cc: Krzysztof Helt &lt;krzysztof.h1@poczta.fm&gt;
Tested-by: Dave Young &lt;hidave.darkstar@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Catalin and kmemleak spotted a leak of a VC screen buffer in
vc_allocate() due to the following chain of events:

	vc_allocate()
	  visual_init(init=1)
	    vc-&gt;vc_sw-&gt;con_init(init=1)
              fbcon_init()
	        vc_resize()
	          vc-&gt;screen_buf = kmalloc()
	  vc-&gt;screen_buf = kmalloc()

The common way for the VC drivers is to set the screen dimension
parameters manually in the init case and only call vc_resize() for
!init - which allocates a screen buffer according to the new
dimensions.

fbcon instead would do vc_resize() unconditionally and afterwards set
the dimensions manually (again) for !init - i.e. completely upside
down.  The vc_resize() allocated buffer would then get lost by
vc_allocate() allocating a fresh one.

Use vc_resize() only for actual resizing to close the leak.

Set the dimensions manually only in initialization mode to remove the
redundant setting in resize mode.

The kmemleak trace from Catalin:

unreferenced object 0xde158000 (size 12288):
  comm "Xorg", pid 1439, jiffies 4294961016
  hex dump (first 32 bytes):
    20 00 20 00 20 00 20 00 20 00 20 00 20 00 20 00   . . . . . . . .
    20 00 20 00 20 00 20 00 20 00 20 00 20 00 20 00   . . . . . . . .
  backtrace:
    [&lt;c006f74b&gt;] __save_stack_trace+0x17/0x1c
    [&lt;c006f81d&gt;] create_object+0xcd/0x188
    [&lt;c01f5457&gt;] kmemleak_alloc+0x1b/0x3c
    [&lt;c006e303&gt;] __kmalloc+0xdb/0xe8
    [&lt;c012cc4b&gt;] vc_do_resize+0x73/0x1e0
    [&lt;c012cdf1&gt;] vc_resize+0x15/0x18
    [&lt;c011afc1&gt;] fbcon_init+0x1f9/0x2b8
    [&lt;c0129e87&gt;] visual_init+0x9f/0xdc
    [&lt;c012aff3&gt;] vc_allocate+0x7f/0xfc
    [&lt;c012b087&gt;] con_open+0x17/0x80
    [&lt;c0120e43&gt;] tty_open+0x1f7/0x2e4
    [&lt;c0072fa1&gt;] chrdev_open+0x101/0x118
    [&lt;c006ffad&gt;] __dentry_open+0x105/0x1cc
    [&lt;c00700fd&gt;] nameidata_to_filp+0x2d/0x38
    [&lt;c00788cd&gt;] do_filp_open+0x2c1/0x54c
    [&lt;c006fdff&gt;] do_sys_open+0x3b/0xb4

Reported-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Johannes Weiner &lt;hannes@cmpxchg.org&gt;
Tested-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Cc: Pekka Enberg &lt;penberg@cs.helsinki.fi&gt;
Cc: Krzysztof Helt &lt;krzysztof.h1@poczta.fm&gt;
Tested-by: Dave Young &lt;hidave.darkstar@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>viafb: fix rmmod bug</title>
<updated>2009-08-07T17:39:56+00:00</updated>
<author>
<name>Florian Tobias Schandinat</name>
<email>FlorianSchandinat@gmx.de</email>
</author>
<published>2009-08-06T22:07:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=521594442cc62d1c2af8436a05ab5918b7730b19'/>
<id>521594442cc62d1c2af8436a05ab5918b7730b19</id>
<content type='text'>
This fixes a bug caused by changing pointers (viafb_mode, viafb_mode1)
assigned by module_param.  It reduces driver complexity by not needlessly
changing these vars as they are only read once and removing now
superfluous code.

On unpatched kernels loading viafb with viafb_mode or viafb_mode1 option
used and afterwards unloading it results in:

kernel BUG at mm/slub.c:2926!
invalid opcode: 0000 [#1] PREEMPT
last sysfs file: /sys/devices/virtual/block/loop0/removable
Modules linked in: snd_hda_codec_realtek snd_hda_intel snd_hda_codec
snd_hwdep snd_pcm rtl8187 snd_timer eeprom_93cx6 mmc_block snd soundcore
via_sdmmc fb snd_page_alloc i2c_algo_bit i2c_viapro ehci_hcd uhci_hcd
cfbcopyarea mmc_core cfbimgblt cfbfillrect video output [last unloaded:
viafb]

  Pid: 3355, comm: rmmod Not tainted (2.6.31-rc1 #0)
  EIP: 0060:[&lt;c106a759&gt;] EFLAGS: 00010246 CPU: 0
  EIP is at kfree+0x80/0xda
  EAX: c17c2da0 EBX: dc7edbdc ECX: 0000010f EDX: 00000000
  ESI: c102c700 EDI: dc7ed8fa EBP: d703ff2c ESP: d703ff20
   DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
  Process rmmod (pid: 3355, ti=d703e000 task=db1412c0 task.ti=d703e000)
  Stack:
   dc7edbdc 00000014 00000016 d703ff40 c102c700 dc7f45d4 dc7f45d4 00000880
   d703ff4c c103e571 00000000 d703ffac c103e751 66616976 da140062 db89ba80
   00000328 d702edf8 db89ba80 d703ff9c c105d0f0 00000200 da14f898 00000014
  Call Trace:
   [&lt;c102c700&gt;] ? destroy_params+0x1e/0x2b
   [&lt;c103e571&gt;] ? free_module+0xa2/0xd7
   [&lt;c103e751&gt;] ? sys_delete_module+0x1ab/0x1da
   [&lt;c105d0f0&gt;] ? do_munmap+0x20a/0x225
   [&lt;c10029b4&gt;] ? sysenter_do_call+0x12/0x26
  Code: 10 76 7a 8d 87 00 00 00 40 c1 e8 0c c1 e0 05 03 05 1c 87 41 c1 66 83 38 00 79 03 8b 40 0c 8b 10 84 d2 78 12 66 f7 c2 00 c0 75 04 &lt;0f&gt; 0b eb fe e8 6f 5a fe ff eb 47 8b 55 04 8b 58 0c 9c 5e fa 3b
  EIP: [&lt;c106a759&gt;] kfree+0x80/0xda SS:ESP 0068:d703ff20

This is caused by the current code changing the pointers assigned by
module_param.  During unload it tries to free the memory the pointers
point at which is now part of an internal structure.

The patch simply avoids changing the pointers.  This is okay as they are
read only once during the initialization process.

Signed-off-by: Florian Tobias Schandinat &lt;FlorianSchandinat@gmx.de&gt;
Cc: Scott Fang &lt;ScottFang@viatech.com.cn&gt;
Cc: Joseph Chan &lt;JosephChan@via.com.tw&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes a bug caused by changing pointers (viafb_mode, viafb_mode1)
assigned by module_param.  It reduces driver complexity by not needlessly
changing these vars as they are only read once and removing now
superfluous code.

On unpatched kernels loading viafb with viafb_mode or viafb_mode1 option
used and afterwards unloading it results in:

kernel BUG at mm/slub.c:2926!
invalid opcode: 0000 [#1] PREEMPT
last sysfs file: /sys/devices/virtual/block/loop0/removable
Modules linked in: snd_hda_codec_realtek snd_hda_intel snd_hda_codec
snd_hwdep snd_pcm rtl8187 snd_timer eeprom_93cx6 mmc_block snd soundcore
via_sdmmc fb snd_page_alloc i2c_algo_bit i2c_viapro ehci_hcd uhci_hcd
cfbcopyarea mmc_core cfbimgblt cfbfillrect video output [last unloaded:
viafb]

  Pid: 3355, comm: rmmod Not tainted (2.6.31-rc1 #0)
  EIP: 0060:[&lt;c106a759&gt;] EFLAGS: 00010246 CPU: 0
  EIP is at kfree+0x80/0xda
  EAX: c17c2da0 EBX: dc7edbdc ECX: 0000010f EDX: 00000000
  ESI: c102c700 EDI: dc7ed8fa EBP: d703ff2c ESP: d703ff20
   DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
  Process rmmod (pid: 3355, ti=d703e000 task=db1412c0 task.ti=d703e000)
  Stack:
   dc7edbdc 00000014 00000016 d703ff40 c102c700 dc7f45d4 dc7f45d4 00000880
   d703ff4c c103e571 00000000 d703ffac c103e751 66616976 da140062 db89ba80
   00000328 d702edf8 db89ba80 d703ff9c c105d0f0 00000200 da14f898 00000014
  Call Trace:
   [&lt;c102c700&gt;] ? destroy_params+0x1e/0x2b
   [&lt;c103e571&gt;] ? free_module+0xa2/0xd7
   [&lt;c103e751&gt;] ? sys_delete_module+0x1ab/0x1da
   [&lt;c105d0f0&gt;] ? do_munmap+0x20a/0x225
   [&lt;c10029b4&gt;] ? sysenter_do_call+0x12/0x26
  Code: 10 76 7a 8d 87 00 00 00 40 c1 e8 0c c1 e0 05 03 05 1c 87 41 c1 66 83 38 00 79 03 8b 40 0c 8b 10 84 d2 78 12 66 f7 c2 00 c0 75 04 &lt;0f&gt; 0b eb fe e8 6f 5a fe ff eb 47 8b 55 04 8b 58 0c 9c 5e fa 3b
  EIP: [&lt;c106a759&gt;] kfree+0x80/0xda SS:ESP 0068:d703ff20

This is caused by the current code changing the pointers assigned by
module_param.  During unload it tries to free the memory the pointers
point at which is now part of an internal structure.

The patch simply avoids changing the pointers.  This is okay as they are
read only once during the initialization process.

Signed-off-by: Florian Tobias Schandinat &lt;FlorianSchandinat@gmx.de&gt;
Cc: Scott Fang &lt;ScottFang@viatech.com.cn&gt;
Cc: Joseph Chan &lt;JosephChan@via.com.tw&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fbcon: fix rotate upside down crash</title>
<updated>2009-08-07T17:39:55+00:00</updated>
<author>
<name>Stefani Seibold</name>
<email>stefani@seibold.net</email>
</author>
<published>2009-08-06T22:07:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=93274e4d4e9416ad1fa47e2f26011e2c483fe5fe'/>
<id>93274e4d4e9416ad1fa47e2f26011e2c483fe5fe</id>
<content type='text'>
Fix the rotate_ud() function not to crash in case of a font which has not
a width of multiple by 8: The inner loop of the font pixel copy should not
access a bit outside the font memory area.  Subtract the shift offset from
the font width will prevent this.

Signed-off-by: Stefani Seibold &lt;stefani@seibold.net&gt;
Cc: Krzysztof Helt &lt;krzysztof.h1@poczta.fm&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix the rotate_ud() function not to crash in case of a font which has not
a width of multiple by 8: The inner loop of the font pixel copy should not
access a bit outside the font memory area.  Subtract the shift offset from
the font width will prevent this.

Signed-off-by: Stefani Seibold &lt;stefani@seibold.net&gt;
Cc: Krzysztof Helt &lt;krzysztof.h1@poczta.fm&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>parisc: sticore.c - check return values</title>
<updated>2009-08-02T13:26:51+00:00</updated>
<author>
<name>Helge Deller</name>
<email>deller@gmx.de</email>
</author>
<published>2009-08-02T13:26:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1a1dba32412c15c51d5fc0b9efadd2ea310356d7'/>
<id>1a1dba32412c15c51d5fc0b9efadd2ea310356d7</id>
<content type='text'>
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers/video/backlight/jornada720_bl.c: fix build</title>
<updated>2009-07-30T02:10:35+00:00</updated>
<author>
<name>Kristoffer Ericson</name>
<email>kristoffer.ericson@gmail.com</email>
</author>
<published>2009-07-29T22:04:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b317c833211b7fbf902163de766f09554090e0bf'/>
<id>b317c833211b7fbf902163de766f09554090e0bf</id>
<content type='text'>
Signed-off-by: Kristoffer Ericson &lt;kristoffer.ericson@gmail.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Kristoffer Ericson &lt;kristoffer.ericson@gmail.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s3c-fb: fix off-by-one bug in loop indexes</title>
<updated>2009-07-30T02:10:34+00:00</updated>
<author>
<name>Pawel Osciak</name>
<email>p.osciak@samsung.com</email>
</author>
<published>2009-07-29T22:02:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c42b110caeb128819104d057acdaa1ae564b7c8d'/>
<id>c42b110caeb128819104d057acdaa1ae564b7c8d</id>
<content type='text'>
Fixed off-by-one bug in loop indexes - some elements beyond windows' array
were accessed, which might result in memory access violations when
removing/suspending the device.

Signed-off-by: Pawel Osciak &lt;p.osciak@samsung.com&gt;
Reviewed-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Cc: Krzysztof Helt &lt;krzysztof.h1@poczta.fm&gt;
Cc: Ben Dooks &lt;ben-linux@fluff.org&gt;
Cc: Russell King &lt;rmk@arm.linux.org.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed off-by-one bug in loop indexes - some elements beyond windows' array
were accessed, which might result in memory access violations when
removing/suspending the device.

Signed-off-by: Pawel Osciak &lt;p.osciak@samsung.com&gt;
Reviewed-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Cc: Krzysztof Helt &lt;krzysztof.h1@poczta.fm&gt;
Cc: Ben Dooks &lt;ben-linux@fluff.org&gt;
Cc: Russell King &lt;rmk@arm.linux.org.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fbmon: work around compiler bug in gcc-2.4.2</title>
<updated>2009-07-22T15:49:22+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-07-22T15:49:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3730793d457fed79a6d49bae72996d458c8e4f2d'/>
<id>3730793d457fed79a6d49bae72996d458c8e4f2d</id>
<content type='text'>
There's some odd bug in gcc-4.2 where it miscompiles a simple loop whent
he loop counter is of type 'unsigned char' and it should count to 128.

The compiler will incorrectly decide that a trivial loop like this:

	unsigned char i, ...

	for (i = 0; i &lt; 128; i++) {
		..

is endless, and will compile it to a single instruction that just
branches to itself.

This was triggered by the addition of '-fno-strict-overflow', and we
could play games with compiler versions and go back to '-fwrapv'
instead, but the trivial way to avoid it is to just make the loop
induction variable be an 'int' instead.

Thanks to Krzysztof Oledzki for reporting and testing and to Troy Moure
for digging through assembler differences and finding it.

Reported-and-tested-by: Krzysztof Oledzki &lt;olel@ans.pl&gt;
Found-by: Troy Moure &lt;twmoure@szypr.net&gt;
Gcc-bug-acked-by: Ian Lance Taylor &lt;iant@google.com&gt;
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There's some odd bug in gcc-4.2 where it miscompiles a simple loop whent
he loop counter is of type 'unsigned char' and it should count to 128.

The compiler will incorrectly decide that a trivial loop like this:

	unsigned char i, ...

	for (i = 0; i &lt; 128; i++) {
		..

is endless, and will compile it to a single instruction that just
branches to itself.

This was triggered by the addition of '-fno-strict-overflow', and we
could play games with compiler versions and go back to '-fwrapv'
instead, but the trivial way to avoid it is to just make the loop
induction variable be an 'int' instead.

Thanks to Krzysztof Oledzki for reporting and testing and to Troy Moure
for digging through assembler differences and finding it.

Reported-and-tested-by: Krzysztof Oledzki &lt;olel@ans.pl&gt;
Found-by: Troy Moure &lt;twmoure@szypr.net&gt;
Gcc-bug-acked-by: Ian Lance Taylor &lt;iant@google.com&gt;
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
