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 X-Spam-Level: X-Spam-Status: No, score=-6.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91C1DC432BE for ; Wed, 1 Sep 2021 18:28:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 68EF361090 for ; Wed, 1 Sep 2021 18:28:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233083AbhIAS3W (ORCPT ); Wed, 1 Sep 2021 14:29:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229510AbhIAS3V (ORCPT ); Wed, 1 Sep 2021 14:29:21 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FF14C061575 for ; Wed, 1 Sep 2021 11:28:24 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: tonyk) with ESMTPSA id D25A71F43FDB Subject: Re: Question on commit dc7109aaa233 ("futex: Validate waiter correctly in futex_proxy_trylock_atomic()") To: Thomas Gleixner , Lukas Bulwahn , Ingo Molnar Cc: Peter Zijlstra , LKML , Sudip Mukherjee , Colin King References: <87a6kyfr4r.ffs@tglx> From: =?UTF-8?Q?Andr=c3=a9_Almeida?= Message-ID: Date: Wed, 1 Sep 2021 15:28:16 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <87a6kyfr4r.ffs@tglx> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thomas, Às 20:29 de 30/08/21, Thomas Gleixner escreveu: > Lukas, > > On Fri, Aug 20 2021 at 13:17, Lukas Bulwahn wrote: >> Did you intend to return -EINVAL here? So: >> >> + if (!top_waiter->rt_waiter || top_waiter->pi_state) >> + return -EINVAL; > > Duh, yes. > >> Static analysis tools are as foolish as they are... but every dog has its day... > > IOW: Even a blind hen sometimes finds a grain of corn :) > > Care to send a patch? > A patch was already proposed with this fix: https://lore.kernel.org/lkml/20210818131840.34262-1-colin.king@canonical.com/