Coverity: do_migrate_range(): Error handling issues

[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-20210608 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:

  Tue Dec 15 12:13:39 2020 -0800
    013339df116c ("mm/rmap: always do TTU_IGNORE_ACCESS")

Coverity reported the following:

*** CID 1505146:  Error handling issues  (CHECKED_RETURN)
/mm/memory_hotplug.c: 1422 in do_migrate_range()
1416     		 * the unmap as the catch all safety net).
1417     		 */
1418     		if (PageHWPoison(page)) {
1419     			if (WARN_ON(PageLRU(page)))
1420     				isolate_lru_page(page);
1421     			if (page_mapped(page))
vvv     CID 1505146:  Error handling issues  (CHECKED_RETURN)
vvv     Calling "try_to_unmap" without checking return value (as is done elsewhere 4 out of 5 times).
1422     				try_to_unmap(page, TTU_IGNORE_MLOCK);
1423     			continue;
1424     		}
1425
1426     		if (!get_page_unless_zero(page))
1427     			continue;

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: 1505146 ("Error handling issues")
Fixes: 013339df116c ("mm/rmap: always do TTU_IGNORE_ACCESS")

Thanks for your attention!

-- 
Coverity-bot



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

  Powered by Linux