From: Jiri Slaby <jirislaby@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org, mm-commits@vger.kernel.org,
joe@perches.com, bzolnier@gmail.com, jens.axboe@oracle.com,
marcin.slusarz@gmail.com, shemminger@vyatta.com
Subject: Re: + drivers-block-floppyc-remove-copyin-copyout-and-ecall-macros.patch added to -mm tree
Date: Wed, 27 Jan 2010 10:43:19 +0100 [thread overview]
Message-ID: <4B600AB7.3070705@gmail.com> (raw)
In-Reply-To: <201001270037.o0R0bqQC032566@imap1.linux-foundation.org>
On 01/27/2010 01:37 AM, akpm@linux-foundation.org wrote:
> @@ -3145,7 +3136,9 @@ static inline int raw_cmd_copyout(int cm
> int ret;
>
> while (ptr) {
> - COPYOUT(*ptr);
> + ret = copy_to_user((void __user *)param, ptr, sizeof(*ptr));
> + if (ret)
> + return -EFAULT;
> param += sizeof(struct floppy_raw_cmd);
> if ((ptr->flags & FD_RAW_READ) && ptr->buffer_length) {
> if (ptr->length >= 0 &&
> @@ -3195,7 +3188,9 @@ static inline int raw_cmd_copyin(int cmd
> if (!ptr)
> return -ENOMEM;
> *rcmd = ptr;
> - COPYIN(*ptr);
> + ret = copy_from_user(ptr, (void __user *)param, sizeof(*ptr));
Actually the casts are not needed anymore, are they?
--
js
next prev parent reply other threads:[~2010-01-27 9:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-27 0:37 + drivers-block-floppyc-remove-copyin-copyout-and-ecall-macros.patch added to -mm tree akpm
2010-01-27 9:43 ` Jiri Slaby [this message]
2010-01-27 14:53 ` Joe Perches
2010-01-27 15:25 ` Jiri Slaby
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=4B600AB7.3070705@gmail.com \
--to=jirislaby@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bzolnier@gmail.com \
--cc=jens.axboe@oracle.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcin.slusarz@gmail.com \
--cc=mm-commits@vger.kernel.org \
--cc=shemminger@vyatta.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.