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
6eb563a4
Commit
6eb563a4
authored
Apr 23, 2003
by
Stephen Hemminger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[BRIDGE]: Missing unlocks in ioctl error paths.
parent
83e410b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
net/bridge/br_ioctl.c
net/bridge/br_ioctl.c
+14
-8
No files found.
net/bridge/br_ioctl.c
View file @
6eb563a4
...
@@ -138,8 +138,10 @@ static int br_ioctl_device(struct net_bridge *br,
...
@@ -138,8 +138,10 @@ static int br_ioctl_device(struct net_bridge *br,
struct
net_bridge_port
*
pt
;
struct
net_bridge_port
*
pt
;
read_lock
(
&
br
->
lock
);
read_lock
(
&
br
->
lock
);
if
((
pt
=
br_get_port
(
br
,
arg1
))
==
NULL
)
if
((
pt
=
br_get_port
(
br
,
arg1
))
==
NULL
)
{
read_unlock
(
&
br
->
lock
);
return
-
EINVAL
;
return
-
EINVAL
;
}
memset
(
&
p
,
0
,
sizeof
(
struct
__port_info
));
memset
(
&
p
,
0
,
sizeof
(
struct
__port_info
));
memcpy
(
&
p
.
designated_root
,
&
pt
->
designated_root
,
8
);
memcpy
(
&
p
.
designated_root
,
&
pt
->
designated_root
,
8
);
...
@@ -176,25 +178,29 @@ static int br_ioctl_device(struct net_bridge *br,
...
@@ -176,25 +178,29 @@ static int br_ioctl_device(struct net_bridge *br,
case
BRCTL_SET_PORT_PRIORITY
:
case
BRCTL_SET_PORT_PRIORITY
:
{
{
struct
net_bridge_port
*
p
;
struct
net_bridge_port
*
p
;
int
ret
=
0
;
write_lock
(
&
br
->
lock
);
write_lock
(
&
br
->
lock
);
if
((
p
=
br_get_port
(
br
,
arg0
))
==
NULL
)
if
((
p
=
br_get_port
(
br
,
arg0
))
==
NULL
)
return
-
EINVAL
;
ret
=
-
EINVAL
;
br_stp_set_port_priority
(
p
,
arg1
);
else
br_stp_set_port_priority
(
p
,
arg1
);
write_unlock
(
&
br
->
lock
);
write_unlock
(
&
br
->
lock
);
return
0
;
return
ret
;
}
}
case
BRCTL_SET_PATH_COST
:
case
BRCTL_SET_PATH_COST
:
{
{
struct
net_bridge_port
*
p
;
struct
net_bridge_port
*
p
;
int
ret
=
0
;
write_lock
(
&
br
->
lock
);
write_lock
(
&
br
->
lock
);
if
((
p
=
br_get_port
(
br
,
arg0
))
==
NULL
)
if
((
p
=
br_get_port
(
br
,
arg0
))
==
NULL
)
return
-
EINVAL
;
ret
=
-
EINVAL
;
br_stp_set_path_cost
(
p
,
arg1
);
else
br_stp_set_path_cost
(
p
,
arg1
);
write_unlock
(
&
br
->
lock
);
write_unlock
(
&
br
->
lock
);
return
0
;
return
ret
;
}
}
case
BRCTL_GET_FDB_ENTRIES
:
case
BRCTL_GET_FDB_ENTRIES
:
...
...
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