mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Pavel Begunkov <asml.silence@gmail.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Jens Axboe <axboe@kernel.dk>
Subject: fs/io_uring.c:1632:21: error: implicit declaration of function 'kmap'; did you mean 'vmap'?
Date: Sat, 30 Nov 2019 09:17:33 +0800	[thread overview]
Message-ID: <201911300932.MIXukaXa%lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   81b6b96475ac7a4ebfceae9f16fb3758327adbfe
commit: 311ae9e159d81a1ec1cf645daf40b39ae5a0bd84 io_uring: fix dead-hung for non-iter fixed rw
date:   4 days ago
config: h8300-h8300h-sim_defconfig (attached as .config)
compiler: h8300-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 311ae9e159d81a1ec1cf645daf40b39ae5a0bd84
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=h8300 

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

All errors (new ones prefixed by >>):

   fs/io_uring.c: In function 'loop_rw_iter':
>> fs/io_uring.c:1632:21: error: implicit declaration of function 'kmap'; did you mean 'vmap'? [-Werror=implicit-function-declaration]
       iovec.iov_base = kmap(iter->bvec->bv_page)
                        ^~~~
                        vmap
   fs/io_uring.c:1632:19: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
       iovec.iov_base = kmap(iter->bvec->bv_page)
                      ^
>> fs/io_uring.c:1647:4: error: implicit declaration of function 'kunmap'; did you mean 'vunmap'? [-Werror=implicit-function-declaration]
       kunmap(iter->bvec->bv_page);
       ^~~~~~
       vunmap
   cc1: some warnings being treated as errors

vim +1632 fs/io_uring.c

  1604	
  1605	/*
  1606	 * For files that don't have ->read_iter() and ->write_iter(), handle them
  1607	 * by looping over ->read() or ->write() manually.
  1608	 */
  1609	static ssize_t loop_rw_iter(int rw, struct file *file, struct kiocb *kiocb,
  1610				   struct iov_iter *iter)
  1611	{
  1612		ssize_t ret = 0;
  1613	
  1614		/*
  1615		 * Don't support polled IO through this interface, and we can't
  1616		 * support non-blocking either. For the latter, this just causes
  1617		 * the kiocb to be handled from an async context.
  1618		 */
  1619		if (kiocb->ki_flags & IOCB_HIPRI)
  1620			return -EOPNOTSUPP;
  1621		if (kiocb->ki_flags & IOCB_NOWAIT)
  1622			return -EAGAIN;
  1623	
  1624		while (iov_iter_count(iter)) {
  1625			struct iovec iovec;
  1626			ssize_t nr;
  1627	
  1628			if (!iov_iter_is_bvec(iter)) {
  1629				iovec = iov_iter_iovec(iter);
  1630			} else {
  1631				/* fixed buffers import bvec */
> 1632				iovec.iov_base = kmap(iter->bvec->bv_page)
  1633							+ iter->iov_offset;
  1634				iovec.iov_len = min(iter->count,
  1635						iter->bvec->bv_len - iter->iov_offset);
  1636			}
  1637	
  1638			if (rw == READ) {
  1639				nr = file->f_op->read(file, iovec.iov_base,
  1640						      iovec.iov_len, &kiocb->ki_pos);
  1641			} else {
  1642				nr = file->f_op->write(file, iovec.iov_base,
  1643						       iovec.iov_len, &kiocb->ki_pos);
  1644			}
  1645	
  1646			if (iov_iter_is_bvec(iter))
> 1647				kunmap(iter->bvec->bv_page);
  1648	
  1649			if (nr < 0) {
  1650				if (!ret)
  1651					ret = nr;
  1652				break;
  1653			}
  1654			ret += nr;
  1655			if (nr != iovec.iov_len)
  1656				break;
  1657			iov_iter_advance(iter, nr);
  1658		}
  1659	
  1660		return ret;
  1661	}
  1662	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

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

                 reply	other threads:[~2019-11-30  1:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=201911300932.MIXukaXa%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®