lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20240715123204.623520bb@canb.auug.org.au>
Date: Mon, 15 Jul 2024 12:32:04 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: David Miller <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
 Paolo Abeni <pabeni@...hat.com>
Cc: Networking <netdev@...r.kernel.org>, "Kory Maincent (Dent Project)"
 <kory.maincent@...tlin.com>, Linux Kernel Mailing List
 <linux-kernel@...r.kernel.org>, Linux Next Mailing List
 <linux-next@...r.kernel.org>
Subject: linux-next: manual merge of the net-next tree with the net tree

Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  net/ethtool/pse-pd.c

between commits:

  93c3a96c301f ("net: pse-pd: Do not return EOPNOSUPP if config is null")
  4cddb0f15ea9 ("net: ethtool: pse-pd: Fix possible null-deref")

from the net tree and commit:

  30d7b6727724 ("net: ethtool: Add new power limit get and set features")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc net/ethtool/pse-pd.c
index 776ac96cdadc,ba46c9c8b12d..000000000000
--- a/net/ethtool/pse-pd.c
+++ b/net/ethtool/pse-pd.c
@@@ -172,21 -256,39 +256,39 @@@ static in
  ethnl_set_pse(struct ethnl_req_info *req_info, struct genl_info *info)
  {
  	struct net_device *dev = req_info->dev;
- 	struct pse_control_config config = {};
  	struct nlattr **tb = info->attrs;
  	struct phy_device *phydev;
+ 	int ret = 0;
  
  	phydev = dev->phydev;
- 	/* These values are already validated by the ethnl_pse_set_policy */
- 	if (tb[ETHTOOL_A_PODL_PSE_ADMIN_CONTROL])
- 		config.podl_admin_control = nla_get_u32(tb[ETHTOOL_A_PODL_PSE_ADMIN_CONTROL]);
- 	if (tb[ETHTOOL_A_C33_PSE_ADMIN_CONTROL])
- 		config.c33_admin_control = nla_get_u32(tb[ETHTOOL_A_C33_PSE_ADMIN_CONTROL]);
  
- 	/* Return errno directly - PSE has no notification
- 	 * pse_ethtool_set_config() will do nothing if the config is null
- 	 */
- 	return pse_ethtool_set_config(phydev->psec, info->extack, &config);
+ 	if (tb[ETHTOOL_A_C33_PSE_AVAIL_PW_LIMIT]) {
+ 		unsigned int pw_limit;
+ 
+ 		pw_limit = nla_get_u32(tb[ETHTOOL_A_C33_PSE_AVAIL_PW_LIMIT]);
+ 		ret = pse_ethtool_set_pw_limit(phydev->psec, info->extack,
+ 					       pw_limit);
+ 		if (ret)
+ 			return ret;
+ 	}
+ 
+ 	/* These values are already validated by the ethnl_pse_set_policy */
+ 	if (tb[ETHTOOL_A_PODL_PSE_ADMIN_CONTROL] ||
+ 	    tb[ETHTOOL_A_C33_PSE_ADMIN_CONTROL]) {
+ 		struct pse_control_config config = {};
+ 
 -		if (pse_has_podl(phydev->psec))
++		if (tb[ETHTOOL_A_PODL_PSE_ADMIN_CONTROL])
+ 			config.podl_admin_control = nla_get_u32(tb[ETHTOOL_A_PODL_PSE_ADMIN_CONTROL]);
 -		if (pse_has_c33(phydev->psec))
++		if (tb[ETHTOOL_A_C33_PSE_ADMIN_CONTROL])
+ 			config.c33_admin_control = nla_get_u32(tb[ETHTOOL_A_C33_PSE_ADMIN_CONTROL]);
+ 
+ 		ret = pse_ethtool_set_config(phydev->psec, info->extack,
+ 					     &config);
+ 		if (ret)
+ 			return ret;
+ 	}
+ 
+ 	return ret;
  }
  
  const struct ethnl_request_ops ethnl_pse_request_ops = {

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ