[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120721110343.GA5128@neilslaptop.think-freely.org>
Date: Sat, 21 Jul 2012 07:03:43 -0400
From: Neil Horman <nhorman@...driver.com>
To: Vlad Yasevich <vyasevich@...il.com>
Cc: netdev@...r.kernel.org, Sridhar Samudrala <sri@...ibm.com>,
"David S. Miller" <davem@...emloft.net>,
linux-sctp@...r.kernel.org, joe@...ches.com
Subject: Re: [PATCH v5] sctp: Implement quick failover draft from tsvwg
On Sat, Jul 21, 2012 at 02:45:03AM -0400, Vlad Yasevich wrote:
> Neil Horman <nhorman@...driver.com> wrote:
><snip>
> >+
> >+ val.spt_pathmaxrxt = trans->pathmaxrxt;
> >+ val.spt_pathpfthld = trans->pf_retrans;
> >+ }
> >+
> >+ if (copy_to_user(optval, &val, optlen))
> >+ return -EFAULT;
> >+
> >+ return optlen;
>
> I don't think you can simply return this. You have to call put_user() with the value to write it back to the User. See how other get calls are done.
>
> -Vlad
>
Yeah, sorry, I had assumed that the put_user for the return code was part of the
common sctp_getsockopt path and didn't go check. Thanks, I'll respin this later
tonight.
Neil
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists