* [PATCH] video: fix deferred io fsync()
@ 2008-12-17 8:35 Magnus Damm
2008-12-24 5:03 ` Jaya Kumar
0 siblings, 1 reply; 2+ messages in thread
From: Magnus Damm @ 2008-12-17 8:35 UTC (permalink / raw)
To: linux-fbdev-devel; +Cc: Magnus Damm
From: Magnus Damm <damm@igel.co.jp>
If CONFIG_FB_DEFERRED_IO is set, but there are framebuffers
registered that does not make use of deferred io, then fsync()
on those framebuffers will result in a crash. Fix that.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
---
drivers/video/fb_defio.c | 4 ++++
1 file changed, 4 insertions(+)
--- 0001/drivers/video/fb_defio.c
+++ work/drivers/video/fb_defio.c 2008-12-17 15:27:44.000000000 +0900
@@ -60,6 +60,10 @@ int fb_deferred_io_fsync(struct file *fi
{
struct fb_info *info = file->private_data;
+ /* Skip if deferred io is complied-in but disabled on this fbdev */
+ if (!info->fbdefio)
+ return 0;
+
/* Kill off the delayed work */
cancel_rearming_delayed_work(&info->deferred_work);
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] video: fix deferred io fsync()
2008-12-17 8:35 [PATCH] video: fix deferred io fsync() Magnus Damm
@ 2008-12-24 5:03 ` Jaya Kumar
0 siblings, 0 replies; 2+ messages in thread
From: Jaya Kumar @ 2008-12-24 5:03 UTC (permalink / raw)
To: Magnus Damm; +Cc: linux-fbdev-devel
On Wed, Dec 17, 2008 at 3:35 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
> From: Magnus Damm <damm@igel.co.jp>
>
> If CONFIG_FB_DEFERRED_IO is set, but there are framebuffers
> registered that does not make use of deferred io, then fsync()
> on those framebuffers will result in a crash. Fix that.
>
> Signed-off-by: Magnus Damm <damm@igel.co.jp>
Acked-by: Jaya Kumar <jayakumar.lkml@gmail.com>
------------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-12-24 5:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-17 8:35 [PATCH] video: fix deferred io fsync() Magnus Damm
2008-12-24 5:03 ` Jaya Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).