summaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorVlad Yasevich <vladislav.yasevich@hp.com>2006-01-17 11:54:06 -0800
committerSridhar Samudrala <sri@us.ibm.com>2006-01-17 11:54:06 -0800
commit38b0e42aba928d9929a26ec23b850c36a31fca5f (patch)
tree934a3678968b7f5f19bf6543f527c0cef39b25c8 /net/sctp
parent49392e5ecf608da6770fd8723b534a0fc851edc4 (diff)
downloadblackbird-op-linux-38b0e42aba928d9929a26ec23b850c36a31fca5f.tar.gz
blackbird-op-linux-38b0e42aba928d9929a26ec23b850c36a31fca5f.zip
[SCTP]: Fix sctp_assoc_seq_show() panics on big-endian systems.
This patch corrects the panic by casting the argument to the pointer of correct size. On big-endian systems we ended up loading only 32 bits of data because we are treating the pointer as an int*. By treating this pointer as loff_t*, we'll load the full 64 bits and then let regular integer demotion take place which will give us the correct value. Signed-off-by: Vlad Yaseivch <vladislav.yasevich@hp.com> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/proc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sctp/proc.c b/net/sctp/proc.c
index 1b5e5b119f79..d47a52c303a8 100644
--- a/net/sctp/proc.c
+++ b/net/sctp/proc.c
@@ -210,7 +210,7 @@ static int sctp_eps_seq_show(struct seq_file *seq, void *v)
struct sctp_ep_common *epb;
struct sctp_endpoint *ep;
struct sock *sk;
- int hash = *(int *)v;
+ int hash = *(loff_t *)v;
if (hash >= sctp_ep_hashsize)
return -ENOMEM;
@@ -313,7 +313,7 @@ static int sctp_assocs_seq_show(struct seq_file *seq, void *v)
struct sctp_ep_common *epb;
struct sctp_association *assoc;
struct sock *sk;
- int hash = *(int *)v;
+ int hash = *(loff_t *)v;
if (hash >= sctp_assoc_hashsize)
return -ENOMEM;
OpenPOWER on IntegriCloud