From: <sezeroz@ttnet.net.tr>
To: <linux-kernel@vger.kernel.org>
Cc: <marcelo.tosatti@cyclades.com>
Subject: 2.4.28-rc1, more lost patches [5/10]
Date: Wed, 27 Oct 2004 12:38:26 +0300 [thread overview]
Message-ID: <20041027093826.JZPS6935.fep01.ttnet.net.tr@localhost> (raw)
[-- Attachment #1: Type: text/plain, Size: 116 bytes --]
[5/10] Alan Cox: appletalk dev copy/user stanford checker patch.
Not in 2.6, only in -ac/redhat. To be reviewed.
[-- Attachment #2: appletalk-dev-copy-user-checker.patch --]
[-- Type: application/octet-stream, Size: 1035 bytes --]
Alan Cox
only in -ac/redhat, _NOT_ in 2.6.
diff -urN 28rc1/net/appletalk/ddp.c 28rc1_aac/net/appletalk/ddp.c
--- 28rc1/net/appletalk/ddp.c 2004-10-24 00:45:51.000000000 +0300
+++ 28rc1_aac/net/appletalk/ddp.c 2004-10-24 00:58:12.000000000 +0300
@@ -978,6 +978,23 @@
if (copy_from_user(&rt, arg, sizeof(rt)))
return -EFAULT;
+
+ if(rt.rt_dev)
+ {
+ char *colon;
+ struct net_device *dev;
+ char devname[IFNAMSIZ];
+
+ if (copy_from_user(devname, rt.rt_dev, IFNAMSIZ-1))
+ return -EFAULT;
+ devname[IFNAMSIZ-1] = 0;
+ colon = strchr(devname, ':');
+ if (colon)
+ *colon = 0;
+ dev = __dev_get_by_name(devname);
+ if(dev == NULL)
+ return -ENODEV;
+ }
switch (cmd) {
case SIOCDELRT:
@@ -987,13 +1004,6 @@
&rt.rt_dst)->sat_addr);
case SIOCADDRT:
- /* FIXME: the name of the device is still in user
- * space, isn't it? */
- if (rt.rt_dev) {
- dev = __dev_get_by_name(rt.rt_dev);
- if (!dev)
- return -ENODEV;
- }
return atrtr_create(&rt, dev);
}
return -EINVAL;
next reply other threads:[~2004-10-27 9:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-27 9:38 sezeroz [this message]
2004-10-28 10:18 ` 2.4.28-rc1, more lost patches [5/10] Marcelo Tosatti
-- strict thread matches above, loose matches on Subject: below --
2004-10-27 9:59 sezeroz
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=20041027093826.JZPS6935.fep01.ttnet.net.tr@localhost \
--to=sezeroz@ttnet.net.tr \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.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