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: <201709011632.kBdEdkVz%fengguang.wu@intel.com>
Date:   Fri, 1 Sep 2017 17:07:48 +0800
From:   kbuild test robot <lkp@...el.com>
To:     harsha <harshasharmaiitr@...il.com>
Cc:     kbuild-all@...org, gregkh@...uxfoundation.org,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
        harsha <harshasharmaiitr@...il.com>
Subject: Re: [PATCH] Staging:android:ion:ion.c : Using WARN_ON() rather than
 BUG()

Hi harsha,

[auto build test ERROR on staging/staging-testing]
[also build test ERROR on v4.13-rc7 next-20170831]
[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/harsha/Staging-android-ion-ion-c-Using-WARN_ON-rather-than-BUG/20170901-160600
config: xtensa-allmodconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 4.9.0
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=xtensa 

All error/warnings (new ones prefixed by >>):

   In file included from ./arch/xtensa/include/generated/asm/bug.h:1:0,
                    from include/linux/bug.h:4,
                    from include/linux/thread_info.h:11,
                    from arch/xtensa/include/asm/current.h:16,
                    from include/linux/mutex.h:13,
                    from include/linux/kernfs.h:13,
                    from include/linux/sysfs.h:15,
                    from include/linux/kobject.h:21,
                    from include/linux/device.h:17,
                    from drivers/staging/android/ion/ion.c:18:
   drivers/staging/android/ion/ion.c: In function 'ion_buffer_add':
>> include/asm-generic/bug.h:107:34: error: expected expression before ')' token
     int __ret_warn_on = !!(condition);    \
                                     ^
>> drivers/staging/android/ion/ion.c:69:4: note: in expansion of macro 'WARN_ON'
       WARN_ON();
       ^
--
   In file included from ./arch/xtensa/include/generated/asm/bug.h:1:0,
                    from include/linux/bug.h:4,
                    from include/linux/thread_info.h:11,
                    from arch/xtensa/include/asm/current.h:16,
                    from include/linux/mutex.h:13,
                    from include/linux/kernfs.h:13,
                    from include/linux/sysfs.h:15,
                    from include/linux/kobject.h:21,
                    from include/linux/device.h:17,
                    from drivers/staging//android/ion/ion.c:18:
   drivers/staging//android/ion/ion.c: In function 'ion_buffer_add':
>> include/asm-generic/bug.h:107:34: error: expected expression before ')' token
     int __ret_warn_on = !!(condition);    \
                                     ^
   drivers/staging//android/ion/ion.c:69:4: note: in expansion of macro 'WARN_ON'
       WARN_ON();
       ^

vim +/WARN_ON +69 drivers/staging/android/ion/ion.c

  > 18	#include <linux/device.h>
    19	#include <linux/err.h>
    20	#include <linux/file.h>
    21	#include <linux/freezer.h>
    22	#include <linux/fs.h>
    23	#include <linux/anon_inodes.h>
    24	#include <linux/kthread.h>
    25	#include <linux/list.h>
    26	#include <linux/memblock.h>
    27	#include <linux/miscdevice.h>
    28	#include <linux/export.h>
    29	#include <linux/mm.h>
    30	#include <linux/mm_types.h>
    31	#include <linux/rbtree.h>
    32	#include <linux/slab.h>
    33	#include <linux/seq_file.h>
    34	#include <linux/uaccess.h>
    35	#include <linux/vmalloc.h>
    36	#include <linux/debugfs.h>
    37	#include <linux/dma-buf.h>
    38	#include <linux/idr.h>
    39	#include <linux/sched/task.h>
    40	
    41	#include "ion.h"
    42	
    43	static struct ion_device *internal_dev;
    44	static int heap_id;
    45	
    46	bool ion_buffer_cached(struct ion_buffer *buffer)
    47	{
    48		return !!(buffer->flags & ION_FLAG_CACHED);
    49	}
    50	
    51	/* this function should only be called while dev->lock is held */
    52	static void ion_buffer_add(struct ion_device *dev,
    53				   struct ion_buffer *buffer)
    54	{
    55		struct rb_node **p = &dev->buffers.rb_node;
    56		struct rb_node *parent = NULL;
    57		struct ion_buffer *entry;
    58	
    59		while (*p) {
    60			parent = *p;
    61			entry = rb_entry(parent, struct ion_buffer, node);
    62	
    63			if (buffer < entry) {
    64				p = &(*p)->rb_left;
    65			} else if (buffer > entry) {
    66				p = &(*p)->rb_right;
    67			} else {
    68				pr_err("%s: buffer already found.", __func__);
  > 69				WARN_ON();
    70			}
    71		}
    72	
    73		rb_link_node(&buffer->node, parent, p);
    74		rb_insert_color(&buffer->node, &dev->buffers);
    75	}
    76	

---
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" (50969 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ