lkml.org 
[lkml]   [2023]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectCoverity: check_empty_area_window(): Error handling issues
Hello!

This is an experimental semi-automated report about issues detected by
Coverity from a scan of next-20230113 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:

Wed Jan 11 16:15:43 2023 -0800
ebc4c1bcc2a5 ("maple_tree: fix mas_empty_area_rev() lower bound validation")

Coverity reported the following:

*** CID 1530569: Error handling issues (CHECKED_RETURN)
lib/test_maple_tree.c:2598 in check_empty_area_window()
2592 MT_BUG_ON(mt, mas_empty_area(&mas, 5, 100, 6) != -EBUSY);
2593
2594 mas_reset(&mas);
2595 MT_BUG_ON(mt, mas_empty_area(&mas, 0, 8, 10) != -EBUSY);
2596
2597 mas_reset(&mas);
vvv CID 1530569: Error handling issues (CHECKED_RETURN)
vvv Calling "mas_empty_area" without checking return value (as is done elsewhere 8 out of 10 times).
2598 mas_empty_area(&mas, 100, 165, 3);
2599
2600 mas_reset(&mas);
2601 MT_BUG_ON(mt, mas_empty_area(&mas, 100, 163, 6) != -EBUSY);
2602 rcu_read_unlock();
2603 }

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: 1530569 ("Error handling issues")
Fixes: ebc4c1bcc2a5 ("maple_tree: fix mas_empty_area_rev() lower bound validation")

Thanks for your attention!

--
Coverity-bot

\
 
 \ /
  Last update: 2023-03-26 23:41    [W:0.042 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site