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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202511220203.nggER5yL-lkp@intel.com>
Date: Sat, 22 Nov 2025 03:13:49 +0800
From: kernel test robot <lkp@...el.com>
To: Ma Ke <make24@...as.ac.cn>, andrew@...n.ch, olteanv@...il.com,
	davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	pabeni@...hat.com, horms@...nel.org, florian.fainelli@...adcom.com,
	stephen@...workplumber.org, robh@...nel.org
Cc: oe-kbuild-all@...ts.linux.dev, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	Ma Ke <make24@...as.ac.cn>, stable@...r.kernel.org
Subject: Re: [PATCH] net: dsa: Fix error handling in dsa_port_parse_of

Hi Ma,

kernel test robot noticed the following build errors:

[auto build test ERROR on net-next/main]
[also build test ERROR on net/main linus/master v6.18-rc6 next-20251121]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Ma-Ke/net-dsa-Fix-error-handling-in-dsa_port_parse_of/20251121-115449
base:   net-next/main
patch link:    https://lore.kernel.org/r/20251121035130.16020-1-make24%40iscas.ac.cn
patch subject: [PATCH] net: dsa: Fix error handling in dsa_port_parse_of
config: i386-allmodconfig (https://download.01.org/0day-ci/archive/20251122/202511220203.nggER5yL-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251122/202511220203.nggER5yL-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511220203.nggER5yL-lkp@intel.com/

All errors (new ones prefixed by >>):

   net/dsa/dsa.c: In function 'dsa_port_parse_of':
>> net/dsa/dsa.c:1265:36: error: passing argument 1 of 'put_device' from incompatible pointer type [-Wincompatible-pointer-types]
    1265 |                         put_device(conduit);
         |                                    ^~~~~~~
         |                                    |
         |                                    struct net_device *
   In file included from net/dsa/dsa.c:10:
   include/linux/device.h:1181:32: note: expected 'struct device *' but argument is of type 'struct net_device *'
    1181 | void put_device(struct device *dev);
         |                 ~~~~~~~~~~~~~~~^~~


vim +/put_device +1265 net/dsa/dsa.c

  1243	
  1244	static int dsa_port_parse_of(struct dsa_port *dp, struct device_node *dn)
  1245	{
  1246		struct device_node *ethernet = of_parse_phandle(dn, "ethernet", 0);
  1247		const char *name = of_get_property(dn, "label", NULL);
  1248		bool link = of_property_read_bool(dn, "link");
  1249		int err;
  1250	
  1251		dp->dn = dn;
  1252	
  1253		if (ethernet) {
  1254			struct net_device *conduit;
  1255			const char *user_protocol;
  1256	
  1257			conduit = of_find_net_device_by_node(ethernet);
  1258			of_node_put(ethernet);
  1259			if (!conduit)
  1260				return -EPROBE_DEFER;
  1261	
  1262			user_protocol = of_get_property(dn, "dsa-tag-protocol", NULL);
  1263			err = dsa_port_parse_cpu(dp, conduit, user_protocol);
  1264			if (err) {
> 1265				put_device(conduit);
  1266				return err;
  1267			}
  1268	
  1269			return 0;
  1270		}
  1271	
  1272		if (link)
  1273			return dsa_port_parse_dsa(dp);
  1274	
  1275		return dsa_port_parse_user(dp, name);
  1276	}
  1277	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ