]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net: move copy_from_user() out of net_hwtstamp_validate()
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sun, 2 Apr 2023 12:37:52 +0000 (15:37 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Apr 2023 09:04:26 +0000 (10:04 +0100)
commitd5d5fd8f2552f6b9c50d3937c77b6783f99fbe83
treedc288ec8c389bc8f86591450fdf4f79b7be69755
parent4ee58e1e56800b589afe31c34547e2bc0c59f586
net: move copy_from_user() out of net_hwtstamp_validate()

The kernel will want to start using the more meaningful struct
hwtstamp_config pointer in more places, so move the copy_from_user() at
the beginning of dev_set_hwtstamp() in order to get to that, and pass
this argument to net_hwtstamp_validate().

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev_ioctl.c