linux-x25.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Martin Schiller <ms@dev.tdt.de>,
	andrew.hendry@gmail.com, davem@davemloft.net, kuba@kernel.org,
	xie.he.0141@gmail.com
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	linux-x25@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, Martin Schiller <ms@dev.tdt.de>
Subject: Re: [PATCH 2/6] net/x25: make neighbour params configurable
Date: Mon, 16 Nov 2020 21:10:40 +0800	[thread overview]
Message-ID: <202011162134.e7zrWw8t-lkp@intel.com> (raw)
In-Reply-To: <20201116073149.23219-2-ms@dev.tdt.de>

[-- Attachment #1: Type: text/plain, Size: 6027 bytes --]

Hi Martin,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on net-next/master]
[also build test ERROR on net/master linus/master sparc-next/master v5.10-rc4 next-20201116]
[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]

url:    https://github.com/0day-ci/linux/commits/Martin-Schiller/net-x25-add-remove-x25_link_device-by-NETDEV_REGISTER-UNREGISTER/20201116-153459
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 0064c5c1b3bf2a695c772c90e8dea38426a870ff
config: x86_64-randconfig-a011-20201116 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c044709b8fbea2a9a375e4173a6bd735f6866c0c)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/2d44533245f7e8388db93c53c26703ac52650e57
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Martin-Schiller/net-x25-add-remove-x25_link_device-by-NETDEV_REGISTER-UNREGISTER/20201116-153459
        git checkout 2d44533245f7e8388db93c53c26703ac52650e57
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> net/x25/af_x25.c:1709:30: error: assigning to 'struct compat_x25_facilities' from incompatible type 'struct x25_facilities'
                   x25_subscr.facilities        = nb->facilities;
                                                ^ ~~~~~~~~~~~~~~
>> net/x25/af_x25.c:1761:24: error: assigning to 'struct x25_facilities' from incompatible type 'struct compat_x25_facilities'
                   nb->facilities        = x25_subscr.facilities;
                                         ^ ~~~~~~~~~~~~~~~~~~~~~
   2 errors generated.

vim +1709 net/x25/af_x25.c

  1678	
  1679	#ifdef CONFIG_COMPAT
  1680	static int compat_x25_subscr_ioctl(unsigned int cmd,
  1681			struct compat_x25_subscrip_struct __user *x25_subscr32)
  1682	{
  1683		struct compat_x25_subscrip_struct x25_subscr;
  1684		struct x25_neigh *nb;
  1685		struct net_device *dev;
  1686		int rc = -EINVAL;
  1687	
  1688		if (cmd != SIOCX25GSUBSCRIP && cmd != SIOCX25SSUBSCRIP)
  1689			goto out;
  1690	
  1691		rc = -EFAULT;
  1692		if (copy_from_user(&x25_subscr, x25_subscr32, sizeof(*x25_subscr32)))
  1693			goto out;
  1694	
  1695		rc = -EINVAL;
  1696		dev = x25_dev_get(x25_subscr.device);
  1697		if (dev == NULL)
  1698			goto out;
  1699	
  1700		nb = x25_get_neigh(dev);
  1701		if (nb == NULL)
  1702			goto out_dev_put;
  1703	
  1704		if (cmd == SIOCX25GSUBSCRIP) {
  1705			read_lock_bh(&x25_neigh_list_lock);
  1706			x25_subscr.extended = nb->extended;
  1707			x25_subscr.dce		     = nb->dce;
  1708			x25_subscr.lc		     = nb->lc;
> 1709			x25_subscr.facilities	     = nb->facilities;
  1710			x25_subscr.t20		     = nb->t20;
  1711			x25_subscr.global_facil_mask = nb->global_facil_mask;
  1712			read_unlock_bh(&x25_neigh_list_lock);
  1713			rc = copy_to_user(x25_subscr32, &x25_subscr,
  1714					sizeof(*x25_subscr32)) ? -EFAULT : 0;
  1715		} else {
  1716			rc = -EINVAL;
  1717	
  1718			if (dev->flags & IFF_UP)
  1719				return -EBUSY;
  1720	
  1721			if (x25_subscr.extended != 0 && x25_subscr.extended != 1)
  1722				goto out_dev_and_neigh_put;
  1723			if (x25_subscr.dce != 0 && x25_subscr.dce != 1)
  1724				goto out_dev_and_neigh_put;
  1725			if (x25_subscr.lc < 1 || x25_subscr.lc > 4095)
  1726				goto out_dev_and_neigh_put;
  1727			if (x25_subscr.facilities.pacsize_in < X25_PS16 ||
  1728			    x25_subscr.facilities.pacsize_in > X25_PS4096)
  1729				goto out_dev_and_neigh_put;
  1730			if (x25_subscr.facilities.pacsize_out < X25_PS16 ||
  1731			    x25_subscr.facilities.pacsize_out > X25_PS4096)
  1732				goto out_dev_and_neigh_put;
  1733			if (x25_subscr.facilities.winsize_in < 1 ||
  1734			    x25_subscr.facilities.winsize_in > 127)
  1735				goto out_dev_and_neigh_put;
  1736			if (x25_subscr.facilities.throughput) {
  1737				int out = x25_subscr.facilities.throughput & 0xf0;
  1738				int in  = x25_subscr.facilities.throughput & 0x0f;
  1739				if (!out)
  1740					x25_subscr.facilities.throughput |=
  1741						X25_DEFAULT_THROUGHPUT << 4;
  1742				else if (out < 0x30 || out > 0xD0)
  1743					goto out_dev_and_neigh_put;
  1744				if (!in)
  1745					x25_subscr.facilities.throughput |=
  1746						X25_DEFAULT_THROUGHPUT;
  1747				else if (in < 0x03 || in > 0x0D)
  1748					goto out_dev_and_neigh_put;
  1749			}
  1750			if (x25_subscr.facilities.reverse &&
  1751			    (x25_subscr.facilities.reverse & 0x81) != 0x81)
  1752				goto out_dev_and_neigh_put;
  1753			if (x25_subscr.t20 < 1 * HZ || x25_subscr.t20 > 300 * HZ)
  1754				goto out_dev_and_neigh_put;
  1755	
  1756			rc = 0;
  1757			write_lock_bh(&x25_neigh_list_lock);
  1758			nb->extended	      = x25_subscr.extended;
  1759			nb->dce		      = x25_subscr.dce;
  1760			nb->lc		      = x25_subscr.lc;
> 1761			nb->facilities	      = x25_subscr.facilities;
  1762			nb->t20		      = x25_subscr.t20;
  1763			nb->global_facil_mask = x25_subscr.global_facil_mask;
  1764			write_unlock_bh(&x25_neigh_list_lock);
  1765		}
  1766		dev_put(dev);
  1767	
  1768		x25_neigh_put(nb);
  1769	out:
  1770		return rc;
  1771	out_dev_and_neigh_put:
  1772		x25_neigh_put(nb);
  1773	out_dev_put:
  1774		dev_put(dev);
  1775		goto out;
  1776	}
  1777	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32127 bytes --]

  reply	other threads:[~2020-11-16 13:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16  7:31 [PATCH 1/6] net/x25: add/remove x25_link_device by NETDEV_REGISTER/UNREGISTER Martin Schiller
2020-11-16  7:31 ` [PATCH 2/6] net/x25: make neighbour params configurable Martin Schiller
2020-11-16 13:10   ` kernel test robot [this message]
2020-11-16  7:31 ` [PATCH 3/6] net/x25: replace x25_kill_by_device with x25_kill_by_neigh Martin Schiller
2020-11-16  7:31 ` [PATCH 4/6] net/x25: support NETDEV_CHANGE notifier Martin Schiller
2020-11-16  7:31 ` [PATCH 5/6] net/lapb: support netdev events Martin Schiller
2020-11-16  7:31 ` [PATCH 6/6] net/lapb: fix t1 timer handling Martin Schiller
2020-11-16  8:45 ` [PATCH 1/6] net/x25: add/remove x25_link_device by NETDEV_REGISTER/UNREGISTER Xie He
2020-11-16  8:59   ` Martin Schiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202011162134.e7zrWw8t-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrew.hendry@gmail.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=davem@davemloft.net \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-x25@vger.kernel.org \
    --cc=ms@dev.tdt.de \
    --cc=netdev@vger.kernel.org \
    --cc=xie.he.0141@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).