From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=192.198.163.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796298309; b=jPT8zZcnNcStANP2a1bl3dFGagHRFRwvarbB3g2lcBkE08a71S6P3FZd4GHh7xRESpfZ 5HWFULFziUvmoPO3Aq2TCX9nnlX1LJfEGIrvyJvoBH/NJ6oUgq6wyIOqusndcN9w2kHP5 +69TKwRy1cENFHXI/MRJdAxMbnLDxh7vgL3dHKr6neMPmPxTRsHjO0+cELMeXenYrONK3 nIKe9TylIjpS92kI+Og+EsFqcCWBqgT2tZHy5MXwpJocqI5rGFrAwdgwYbpv9G/fVJfLY sadZV6vUBcli7B40OXqo8g+NzFGpR+izB0msJgO/0tVZ6LG6DdXSSTZtT7AtNsz/hgw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796298309; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Received:Date:From:To: Cc:Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; bh=E01a3bzqi6ZZMNEnKTyhH5d3UjvL067DiZs6+DF4pZ8=; b=h5vs6AHa+AJFTByT3Y/UXnqxuZi59dEWChgWd4BpxOfiBn0TMt3b5x0adzd3anH53kod aX4N/sBKs4vpH5UkF9sTE9+7QAxdq7mhfWdUkOy/r4QmkK/DxRNYHGi6u/Ga8y/ltO+jv RWt0tjOREUFc6ze0T90OQLw+JAD0+rTDCtqrh2CYwUE2r/7JtNzBdGDNv63Fzvh52Z+An K818OakpOPvxn91OsNDC3h7wTBbIdCD1goKcJFtaqjD48Y2dMbf+HwWbVLJNh2CDTnXvv qOU3kfptClbG9EauwYBkDJ5CPvX89BvW/J/gcNG+11zbYb3lK+bl7++xhK/QTw+Xqhw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=SoqF99So; arc=none smtp.remote-ip=192.198.163.18 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E86F8606A338; Thu, 3 Dec 2026 11:45:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E86F8606A338 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=SoqF99So DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796298310; x=1827834310; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=E01a3bzqi6ZZMNEnKTyhH5d3UjvL067DiZs6+DF4pZ8=; b=SoqF99SofU/48pvOAp1AWSOvl5Pa5YIa+I8m3vYk3HQl28bh+0iq47DL CxlnI+K4+I1bKyOkXpvrL1xi7n9z0/6ywbWXM2k4rfT13YkblI/lMJ6/1 XTG40i17BZs3CowJGHJXMe5F2tGDkYMoWTCPRv1yFwIbcahvPwqQmDJjI O5sj+I9R8XFt2kFfeTpzQ9azVfQcen9VETEdHuHOJ0Us/PefBXpD7KLXC uae1Ssvct7KcFOEsRLfv9QTqJZMedErIrWdnxjIgwFSNl+JW3bxkNaFfq xUCyagq/R3uuUMo8PIkAS243F+k1hgSAz5/ePPaI0DsfbmeBHErBLy193 A==; X-CSE-ConnectionGUID: W++3Fih6T+uzTUbZhyJSxg== X-CSE-MsgGUID: 5eciQpJmTkGb2ChPzvKE5g== X-IronPort-AV: E=McAfee;i="6800,10657,11984"; a="5264697" X-IronPort-AV: E=Sophos;i="6.27,248,1787036400"; d="scan'208";a="5264697" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 03:41:21 -0800 X-CSE-ConnectionGUID: vL4ahQmaQbOcSXfFJ0J60Q== X-CSE-MsgGUID: qSH6JiaaQG6SRkGB93f2GA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,248,1787036400"; d="scan'208";a="13608397" Received: from lkp-server01.sh.intel.com (HELO 0caa9d2d175c) ([10.239.97.150]) by orviesa005.jf.intel.com with ESMTP; 03 Dec 2026 03:41:17 -0800 Received: from kbuild by 0caa9d2d175c with local (Exim 4.98.2) (envelope-from ) id 1xZ5BZ-00000001hWx-2slY; Thu, 03 Dec 2026 11:41:13 +0000 Date: Thu, 3 Dec 2026 19:40:35 +0800 From: kernel test robot To: Shuai Liu <847807867@qq.com>, linux-ext4@vger.kernel.org Cc: oe-kbuild-all@lists.linux.dev, tytso@mit.edu, jack@suse.cz, adilger.kernel@dilger.ca, libaokun@linux.alibaba.com, ojaswin@linux.ibm.com, ritesh.list@gmail.com, yi.zhang@huawei.com, djwong@kernel.org, zhaimingbing@cmss.chinamobile.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, syzbot+68178aa1e39c8606392e@syzkaller.appspotmail.com, Shuai Liu <847807867@qq.com> Subject: Re: [PATCH v3] ext4: fix NULL s_encoding after runtime tune_sb enables casefold Message-ID: <20261203190908.N2uDMQlX-lkp@intel.com> References: X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hi Shuai, kernel test robot noticed the following build errors: [auto build test ERROR on tytso-ext4/dev] [also build test ERROR on linus/master v7.4-rc5 next-20261202] [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/Shuai-Liu/ext4-fix-NULL-s_encoding-after-runtime-tune_sb-enables-casefold/20261203-093038 base: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev patch link: https://lore.kernel.org/r/tencent_F27193C546272ADCA5A46D593AE4139ABE09%40qq.com patch subject: [PATCH v3] ext4: fix NULL s_encoding after runtime tune_sb enables casefold config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20261203/20261203190908.N2uDMQlX-lkp@intel.com/config) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261203/20261203190908.N2uDMQlX-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/20261203190908.N2uDMQlX-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from : fs/ext4/ioctl.c: In function 'ext4_ioctl_set_tune_sb': >> fs/ext4/ioctl.c:1566:47: error: 'struct super_block' has no member named 's_encoding' 1566 | if (enabling_casefold && !READ_ONCE(sb->s_encoding)) { | ^~ include/linux/compiler_types.h:682:23: note: in definition of macro '__compiletime_assert' 682 | if (!(condition)) \ | ^~~~~~~~~ include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert' 702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~ include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type' 49 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/ext4/ioctl.c:1566:35: note: in expansion of macro 'READ_ONCE' 1566 | if (enabling_casefold && !READ_ONCE(sb->s_encoding)) { | ^~~~~~~~~ >> fs/ext4/ioctl.c:1566:47: error: 'struct super_block' has no member named 's_encoding' 1566 | if (enabling_casefold && !READ_ONCE(sb->s_encoding)) { | ^~ include/linux/compiler_types.h:682:23: note: in definition of macro '__compiletime_assert' 682 | if (!(condition)) \ | ^~~~~~~~~ include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert' 702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~ include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type' 49 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/ext4/ioctl.c:1566:35: note: in expansion of macro 'READ_ONCE' 1566 | if (enabling_casefold && !READ_ONCE(sb->s_encoding)) { | ^~~~~~~~~ >> fs/ext4/ioctl.c:1566:47: error: 'struct super_block' has no member named 's_encoding' 1566 | if (enabling_casefold && !READ_ONCE(sb->s_encoding)) { | ^~ include/linux/compiler_types.h:682:23: note: in definition of macro '__compiletime_assert' 682 | if (!(condition)) \ | ^~~~~~~~~ include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert' 702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~ include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type' 49 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/ext4/ioctl.c:1566:35: note: in expansion of macro 'READ_ONCE' 1566 | if (enabling_casefold && !READ_ONCE(sb->s_encoding)) { | ^~~~~~~~~ >> fs/ext4/ioctl.c:1566:47: error: 'struct super_block' has no member named 's_encoding' 1566 | if (enabling_casefold && !READ_ONCE(sb->s_encoding)) { | ^~ include/linux/compiler_types.h:682:23: note: in definition of macro '__compiletime_assert' 682 | if (!(condition)) \ | ^~~~~~~~~ include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert' 702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~ include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type' 49 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/ext4/ioctl.c:1566:35: note: in expansion of macro 'READ_ONCE' 1566 | if (enabling_casefold && !READ_ONCE(sb->s_encoding)) { | ^~~~~~~~~ >> fs/ext4/ioctl.c:1566:47: error: 'struct super_block' has no member named 's_encoding' 1566 | if (enabling_casefold && !READ_ONCE(sb->s_encoding)) { | ^~ include/linux/compiler_types.h:682:23: note: in definition of macro '__compiletime_assert' 682 | if (!(condition)) \ | ^~~~~~~~~ include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert' 702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type' 49 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/ext4/ioctl.c:1566:35: note: in expansion of macro 'READ_ONCE' 1566 | if (enabling_casefold && !READ_ONCE(sb->s_encoding)) { | ^~~~~~~~~ >> fs/ext4/ioctl.c:1566:47: error: 'struct super_block' has no member named 's_encoding' 1566 | if (enabling_casefold && !READ_ONCE(sb->s_encoding)) { | ^~ include/linux/compiler_types.h:635:53: note: in definition of macro '__unqual_scalar_typeof' 635 | #define __unqual_scalar_typeof(x) __typeof_unqual__(x) | ^ include/asm-generic/rwonce.h:50:9: note: in expansion of macro '__READ_ONCE' 50 | __READ_ONCE(x); \ | ^~~~~~~~~~~ fs/ext4/ioctl.c:1566:35: note: in expansion of macro 'READ_ONCE' 1566 | if (enabling_casefold && !READ_ONCE(sb->s_encoding)) { | ^~~~~~~~~ In file included from ./arch/x86/include/generated/asm/rwonce.h:1, from include/linux/compiler.h:394, from include/linux/export.h:5, from include/linux/linkage.h:7, from arch/x86/include/asm/cache.h:5, from include/vdso/cache.h:5, from include/linux/cache.h:6, from include/linux/time.h:5, from include/linux/stat.h:19, from include/linux/fs_dirent.h:5, from include/linux/fs/super_types.h:5, from include/linux/fs/super.h:5, from include/linux/fs.h:5, from fs/ext4/ioctl.c:11: >> fs/ext4/ioctl.c:1566:47: error: 'struct super_block' has no member named 's_encoding' 1566 | if (enabling_casefold && !READ_ONCE(sb->s_encoding)) { | ^~ include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE' 44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) | ^ fs/ext4/ioctl.c:1566:35: note: in expansion of macro 'READ_ONCE' 1566 | if (enabling_casefold && !READ_ONCE(sb->s_encoding)) { | ^~~~~~~~~ vim +1566 fs/ext4/ioctl.c 1536 1537 static int ext4_ioctl_set_tune_sb(struct file *filp, 1538 struct ext4_tune_sb_params __user *in) 1539 { 1540 struct ext4_tune_sb_params params; 1541 struct super_block *sb = file_inode(filp)->i_sb; 1542 struct ext4_sb_info *sbi = EXT4_SB(sb); 1543 int ret; 1544 bool enabling_casefold; 1545 1546 if (!capable(CAP_SYS_ADMIN)) 1547 return -EPERM; 1548 1549 if (copy_from_user(¶ms, in, sizeof(params))) 1550 return -EFAULT; 1551 1552 ret = ext4_validate_tune_sb_params(sb, ¶ms); 1553 if (ret) 1554 return ret; 1555 1556 enabling_casefold = (params.set_flags & EXT4_TUNE_FL_EDIT_FEATURES) && 1557 (params.set_feature_incompat_mask & 1558 EXT4_FEATURE_INCOMPAT_CASEFOLD) && 1559 !ext4_has_feature_casefold(sb); 1560 1561 ret = mnt_want_write_file(filp); 1562 if (ret) 1563 return ret; 1564 1565 /* A failed utf8_load() after commit leaves an unmountable fs. */ > 1566 if (enabling_casefold && !READ_ONCE(sb->s_encoding)) { 1567 ret = ext4_encoding_probe(sb, params.encoding); 1568 if (ret) { 1569 mnt_drop_write_file(filp); 1570 return ret; 1571 } 1572 } 1573 1574 ret = ext4_update_superblocks_fn(sb, ext4_sb_setparams, ¶ms); 1575 1576 /* Serialise concurrent callers: only one unicode_map may load. */ 1577 if (ret == 0 && enabling_casefold) { 1578 static DEFINE_MUTEX(casefold_enable_lock); 1579 1580 mutex_lock(&casefold_enable_lock); 1581 ret = ext4_encoding_init(sb, sbi->s_es); 1582 mutex_unlock(&casefold_enable_lock); 1583 if (ret) 1584 ext4_msg(sb, KERN_ERR, 1585 "runtime tune_sb: encoding_init failed (%d)", 1586 ret); 1587 } 1588 1589 mnt_drop_write_file(filp); 1590 1591 if (params.set_flags & EXT4_TUNE_FL_DEF_HASH_ALG) 1592 sbi->s_def_hash_version = params.def_hash_alg; 1593 1594 return ret; 1595 } 1596 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki