linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* msync on fbdev
@ 2014-12-18 13:55 Martin Jackson
  2014-12-19 11:59 ` Tomi Valkeinen
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Jackson @ 2014-12-18 13:55 UTC (permalink / raw)
  To: linux-fbdev

Dear fbdev developers,

This relates to the core implementation of fbdev with the
CONFIG_FB_DEFERRED_IO option enabled.

I believe I have found a bug when doing msync(2) on a framebuffer
device. We are using an old (2.6.37) kernel on an embedded plaform,
but if I look at the current torvalds kernel (fbdev kernel looks
rather old!?), the bug seems to still be there.

When looking at the msync(2) man page, msync is meant to return 0 on
success and -1 on failure, however we are seeing it return 1, which is
undocumented and in my opinion wrong.

This is because the fb_deferred_io_fsync method returns the code from
'schedule_delayed_work', which is either 0 or 1 depending on whether
the work was already scheduled, leading to the possibility that msync
returns the value 1 to userland.

Best regards,

Martin Jackson

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-19 11:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-18 13:55 msync on fbdev Martin Jackson
2014-12-19 11:59 ` Tomi Valkeinen

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).