]> git.baikalelectronics.ru Git - kernel.git/commit
bonding: don't cast const buf in sysfs store
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Sun, 22 Jul 2018 08:37:31 +0000 (11:37 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Jul 2018 17:09:30 +0000 (10:09 -0700)
commitf0ad9793c7c06f265fd8c5681397ef611f848635
treea361b8000ddb18f53bcc7172e552e2e2dbacce69
parentec0ecefd4df71c942a96f63337c0fce64ce67b2a
bonding: don't cast const buf in sysfs store

As was recently discussed [1], let's avoid casting the const buf in
bonding_sysfs_store_option and use kstrndup/kfree instead.

[1] http://lists.openwall.net/netdev/2018/07/22/25

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_sysfs.c