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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202208141105.tF57XnDg-lkp@intel.com>
Date:   Sun, 14 Aug 2022 11:57:44 +0800
From:   kernel test robot <lkp@...el.com>
To:     Matthew Rosato <mjrosato@...ux.ibm.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Christian Borntraeger <borntraeger@...ux.ibm.com>
Subject: arch/s390/kvm/pci.c:58:68: sparse: sparse: Using plain integer as
 NULL pointer

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   aea23e7c464bfdec04b52cf61edb62030e9e0d0a
commit: 98b1d33dac5fd09060486762c02fd1a78baeb1e0 KVM: s390: pci: do initial setup for AEN interpretation
date:   5 weeks ago
config: s390-randconfig-s053-20220814 (https://download.01.org/0day-ci/archive/20220814/202208141105.tF57XnDg-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 12.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=98b1d33dac5fd09060486762c02fd1a78baeb1e0
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 98b1d33dac5fd09060486762c02fd1a78baeb1e0
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=s390 SHELL=/bin/bash arch/s390/kvm/

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

sparse warnings: (new ones prefixed by >>)
>> arch/s390/kvm/pci.c:58:68: sparse: sparse: Using plain integer as NULL pointer

vim +58 arch/s390/kvm/pci.c

    48	
    49	static int zpci_setup_aipb(u8 nisc)
    50	{
    51		struct page *page;
    52		int size, rc;
    53	
    54		zpci_aipb = kzalloc(sizeof(union zpci_sic_iib), GFP_KERNEL);
    55		if (!zpci_aipb)
    56			return -ENOMEM;
    57	
  > 58		aift->sbv = airq_iv_create(ZPCI_NR_DEVICES, AIRQ_IV_ALLOC, 0);
    59		if (!aift->sbv) {
    60			rc = -ENOMEM;
    61			goto free_aipb;
    62		}
    63		zpci_aif_sbv = aift->sbv;
    64		size = get_order(PAGE_ALIGN(ZPCI_NR_DEVICES *
    65							sizeof(struct zpci_gaite)));
    66		page = alloc_pages(GFP_KERNEL | __GFP_ZERO, size);
    67		if (!page) {
    68			rc = -ENOMEM;
    69			goto free_sbv;
    70		}
    71		aift->gait = (struct zpci_gaite *)page_to_phys(page);
    72	
    73		zpci_aipb->aipb.faisb = virt_to_phys(aift->sbv->vector);
    74		zpci_aipb->aipb.gait = virt_to_phys(aift->gait);
    75		zpci_aipb->aipb.afi = nisc;
    76		zpci_aipb->aipb.faal = ZPCI_NR_DEVICES;
    77	
    78		/* Setup Adapter Event Notification Interpretation */
    79		if (zpci_set_irq_ctrl(SIC_SET_AENI_CONTROLS, 0, zpci_aipb)) {
    80			rc = -EIO;
    81			goto free_gait;
    82		}
    83	
    84		return 0;
    85	
    86	free_gait:
    87		free_pages((unsigned long)aift->gait, size);
    88	free_sbv:
    89		airq_iv_release(aift->sbv);
    90		zpci_aif_sbv = NULL;
    91	free_aipb:
    92		kfree(zpci_aipb);
    93		zpci_aipb = NULL;
    94	
    95		return rc;
    96	}
    97	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ