From: Andrew Morton <akpm@osdl.org>
To: domen@coderock.org
Cc: linux-kernel@vger.kernel.org, domen@coderock.org, yrgrknmxpzlk@gawab.com
Subject: Re: [patch 11/12] sound/oss/emu10k1/* - compile warning cleanup
Date: Sun, 6 Mar 2005 16:54:39 -0800 [thread overview]
Message-ID: <20050306165439.04acd045.akpm@osdl.org> (raw)
In-Reply-To: <20050305153542.7A66E1F208@trashy.coderock.org>
domen@coderock.org wrote:
>
> @@ -316,7 +320,10 @@ static void copy_block(u8 __user *dst, u
>
> for (i = 0; i < len; i++) {
> byte = src[2 * i] ^ 0x80;
> - __copy_to_user(dst + i, &byte, 1);
> + if (__copy_to_user(dst + i, &byte, 1)) {
> + printk( KERN_ERR "emu10k1: %s: copy_to_user failed\n",__FUNCTION__);
> + return;
> + }
> }
This allows users to spam the logs without bounds, which is normally
something we try to avoid. If it's a privileged operation then OK. But it
would be better to propagate an error back to userspace.
I'll drop the patch for now.
prev parent reply other threads:[~2005-03-07 0:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-05 15:35 domen
2005-03-07 0:52 ` Andrew Morton
2005-03-07 0:54 ` Andrew Morton [this message]
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=20050306165439.04acd045.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=domen@coderock.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yrgrknmxpzlk@gawab.com \
/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
all inboxes | Powered by JetHome®