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
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
Show 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)
...
@@ -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
*
tp
;
struct
tcf_proto_ops
*
tp_ops
;
struct
tcf_proto_ops
*
tp_ops
;
struct
Qdisc_class_ops
*
cops
;
struct
Qdisc_class_ops
*
cops
;
unsigned
long
cl
=
0
;
unsigned
long
cl
;
unsigned
long
fh
;
unsigned
long
fh
;
int
err
;
int
err
;
...
@@ -153,6 +153,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
...
@@ -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
);
prio
=
TC_H_MAJ
(
t
->
tcm_info
);
nprio
=
prio
;
nprio
=
prio
;
parent
=
t
->
tcm_parent
;
parent
=
t
->
tcm_parent
;
cl
=
0
;
if
(
prio
==
0
)
{
if
(
prio
==
0
)
{
/* If no priority is given, user wants we allocated it. */
/* 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)
...
@@ -219,20 +220,29 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
err
=
-
ENOBUFS
;
err
=
-
ENOBUFS
;
if
((
tp
=
kmalloc
(
sizeof
(
*
tp
),
GFP_KERNEL
))
==
NULL
)
if
((
tp
=
kmalloc
(
sizeof
(
*
tp
),
GFP_KERNEL
))
==
NULL
)
goto
errout
;
goto
errout
;
err
=
-
EINVAL
;
tp_ops
=
tcf_proto_lookup_ops
(
tca
[
TCA_KIND
-
1
]);
tp_ops
=
tcf_proto_lookup_ops
(
tca
[
TCA_KIND
-
1
]);
if
(
tp_ops
==
NULL
)
{
#ifdef CONFIG_KMOD
#ifdef CONFIG_KMOD
if
(
tp_ops
==
NULL
&&
tca
[
TCA_KIND
-
1
]
!=
NULL
)
{
struct
rtattr
*
kind
=
tca
[
TCA_KIND
-
1
];
struct
rtattr
*
kind
=
tca
[
TCA_KIND
-
1
];
char
name
[
IFNAMSIZ
];
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
);
request_module
(
"cls_%s"
,
name
);
rtnl_lock
();
tp_ops
=
tcf_proto_lookup_ops
(
kind
);
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
#endif
if
(
tp_ops
==
NULL
)
{
err
=
-
EINVAL
;
kfree
(
tp
);
kfree
(
tp
);
goto
errout
;
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