Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
a09a624a
Commit
a09a624a
authored
May 07, 2003
by
Steven Whitehouse
Committed by
David S. Miller
May 07, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DECNET]: Decnet not obeying netdev locking (from shemminger@osdl.org).
parent
5367cd16
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
10 deletions
+9
-10
net/decnet/dn_dev.c
net/decnet/dn_dev.c
+5
-8
net/decnet/dn_rules.c
net/decnet/dn_rules.c
+4
-2
No files found.
net/decnet/dn_dev.c
View file @
a09a624a
...
@@ -561,7 +561,6 @@ int dn_dev_ioctl(unsigned int cmd, void *arg)
...
@@ -561,7 +561,6 @@ int dn_dev_ioctl(unsigned int cmd, void *arg)
struct
dn_dev
*
dn_db
;
struct
dn_dev
*
dn_db
;
struct
net_device
*
dev
;
struct
net_device
*
dev
;
struct
dn_ifaddr
*
ifa
=
NULL
,
**
ifap
=
NULL
;
struct
dn_ifaddr
*
ifa
=
NULL
,
**
ifap
=
NULL
;
int
exclusive
=
0
;
int
ret
=
0
;
int
ret
=
0
;
if
(
copy_from_user
(
ifr
,
arg
,
DN_IFREQ_SIZE
))
if
(
copy_from_user
(
ifr
,
arg
,
DN_IFREQ_SIZE
))
...
@@ -580,13 +579,13 @@ int dn_dev_ioctl(unsigned int cmd, void *arg)
...
@@ -580,13 +579,13 @@ int dn_dev_ioctl(unsigned int cmd, void *arg)
return
-
EACCES
;
return
-
EACCES
;
if
(
sdn
->
sdn_family
!=
AF_DECnet
)
if
(
sdn
->
sdn_family
!=
AF_DECnet
)
return
-
EINVAL
;
return
-
EINVAL
;
rtnl_lock
();
exclusive
=
1
;
break
;
break
;
default:
default:
return
-
EINVAL
;
return
-
EINVAL
;
}
}
rtnl_lock
();
if
((
dev
=
__dev_get_by_name
(
ifr
->
ifr_name
))
==
NULL
)
{
if
((
dev
=
__dev_get_by_name
(
ifr
->
ifr_name
))
==
NULL
)
{
ret
=
-
ENODEV
;
ret
=
-
ENODEV
;
goto
done
;
goto
done
;
...
@@ -626,15 +625,13 @@ int dn_dev_ioctl(unsigned int cmd, void *arg)
...
@@ -626,15 +625,13 @@ int dn_dev_ioctl(unsigned int cmd, void *arg)
ret
=
dn_dev_set_ifa
(
dev
,
ifa
);
ret
=
dn_dev_set_ifa
(
dev
,
ifa
);
}
}
done:
done:
if
(
exclusive
)
rtnl_unlock
();
rtnl_unlock
();
return
ret
;
return
ret
;
rarok:
rarok:
if
(
copy_to_user
(
arg
,
ifr
,
DN_IFREQ_SIZE
))
if
(
copy_to_user
(
arg
,
ifr
,
DN_IFREQ_SIZE
))
return
-
EFAULT
;
ret
=
-
EFAULT
;
goto
done
;
return
0
;
}
}
static
struct
dn_dev
*
dn_dev_by_index
(
int
ifindex
)
static
struct
dn_dev
*
dn_dev_by_index
(
int
ifindex
)
...
...
net/decnet/dn_rules.c
View file @
a09a624a
...
@@ -173,9 +173,11 @@ int dn_fib_rtm_newrule(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
...
@@ -173,9 +173,11 @@ int dn_fib_rtm_newrule(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
memcpy
(
new_r
->
r_ifname
,
RTA_DATA
(
rta
[
RTA_IIF
-
1
]),
IFNAMSIZ
);
memcpy
(
new_r
->
r_ifname
,
RTA_DATA
(
rta
[
RTA_IIF
-
1
]),
IFNAMSIZ
);
new_r
->
r_ifname
[
IFNAMSIZ
-
1
]
=
0
;
new_r
->
r_ifname
[
IFNAMSIZ
-
1
]
=
0
;
new_r
->
r_ifindex
=
-
1
;
new_r
->
r_ifindex
=
-
1
;
dev
=
__
dev_get_by_name
(
new_r
->
r_ifname
);
dev
=
dev_get_by_name
(
new_r
->
r_ifname
);
if
(
dev
)
if
(
dev
)
{
new_r
->
r_ifindex
=
dev
->
ifindex
;
new_r
->
r_ifindex
=
dev
->
ifindex
;
dev_put
(
dev
);
}
}
}
rp
=
&
dn_fib_rules
;
rp
=
&
dn_fib_rules
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment