Coverity: iopt_map_user_pages(): Memory - illegal accesses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

This is an experimental semi-automated report about issues detected by
Coverity from a scan of next-20221102 as part of the linux-next scan project:
https://scan.coverity.com/projects/linux-next-weekly-scan

You're getting this email because you were associated with the identified
lines of code (noted below) that were touched by commits:

  Mon Oct 31 13:37:57 2022 -0300
    91b4be750274 ("iommufd: Data structure to provide IOVA to PFN mapping")

Coverity reported the following:

*** CID 1527094:  Memory - illegal accesses  (UNINIT)
/drivers/iommu/iommufd/io_pagetable.c: 415 in iopt_map_user_pages()
409     	elm.start_byte = uptr - elm.pages->uptr;
410     	elm.length = length;
411     	list_add(&elm.next, &pages_list);
412
413     	rc = iopt_map_pages(iopt, &pages_list, length, iova, iommu_prot, flags);
414     	if (rc) {
vvv     CID 1527094:  Memory - illegal accesses  (UNINIT)
vvv     Using uninitialized value "elm.area".
415     		if (elm.area)
416     			iopt_abort_area(elm.area);
417     		if (elm.pages)
418     			iopt_put_pages(elm.pages);
419     		return rc;
420     	}

If this is a false positive, please let us know so we can mark it as
such, or teach the Coverity rules to be smarter. If not, please make
sure fixes get into linux-next. :) For patches fixing this, please
include these lines (but double-check the "Fixes" first):

Reported-by: coverity-bot <keescook+coverity-bot@xxxxxxxxxxxx>
Addresses-Coverity-ID: 1527094 ("Memory - illegal accesses")
Fixes: 91b4be750274 ("iommufd: Data structure to provide IOVA to PFN mapping")

Thanks for your attention!

-- 
Coverity-bot



[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux