From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94C8FC677F1 for ; Fri, 13 Jan 2023 23:55:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D91C68E0002; Fri, 13 Jan 2023 18:55:41 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D40E58E0001; Fri, 13 Jan 2023 18:55:41 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BE1DF8E0002; Fri, 13 Jan 2023 18:55:41 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id AAFCB8E0001 for ; Fri, 13 Jan 2023 18:55:41 -0500 (EST) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 854AAC0247 for ; Fri, 13 Jan 2023 23:55:41 +0000 (UTC) X-FDA: 80351435682.22.D92EE89 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by imf16.hostedemail.com (Postfix) with ESMTP id D3AFF180010 for ; Fri, 13 Jan 2023 23:55:39 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b="UooW/gPd"; spf=pass (imf16.hostedemail.com: domain of keescook@chromium.org designates 209.85.214.173 as permitted sender) smtp.mailfrom=keescook@chromium.org; dmarc=pass (policy=none) header.from=chromium.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1673654139; a=rsa-sha256; cv=none; b=RhmopW3Cs6CaydpvZSGRnfsSD3uwNy/nsSIYOt1V1GlNLjo8AYqZtVOhu+oUCEaYFVOrIP fdy+pWDuT1cppGkiWVNOWl4+SDFuP1zS4UYJRh119RTVTS+CmEbYdXHJAQzg4izgwdLmHB cjZ0wV2dExjqtkWwX60+zkQCn/ifCSE= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b="UooW/gPd"; spf=pass (imf16.hostedemail.com: domain of keescook@chromium.org designates 209.85.214.173 as permitted sender) smtp.mailfrom=keescook@chromium.org; dmarc=pass (policy=none) header.from=chromium.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1673654139; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=LF3WsXigIPtoM91xDdGg1MKwYTSeuEO0M3pVuLY/JbQ=; b=QuwXjNxZyu6Y7BlTzmrw3RbIdzmmyuyNjFAPmlzavlf40dGzMoWNDtyw9H02VfWtsqhLcM OsggU6sGmhU8hErVbneROWAV2X/v50OA9NxYPSjufL5sIRNT46SIUNP9Dms/TcvWeeua8i ti1h0kNg+JdtsX0OFVf2OcAm2vGcR3A= Received: by mail-pl1-f173.google.com with SMTP id p24so24959429plw.11 for ; Fri, 13 Jan 2023 15:55:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-disposition:mime-version:message-id:subject:cc:to:date:from :from:to:cc:subject:date:message-id:reply-to; bh=LF3WsXigIPtoM91xDdGg1MKwYTSeuEO0M3pVuLY/JbQ=; b=UooW/gPdlyiA1OGaapbkni44sryCSNVmMvtT9Ul9RLHWTvKLioT8nJxXKUFZqlBUC2 fVRlwYCZe2oHJ/vbuFEOs/HGaZgm2cDjSh/ntaE0nzKPdbPqZTP/JRCDDWEyuLIALOYC KECbXHdpPj+Ai1NKz/0SixoNMulCOF6hUTPX8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LF3WsXigIPtoM91xDdGg1MKwYTSeuEO0M3pVuLY/JbQ=; b=vkeP2cV5oh2TL96vs9GJjWmU5y1lQVrkc6wzTKwg38ZkzOYSeU2sTDpMiwOo1hUc5e MPDy/Ol7o2f2GPnI7RMzdT9icMs/uhdKPgA8/SWmeIMx6S6XnTKEBmujL/0diDrB6Zxf AZDLEROLAsVFKrHuTo+p1DrSwgS8aG1rbGKmofrKSjcLy+qHgiJPjC9XOtSgX/lEQWXk rkNclgmMCokPUvWuSVDhX1vicIw5M6igDYZyYeDMP3b1XUIQWG9ePqKGHMePzAS9hPym ejLQiglgIcZYttdX0Rc+EMH/rYVlCwnAXGn/4ibuH8w2jEubqPWJdKbSWqPtQE9brD6o USRA== X-Gm-Message-State: AFqh2koh3kMHiAnA3ZeOVoYcaFiRfpJnRSMQhZE/Xr8dNYbsX6xxN5z2 v9CdFQG23dlZidIBTl82IUKcAg== X-Google-Smtp-Source: AMrXdXsOAdCKdSgYkiZ/E0ZO8oA/rxRKPzE25xlurZuhM3GKj0+vty25gaw2s5FBdvVB2khEsKzUew== X-Received: by 2002:a17:902:d50e:b0:194:3e44:26a5 with SMTP id b14-20020a170902d50e00b001943e4426a5mr22623176plg.66.1673654138780; Fri, 13 Jan 2023 15:55:38 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id r3-20020a632b03000000b00478e14e6e76sm12379469pgr.32.2023.01.13.15.55.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jan 2023 15:55:38 -0800 (PST) From: coverity-bot X-Google-Original-From: coverity-bot Date: Fri, 13 Jan 2023 15:46:49 -0800 To: Liam Howlett Cc: "Liam R. Howlett" , Holger Hoffsttte , linux-kernel@vger.kernel.org, Andrew Morton , stable@vger.kernel.org, linux-mm@kvack.org, amanieu@gmail.com, "Gustavo A. R. Silva" , linux-next@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Coverity: check_empty_area_window(): Error handling issues Message-ID: <202301131546.73FBCC7B6@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspam-User: X-Rspamd-Queue-Id: D3AFF180010 X-Rspamd-Server: rspam01 X-Stat-Signature: x4754ca7f5aoitf3spet7ga1w9y5brnd X-HE-Tag: 1673654139-76093 X-HE-Meta: U2FsdGVkX1/a+ZrCJNDdN2LvId/r7AnNpAxKN0Kr2olDEMoVyFeH6CI19oa1lDY44VUJdql86zIOdS7MzNHciHWMhHOthjvQwnjvxXvPgKNjilT1byuLbRLN5GDUrD/7l0l58oIxdzER6mh+x1GEV6/AAc1hnH/m0Uc/0dsMK/e9WrCVA8hE9AiUoleet0yRdfpL27uAIxMnAPDz8bRJyvaOR/fGhiX8Tz7U7GTAw8ZxYIY2/SxWNI7S76wSG7KR5+IQIB/gCQUhspm72JC2nQpBstlPmQr1VQ+IvFfPSkvwDEk/e3+t4S6Y4Z6UghH++43+Maeg6b9W/QvCa9nO5RO02IwnCmfV0WN+5Bcyh4QdpdDpmu08N30mu6XcCb48dyDhpbVwQg9k0G67zEyUgiEnRzYHIT97FxsujJqd2IA38uaqC04bQxa84E1Ce+tp7KDDWvmClVZYchAVpnZ7uAXxqyf2cLY3E2j9E00hZtFRQwOc6NePB8RgUTDnEvg8BGvowKDs4O1aRu82VMH2HcFp5K2f1tSUHrnGjf5ysdDWjskeX+bZcQKC5NCXBRsGCABsbwd3GPQ9a1an8xKPUyk0TIjHP9RJW2mUXrB7K+4vgpYwbGwDUV/IxTHp+Yn5FKVBMn6NR20uYQ1dUMzzDvWGhnAO+1P8d8SDDY+DyLiQWOlfp4R5hg6moRgrbya5+M3El5Jcu0HGdoKpoYv5qThXrkrmPsD1SsHjSj3eL0Ta3ZJxeWY+5VgM+mrdSste3n8SVhusMBbFHV3M0PWjMP45NPeHkpgWjxx2yr4mBCY4zDl1zpzDDexg5aISNwVp7vBm2NMf+mvZX0eRm1Rr0ydmU+yRrhB7fOMR40nmSvI3o/vLKSKW6P1UITfR3CZw8761lKrF/LyV0FCbdxHob9vmHFc2x6lz/E0vUr+zWXTaZ9bh5zfUSfS8jrIuhByfuZJWXbwx4Q7qBFOJc7l Xq0QAHi/ 5MFjKMZr+HSt1qiR9dKT0TbvqmFdXarbJe1yBbUZaGwBQ0UD//xkO6N9JNO33vlmCg6vUbRIkc/wDM1BXhuuFhW4oZlhgEYfXRjK+1V8CC2lpt64QRx4XqmWdqr9oc3qIDRCwo6ua0QNa44g= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000003, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 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