All of lore.kernel.org
 help / color / mirror / Atom feed
* Coverity: do_migrate_range(): Error handling issues
@ 2021-06-08 18:05 coverity-bot
  2021-06-08 19:35 ` Linus Torvalds
  0 siblings, 1 reply; 4+ messages in thread
From: coverity-bot @ 2021-06-08 18:05 UTC (permalink / raw)
  To: Shakeel Butt
  Cc: Andrew Morton, Linus Torvalds, Johannes Weiner,
	Gustavo A. R. Silva, linux-next

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@chromium.org>
Addresses-Coverity-ID: 1505146 ("Error handling issues")
Fixes: 013339df116c ("mm/rmap: always do TTU_IGNORE_ACCESS")

Thanks for your attention!

-- 
Coverity-bot

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-08 23:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-08 18:05 Coverity: do_migrate_range(): Error handling issues coverity-bot
2021-06-08 19:35 ` Linus Torvalds
2021-06-08 20:21   ` Shakeel Butt
2021-06-08 23:12   ` Kees Cook

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.