addrconf: always initialize sysctl table data
authorWANG Cong <[email protected]>
Mon, 21 Dec 2015 18:55:45 +0000 (10:55 -0800)
committerDavid S. Miller <[email protected]>
Tue, 22 Dec 2015 22:00:58 +0000 (17:00 -0500)
commit5449a5ca9bc27dd51a462de7ca0b1cd861cd2bd0
treed45c413133a77f12c74950961286367daca26a61
parent024f35c55233fb6041e2b31165271f5b941802e6
addrconf: always initialize sysctl table data

When sysctl performs restrict writes, it allows to write from
a middle position of a sysctl file, which requires us to initialize
the table data before calling proc_dostring() for the write case.

Fixes: 3d1bec99320d ("ipv6: introduce secret_stable to ipv6_devconf")
Reported-by: Sasha Levin <[email protected]>
Acked-by: Hannes Frederic Sowa <[email protected]>
Tested-by: Sasha Levin <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/ipv6/addrconf.c