: Disable broken override bits in pedit action
Subsystems (2)
PATCH 17/17 : Disable broken override bits in pedit action
Disable broken override bits in pedit action. It misses locking and needs to allocate new memory if nkeys increases. Also disable it for now.
# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2004/12/30 03:56:27+01:00 [email protected]
# [PKT_SCHED]: Disable broken override bits in pedit action
#
# Signed-off-by: Patrick McHardy <[email protected]>
#
# net/sched/pedit.c # 2004/12/30 03:56:20+01:00 [email protected] +2 -0 # [PKT_SCHED]: Disable broken override bits in pedit action # # Signed-off-by: Patrick McHardy <[email protected]> # diff -Nru a/net/sched/pedit.c b/net/sched/pedit.c --- a/net/sched/pedit.c 2004-12-30 04:02:10 +01:00 +++ b/net/sched/pedit.c 2004-12-30 04:02:10 +01:00 @@ -83,6 +83,8 @@
ret = -EEXIST;
if (ovr) {
+ /* FIXME: no locking, larger memory area might be required */
+ return -EOPNOTSUPP;
ret = 0;
override:
p->flags = parm->flags;
Quoted 4 lines · Patrick McHardy
Disable broken override bits in pedit action. It misses locking and needs to allocate new memory if nkeys increases. Also disable it for now.
There are a couple of these that you have (ipt being other). Could you just add a check for size before returning -EOPNOTSUPP? Example:
if (ovr) if (p->nkeys != parm->nkeys) return -EOPNOTSUPP;
This way if they are of the same size then things should work as is and my testcases dont break. Now if you feel more gracious, go ahead and fix them ;->
Review
Quoted 7 lines
(quoted diff) +2
-0ret = -EEXIST; if (ovr) { + /* FIXME: no locking, larger memory area might be required */ + return -EOPNOTSUPP; ret = 0; override: p->flags = parm->flags;
cheers,
jamal
Quoted 3 lines · jamal
This way if they are of the same size then things should work as is and my testcases dont break. Now if you feel more gracious, go ahead and fix them ;->
Yes, this patch was silly, I should have just fixed it. I'll revert the patch and fix it.
Regards
Patrick