未验证 提交 6bc20a2c 编写于 作者: O openeuler-ci-bot 提交者: Gitee

!890 ethtool: ioctl: fix potential NULL deref in ethtool_set_coalesce()

Merge Pull Request from: @ci-robot 
 
PR sync from:  Zhengchao Shao <shaozhengchao@huawei.com>
 https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/thread/RD4XA3AJYG55M6DKC5CSK5O2Z4JJWDPF/ 
 
 
Link:https://gitee.com/openeuler/kernel/pulls/890 

Reviewed-by: Jialin Zhang <zhangjialin11@huawei.com> 
Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com> 
......@@ -1696,7 +1696,7 @@ static noinline_for_stack int ethtool_set_coalesce(struct net_device *dev,
struct ethtool_coalesce coalesce;
int ret;
if (!dev->ethtool_ops->set_coalesce && !dev->ethtool_ops->get_coalesce)
if (!dev->ethtool_ops->set_coalesce || !dev->ethtool_ops->get_coalesce)
return -EOPNOTSUPP;
ret = dev->ethtool_ops->get_coalesce(dev, &coalesce, &kernel_coalesce,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册