diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-18 17:34:14 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-18 17:34:14 +0100 |
commit | c45bb8cb72136bf23d18926113bff04c8cc90813 (patch) | |
tree | ae49a32f9c2536383c50d426c2eba1c7da1f22cf /net/sctp/socket.c | |
parent | staging: comedi: ni_labpc: fix common detach (diff) | |
parent | Linux 3.9-rc3 (diff) | |
download | linux-c45bb8cb72136bf23d18926113bff04c8cc90813.tar.xz linux-c45bb8cb72136bf23d18926113bff04c8cc90813.zip |
Merge 3.9-rc3 into staging-next
This resolves the merge error due to removing the ccg staging driver,
and picks up the other staging driver fixes that went into 3.9-rc3.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r-- | net/sctp/socket.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index c99458df3f3f..b9070736b8d9 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -5653,6 +5653,9 @@ static int sctp_getsockopt_assoc_stats(struct sock *sk, int len, if (len < sizeof(sctp_assoc_t)) return -EINVAL; + /* Allow the struct to grow and fill in as much as possible */ + len = min_t(size_t, len, sizeof(sas)); + if (copy_from_user(&sas, optval, len)) return -EFAULT; @@ -5686,9 +5689,6 @@ static int sctp_getsockopt_assoc_stats(struct sock *sk, int len, /* Mark beginning of a new observation period */ asoc->stats.max_obs_rto = asoc->rto_min; - /* Allow the struct to grow and fill in as much as possible */ - len = min_t(size_t, len, sizeof(sas)); - if (put_user(len, optlen)) return -EFAULT; |