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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201811051843.7JyCkJpC%fengguang.wu@intel.com>
Date:   Mon, 5 Nov 2018 18:38:06 +0800
From:   kbuild test robot <lkp@...el.com>
To:     "He, Bo" <bo.he@...el.com>
Cc:     kbuild-all@...org,
        "alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "pierre-louis.bossart@...ux.intel.com" 
        <pierre-louis.bossart@...ux.intel.com>,
        "liam.r.girdwood@...ux.intel.com" <liam.r.girdwood@...ux.intel.com>,
        "perex@...ex.cz" <perex@...ex.cz>,
        "tiwai@...e.com" <tiwai@...e.com>,
        "Singh, Guneshwor O" <guneshwor.o.singh@...el.com>,
        "Periyasamy, SriramX" <sriramx.periyasamy@...el.com>,
        "Kale, Sanyog R" <sanyog.r.kale@...el.com>,
        "Kesapragada, Pardha Saradhi" <pardha.saradhi.kesapragada@...el.com>,
        "kuninori.morimoto.gx@...esas.com" <kuninori.morimoto.gx@...esas.com>,
        "guruprasadx.pawse@...el.com" <guruprasadx.pawse@...el.com>,
        "Ughreja, Rakesh A" <rakesh.a.ughreja@...el.com>,
        "Prakash, Divya1" <divya1.prakash@...el.com>,
        "Diwakar, Praveen" <praveen.diwakar@...el.com>,
        "Zhang, Yanmin" <yanmin.zhang@...el.com>
Subject: Re: [PATCH] fix the kernel panic due to wrong use the dev memory API

Hi Bo,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on asoc/for-next]
[also build test WARNING on v4.20-rc1 next-20181105]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/He-Bo/fix-the-kernel-panic-due-to-wrong-use-the-dev-memory-API/20181105-175620
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: i386-randconfig-x014-201844 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   sound/soc/intel/skylake/skl-pcm.c: In function 'skl_platform_register':
>> sound/soc/intel/skylake/skl-pcm.c:1489:28: warning: passing argument 2 of 'devm_kcalloc' makes integer from pointer without a cast [-Wint-conversion]
      dais = devm_kcalloc(dev, skl->dais, sizeof(skl_fe_dai) +
                               ^~~
   In file included from include/linux/pci.h:31:0,
                    from sound/soc/intel/skylake/skl-pcm.c:22:
   include/linux/device.h:690:21: note: expected 'size_t {aka unsigned int}' but argument is of type 'struct snd_soc_dai_driver *'
    static inline void *devm_kcalloc(struct device *dev,
                        ^~~~~~~~~~~~

vim +/devm_kcalloc +1489 sound/soc/intel/skylake/skl-pcm.c

  1468	
  1469	int skl_platform_register(struct device *dev)
  1470	{
  1471		int ret;
  1472		struct snd_soc_dai_driver *dais;
  1473		int num_dais = ARRAY_SIZE(skl_platform_dai);
  1474		struct hdac_bus *bus = dev_get_drvdata(dev);
  1475		struct skl *skl = bus_to_skl(bus);
  1476	
  1477		INIT_LIST_HEAD(&skl->ppl_list);
  1478		INIT_LIST_HEAD(&skl->bind_list);
  1479	
  1480		skl->dais = kmemdup(skl_platform_dai, sizeof(skl_platform_dai),
  1481				    GFP_KERNEL);
  1482		if (!skl->dais) {
  1483			ret = -ENOMEM;
  1484			goto err;
  1485		}
  1486	
  1487		if (!skl->use_tplg_pcm) {
  1488			devm_kfree(dev, skl->dais);
> 1489			dais = devm_kcalloc(dev, skl->dais, sizeof(skl_fe_dai) +
  1490					sizeof(skl_platform_dai), GFP_KERNEL);
  1491			if (!dais) {
  1492				ret = -ENOMEM;
  1493				goto err;
  1494			}
  1495	
  1496			skl->dais = dais;
  1497			memcpy(&skl->dais[ARRAY_SIZE(skl_platform_dai)], skl_fe_dai,
  1498			       sizeof(skl_fe_dai));
  1499			num_dais += ARRAY_SIZE(skl_fe_dai);
  1500		}
  1501	
  1502		ret = devm_snd_soc_register_component(dev, &skl_component,
  1503						 skl->dais, num_dais);
  1504		if (ret)
  1505			dev_err(dev, "soc component registration failed %d\n", ret);
  1506	err:
  1507		return ret;
  1508	}
  1509	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (27737 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ