* 2.4.28-rc1, more lost patches [5/10]
@ 2004-10-27 9:38 sezeroz
2004-10-28 10:18 ` Marcelo Tosatti
0 siblings, 1 reply; 3+ messages in thread
From: sezeroz @ 2004-10-27 9:38 UTC (permalink / raw)
To: linux-kernel; +Cc: marcelo.tosatti
[-- 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;
^ permalink raw reply [flat|nested] 3+ messages in thread
* 2.4.28-rc1, more lost patches [5/10]
@ 2004-10-27 9:59 sezeroz
0 siblings, 0 replies; 3+ messages in thread
From: sezeroz @ 2004-10-27 9:59 UTC (permalink / raw)
To: linux-kernel; +Cc: marcelo.tosatti
[-- Attachment #1: Type: text/plain, Size: 153 bytes --]
(Re-send to fix base64 attachment.)
[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_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;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 2.4.28-rc1, more lost patches [5/10]
2004-10-27 9:38 sezeroz
@ 2004-10-28 10:18 ` Marcelo Tosatti
0 siblings, 0 replies; 3+ messages in thread
From: Marcelo Tosatti @ 2004-10-28 10:18 UTC (permalink / raw)
To: sezeroz, davem, acme; +Cc: linux-kernel
On Wed, Oct 27, 2004 at 12:38:26PM +0300, sezeroz@ttnet.net.tr wrote:
>
> [5/10] Alan Cox: appletalk dev copy/user stanford checker patch.
>
> Not in 2.6, only in -ac/redhat. To be reviewed.
Ozkan,
Can you get it into v2.6 first?
CC'ed acme/davem.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-10-28 12:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-27 9:59 2.4.28-rc1, more lost patches [5/10] sezeroz
-- strict thread matches above, loose matches on Subject: below --
2004-10-27 9:38 sezeroz
2004-10-28 10:18 ` Marcelo Tosatti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox