From: kernel test robot <lkp@intel.com>
To: Neil Roberts <nroberts@igalia.com>,
Rob Herring <robh+dt@kernel.org>,
Tomeu Vizoso <tomeu@tomeuvizoso.net>,
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>,
Steven Price <steven.price@arm.com>
Cc: kbuild-all@lists.01.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff
Date: Thu, 18 Feb 2021 03:33:25 +0800 [thread overview]
Message-ID: <202102180322.TXUdUZqG-lkp@intel.com> (raw)
In-Reply-To: <20210217165910.3820374-1-nroberts@igalia.com>
[-- Attachment #1: Type: text/plain, Size: 2060 bytes --]
Hi Neil,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.11 next-20210217]
[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/Neil-Roberts/drm-shmem-helper-Don-t-remove-the-offset-in-vm_area_struct-pgoff/20210218-012028
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git f40ddce88593482919761f74910f42f4b84c004b
config: i386-randconfig-m021-20210215 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
New smatch warnings:
drivers/gpu/drm/drm_gem_shmem_helper.c:534 drm_gem_shmem_fault() warn: unsigned 'page_offset' is never less than zero.
Old smatch warnings:
include/drm/drm_vma_manager.h:225 drm_vma_node_unmap() warn: should 'drm_vma_node_size(node) << 12' be a 64 bit type?
vim +/page_offset +534 drivers/gpu/drm/drm_gem_shmem_helper.c
521
522 static vm_fault_t drm_gem_shmem_fault(struct vm_fault *vmf)
523 {
524 struct vm_area_struct *vma = vmf->vma;
525 struct drm_gem_object *obj = vma->vm_private_data;
526 struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj);
527 loff_t num_pages = obj->size >> PAGE_SHIFT;
528 struct page *page;
529 pgoff_t page_offset;
530
531 /* We don't use vmf->pgoff since that has the fake offset */
532 page_offset = (vmf->address - vma->vm_start) >> PAGE_SHIFT;
533
> 534 if (page_offset < 0 || page_offset >= num_pages ||
535 WARN_ON_ONCE(!shmem->pages))
536 return VM_FAULT_SIGBUS;
537
538 page = shmem->pages[page_offset];
539
540 return vmf_insert_page(vma, vmf->address, page);
541 }
542
---
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: 38058 bytes --]
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2021-02-17 19:33 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-17 16:59 [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff Neil Roberts
2021-02-17 19:33 ` kernel test robot [this message]
2021-02-18 15:26 ` Steven Price
2021-02-18 15:30 ` Daniel Vetter
2021-02-18 15:45 ` Alyssa Rosenzweig
2021-02-18 16:15 ` Steven Price
2021-02-18 16:38 ` Rob Herring
2021-02-18 16:52 ` Steven Price
2021-02-18 17:15 ` Rob Herring
2021-02-18 18:20 ` Daniel Vetter
2021-02-19 13:36 ` Steven Price
2021-02-19 15:13 ` Daniel Vetter
2021-02-19 16:18 ` Steven Price
2021-02-19 17:45 ` Daniel Vetter
2021-02-22 8:34 ` Boris Brezillon
2021-02-22 16:20 ` Daniel Vetter
2021-02-23 12:42 ` Neil Roberts
2021-02-23 12:54 ` Daniel Vetter
2021-02-23 15:59 ` Neil Roberts
2021-02-23 16:40 ` Daniel Vetter
2021-02-22 14:24 ` Thomas Zimmermann
2021-02-22 16:21 ` Daniel Vetter
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=202102180322.TXUdUZqG-lkp@intel.com \
--to=lkp@intel.com \
--cc=alyssa.rosenzweig@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kbuild-all@lists.01.org \
--cc=nroberts@igalia.com \
--cc=robh+dt@kernel.org \
--cc=steven.price@arm.com \
--cc=tomeu@tomeuvizoso.net \
/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