All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kyle Zeng <kylebot@openai.com>
Cc: oe-kbuild-all@lists.linux.dev, Jan Kara <jack@suse.cz>
Subject: [jack-fs:for_next 1/4] fs/udf/inode.c:2302:44: error: 'sbi' undeclared
Date: Thu, 09 Jul 2026 01:51:25 +0800	[thread overview]
Message-ID: <202607090123.R8ME5MFP-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs.git for_next
head:   b0961edc5667d36af3667a2ff07c4804dadecf99
commit: 107eb175cbc8115811b223f7ea63ca6afa607fe3 [1/4] udf: validate extent partition references in udf_current_aext()
config: nios2-allmodconfig (https://download.01.org/0day-ci/archive/20260709/202607090123.R8ME5MFP-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260709/202607090123.R8ME5MFP-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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202607090123.R8ME5MFP-lkp@intel.com/

All errors (new ones prefixed by >>):

   fs/udf/inode.c: In function 'udf_current_aext':
>> fs/udf/inode.c:2302:44: error: 'sbi' undeclared (first use in this function)
    2302 |         if (eloc->partitionReferenceNum >= sbi->s_partitions) {
         |                                            ^~~
   fs/udf/inode.c:2302:44: note: each undeclared identifier is reported only once for each function it appears in


vim +/sbi +2302 fs/udf/inode.c

  2241	
  2242	/*
  2243	 * Returns 1 on success, -errno on error, 0 on hit EOF.
  2244	 */
  2245	int udf_current_aext(struct inode *inode, struct extent_position *epos,
  2246			     struct kernel_lb_addr *eloc, uint32_t *elen, int8_t *etype,
  2247			     int inc)
  2248	{
  2249		int alen;
  2250		uint8_t *ptr;
  2251		struct short_ad *sad;
  2252		struct long_ad *lad;
  2253		struct udf_inode_info *iinfo = UDF_I(inode);
  2254	
  2255		if (!epos->bh) {
  2256			if (!epos->offset)
  2257				epos->offset = udf_file_entry_alloc_offset(inode);
  2258			ptr = iinfo->i_data + epos->offset -
  2259				udf_file_entry_alloc_offset(inode) +
  2260				iinfo->i_lenEAttr;
  2261			alen = udf_file_entry_alloc_offset(inode) +
  2262								iinfo->i_lenAlloc;
  2263		} else {
  2264			struct allocExtDesc *header =
  2265				(struct allocExtDesc *)epos->bh->b_data;
  2266	
  2267			if (!epos->offset)
  2268				epos->offset = sizeof(struct allocExtDesc);
  2269			ptr = epos->bh->b_data + epos->offset;
  2270			if (check_add_overflow(sizeof(struct allocExtDesc),
  2271					le32_to_cpu(header->lengthAllocDescs), &alen))
  2272				return -1;
  2273	
  2274			if (alen > epos->bh->b_size)
  2275				return -1;
  2276		}
  2277	
  2278		switch (iinfo->i_alloc_type) {
  2279		case ICBTAG_FLAG_AD_SHORT:
  2280			sad = udf_get_fileshortad(ptr, alen, &epos->offset, inc);
  2281			if (!sad)
  2282				return 0;
  2283			*etype = le32_to_cpu(sad->extLength) >> 30;
  2284			eloc->logicalBlockNum = le32_to_cpu(sad->extPosition);
  2285			eloc->partitionReferenceNum =
  2286					iinfo->i_location.partitionReferenceNum;
  2287			*elen = le32_to_cpu(sad->extLength) & UDF_EXTENT_LENGTH_MASK;
  2288			break;
  2289		case ICBTAG_FLAG_AD_LONG:
  2290			lad = udf_get_filelongad(ptr, alen, &epos->offset, inc);
  2291			if (!lad)
  2292				return 0;
  2293			*etype = le32_to_cpu(lad->extLength) >> 30;
  2294			*eloc = lelb_to_cpu(lad->extLocation);
  2295			*elen = le32_to_cpu(lad->extLength) & UDF_EXTENT_LENGTH_MASK;
  2296			break;
  2297		default:
  2298			udf_debug("alloc_type = %u unsupported\n", iinfo->i_alloc_type);
  2299			return -EINVAL;
  2300		}
  2301	
> 2302		if (eloc->partitionReferenceNum >= sbi->s_partitions) {
  2303			udf_debug("invalid partition reference %u (partitions %u)\n",
  2304				  eloc->partitionReferenceNum, sbi->s_partitions);
  2305			return -EFSCORRUPTED;
  2306		}
  2307	
  2308		return 1;
  2309	}
  2310	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2026-07-08 17:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202607090123.R8ME5MFP-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=jack@suse.cz \
    --cc=kylebot@openai.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.