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: <202209071724.9KXWPPZ7-lkp@intel.com>
Date:   Wed, 7 Sep 2022 17:36:17 +0800
From:   kernel test robot <lkp@...el.com>
To:     Jianglei Nie <niejianglei2021@....com>, ojeda@...nel.org
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Jianglei Nie <niejianglei2021@....com>
Subject: Re: [PATCH] auxdisplay: hd44780: Fix potential memory leak in
 hd44780_remove()

Hi Jianglei,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.0-rc4 next-20220906]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Jianglei-Nie/auxdisplay-hd44780-Fix-potential-memory-leak-in-hd44780_remove/20220907-151008
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 0066f1b0e27556381402db3ff31f85d2a2265858
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20220907/202209071724.9KXWPPZ7-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 12.1.0
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://github.com/intel-lab-lkp/linux/commit/bef273823cd1f11736f4e0ce7fcf5d4ac2e1b972
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Jianglei-Nie/auxdisplay-hd44780-Fix-potential-memory-leak-in-hd44780_remove/20220907-151008
        git checkout bef273823cd1f11736f4e0ce7fcf5d4ac2e1b972
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash drivers/

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

All warnings (new ones prefixed by >>):

   drivers/auxdisplay/hd44780.c: In function 'hd44780_remove':
>> drivers/auxdisplay/hd44780.c:327:27: warning: dereferencing 'void *' pointer
     327 |         kfree(lcd->drvdata->hd44780);
         |                           ^~
   drivers/auxdisplay/hd44780.c:327:27: error: request for member 'hd44780' in something not a structure or union


vim +327 drivers/auxdisplay/hd44780.c

   321	
   322	static int hd44780_remove(struct platform_device *pdev)
   323	{
   324		struct charlcd *lcd = platform_get_drvdata(pdev);
   325	
   326		charlcd_unregister(lcd);
 > 327		kfree(lcd->drvdata->hd44780);
   328		kfree(lcd->drvdata);
   329	
   330		kfree(lcd);
   331		return 0;
   332	}
   333	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ