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
nexedi
linux
Commits
437293de
Commit
437293de
authored
Jan 12, 2005
by
Patrick McHardy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PKT_SCHED]: cls_api.c: drop rtnl for loading modules
Signed-off-by:
Patrick McHardy
<
kaber@trash.net
>
parent
b406b3fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
net/sched/cls_api.c
net/sched/cls_api.c
+16
-6
No files found.
net/sched/cls_api.c
View file @
437293de
...
...
@@ -142,7 +142,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
struct
tcf_proto
*
tp
;
struct
tcf_proto_ops
*
tp_ops
;
struct
Qdisc_class_ops
*
cops
;
unsigned
long
cl
=
0
;
unsigned
long
cl
;
unsigned
long
fh
;
int
err
;
...
...
@@ -153,6 +153,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
prio
=
TC_H_MAJ
(
t
->
tcm_info
);
nprio
=
prio
;
parent
=
t
->
tcm_parent
;
cl
=
0
;
if
(
prio
==
0
)
{
/* If no priority is given, user wants we allocated it. */
...
...
@@ -219,20 +220,29 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
err
=
-
ENOBUFS
;
if
((
tp
=
kmalloc
(
sizeof
(
*
tp
),
GFP_KERNEL
))
==
NULL
)
goto
errout
;
err
=
-
EINVAL
;
tp_ops
=
tcf_proto_lookup_ops
(
tca
[
TCA_KIND
-
1
]);
if
(
tp_ops
==
NULL
)
{
#ifdef CONFIG_KMOD
if
(
tp_ops
==
NULL
&&
tca
[
TCA_KIND
-
1
]
!=
NULL
)
{
struct
rtattr
*
kind
=
tca
[
TCA_KIND
-
1
];
char
name
[
IFNAMSIZ
];
if
(
rtattr_strlcpy
(
name
,
kind
,
IFNAMSIZ
)
<
IFNAMSIZ
)
{
if
(
kind
!=
NULL
&&
rtattr_strlcpy
(
name
,
kind
,
IFNAMSIZ
)
<
IFNAMSIZ
)
{
rtnl_unlock
();
request_module
(
"cls_%s"
,
name
);
rtnl_lock
();
tp_ops
=
tcf_proto_lookup_ops
(
kind
);
/* We dropped the RTNL semaphore in order to
* perform the module load. So, even if we
* succeeded in loading the module we have to
* replay the request. We indicate this using
* -EAGAIN.
*/
if
(
tp_ops
!=
NULL
)
err
=
-
EAGAIN
;
}
}
#endif
if
(
tp_ops
==
NULL
)
{
err
=
-
EINVAL
;
kfree
(
tp
);
goto
errout
;
}
...
...
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