lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202203131914.rJjnMLih-lkp@intel.com>
Date:   Sun, 13 Mar 2022 20:00:55 +0800
From:   kernel test robot <lkp@...el.com>
To:     Hannes Reinecke <hare@...e.de>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: [hare-scsi-devel:tls-upcall.v4 141/156]
 drivers/nvme/host/tcp.c:674:7: warning: variable 'map' is uninitialized when
 used here

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git tls-upcall.v4
head:   d2416ecdb6b03fc2e4aa40b20cdf919322713224
commit: fb16aba001d4b403be727c8dd379da6e3dbf56e4 [141/156] nvme-tcp: decode c2h term PDU
config: i386-randconfig-a013 (https://download.01.org/0day-ci/archive/20220313/202203131914.rJjnMLih-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0467eb2cb7654c15ae366967ef35093c5724c416)
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
        # https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git/commit/?id=fb16aba001d4b403be727c8dd379da6e3dbf56e4
        git remote add hare-scsi-devel https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git
        git fetch --no-tags hare-scsi-devel tls-upcall.v4
        git checkout fb16aba001d4b403be727c8dd379da6e3dbf56e4
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/nvme/host/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

>> drivers/nvme/host/tcp.c:674:7: warning: variable 'map' is uninitialized when used here [-Wuninitialized]
                   if (map[i].fes == pdu->fes) {
                       ^~~
   drivers/nvme/host/tcp.c:668:28: note: initialize the variable 'map' to silence this warning
           struct fes_status_map *map;
                                     ^
                                      = NULL
   1 warning generated.


vim +/map +674 drivers/nvme/host/tcp.c

   663	
   664	static int nvme_tcp_handle_c2h_term(struct nvme_tcp_queue *queue,
   665			struct nvme_tcp_term_pdu *pdu)
   666	{
   667		struct nvme_tcp_hdr *ref_pdu;
   668		struct fes_status_map *map;
   669		const char *fes_desc = NULL;
   670		int i;
   671		u32 pdu_offset;
   672	
   673		for (i = 0; i < ARRAY_SIZE(fes_status); i++) {
 > 674			if (map[i].fes == pdu->fes) {
   675				fes_desc = map[i].desc;
   676				break;
   677			}
   678		}
   679		if (!fes_desc)
   680			fes_desc = "unknown fatal error status";
   681	
   682		if (pdu->hdr.plen > sizeof(struct nvme_tcp_term_pdu))
   683			ref_pdu = (struct nvme_tcp_hdr *)((u8 *)pdu + 1);
   684	
   685		if (pdu->fes == NVME_TCP_FES_INVALID_PDU_HDR ||
   686		    pdu->fes == NVME_TCP_FES_HDR_DIGEST_ERR ||
   687		    pdu->fes == NVME_TCP_FES_UNSUPPORTED_PARAM) {
   688			pdu_offset = le32_to_cpu(pdu->fei);
   689	
   690			dev_err(queue->ctrl->ctrl.device,
   691				"queue %d c2h term, %s, pdu type %u offset %u\n",
   692				nvme_tcp_queue_id(queue), fes_desc, ref_pdu->type, pdu_offset);
   693		} else
   694			dev_err(queue->ctrl->ctrl.device,
   695				"queue %d c2h term, %s, pdu type %u\n",
   696				nvme_tcp_queue_id(queue), fes_desc, ref_pdu->type);
   697	
   698		return -ECONNRESET;
   699	}
   700	

---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ