From: coverity-bot <keescook@chromium.org>
To: Shakeel Butt <shakeelb@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Johannes Weiner <hannes@cmpxchg.org>,
"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
linux-next@vger.kernel.org
Subject: Coverity: do_migrate_range(): Error handling issues
Date: Tue, 8 Jun 2021 11:05:10 -0700 [thread overview]
Message-ID: <202106081105.B3E3DAE44@keescook> (raw)
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
next reply other threads:[~2021-06-08 18:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-08 18:05 coverity-bot [this message]
2021-06-08 19:35 ` Coverity: do_migrate_range(): Error handling issues Linus Torvalds
2021-06-08 20:21 ` Shakeel Butt
2021-06-08 23:12 ` Kees Cook
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=202106081105.B3E3DAE44@keescook \
--to=keescook@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=gustavo@embeddedor.com \
--cc=hannes@cmpxchg.org \
--cc=linux-next@vger.kernel.org \
--cc=shakeelb@google.com \
--cc=torvalds@linux-foundation.org \
/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.