[OLK-5.10 1/2] net: add copy_safe_from_sockptr() helper