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 90710C4828D for ; Tue, 6 Feb 2024 11:46:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 085B16B0071; Tue, 6 Feb 2024 06:46:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 00ECD6B0072; Tue, 6 Feb 2024 06:46:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DCBC36B0074; Tue, 6 Feb 2024 06:46:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id C6A696B0071 for ; Tue, 6 Feb 2024 06:46:07 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 9B089A1761 for ; Tue, 6 Feb 2024 11:46:07 +0000 (UTC) X-FDA: 81761200374.19.570C6EF Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by imf09.hostedemail.com (Postfix) with ESMTP id 52EF914002A for ; Tue, 6 Feb 2024 11:46:04 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=SMeEIKZJ; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf09.hostedemail.com: domain of lkp@intel.com designates 198.175.65.20 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=1707219965; 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: references:dkim-signature; bh=rkx5xfNXAqTe8N/SJPmGYUbQa6yIOh9uz5gx2I6bSck=; b=vKvFZHH1irG/swrLA6US9KTQsAs7TZmpDz668MrlwO7Y3X48TYx7R0+Yxdi088V9l07bYw T5c3Y4zwqPQzRUNwaqIUOrxzWPzjDfY6zPDhBftp6u408leQCINM3tkim40q6+oCM66+mC +JGXrkeasreNVXdgmZtAYjDw/X6UoQ4= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=SMeEIKZJ; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf09.hostedemail.com: domain of lkp@intel.com designates 198.175.65.20 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1707219965; a=rsa-sha256; cv=none; b=oU0H2hmRCFefkNNfqi8dHGxYwCGYl1Ksoe9NuY6yvvatWXoK0OgBkMzi9lWC+iXFv/nx0a JZKhSmzisBtZffUQdbt3A+E9quTmiD/CCaTqbbv9NY6G52ZJ/qYnreMEzZjXfZopPUoilZ wPB+oZotvEKkB3pfvMzRs3RIrfmdzcc= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707219965; x=1738755965; h=date:from:to:cc:subject:message-id:mime-version; bh=VuXg/EM8vRRBIDF9k++uopiFTMoSprRFp8Cb5yjHjgc=; b=SMeEIKZJIcYPrumZrgvmy8ugurhJnHvfwMgnpLyMrunettlPMf+VGlm9 D2KSnLtSyi0q0n029xGJb6eUrMZx3UahZDG2Lo3iZFidofDR4pZ60aMhB uttWRzP5e23FNIFhjC0+vg946nCvS0u3pH6MBsP3QQqCXAPOBIRDxsmPf V8938SOpxOcyHTHMPj+L4xOsEECynjaY+eBFEPiwZ+PO/w/92d7QaY2OP uho7TjNG+5/yPaEMhrrJ0MTGouycR4LrsBU29kypa0anqNhOYWn5yG5Zm 8iygb9OqOV0PQeEBxNWvxGPjbA1sQifXIW5ofnrAUIIOP7JR+ht8oCxxt Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10975"; a="630375" X-IronPort-AV: E=Sophos;i="6.05,247,1701158400"; d="scan'208";a="630375" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2024 03:46:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,247,1701158400"; d="scan'208";a="998458" Received: from lkp-server01.sh.intel.com (HELO 01f0647817ea) ([10.239.97.150]) by fmviesa010.fm.intel.com with ESMTP; 06 Feb 2024 03:46:01 -0800 Received: from kbuild by 01f0647817ea with local (Exim 4.96) (envelope-from ) id 1rXJtm-0001KS-39; Tue, 06 Feb 2024 11:45:58 +0000 Date: Tue, 6 Feb 2024 19:45:10 +0800 From: kernel test robot To: Wang Jianjian Cc: oe-kbuild-all@lists.linux.dev, Linux Memory Management List , Jan Kara Subject: [linux-next:master 4146/4465] fs/quota/dquot.c:1699:25: sparse: sparse: incompatible types in comparison expression (different address spaces): Message-ID: <202402061900.rTuYDlo6-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspam-User: X-Stat-Signature: op5h4xebzzzhzgn86ku4qwu753erxpoc X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 52EF914002A X-HE-Tag: 1707219964-556030 X-HE-Meta: U2FsdGVkX1+ceZyKi9fVta593jLUQ6UFpSiLu8cMut4Qe+IbbgULrB/PscFeAy+APmxj56bUoj1qXEKyr90OdIeG8IWPfuQJVMAa7/pGMOQ/BxppR9pXwUMaZHL+/aZcemse3zOQKkYNfreM9LXrpy/3/Lr3cMp7NNhcKDip/3gZk7Xmuvtn8y1BiP/aA/FHN3OsFgrKBXqH5IaXlyyb5FUfPMp9QkbBj7xDpfvfbzX/ZARyyZguO6FH8hXbDpercZOhNf8gks1khpcq0cGueyKF4fLfkIf2lfYZ6xuP6euGIKz5okY40txlTI+NC61Jlt4LnqJF93lCwOc8vn5L/14G1ltgLNdafZrdrSr9oH5Ys1ek1GYmeWtFK1vlfT86LZV3WE7O4D5yOembze0Nxfxa7DVqU1/OEVN2Rg95udntL+Yvb0yTcgSaH4vPq3yVPazQg0WIchGpUasD68cCHJF9XyDChXhHTNIm5W9bFY8zRuBGFb0dktswPjffe1hfBniAFRLe7aGtg/Ec9Os6oB82PPClnsZOKqysFBkEOqhA9/Vjin7zxFrEBFRR/BILALNcA56CtVaWysrT6wRSIt77xiG2rl5IoRtXGuvC09CawA3lYP0rvFdHUiblIXphLd6MwebAq26B6wpYfZ/WYT5cUvk3VE7zyN5THkCxnaY0TCDkoaC5uJCoM3XqYBt1h1lQQLn9MMgbOnOjUZPSk9SBgXcVNUx7ksZGDLenPTHeKNJusW2jOP3Bw4tMma6SJDNwuFUNTCXxA19X0Mfw99rVpnv/K1mAP9jX1DiOtgu4G0G0fmpmY3hMU+U5AqUeTaxWC6cMYAg+4T09eeIHV+dGa3i4o5Z3Mha042owP62FMacCK9Mr5RaixmAW77b/+SVeg0KjRhHVlgugQzFuXLvsIIHs4SSFHrlxDWRwPT84I/2S5BX/z6LTQfgQrmVkj80SSg5xwXErnXPeppO SkbBMXcf JxrQx3XvNzUlfNKvZN4E3bnPRaL6XDiIKnSQjeTlEhp31fEJEfSsuiFAY21mlWJsx6E3RlztTFmScUXqFRtTR3ECT8DY2UD5aqV/y3GXwJNtF26FeijOISw55LmL7K3l0Ns19vvVue6S3kA+MA9qpvEq6O1ZaMpalfmGUGuLlxZCw8x0DJAGLghFTV+0rznsXq9asm5s786O66FWZWD35o0wAk9flQ7dne8C7XIUfY53IxQD/ldaz8ZbrFDfd+FVYogJPi9LigTENFHB4xsm9tZup059tL3c7O4+mklHmgjoUCWT7kvrw3x4q3A== 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: List-Subscribe: List-Unsubscribe: tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: ac139fc7db67968e5061715508b5fc4aa7c40c56 commit: d0aa72604fbd80c8aabb46eda00535ed35570f1f [4146/4465] quota: Fix potential NULL pointer dereference config: x86_64-randconfig-122-20240206 (https://download.01.org/0day-ci/archive/20240206/202402061900.rTuYDlo6-lkp@intel.com/config) compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240206/202402061900.rTuYDlo6-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/202402061900.rTuYDlo6-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> fs/quota/dquot.c:1699:25: sparse: sparse: incompatible types in comparison expression (different address spaces): fs/quota/dquot.c:1699:25: sparse: struct dquot [noderef] __rcu * fs/quota/dquot.c:1699:25: sparse: struct dquot * fs/quota/dquot.c:1710:41: sparse: sparse: incompatible types in comparison expression (different address spaces): fs/quota/dquot.c:1710:41: sparse: struct dquot [noderef] __rcu * fs/quota/dquot.c:1710:41: sparse: struct dquot * fs/quota/dquot.c:1760:25: sparse: sparse: incompatible types in comparison expression (different address spaces): fs/quota/dquot.c:1760:25: sparse: struct dquot [noderef] __rcu * fs/quota/dquot.c:1760:25: sparse: struct dquot * fs/quota/dquot.c:1766:41: sparse: sparse: incompatible types in comparison expression (different address spaces): fs/quota/dquot.c:1766:41: sparse: struct dquot [noderef] __rcu * fs/quota/dquot.c:1766:41: sparse: struct dquot * fs/quota/dquot.c:1810:25: sparse: sparse: incompatible types in comparison expression (different address spaces): fs/quota/dquot.c:1810:25: sparse: struct dquot [noderef] __rcu * fs/quota/dquot.c:1810:25: sparse: struct dquot * fs/quota/dquot.c:1852:25: sparse: sparse: incompatible types in comparison expression (different address spaces): fs/quota/dquot.c:1852:25: sparse: struct dquot [noderef] __rcu * fs/quota/dquot.c:1852:25: sparse: struct dquot * fs/quota/dquot.c:1901:25: sparse: sparse: incompatible types in comparison expression (different address spaces): fs/quota/dquot.c:1901:25: sparse: struct dquot [noderef] __rcu * fs/quota/dquot.c:1901:25: sparse: struct dquot * fs/quota/dquot.c:1949:25: sparse: sparse: incompatible types in comparison expression (different address spaces): fs/quota/dquot.c:1949:25: sparse: struct dquot [noderef] __rcu * fs/quota/dquot.c:1949:25: sparse: struct dquot * fs/quota/dquot.c: note: in included file (through include/linux/wait.h, include/linux/wait_bit.h, include/linux/fs.h): include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true fs/quota/dquot.c:409:25: sparse: sparse: incompatible types in comparison expression (different address spaces): fs/quota/dquot.c:409:25: sparse: struct dquot [noderef] __rcu * fs/quota/dquot.c:409:25: sparse: struct dquot * fs/quota/dquot.c:409:25: sparse: sparse: incompatible types in comparison expression (different address spaces): fs/quota/dquot.c:409:25: sparse: struct dquot [noderef] __rcu * fs/quota/dquot.c:409:25: sparse: struct dquot * fs/quota/dquot.c:409:25: sparse: sparse: incompatible types in comparison expression (different address spaces): fs/quota/dquot.c:409:25: sparse: struct dquot [noderef] __rcu * fs/quota/dquot.c:409:25: sparse: struct dquot * fs/quota/dquot.c:409:25: sparse: sparse: incompatible types in comparison expression (different address spaces): fs/quota/dquot.c:409:25: sparse: struct dquot [noderef] __rcu * fs/quota/dquot.c:409:25: sparse: struct dquot * fs/quota/dquot.c:409:25: sparse: sparse: incompatible types in comparison expression (different address spaces): fs/quota/dquot.c:409:25: sparse: struct dquot [noderef] __rcu * fs/quota/dquot.c:409:25: sparse: struct dquot * fs/quota/dquot.c:409:25: sparse: sparse: incompatible types in comparison expression (different address spaces): fs/quota/dquot.c:409:25: sparse: struct dquot [noderef] __rcu * fs/quota/dquot.c:409:25: sparse: struct dquot * fs/quota/dquot.c:409:25: sparse: sparse: incompatible types in comparison expression (different address spaces): fs/quota/dquot.c:409:25: sparse: struct dquot [noderef] __rcu * fs/quota/dquot.c:409:25: sparse: struct dquot * fs/quota/dquot.c:409:25: sparse: sparse: incompatible types in comparison expression (different address spaces): fs/quota/dquot.c:409:25: sparse: struct dquot [noderef] __rcu * fs/quota/dquot.c:409:25: sparse: struct dquot * vim +1699 fs/quota/dquot.c 1659 1660 /* 1661 * This functions updates i_blocks+i_bytes fields and quota information 1662 * (together with appropriate checks). 1663 * 1664 * NOTE: We absolutely rely on the fact that caller dirties the inode 1665 * (usually helpers in quotaops.h care about this) and holds a handle for 1666 * the current transaction so that dquot write and inode write go into the 1667 * same transaction. 1668 */ 1669 1670 /* 1671 * This operation can block, but only after everything is updated 1672 */ 1673 int __dquot_alloc_space(struct inode *inode, qsize_t number, int flags) 1674 { 1675 int cnt, ret = 0, index; 1676 struct dquot_warn warn[MAXQUOTAS]; 1677 int reserve = flags & DQUOT_SPACE_RESERVE; 1678 struct dquot **dquots; 1679 struct dquot *dquot; 1680 1681 if (!inode_quota_active(inode)) { 1682 if (reserve) { 1683 spin_lock(&inode->i_lock); 1684 *inode_reserved_space(inode) += number; 1685 spin_unlock(&inode->i_lock); 1686 } else { 1687 inode_add_bytes(inode, number); 1688 } 1689 goto out; 1690 } 1691 1692 for (cnt = 0; cnt < MAXQUOTAS; cnt++) 1693 warn[cnt].w_type = QUOTA_NL_NOWARN; 1694 1695 dquots = i_dquot(inode); 1696 index = srcu_read_lock(&dquot_srcu); 1697 spin_lock(&inode->i_lock); 1698 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { > 1699 dquot = srcu_dereference(dquots[cnt], &dquot_srcu); 1700 if (!dquot) 1701 continue; 1702 if (reserve) { 1703 ret = dquot_add_space(dquot, 0, number, flags, &warn[cnt]); 1704 } else { 1705 ret = dquot_add_space(dquot, number, 0, flags, &warn[cnt]); 1706 } 1707 if (ret) { 1708 /* Back out changes we already did */ 1709 for (cnt--; cnt >= 0; cnt--) { 1710 dquot = srcu_dereference(dquots[cnt], &dquot_srcu); 1711 if (!dquot) 1712 continue; 1713 spin_lock(&dquot->dq_dqb_lock); 1714 if (reserve) 1715 dquot_free_reserved_space(dquot, number); 1716 else 1717 dquot_decr_space(dquot, number); 1718 spin_unlock(&dquot->dq_dqb_lock); 1719 } 1720 spin_unlock(&inode->i_lock); 1721 goto out_flush_warn; 1722 } 1723 } 1724 if (reserve) 1725 *inode_reserved_space(inode) += number; 1726 else 1727 __inode_add_bytes(inode, number); 1728 spin_unlock(&inode->i_lock); 1729 1730 if (reserve) 1731 goto out_flush_warn; 1732 mark_all_dquot_dirty(dquots); 1733 out_flush_warn: 1734 srcu_read_unlock(&dquot_srcu, index); 1735 flush_warnings(warn); 1736 out: 1737 return ret; 1738 } 1739 EXPORT_SYMBOL(__dquot_alloc_space); 1740 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki