* [jack-fs:for_next 1/4] fs/udf/inode.c:2302:44: error: 'sbi' undeclared
@ 2026-07-08 17:51 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-07-08 17:51 UTC (permalink / raw)
To: Kyle Zeng; +Cc: oe-kbuild-all, Jan Kara
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-08 17:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-08 17:51 [jack-fs:for_next 1/4] fs/udf/inode.c:2302:44: error: 'sbi' undeclared kernel test robot
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.