From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: drivers/iommu/iommufd/selftest.c:371 iommufd_test_md_check_pa() error: uninitialized symbol 'mock'.
Date: Thu, 23 Mar 2023 13:53:25 +0800 [thread overview]
Message-ID: <202303231330.lOV3AUTd-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Jason Gunthorpe <jgg@nvidia.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fff5a5e7f528b2ed2c335991399a766c2cf01103
commit: f4b20bb34c83dceade5470288f48f94ce3598ada iommufd: Add kernel support for testing iommufd
date: 4 months ago
:::::: branch date: 9 hours ago
:::::: commit date: 4 months ago
config: s390-randconfig-m031-20230321 (https://download.01.org/0day-ci/archive/20230323/202303231330.lOV3AUTd-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 12.1.0
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Link: https://lore.kernel.org/r/202303231330.lOV3AUTd-lkp@intel.com/
smatch warnings:
drivers/iommu/iommufd/selftest.c:371 iommufd_test_md_check_pa() error: uninitialized symbol 'mock'.
vim +/mock +371 drivers/iommu/iommufd/selftest.c
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 334
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 335 /* Check that every pfn under each iova matches the pfn under a user VA */
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 336 static int iommufd_test_md_check_pa(struct iommufd_ucmd *ucmd,
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 337 unsigned int mockpt_id, unsigned long iova,
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 338 size_t length, void __user *uptr)
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 339 {
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 340 struct iommufd_hw_pagetable *hwpt;
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 341 struct mock_iommu_domain *mock;
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 342 int rc;
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 343
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 344 if (iova % MOCK_IO_PAGE_SIZE || length % MOCK_IO_PAGE_SIZE ||
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 345 (uintptr_t)uptr % MOCK_IO_PAGE_SIZE)
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 346 return -EINVAL;
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 347
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 348 hwpt = get_md_pagetable(ucmd, mockpt_id, &mock);
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 349 if (IS_ERR(hwpt))
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 350 return PTR_ERR(hwpt);
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 351
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 352 for (; length; length -= MOCK_IO_PAGE_SIZE) {
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 353 struct page *pages[1];
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 354 unsigned long pfn;
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 355 long npages;
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 356 void *ent;
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 357
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 358 npages = get_user_pages_fast((uintptr_t)uptr & PAGE_MASK, 1, 0,
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 359 pages);
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 360 if (npages < 0) {
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 361 rc = npages;
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 362 goto out_put;
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 363 }
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 364 if (WARN_ON(npages != 1)) {
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 365 rc = -EFAULT;
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 366 goto out_put;
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 367 }
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 368 pfn = page_to_pfn(pages[0]);
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 369 put_page(pages[0]);
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 370
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 @371 ent = xa_load(&mock->pfns, iova / MOCK_IO_PAGE_SIZE);
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 372 if (!ent ||
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 373 (xa_to_value(ent) & MOCK_PFN_MASK) * MOCK_IO_PAGE_SIZE !=
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 374 pfn * PAGE_SIZE + ((uintptr_t)uptr % PAGE_SIZE)) {
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 375 rc = -EINVAL;
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 376 goto out_put;
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 377 }
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 378 iova += MOCK_IO_PAGE_SIZE;
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 379 uptr += MOCK_IO_PAGE_SIZE;
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 380 }
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 381 rc = 0;
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 382
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 383 out_put:
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 384 iommufd_put_object(&hwpt->obj);
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 385 return rc;
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 386 }
f4b20bb34c83dc Jason Gunthorpe 2022-11-29 387
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next reply other threads:[~2023-03-23 5:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-23 5:53 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-04-22 3:47 drivers/iommu/iommufd/selftest.c:371 iommufd_test_md_check_pa() error: uninitialized symbol 'mock' kernel test robot
2023-02-12 2:18 kernel test robot
2022-12-16 15:51 kernel test robot
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=202303231330.lOV3AUTd-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.