From: Patrick McHardy <kaber@trash.net>
To: "David S. Miller" <davem@davemloft.net>
Cc: Kernel Netdev Mailing List <netdev@vger.kernel.org>
Subject: [NET_SCHED 2.6.21]: cls_tcindex: fix compatibility breakage
Date: Mon, 09 Apr 2007 18:30:42 +0200 [thread overview]
Message-ID: <461A6A32.2040809@trash.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 104 bytes --]
Fix tcindex userspace compatibility breakage on big-endian.
Patch applies to current -git and -stable.
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1281 bytes --]
[NET_SCHED]: cls_tcindex: fix compatibility breakage
Userspace uses an integer for TCA_TCINDEX_SHIFT, the kernel was changed
to expect and use a u16 value in 2.6.11, which broke compatibility on
big endian machines. Change back to use int.
Reported by Ole Reinartz <ole.reinartz@gmx.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit 763d781919d5a69bea12c8f191486c562f16f515
tree 6dc589cde5689766059f32d451b65ff1f40509e0
parent 526a622afe930173cae35fe53948f380f0c04fef
author Patrick McHardy <kaber@trash.net> Mon, 09 Apr 2007 05:55:58 +0200
committer Patrick McHardy <kaber@trash.net> Mon, 09 Apr 2007 05:55:58 +0200
net/sched/cls_tcindex.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/sched/cls_tcindex.c b/net/sched/cls_tcindex.c
index 040e2d2..7563fdc 100644
--- a/net/sched/cls_tcindex.c
+++ b/net/sched/cls_tcindex.c
@@ -245,9 +245,9 @@ tcindex_set_parms(struct tcf_proto *tp, unsigned long base, u32 handle,
}
if (tb[TCA_TCINDEX_SHIFT-1]) {
- if (RTA_PAYLOAD(tb[TCA_TCINDEX_SHIFT-1]) < sizeof(u16))
+ if (RTA_PAYLOAD(tb[TCA_TCINDEX_SHIFT-1]) < sizeof(int))
goto errout;
- cp.shift = *(u16 *) RTA_DATA(tb[TCA_TCINDEX_SHIFT-1]);
+ cp.shift = *(int *) RTA_DATA(tb[TCA_TCINDEX_SHIFT-1]);
}
err = -EBUSY;
next reply other threads:[~2007-04-09 16:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-09 16:30 Patrick McHardy [this message]
2007-04-09 18:42 ` [NET_SCHED 2.6.21]: cls_tcindex: fix compatibility breakage David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=461A6A32.2040809@trash.net \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).