From: "Rick L. Vinyard, Jr." <rvinyard@cs.nmsu.edu>
To: Oliver Neukum <oliver@neukum.org>
Cc: linux-kernel@vger.kernel.org, felipe.balbi@nokia.com,
pavel@ucw.cz, jayakumar.lkml@gmail.com,
linux-fbdev@vger.kernel.org, krzysztof.h1@wp.pl,
akpm@linux-foundation.org, linux-usb@vger.kernel.org,
linux-input@vger.kernel.org, jkosina@suse.cz,
dmitry.torokhov@gmail.com
Subject: Re: [PATCH] hid: Logitech G13 driver 0.0.4
Date: Mon, 25 Jan 2010 16:48:34 +0000 [thread overview]
Message-ID: <acd6dfcf4391c081f861d430c0b45311.squirrel@intranet.cs.nmsu.edu> (raw)
In-Reply-To: <201001202219.12058.oliver@neukum.org>
Oliver Neukum wrote:
> Am Mittwoch, 20. Januar 2010 21:47:22 schrieb Rick L. Vinyard Jr.:
>> + if (copy_from_user(dst, buf, count))
>> + err = -EFAULT;
>> +
>> + if (!err)
>> + *ppos += count;
>> +
>> + g13_fb_update(par);
>> +
>> + return (err) ? err : count;
>
> Do you really want to go on if you get -EFAULT?
>
Since the hecubafb driver (which I based this portion of the g13 driver
on) uses the same approach I tried to justify it myself when I first saw
it.
I don't know if this was the intent of the hecubafb author, but this is
the way I saw it.
By this point the copy_from_user() has failed. If it resulted in a partial
copy to dst then continuing on to an update can't hurt, and would reduce
display jitter if a re-write occurs from userspace. If a re-write doesn't
occur the virtual framebuffer is hosed anyways as dst is is the underlying
framebuffer.
Given that, the worst-case consequence seems to be an unnecessary update
to the device display.
next prev parent reply other threads:[~2010-01-25 16:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-20 20:47 [PATCH] hid: Logitech G13 driver 0.0.4 Rick L. Vinyard Jr.
2010-01-20 21:19 ` Oliver Neukum
2010-01-25 16:48 ` Rick L. Vinyard, Jr. [this message]
[not found] ` <acd6dfcf4391c081f861d430c0b45311.squirrel-2xSMGd46i5akveL4JqN78fZ8FUJU4vz8@public.gmane.org>
2010-01-25 16:59 ` Jiri Kosina
2010-01-25 18:02 ` Rick L. Vinyard, Jr.
2010-01-28 7:24 ` Pavel Machek
2010-01-28 7:47 ` Oliver Neukum
2010-01-20 21:27 ` Oliver Neukum
[not found] ` <201001202227.31732.oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>
2010-01-25 16:49 ` Rick L. Vinyard, Jr.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=acd6dfcf4391c081f861d430c0b45311.squirrel@intranet.cs.nmsu.edu \
--to=rvinyard@cs.nmsu.edu \
--cc=akpm@linux-foundation.org \
--cc=dmitry.torokhov@gmail.com \
--cc=felipe.balbi@nokia.com \
--cc=jayakumar.lkml@gmail.com \
--cc=jkosina@suse.cz \
--cc=krzysztof.h1@wp.pl \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oliver@neukum.org \
--cc=pavel@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).