From: Axel Ludszuweit <alu@keymile.com>
To: linux-mtd@lists.infradead.org
Subject: question about mtdchar.c
Date: Tue, 09 Dec 2003 12:28:47 +0100 [thread overview]
Message-ID: <3FD5B1EF.4060905@keymile.com> (raw)
Hello everybody,
I have a question, concerning the
MEMGETINFO part of the mtd_ioctl function,
contained in .../mtd/drivers/mtd/mtdchar.c
I think, the right code is
.
.
case MEMGETINFO:
if (copy_to_user((struct mtd_info_user *)arg, mtd,
^^^^^^^^^^^^^
sizeof(struct mtd_info_user)))
return -EFAULT;
break;
.
.
instead
.
.
case MEMGETINFO:
if (copy_to_user((struct mtd_info *)arg, mtd,
^^^^^^^^
sizeof(struct mtd_info_user)))
return -EFAULT;
break;
.
.
I have attached the patch file.
Is this correct or have I not understand the code?
----------------------------------------------------------------------------
--- mtd/drivers/mtd/mtdchar.c.ORIG 2003-12-09 10:55:14.000000000 +0100
+++ mtd/drivers/mtd/mtdchar.c 2003-12-09 10:57:01.000000000 +0100
@@ -283,7 +283,7 @@
}
case MEMGETINFO:
- if (copy_to_user((struct mtd_info *)arg, mtd,
+ if (copy_to_user((struct mtd_info_user *)arg, mtd,
sizeof(struct mtd_info_user)))
return -EFAULT;
break;
----------------------------------------------------------------------------
--------------------------------------------
Axel Ludszuweit
Keymile GmbH
Wohlenbergstr. 3, D-30179 Hannover
Tel.: +49 511 / 978197-630
Fax : +49 511 / 978197-670
http://www.keymile.com
mailto:axel.ludszuweit@keymile.com
>> Be the FIRST on the LAST MILE <<
next reply other threads:[~2003-12-09 11:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-09 11:28 Axel Ludszuweit [this message]
2003-12-09 11:33 ` question about mtdchar.c David Woodhouse
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=3FD5B1EF.4060905@keymile.com \
--to=alu@keymile.com \
--cc=linux-mtd@lists.infradead.org \
/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