Unverified Commit 6bc20a2c authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

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

parents 3fa9c2ff b7355a31
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,