Skip to contentSkip to conversation

: Disable broken override bits in pedit action

PATCH In review Patrick McHardy 2 participants 3 messages Dec 30, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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;

#1 lore raw
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 -0
 	ret = -EEXIST;
 	if (ovr) {
+		/* FIXME: no locking, larger memory area might be required */
+		return -EOPNOTSUPP;
 		ret = 0;
 override:
 		p->flags = parm->flags;

cheers,
jamal

#2 lore raw
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