All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1056 vchiq_get_user_ptr() error: uninitialized symbol 'ptr'.
Date: Sun, 20 Dec 2020 00:52:42 +0800	[thread overview]
Message-ID: <202012200035.lhvDix2K-lkp@intel.com> (raw)

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

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Arnd Bergmann <arnd@arndb.de>
CC: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   3644e2d2dda78e21edd8f5415b6d7ab03f5f54f3
commit: 4184da4f316a549ae732d91088571fef46a2f58d staging: vchiq: fix __user annotations
date:   3 months ago
:::::: branch date: 19 hours ago
:::::: commit date: 3 months ago
config: microblaze-randconfig-m031-20201219 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.3.0

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

New smatch warnings:
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1056 vchiq_get_user_ptr() error: uninitialized symbol 'ptr'.

Old smatch warnings:
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:476 vchiq_blocking_bulk_transfer() warn: returning -1 instead of -ENOMEM is sloppy
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:606 service_callback() warn: argument 3 to %lx specifier is cast from pointer
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:606 service_callback() warn: argument 7 to %lx specifier is cast from pointer
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:606 service_callback() warn: argument 8 to %lx specifier is cast from pointer
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:606 service_callback() warn: argument 9 to %lx specifier is cast from pointer
arch/microblaze/include/asm/thread_info.h:91 current_thread_info() error: uninitialized symbol 'sp'.
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1001 vchiq_irq_queue_bulk_tx_rx() error: uninitialized symbol 'userdata'.
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1890 vchiq_release() warn: argument 3 to %lx specifier is cast from pointer

vim +/ptr +1056 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c

a4367cd2b231686 Arnd Bergmann 2020-09-18  1042  
4184da4f316a549 Arnd Bergmann 2020-09-25  1043  /* read a user pointer value from an array pointers in user space */
5d240a54be7e592 Arnd Bergmann 2020-09-18  1044  static inline int vchiq_get_user_ptr(void __user **buf, void __user *ubuf, int index)
5d240a54be7e592 Arnd Bergmann 2020-09-18  1045  {
5d240a54be7e592 Arnd Bergmann 2020-09-18  1046  	int ret;
5d240a54be7e592 Arnd Bergmann 2020-09-18  1047  
5d240a54be7e592 Arnd Bergmann 2020-09-18  1048  	if (in_compat_syscall()) {
4184da4f316a549 Arnd Bergmann 2020-09-25  1049  		compat_uptr_t ptr32;
5d240a54be7e592 Arnd Bergmann 2020-09-18  1050  		compat_uptr_t __user *uptr = ubuf;
4184da4f316a549 Arnd Bergmann 2020-09-25  1051  		ret = get_user(ptr32, uptr + index);
5d240a54be7e592 Arnd Bergmann 2020-09-18  1052  		*buf = compat_ptr(ptr32);
5d240a54be7e592 Arnd Bergmann 2020-09-18  1053  	} else {
4184da4f316a549 Arnd Bergmann 2020-09-25  1054  		uintptr_t ptr, __user *uptr = ubuf;
4184da4f316a549 Arnd Bergmann 2020-09-25  1055  		ret = get_user(ptr, uptr + index);
4184da4f316a549 Arnd Bergmann 2020-09-25 @1056  		*buf = (void __user *)ptr;
5d240a54be7e592 Arnd Bergmann 2020-09-18  1057  	}
4184da4f316a549 Arnd Bergmann 2020-09-25  1058  
5d240a54be7e592 Arnd Bergmann 2020-09-18  1059  	return ret;
5d240a54be7e592 Arnd Bergmann 2020-09-18  1060  }
5d240a54be7e592 Arnd Bergmann 2020-09-18  1061  

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

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

             reply	other threads:[~2020-12-19 16:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-19 16:52 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-01-04 10:54 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1056 vchiq_get_user_ptr() error: uninitialized symbol 'ptr' Dan Carpenter
2021-01-04 10:54 ` Dan Carpenter
2021-01-04 10:54 ` Dan Carpenter
2021-01-05 13:53 ` Arnd Bergmann
2021-01-05 13:53   ` Arnd Bergmann

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=202012200035.lhvDix2K-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.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 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.