Thread (24 messages) flat view 24 messages, 5 authors, 2012-07-23

Re: [PATCH v5] sctp: Implement quick failover draft from tsvwg

From: Neil Horman <nhorman@tuxdriver.com>
Date: 2012-07-21 11:03:55
Also in: linux-sctp

On Sat, Jul 21, 2012 at 02:45:03AM -0400, Vlad Yasevich wrote:
Neil Horman [off-list ref] wrote:
<snip>
quoted
+
+		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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help