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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202211261159.wgOIXyzz-lkp@intel.com>
Date:   Sat, 26 Nov 2022 12:02:44 +0800
From:   kernel test robot <lkp@...el.com>
To:     Bartosz Golaszewski <brgl@...ev.pl>,
        Kent Gibson <warthog618@...il.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     oe-kbuild-all@...ts.linux.dev, linux-gpio@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH] gpiolib: cdev: fix NULL-pointer dereferences

Hi Bartosz,

I love your patch! Perhaps something to improve:

[auto build test WARNING on brgl/gpio/for-next]
[also build test WARNING on linus/master v6.1-rc6 next-20221125]
[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/Bartosz-Golaszewski/gpiolib-cdev-fix-NULL-pointer-dereferences/20221125-233356
base:   https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git gpio/for-next
patch link:    https://lore.kernel.org/r/20221125153257.528826-1-brgl%40bgdev.pl
patch subject: [PATCH] gpiolib: cdev: fix NULL-pointer dereferences
config: powerpc-randconfig-s051-20221124
compiler: powerpc-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://github.com/intel-lab-lkp/linux/commit/79d8e683d5df83bf0b25c6a1bf6755ba20266099
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Bartosz-Golaszewski/gpiolib-cdev-fix-NULL-pointer-dereferences/20221125-233356
        git checkout 79d8e683d5df83bf0b25c6a1bf6755ba20266099
        # 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=powerpc SHELL=/bin/bash drivers/gpio/

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 >>)
>> drivers/gpio/gpiolib-cdev.c:1726:24: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted __poll_t @@     got int @@
   drivers/gpio/gpiolib-cdev.c:1726:24: sparse:     expected restricted __poll_t
   drivers/gpio/gpiolib-cdev.c:1726:24: sparse:     got int

vim +1726 drivers/gpio/gpiolib-cdev.c

  1714	
  1715	#define GPIOEVENT_REQUEST_VALID_FLAGS \
  1716		(GPIOEVENT_REQUEST_RISING_EDGE | \
  1717		GPIOEVENT_REQUEST_FALLING_EDGE)
  1718	
  1719	static __poll_t lineevent_poll(struct file *file,
  1720				       struct poll_table_struct *wait)
  1721	{
  1722		struct lineevent_state *le = file->private_data;
  1723		__poll_t events = 0;
  1724	
  1725		if (!le->gdev->chip)
> 1726			return -ENODEV;
  1727	
  1728		poll_wait(file, &le->wait, wait);
  1729	
  1730		if (!kfifo_is_empty_spinlocked_noirqsave(&le->events, &le->wait.lock))
  1731			events = EPOLLIN | EPOLLRDNORM;
  1732	
  1733		return events;
  1734	}
  1735	

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

View attachment "config" of type "text/plain" (225004 bytes)

Powered by blists - more mailing lists