diff
< 		if (copy_from_sockptr(&opt, optval, sizeof(u32))) {
---
> 		if (copy_from_sockptr(&opt, optval, min(sizeof(u32), optlen))) {
