]> git.baikalelectronics.ru Git - kernel.git/commit
net: core: devlink: use right genl user_ptr when handling port param get/set
authorOleksandr Mazur <oleksandr.mazur@plvision.eu>
Tue, 19 Jan 2021 08:53:33 +0000 (10:53 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 19 Jan 2021 19:45:41 +0000 (11:45 -0800)
commit4ce8b07382752920abd44cc0969f35b53c1f2916
tree0b9ee64e9426187e1d3d746ca9ea999e04a87290
parent0f2f8b100269cb1d50686de2499dd8b68faf2add
net: core: devlink: use right genl user_ptr when handling port param get/set

Fix incorrect user_ptr dereferencing when handling port param get/set:

    idx [0] stores the 'struct devlink' pointer;
    idx [1] stores the 'struct devlink_port' pointer;

Fixes: 094267f973df ("devlink: Always use user_ptr[0] for devlink and simplify post_doit")
CC: Parav Pandit <parav@mellanox.com>
Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
Signed-off-by: Vadym Kochan <vadym.kochan@plvision.eu>
Link: https://lore.kernel.org/r/20210119085333.16833-1-vadym.kochan@plvision.eu
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/devlink.c