tree:
https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
arm-kill-set_fs-3
head: a817d8974430d0e8da637c85535ab678d1b19f59
commit: a6d32b05893b32de817f317991435715dc78e16d [34/37] vchiq temp
config: x86_64-randconfig-a006-20200917 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
1321160a26e7e489baf9b10d6de90a342f898960)
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
git checkout a6d32b05893b32de817f317991435715dc78e16d
# 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(a)intel.com>
All warnings (new ones prefixed by >>):
>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:904:7: warning: variable
'ret' is uninitialized when used here [-Wuninitialized]
if (ret)
^~~
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:867:9: note: initialize
the variable 'ret' to silence this warning
int ret;
^
= 0
1 warning generated.
#
https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/commi...
git remote add arnd-playground
https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
git fetch --no-tags arnd-playground arm-kill-set_fs-3
git checkout a6d32b05893b32de817f317991435715dc78e16d
vim +/ret +904 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
860
861 static int vchiq_ioc_dequeue_message(struct vchiq_instance *instance,
862 struct vchiq_dequeue_message *args)
863 {
864 struct user_service *user_service;
865 struct vchiq_service *service;
866 struct vchiq_header *header;
867 int ret;
868
869 DEBUG_INITIALISE(g_state.local)
870 DEBUG_TRACE(DEQUEUE_MESSAGE_LINE);
871 service = find_service_for_instance(instance, args->handle);
872 if (!service)
873 return -EINVAL;
874
875 user_service = (struct user_service *)service->base.userdata;
876 if (user_service->is_vchi == 0) {
877 ret = -EINVAL;
878 goto out;
879 }
880
881 spin_lock(&msg_queue_spinlock);
882 if (user_service->msg_remove == user_service->msg_insert) {
883 if (!args->blocking) {
884 spin_unlock(&msg_queue_spinlock);
885 DEBUG_TRACE(DEQUEUE_MESSAGE_LINE);
886 ret = -EWOULDBLOCK;
887 goto out;
888 }
889 user_service->dequeue_pending = 1;
890 do {
891 spin_unlock(&msg_queue_spinlock);
892 DEBUG_TRACE(DEQUEUE_MESSAGE_LINE);
893 if (wait_for_completion_interruptible(
894 &user_service->insert_event)) {
895 vchiq_log_info(vchiq_arm_log_level,
896 "DEQUEUE_MESSAGE interrupted");
897 ret = -EINTR;
898 goto out;
899 }
900 spin_lock(&msg_queue_spinlock);
901 } while (user_service->msg_remove ==
902 user_service->msg_insert);
903
904 if (ret)
905 goto out;
906 }
907
908 BUG_ON((int)(user_service->msg_insert -
909 user_service->msg_remove) < 0);
910
911 header = user_service->msg_queue[user_service->msg_remove &
912 (MSG_QUEUE_SIZE - 1)];
913 user_service->msg_remove++;
914 spin_unlock(&msg_queue_spinlock);
915
916 complete(&user_service->remove_event);
917 if (!header) {
918 ret = -ENOTCONN;
919 } else if (header->size <= args->bufsize) {
920 /* Copy to user space if msgbuf is not NULL */
921 if (!args->buf || (copy_to_user((void __user *)args->buf,
922 header->data, header->size) == 0)) {
923 ret = header->size;
924 vchiq_release_message(service->handle, header);
925 } else
926 ret = -EFAULT;
927 } else {
928 vchiq_log_error(vchiq_arm_log_level,
929 "header %pK: bufsize %x < size %x",
930 header, args->bufsize, header->size);
931 WARN(1, "invalid size\n");
932 ret = -EMSGSIZE;
933 }
934 DEBUG_TRACE(DEQUEUE_MESSAGE_LINE);
935 out:
936 unlock_service(service);
937 return ret;
938 }
939
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org