[PATCH 6.1.y 1/2] net: add copy_safe_from_sockptr() helper