summaryrefslogtreecommitdiff
path: root/net/mac802154
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2014-06-19 01:31:30 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-28 08:05:59 -0700
commit38d1c951cb8810953cadeb6a8e66fabde3de1c89 (patch)
tree757264b4e0a469667643a9bc11bb4f47febdb5e5 /net/mac802154
parent49f5947b8a69e5fce9ef98429113fffde4a62b5a (diff)
downloadlinux-rt-38d1c951cb8810953cadeb6a8e66fabde3de1c89.tar.gz
net: sctp: propagate sysctl errors from proc_do* properly
[ Upstream commit ff5e92c1affe7166b3f6e7073e648ed65a6e2e59 ] sysctl handler proc_sctp_do_hmac_alg(), proc_sctp_do_rto_min() and proc_sctp_do_rto_max() do not properly reflect some error cases when writing values via sysctl from internal proc functions such as proc_dointvec() and proc_dostring(). In all these cases we pass the test for write != 0 and partially do additional work just to notice that additional sanity checks fail and we return with hard-coded -EINVAL while proc_do* functions might also return different errors. So fix this up by simply testing a successful return of proc_do* right after calling it. This also allows to propagate its return value onwards to the user. While touching this, also fix up some minor style issues. Fixes: 4f3fdf3bc59c ("sctp: add check rto_min and rto_max in sysctl") Fixes: 3c68198e7511 ("sctp: Make hmac algorithm selection for cookie generation dynamic") Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/mac802154')
0 files changed, 0 insertions, 0 deletions