<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/video, branch linux-2.6.24.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>fbdev: fix /proc/fb oops after module removal</title>
<updated>2008-04-19T01:53:30+00:00</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2008-04-16T02:45:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=acba01a4a72096cd60de7dad570acea3ec7f46ab'/>
<id>acba01a4a72096cd60de7dad570acea3ec7f46ab</id>
<content type='text'>
upstream commit: c43f89c2084f46e3ec59ddcbc52ecf4b1e9b015a

/proc/fb is not removed during rmmod.

Steps to reproduce:

	modprobe fb
	rmmod fb
	ls /proc

BUG: unable to handle kernel paging request at ffffffffa0094370
IP: [&lt;ffffffff802b92a1&gt;] proc_get_inode+0x101/0x130
PGD 203067 PUD 207063 PMD 17e758067 PTE 0
Oops: 0000 [1] SMP
last sysfs file: /sys/devices/pci0000:00/0000:00:1e.0/0000:05:02.0/resource
CPU 1
Modules linked in: nf_conntrack_irc xt_state iptable_filter ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack ip_tables x_tables vfat fat usbhid ehci_hcd uhci_hcd usbcore sr_mod cdrom [last unloaded: fb]
Pid: 21205, comm: ls Not tainted 2.6.25-rc8-mm2 #14
RIP: 0010:[&lt;ffffffff802b92a1&gt;]  [&lt;ffffffff802b92a1&gt;] proc_get_inode+0x101/0x130
RSP: 0018:ffff81017c4bfc78  EFLAGS: 00010246
RAX: 0000000000008000 RBX: ffff8101787f5470 RCX: 0000000048011ccc
RDX: ffffffffa0094320 RSI: ffff810006ad43b0 RDI: ffff81017fc2cc00
RBP: ffff81017e450300 R08: 0000000000000002 R09: ffff81017c5d1000
R10: 0000000000000000 R11: 0000000000000246 R12: ffff81016b903a28
R13: ffff81017f822020 R14: ffff81017c4bfd58 R15: ffff81017f822020
FS:  00007f08e71696f0(0000) GS:ffff81017fc06480(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: ffffffffa0094370 CR3: 000000017e54a000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process ls (pid: 21205, threadinfo ffff81017c4be000, task ffff81017de48770)
Stack:  ffff81017c5d1000 00000000ffffffea ffff81017e450300 ffffffff802bdd1e
 ffff81017f802258 ffff81017c4bfe48 ffff81016b903a28 ffff81017f822020
 ffff81017c4bfd48 ffffffff802b9ba0 ffff81016b903a28 ffff81017f802258
Call Trace:
 [&lt;ffffffff802bdd1e&gt;] ? proc_lookup_de+0x8e/0x100
 [&lt;ffffffff802b9ba0&gt;] ? proc_root_lookup+0x20/0x60
 [&lt;ffffffff802882a7&gt;] ? do_lookup+0x1b7/0x210
 [&lt;ffffffff8028883d&gt;] ? __link_path_walk+0x53d/0x7f0
 [&lt;ffffffff80295eb8&gt;] ? mntput_no_expire+0x28/0x130
 [&lt;ffffffff80288b4a&gt;] ? path_walk+0x5a/0xc0
 [&lt;ffffffff80288dd3&gt;] ? do_path_lookup+0x83/0x1c0
 [&lt;ffffffff80287785&gt;] ? getname+0xe5/0x210
 [&lt;ffffffff80289adb&gt;] ? __user_walk_fd+0x4b/0x80
 [&lt;ffffffff8028236c&gt;] ? vfs_lstat_fd+0x2c/0x70
 [&lt;ffffffff8028bf1e&gt;] ? filldir+0xae/0xf0
 [&lt;ffffffff802b92e9&gt;] ? de_put+0x9/0x50
 [&lt;ffffffff8029633d&gt;] ? mnt_want_write+0x2d/0x80
 [&lt;ffffffff8029339f&gt;] ? touch_atime+0x1f/0x170
 [&lt;ffffffff802b9b1d&gt;] ? proc_root_readdir+0x7d/0xa0
 [&lt;ffffffff802825e7&gt;] ? sys_newlstat+0x27/0x50
 [&lt;ffffffff8028bffb&gt;] ? vfs_readdir+0x9b/0xd0
 [&lt;ffffffff8028c0fe&gt;] ? sys_getdents+0xce/0xe0
 [&lt;ffffffff8020b39b&gt;] ? system_call_after_swapgs+0x7b/0x80

Code: b7 83 b2 00 00 00 25 00 f0 00 00 3d 00 80 00 00 74 19 48 89 93 f0 00 00 00 48 89 df e8 39 9a fd ff 48 89 d8 48 83 c4 08 5b 5d c3 &lt;48&gt; 83 7a 50 00 48 c7 c0 60 16 45 80 48 c7 c2 40 17 45 80 48 0f
RIP  [&lt;ffffffff802b92a1&gt;] proc_get_inode+0x101/0x130
 RSP &lt;ffff81017c4bfc78&gt;
CR2: ffffffffa0094370
---[ end trace c71hiarjan8ab739 ]---

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
"Antonino A. Daplas" &lt;adaplas@pol.net&gt;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Chris Wright &lt;chrisw@sous-sol.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
upstream commit: c43f89c2084f46e3ec59ddcbc52ecf4b1e9b015a

/proc/fb is not removed during rmmod.

Steps to reproduce:

	modprobe fb
	rmmod fb
	ls /proc

BUG: unable to handle kernel paging request at ffffffffa0094370
IP: [&lt;ffffffff802b92a1&gt;] proc_get_inode+0x101/0x130
PGD 203067 PUD 207063 PMD 17e758067 PTE 0
Oops: 0000 [1] SMP
last sysfs file: /sys/devices/pci0000:00/0000:00:1e.0/0000:05:02.0/resource
CPU 1
Modules linked in: nf_conntrack_irc xt_state iptable_filter ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack ip_tables x_tables vfat fat usbhid ehci_hcd uhci_hcd usbcore sr_mod cdrom [last unloaded: fb]
Pid: 21205, comm: ls Not tainted 2.6.25-rc8-mm2 #14
RIP: 0010:[&lt;ffffffff802b92a1&gt;]  [&lt;ffffffff802b92a1&gt;] proc_get_inode+0x101/0x130
RSP: 0018:ffff81017c4bfc78  EFLAGS: 00010246
RAX: 0000000000008000 RBX: ffff8101787f5470 RCX: 0000000048011ccc
RDX: ffffffffa0094320 RSI: ffff810006ad43b0 RDI: ffff81017fc2cc00
RBP: ffff81017e450300 R08: 0000000000000002 R09: ffff81017c5d1000
R10: 0000000000000000 R11: 0000000000000246 R12: ffff81016b903a28
R13: ffff81017f822020 R14: ffff81017c4bfd58 R15: ffff81017f822020
FS:  00007f08e71696f0(0000) GS:ffff81017fc06480(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: ffffffffa0094370 CR3: 000000017e54a000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process ls (pid: 21205, threadinfo ffff81017c4be000, task ffff81017de48770)
Stack:  ffff81017c5d1000 00000000ffffffea ffff81017e450300 ffffffff802bdd1e
 ffff81017f802258 ffff81017c4bfe48 ffff81016b903a28 ffff81017f822020
 ffff81017c4bfd48 ffffffff802b9ba0 ffff81016b903a28 ffff81017f802258
Call Trace:
 [&lt;ffffffff802bdd1e&gt;] ? proc_lookup_de+0x8e/0x100
 [&lt;ffffffff802b9ba0&gt;] ? proc_root_lookup+0x20/0x60
 [&lt;ffffffff802882a7&gt;] ? do_lookup+0x1b7/0x210
 [&lt;ffffffff8028883d&gt;] ? __link_path_walk+0x53d/0x7f0
 [&lt;ffffffff80295eb8&gt;] ? mntput_no_expire+0x28/0x130
 [&lt;ffffffff80288b4a&gt;] ? path_walk+0x5a/0xc0
 [&lt;ffffffff80288dd3&gt;] ? do_path_lookup+0x83/0x1c0
 [&lt;ffffffff80287785&gt;] ? getname+0xe5/0x210
 [&lt;ffffffff80289adb&gt;] ? __user_walk_fd+0x4b/0x80
 [&lt;ffffffff8028236c&gt;] ? vfs_lstat_fd+0x2c/0x70
 [&lt;ffffffff8028bf1e&gt;] ? filldir+0xae/0xf0
 [&lt;ffffffff802b92e9&gt;] ? de_put+0x9/0x50
 [&lt;ffffffff8029633d&gt;] ? mnt_want_write+0x2d/0x80
 [&lt;ffffffff8029339f&gt;] ? touch_atime+0x1f/0x170
 [&lt;ffffffff802b9b1d&gt;] ? proc_root_readdir+0x7d/0xa0
 [&lt;ffffffff802825e7&gt;] ? sys_newlstat+0x27/0x50
 [&lt;ffffffff8028bffb&gt;] ? vfs_readdir+0x9b/0xd0
 [&lt;ffffffff8028c0fe&gt;] ? sys_getdents+0xce/0xe0
 [&lt;ffffffff8020b39b&gt;] ? system_call_after_swapgs+0x7b/0x80

Code: b7 83 b2 00 00 00 25 00 f0 00 00 3d 00 80 00 00 74 19 48 89 93 f0 00 00 00 48 89 df e8 39 9a fd ff 48 89 d8 48 83 c4 08 5b 5d c3 &lt;48&gt; 83 7a 50 00 48 c7 c0 60 16 45 80 48 c7 c2 40 17 45 80 48 0f
RIP  [&lt;ffffffff802b92a1&gt;] proc_get_inode+0x101/0x130
 RSP &lt;ffff81017c4bfc78&gt;
CR2: ffffffffa0094370
---[ end trace c71hiarjan8ab739 ]---

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
"Antonino A. Daplas" &lt;adaplas@pol.net&gt;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Chris Wright &lt;chrisw@sous-sol.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s3c2410_fb: fix line length calculation</title>
<updated>2008-01-22T03:39:41+00:00</updated>
<author>
<name>Stefan Schmidt</name>
<email>stefan@openmoko.org</email>
</author>
<published>2008-01-22T01:18:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a10336043b8193ec603ad54bb79cdcd26bbf94b3'/>
<id>a10336043b8193ec603ad54bb79cdcd26bbf94b3</id>
<content type='text'>
Fix line length calculation. var-&gt;width is the size of the display in mm. We
like to use the pixel size.

Without this fix, dynamic (fbset) based resolution and depths changes with
s3c2410_fb don't work at all.

Spotted by john cass &lt;johnpcass@yahoo.com&gt;

Signed-off-by: Stefan Schmidt &lt;stefan@openmoko.org&gt;
Signed-off-by: Harald Welte &lt;laforge@openmoko.org&gt;
Acked-by: Ben Dooks &lt;ben-linux@fluff.org&gt;
Acked-by: Arnaud Patard &lt;arnaud.patard@rtp-net.org&gt;
Acked-by: Krzysztof Helt &lt;krzysztof.h1@wp.pl&gt;
Cc: "Antonino A. Daplas" &lt;adaplas@pol.net&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@akpm@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix line length calculation. var-&gt;width is the size of the display in mm. We
like to use the pixel size.

Without this fix, dynamic (fbset) based resolution and depths changes with
s3c2410_fb don't work at all.

Spotted by john cass &lt;johnpcass@yahoo.com&gt;

Signed-off-by: Stefan Schmidt &lt;stefan@openmoko.org&gt;
Signed-off-by: Harald Welte &lt;laforge@openmoko.org&gt;
Acked-by: Ben Dooks &lt;ben-linux@fluff.org&gt;
Acked-by: Arnaud Patard &lt;arnaud.patard@rtp-net.org&gt;
Acked-by: Krzysztof Helt &lt;krzysztof.h1@wp.pl&gt;
Cc: "Antonino A. Daplas" &lt;adaplas@pol.net&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@akpm@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fix radeonfb regression with Xpress 200m 5955</title>
<updated>2008-01-17T23:38:59+00:00</updated>
<author>
<name>Alex</name>
<email>alevkovich@tut.by</email>
</author>
<published>2008-01-17T23:21:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=545c4423335469de06af7f7c95e97c1122c1c818'/>
<id>545c4423335469de06af7f7c95e97c1122c1c818</id>
<content type='text'>
Fix http://bugzilla.kernel.org/show_bug.cgi?id=9762

Framebuffer is ok only with default parameters only (it is 1280x800-8@60).  If
parameters are video=radeonfb:1280x800-32@60 then xres, yres and xres_virtual
are ok but yres_virtual is 1024.  It can be corrected by fbset utility so I
think it can be corrected in the driver code also.

Steps to reproduce: video=radeonfb:1280x800-32@60 or
video=radeonfb:1280x800-16@60

Add 1280x800 mode into modedb

Cc: "Rafael J. Wysocki" &lt;rjw@sisk.pl&gt;
Cc: "Antonino A. Daplas" &lt;adaplas@pol.net&gt;
Cc: Geert Uytterhoeven &lt;geert@linux-m68k.org&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 http://bugzilla.kernel.org/show_bug.cgi?id=9762

Framebuffer is ok only with default parameters only (it is 1280x800-8@60).  If
parameters are video=radeonfb:1280x800-32@60 then xres, yres and xres_virtual
are ok but yres_virtual is 1024.  It can be corrected by fbset utility so I
think it can be corrected in the driver code also.

Steps to reproduce: video=radeonfb:1280x800-32@60 or
video=radeonfb:1280x800-16@60

Add 1280x800 mode into modedb

Cc: "Rafael J. Wysocki" &lt;rjw@sisk.pl&gt;
Cc: "Antonino A. Daplas" &lt;adaplas@pol.net&gt;
Cc: Geert Uytterhoeven &lt;geert@linux-m68k.org&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>uvesafb: fix section mismatch warnings</title>
<updated>2008-01-14T16:52:23+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>randy.dunlap@oracle.com</email>
</author>
<published>2008-01-14T08:55:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=27b526a09086d563d61cf0e0fdd5c8e3f3c295d4'/>
<id>27b526a09086d563d61cf0e0fdd5c8e3f3c295d4</id>
<content type='text'>
Mark uvesafb_init_mtrr() as __devinit since its caller is __devinit
and since it accesses __devinitdata.

WARNING: vmlinux.o(.text+0x4df80e): Section mismatch: reference to .init.data: (between 'uvesafb_init_mtrr' and 'uvesafb_show_vbe_ver')

Variable 'blank' cannot be __devinitdata since it is referenced in an
fb_ops method that could be called at any time.

WARNING: vmlinux.o(.text+0x4dfc1e): Section mismatch: reference to .init.data:blank (between 'param_set_scroll' and 'vesa_setpalette')
WARNING: vmlinux.o(.text+0x4dfc24): Section mismatch: reference to .init.data:blank (between 'param_set_scroll' and 'vesa_setpalette')

Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Cc: "Antonino A. Daplas" &lt;adaplas@pol.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>
Mark uvesafb_init_mtrr() as __devinit since its caller is __devinit
and since it accesses __devinitdata.

WARNING: vmlinux.o(.text+0x4df80e): Section mismatch: reference to .init.data: (between 'uvesafb_init_mtrr' and 'uvesafb_show_vbe_ver')

Variable 'blank' cannot be __devinitdata since it is referenced in an
fb_ops method that could be called at any time.

WARNING: vmlinux.o(.text+0x4dfc1e): Section mismatch: reference to .init.data:blank (between 'param_set_scroll' and 'vesa_setpalette')
WARNING: vmlinux.o(.text+0x4dfc24): Section mismatch: reference to .init.data:blank (between 'param_set_scroll' and 'vesa_setpalette')

Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Cc: "Antonino A. Daplas" &lt;adaplas@pol.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>s3c2410fb: fix incorrect argument type in resume function</title>
<updated>2008-01-14T16:52:23+00:00</updated>
<author>
<name>Krzysztof Helt</name>
<email>krzysztof.h1@wp.pl</email>
</author>
<published>2008-01-14T08:55:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f0466441492dc17d0749ef0cce9831fc7e4a7a5d'/>
<id>f0466441492dc17d0749ef0cce9831fc7e4a7a5d</id>
<content type='text'>
Fix wrong pointer type passed into the s3c2410fb_init_registers()
function.

Signed-off-by: Krzysztof Helt &lt;krzysztof.h1@wp.pl&gt;
Cc: "Antonino A. Daplas" &lt;adaplas@pol.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>
Fix wrong pointer type passed into the s3c2410fb_init_registers()
function.

Signed-off-by: Krzysztof Helt &lt;krzysztof.h1@wp.pl&gt;
Cc: "Antonino A. Daplas" &lt;adaplas@pol.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>MAINTAINERS: email update and add missing entry</title>
<updated>2008-01-14T16:52:22+00:00</updated>
<author>
<name>Nicolas Ferre</name>
<email>nicolas.ferre@atmel.com</email>
</author>
<published>2008-01-14T08:55:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8f4c79ce79d1552014af3c115d03e13092443905'/>
<id>8f4c79ce79d1552014af3c115d03e13092443905</id>
<content type='text'>
 - MAINTAINERS email update
 - add atmel_lcdfb entry

Signed-off-by: Nicolas Ferre &lt;nicolas.ferre@atmel.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>
 - MAINTAINERS email update
 - add atmel_lcdfb entry

Signed-off-by: Nicolas Ferre &lt;nicolas.ferre@atmel.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>ps3fb: fix deadlock on kexec()</title>
<updated>2008-01-11T19:47:43+00:00</updated>
<author>
<name>Jeremy Kerr</name>
<email>jk@ozlabs.org</email>
</author>
<published>2008-01-11T13:28:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8dab63761219d7bc6a7d7d3b5f0fca76af5533a5'/>
<id>8dab63761219d7bc6a7d7d3b5f0fca76af5533a5</id>
<content type='text'>
Since the introduction of the acquire_console_sem calls in
0333d83509c7d8496c8965b5ba9bc0c98e83c259, kexecing can cause the
kernel to deadlock:

 ps3fb_shutdown()
  -&gt; unregister_framebuffer()
  -&gt; fb_notifier_call_chain(FB_EVENT_FB_UNBIND)
  -&gt; fbcon_fb_unbind()
  -&gt; unbind_con_driver()
  -&gt; bind_con_driver()
	[ acquires console_sem ]
  -&gt; fbcon_deinit()
  -&gt; fbops-&gt;fb_release(newinfo, 0)
  -&gt; ps3fb_release()
  -&gt; ps3fb_sync()
	[ acquires console_sem ]

This change avoids the deadlock by moving the acquire_console_sem()
out of ps3fb_sync(), and puts it into the two other callsites, leaving
ps3fb_release() to call ps3fb_sync() without the console semaphore.

[Geert]
  - Corrected call sequence above
  - ps3fb_release() may be called with and without console_sem held. This is an
    inconsistency that should be fixed at the fb level, but for now, try to
    acquire console_sem in ps3fb_release().

    I think it's safer to let ps3fb_release() try to acquire console_sem and
    not refresh the screen if it fails, than to call ps3fb_sync() without
    holding console_sem, as ps3fb_par may be modified at the same time, causing
    crashes or lockups.

    Besides, ps3fb_release() only calls ps3fb_sync() to refresh the screen
    when display flipping is disabled, which is an uncommon case (except during
    shutdown/kexec).

Signed-off-by: Jeremy Kerr &lt;jk@ozlabs.org&gt;
Signed-off-by: Geert Uytterhoeven &lt;Geert.Uytterhoeven@sonycom.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.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>
Since the introduction of the acquire_console_sem calls in
0333d83509c7d8496c8965b5ba9bc0c98e83c259, kexecing can cause the
kernel to deadlock:

 ps3fb_shutdown()
  -&gt; unregister_framebuffer()
  -&gt; fb_notifier_call_chain(FB_EVENT_FB_UNBIND)
  -&gt; fbcon_fb_unbind()
  -&gt; unbind_con_driver()
  -&gt; bind_con_driver()
	[ acquires console_sem ]
  -&gt; fbcon_deinit()
  -&gt; fbops-&gt;fb_release(newinfo, 0)
  -&gt; ps3fb_release()
  -&gt; ps3fb_sync()
	[ acquires console_sem ]

This change avoids the deadlock by moving the acquire_console_sem()
out of ps3fb_sync(), and puts it into the two other callsites, leaving
ps3fb_release() to call ps3fb_sync() without the console semaphore.

[Geert]
  - Corrected call sequence above
  - ps3fb_release() may be called with and without console_sem held. This is an
    inconsistency that should be fixed at the fb level, but for now, try to
    acquire console_sem in ps3fb_release().

    I think it's safer to let ps3fb_release() try to acquire console_sem and
    not refresh the screen if it fails, than to call ps3fb_sync() without
    holding console_sem, as ps3fb_par may be modified at the same time, causing
    crashes or lockups.

    Besides, ps3fb_release() only calls ps3fb_sync() to refresh the screen
    when display flipping is disabled, which is an uncommon case (except during
    shutdown/kexec).

Signed-off-by: Jeremy Kerr &lt;jk@ozlabs.org&gt;
Signed-off-by: Geert Uytterhoeven &lt;Geert.Uytterhoeven@sonycom.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ps3fb: prevent use after free of fb_info</title>
<updated>2008-01-11T19:47:42+00:00</updated>
<author>
<name>Jeremy Kerr</name>
<email>jk@ozlabs.org</email>
</author>
<published>2008-01-11T13:27:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ba21611c9c0031ca8388cae5e43b38c29c8b595d'/>
<id>ba21611c9c0031ca8388cae5e43b38c29c8b595d</id>
<content type='text'>
In ps3fb_shutdown, freeing the framebuffer will cause fb_info (in
dev-&gt;core.driver_data) to be free()ed, which we potentially access
from the ps3fbd kthread.

This change frees the framebuffer after stopping the ps3fbd kthread.

Signed-off-by: Jeremy Kerr &lt;jk@ozlabs.org&gt;
Signed-off-by: Geert Uytterhoeven &lt;Geert.Uytterhoeven@sonycom.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>
In ps3fb_shutdown, freeing the framebuffer will cause fb_info (in
dev-&gt;core.driver_data) to be free()ed, which we potentially access
from the ps3fbd kthread.

This change frees the framebuffer after stopping the ps3fbd kthread.

Signed-off-by: Jeremy Kerr &lt;jk@ozlabs.org&gt;
Signed-off-by: Geert Uytterhoeven &lt;Geert.Uytterhoeven@sonycom.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ps3fb: Fix ps3fb free_irq() dev_id</title>
<updated>2007-12-19T22:27:30+00:00</updated>
<author>
<name>Geoff Levand</name>
<email>geoffrey.levand@am.sony.com</email>
</author>
<published>2007-12-19T10:17:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=fcbe6e9709f90fd83cfa614a4e0efe83174018ea'/>
<id>fcbe6e9709f90fd83cfa614a4e0efe83174018ea</id>
<content type='text'>
The dev_id arg passed to free_irq() must match that passed to
request_irq().

Fixes this PS3 error message:

  Trying to free already-free IRQ 44

Signed-off-by: Geoff Levand &lt;geoffrey.levand@am.sony.com&gt;
Signed-off-by: Geert Uytterhoeven &lt;Geert.Uytterhoeven@sonycom.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>
The dev_id arg passed to free_irq() must match that passed to
request_irq().

Fixes this PS3 error message:

  Trying to free already-free IRQ 44

Signed-off-by: Geoff Levand &lt;geoffrey.levand@am.sony.com&gt;
Signed-off-by: Geert Uytterhoeven &lt;Geert.Uytterhoeven@sonycom.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ps3fb: Update for firmware 2.10</title>
<updated>2007-12-19T22:27:30+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>Geert.Uytterhoeven@sonycom.com</email>
</author>
<published>2007-12-19T10:16:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9ac67a35827ee03d71f2f1c656a725e263b14a7e'/>
<id>9ac67a35827ee03d71f2f1c656a725e263b14a7e</id>
<content type='text'>
ps3fb: Update for firmware 2.10

As of PS3 firmware version 2.10, the GPU command buffer size must be at least 2
MiB large. Since we use only a small part of the GPU command buffer and don't
want to waste precious XDR memory, move the GPU command buffer back to the
start of the XDR memory reserved for ps3fb and let the unused part overlap with
the actual frame buffer.

Signed-off-by: Geert Uytterhoeven &lt;Geert.Uytterhoeven@sonycom.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>
ps3fb: Update for firmware 2.10

As of PS3 firmware version 2.10, the GPU command buffer size must be at least 2
MiB large. Since we use only a small part of the GPU command buffer and don't
want to waste precious XDR memory, move the GPU command buffer back to the
start of the XDR memory reserved for ps3fb and let the unused part overlap with
the actual frame buffer.

Signed-off-by: Geert Uytterhoeven &lt;Geert.Uytterhoeven@sonycom.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
