If copy_from_sockptr() then we need to unlock before returning.
Fixes: e9964564dc86 ("net: sock: extend SO_TIMESTAMPING for PHC binding")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
case SO_TIMESTAMPING_OLD:
if (optlen == sizeof(timestamping)) {
if (copy_from_sockptr(×tamping, optval,
- sizeof(timestamping)))
- return -EFAULT;
+ sizeof(timestamping))) {
+ ret = -EFAULT;
+ break;
+ }
} else {
memset(×tamping, 0, sizeof(timestamping));
timestamping.flags = val;