From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A44EDEE14D3 for ; Wed, 6 Sep 2023 20:54:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2BCF028001D; Wed, 6 Sep 2023 16:54:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 26CB28D0005; Wed, 6 Sep 2023 16:54:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 10DBC28001D; Wed, 6 Sep 2023 16:54:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 0295B8D0005 for ; Wed, 6 Sep 2023 16:54:12 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id D441A1A0EA6 for ; Wed, 6 Sep 2023 20:54:11 +0000 (UTC) X-FDA: 81207375102.04.2994B5E Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by imf18.hostedemail.com (Postfix) with ESMTP id AB04D1C0010 for ; Wed, 6 Sep 2023 20:54:09 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=md6NdBtY; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf18.hostedemail.com: domain of lkp@intel.com designates 192.55.52.93 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1694033649; a=rsa-sha256; cv=none; b=iISMe1TgL6KcUhnGUJuU0xsULkRVZbWl4EBMG/luZGKECO8HknzKfGsKxElAt9VPlEAz/O gg7PKVpnBVVI65CNqyDd3AhUi9qU8tY6gKSs0JVv7b6T6WgFesGLlF4yPDz/uTASrbUysS p1NqqwI9gI0C2+cH1AqHagAdVz6RHBw= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=md6NdBtY; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf18.hostedemail.com: domain of lkp@intel.com designates 192.55.52.93 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1694033649; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=IWs+Qw9xPmKwZjv7lgbWQy5OQO1Go64En4m3tI6NIGo=; b=LlOaMYd91LiObFbHOsF02vMN1i5GK9CAHqfJi7j10Xg5+1nY9aWZUlONfM5w341BHAIB4N 65c1gOWQfGXJjiGrkKbBwpBNZV1x+Dqz6JYbUTNZw1HW04vSzQtG8hWUgd+sqdEnd15JWd bfdr34h5S4SFEsczPjdbyg3roX6WheU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694033649; x=1725569649; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=VqeF0aeYObOh3hd+HV3wpbgpW4Kt9ciCv6dvaF8ZXEw=; b=md6NdBtY8PNuUErFNalNAB2ut4Z26i4jdVYBeY3FNwfCIXOz/f1tAqxD l6/yhXfvyvb1OVFnWsMRY9HwXuK/lyehQQA36ABDL8HOUs/QRijIZlT64 Yjl23AqRUh2mJYsL6filb3aUUSJjmYGddfq3wg3waKSI7MlZPsaOYLRJt ry/2BfxRuLlVcsdWE7nC6YHIIUZE2jUUdoaxVpQeBs3UTWFRCNo5C1f4b rZu2HBtq8wHamUXX8xolIYG07LWcH2OYjNCMFJNuDoRQ3Kgu+XdpOf0hz +OAEkf3gcYfyooR9qSn7EKRjVqNcI2AE6nFUDA7RincK5JZa1qDnbRQwK w==; X-IronPort-AV: E=McAfee;i="6600,9927,10825"; a="374574270" X-IronPort-AV: E=Sophos;i="6.02,233,1688454000"; d="scan'208";a="374574270" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2023 13:54:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10825"; a="915430165" X-IronPort-AV: E=Sophos;i="6.02,233,1688454000"; d="scan'208";a="915430165" Received: from lkp-server01.sh.intel.com (HELO 59b3c6e06877) ([10.239.97.150]) by orsmga005.jf.intel.com with ESMTP; 06 Sep 2023 13:54:02 -0700 Received: from kbuild by 59b3c6e06877 with local (Exim 4.96) (envelope-from ) id 1qdzXE-0000Zn-1e; Wed, 06 Sep 2023 20:54:00 +0000 Date: Thu, 7 Sep 2023 04:53:20 +0800 From: kernel test robot To: Peter Xu , linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Anish Moorthy , Axel Rasmussen , Alexander Viro , Mike Kravetz , Peter Zijlstra , Andrew Morton , Linux Memory Management List , Mike Rapoport , Christian Brauner , peterx@redhat.com, linux-fsdevel@vger.kernel.org, Andrea Arcangeli , Ingo Molnar , James Houghton , Nadav Amit Subject: Re: [PATCH 2/7] poll: Add a poll_flags for poll_queue_proc() Message-ID: <202309070440.eKzBcg8X-lkp@intel.com> References: <20230905214235.320571-3-peterx@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230905214235.320571-3-peterx@redhat.com> X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: AB04D1C0010 X-Stat-Signature: jebhxrumj45ad8uw1atsk8b81hh1ugin X-HE-Tag: 1694033649-752419 X-HE-Meta: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E/xQDqoSYEkihXq16UYLuc6FS83ZnKHz/K2ltpnbCH1wUJcVofQYByIPlEgzkzp3E7hZM6XfNULzSrbpKKOdQrvGkZySqN9KZpuJeHAsVnDYe+Ti0YzkneSY5yXlREXEB8929jw5GqMINmGORM4/ze2xgW7Tz8gfiEvtV32+33OQ/aMF0cH1/T3lpLfWXKeJsZFzajthLjFwdBpu8QqQPR/BuKsE7oAT1kvvfOhrjgMynXiAXOQFSgZgXcUP2G9a8xPf+IuyB/4wwTU9ajYm9N/3ofxkIUBgflpHHMtu43K3BBr1svdcXYkcPA7uEfHY4fHdC9D7YI2X2WVXOesZbGQ9u28P4wgqifigoZtLbAn X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Peter, kernel test robot noticed the following build errors: [auto build test ERROR on akpm-mm/mm-everything] url: https://github.com/intel-lab-lkp/linux/commits/Peter-Xu/mm-userfaultfd-Make-uffd-read-wait-event-exclusive/20230906-054430 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything patch link: https://lore.kernel.org/r/20230905214235.320571-3-peterx%40redhat.com patch subject: [PATCH 2/7] poll: Add a poll_flags for poll_queue_proc() config: hexagon-randconfig-002-20230906 (https://download.01.org/0day-ci/archive/20230907/202309070440.eKzBcg8X-lkp@intel.com/config) compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230907/202309070440.eKzBcg8X-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202309070440.eKzBcg8X-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from drivers/vhost/vhost.c:14: In file included from include/uapi/linux/vhost.h:14: In file included from include/uapi/linux/vhost_types.h:16: In file included from include/linux/virtio_config.h:7: In file included from include/linux/virtio.h:7: In file included from include/linux/scatterlist.h:9: In file included from arch/hexagon/include/asm/io.h:337: include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __raw_readb(PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu' #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) ^ In file included from drivers/vhost/vhost.c:14: In file included from include/uapi/linux/vhost.h:14: In file included from include/uapi/linux/vhost_types.h:16: In file included from include/linux/virtio_config.h:7: In file included from include/linux/virtio.h:7: In file included from include/linux/scatterlist.h:9: In file included from arch/hexagon/include/asm/io.h:337: include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) ^ In file included from drivers/vhost/vhost.c:14: In file included from include/uapi/linux/vhost.h:14: In file included from include/uapi/linux/vhost_types.h:16: In file included from include/linux/virtio_config.h:7: In file included from include/linux/virtio.h:7: In file included from include/linux/scatterlist.h:9: In file included from arch/hexagon/include/asm/io.h:337: include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writeb(value, PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ >> drivers/vhost/vhost.c:193:41: error: incompatible function pointer types passing 'int (wait_queue_entry_t *, unsigned int, int, void *, poll_flags)' (aka 'int (struct wait_queue_entry *, unsigned int, int, void *, unsigned int)') to parameter of type 'wait_queue_func_t' (aka 'int (*)(struct wait_queue_entry *, unsigned int, int, void *)') [-Werror,-Wincompatible-function-pointer-types] init_waitqueue_func_entry(&poll->wait, vhost_poll_wakeup); ^~~~~~~~~~~~~~~~~ include/linux/wait.h:90:80: note: passing argument to parameter 'func' here init_waitqueue_func_entry(struct wait_queue_entry *wq_entry, wait_queue_func_t func) ^ >> drivers/vhost/vhost.c:194:34: error: incompatible function pointer types passing 'void (struct file *, wait_queue_head_t *, poll_table *)' (aka 'void (struct file *, struct wait_queue_head *, struct poll_table_struct *)') to parameter of type 'poll_queue_proc' (aka 'void (*)(struct file *, struct wait_queue_head *, struct poll_table_struct *, unsigned int)') [-Werror,-Wincompatible-function-pointer-types] init_poll_funcptr(&poll->table, vhost_poll_func); ^~~~~~~~~~~~~~~ include/linux/poll.h:76:70: note: passing argument to parameter 'qproc' here static inline void init_poll_funcptr(poll_table *pt, poll_queue_proc qproc) ^ >> drivers/vhost/vhost.c:215:57: error: too few arguments to function call, expected 5, have 4 vhost_poll_wakeup(&poll->wait, 0, 0, poll_to_key(mask)); ~~~~~~~~~~~~~~~~~ ^ drivers/vhost/vhost.c:164:12: note: 'vhost_poll_wakeup' declared here static int vhost_poll_wakeup(wait_queue_entry_t *wait, unsigned mode, int sync, ^ 6 warnings and 3 errors generated. vim +193 drivers/vhost/vhost.c 87d6a412bd1ed8 Michael S. Tsirkin 2010-09-02 187 3a4d5c94e95935 Michael S. Tsirkin 2010-01-14 188 /* Init poll structure */ c23f3445e68e1d Tejun Heo 2010-06-02 189 void vhost_poll_init(struct vhost_poll *poll, vhost_work_fn_t fn, 493b94bf5ae0f6 Mike Christie 2023-06-26 190 __poll_t mask, struct vhost_dev *dev, 493b94bf5ae0f6 Mike Christie 2023-06-26 191 struct vhost_virtqueue *vq) 3a4d5c94e95935 Michael S. Tsirkin 2010-01-14 192 { 3a4d5c94e95935 Michael S. Tsirkin 2010-01-14 @193 init_waitqueue_func_entry(&poll->wait, vhost_poll_wakeup); 3a4d5c94e95935 Michael S. Tsirkin 2010-01-14 @194 init_poll_funcptr(&poll->table, vhost_poll_func); 3a4d5c94e95935 Michael S. Tsirkin 2010-01-14 195 poll->mask = mask; c23f3445e68e1d Tejun Heo 2010-06-02 196 poll->dev = dev; 2b8b328b61c799 Jason Wang 2013-01-28 197 poll->wqh = NULL; 493b94bf5ae0f6 Mike Christie 2023-06-26 198 poll->vq = vq; c23f3445e68e1d Tejun Heo 2010-06-02 199 87d6a412bd1ed8 Michael S. Tsirkin 2010-09-02 200 vhost_work_init(&poll->work, fn); 3a4d5c94e95935 Michael S. Tsirkin 2010-01-14 201 } 6ac1afbf6132df Asias He 2013-05-06 202 EXPORT_SYMBOL_GPL(vhost_poll_init); 3a4d5c94e95935 Michael S. Tsirkin 2010-01-14 203 3a4d5c94e95935 Michael S. Tsirkin 2010-01-14 204 /* Start polling a file. We add ourselves to file's wait queue. The caller must 3a4d5c94e95935 Michael S. Tsirkin 2010-01-14 205 * keep a reference to a file until after vhost_poll_stop is called. */ 2b8b328b61c799 Jason Wang 2013-01-28 206 int vhost_poll_start(struct vhost_poll *poll, struct file *file) 3a4d5c94e95935 Michael S. Tsirkin 2010-01-14 207 { e6c8adca20ba45 Al Viro 2017-07-03 208 __poll_t mask; d47effe1be0c4f Krishna Kumar 2011-03-01 209 70181d51209cbc Jason Wang 2013-04-10 210 if (poll->wqh) 70181d51209cbc Jason Wang 2013-04-10 211 return 0; 70181d51209cbc Jason Wang 2013-04-10 212 9965ed174e7d38 Christoph Hellwig 2018-03-05 213 mask = vfs_poll(file, &poll->table); 3a4d5c94e95935 Michael S. Tsirkin 2010-01-14 214 if (mask) 3ad6f93e98d6df Al Viro 2017-07-03 @215 vhost_poll_wakeup(&poll->wait, 0, 0, poll_to_key(mask)); a9a08845e9acbd Linus Torvalds 2018-02-11 216 if (mask & EPOLLERR) { dc6455a71c7fc5 Jason Wang 2018-03-27 217 vhost_poll_stop(poll); 896fc242bc1d26 Yunsheng Lin 2019-08-20 218 return -EINVAL; 2b8b328b61c799 Jason Wang 2013-01-28 219 } 2b8b328b61c799 Jason Wang 2013-01-28 220 896fc242bc1d26 Yunsheng Lin 2019-08-20 221 return 0; 3a4d5c94e95935 Michael S. Tsirkin 2010-01-14 222 } 6ac1afbf6132df Asias He 2013-05-06 223 EXPORT_SYMBOL_GPL(vhost_poll_start); 3a4d5c94e95935 Michael S. Tsirkin 2010-01-14 224 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki