Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2580124ybl; Mon, 20 Jan 2020 05:40:48 -0800 (PST) X-Google-Smtp-Source: APXvYqy34wphliJUKU4+CEdVEirZz/0mbCbOAguPUwKew5ItFBwAX8MHn35NAvaOU6b8Ibl9YaFP X-Received: by 2002:a05:6830:145:: with SMTP id j5mr15351409otp.242.1579527647935; Mon, 20 Jan 2020 05:40:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579527647; cv=none; d=google.com; s=arc-20160816; b=VGA1FlQKtn6qYVbXgYJrITN5cvtD/4okZBvNQTUWEcTxqMpGoSFRrLu5w9qRPH72lw Uk+S8WI0G7jgEaB+hXQqROUkNQFuie3Du4ZMVLFEBkhDNzTrAwFgXZkJnGIh54nlBpQ1 3dJJgddLxSvDFg/OfynMVCS/FLn6KnYNSX9WTu/Z8Se1A3mVOCpBg+g9LK7utMlmGvpB tkTMWWmJBgrZoOGFzI+GpEfLi/7AQsJHUV5tLfPX9BUZG9uJCDWiAmOcMvNBwmoykeX0 veYbXrRD2aCmPd8wsao69eOXFj4VpHxVsmoShezLUCQR665LD+s4gZDOc9ywLD725LfY HkCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=hIrVa5Zc0Y/8LAMmD5SZvjRBvVBDNVksOBYzGDIjeGU=; b=d7GREfQlCD7oIU+k/ykV0VCxmqtEycHD0k403EwH/ZcvCGBcX5fpvAXgo6AofnYUXq n5aTnzpbjSAYQV5M2fkA6ZviztBkNXoGsVTqOIzYHqIj4ZqODU+9iOMHwSfuSRNyzEeP jWyoPPVnP0PZEUQMgtyqYDbsAvOXUFpJNbxtVWO2Y8wCxfraEDLKPHOmPJXmQBD0hJ1R oSfBweLOE4h0o3UPjTgfjU+PfAQxJEfaQWcpdE7EViiB94Vix9QU2xiEPgUNNnxfU3M+ vGMt6aHwWVLqPx4qYfYjA41v61ehZqLbbhaebtAZsDTlAJk9pSF9KClpFvZKunXJ3f/5 I2cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=IzFUeFd5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v21si19819633otj.282.2020.01.20.05.40.36; Mon, 20 Jan 2020 05:40:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=IzFUeFd5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727011AbgATNja (ORCPT + 99 others); Mon, 20 Jan 2020 08:39:30 -0500 Received: from mail-io1-f68.google.com ([209.85.166.68]:44972 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726626AbgATNja (ORCPT ); Mon, 20 Jan 2020 08:39:30 -0500 Received: by mail-io1-f68.google.com with SMTP id b10so33674013iof.11 for ; Mon, 20 Jan 2020 05:39:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hIrVa5Zc0Y/8LAMmD5SZvjRBvVBDNVksOBYzGDIjeGU=; b=IzFUeFd5PB/JBWIOe0W6aNsohUdczCpj/2A+NCFNQV1PCD4k8IiMCsj0y4medcFiod UOdDI6kkDpko2uv5p9+mt2IJvULy5y994Np+zBxZNg9WXRR88FY5wCH5KdFXe8USsNaQ qgFQgEvEAZaoC6Y/fUZvTvD6WnQQivrHL6ggA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hIrVa5Zc0Y/8LAMmD5SZvjRBvVBDNVksOBYzGDIjeGU=; b=b2zVs6w/+e4FUGe3z0EF4iO/H7pOV9u1CZl1m36s+0a1D8RRfLIKuufxBaBTnvQDlo 0C6BlU98BxwQERsCOzH7T3FPwfMUg673/vLgqbmcacfqA8LSfwRsgzHd8SxzciixVbVQ znOMX+mr9455IBxP3ospLEX0cYY55FWu2Z7Yemc/lX3A49XVEdK+7i3BtomrRB2YL8fh AHXxSlMt2nPrhOM49jIzygqJ6rm7s8rBX0eKPCWJaL/L6Dh3eZdq+jqHXA5C6ZSqGNP+ IAw9JujfRvs83RwVFpcseEz0tIACFjef30L2senPMIz+y9zwr9FoVhA+i9tc10JSSMqp 014g== X-Gm-Message-State: APjAAAVNThhlSUyBTWGLLiSPOaBIg9ZKuNJ1Mfnomc2S9PMnqHhJBY1Z lZMR6cwdP4xoiVlm3p01RRLUBVsOX4ZMaLmdnaqpLg== X-Received: by 2002:a6b:b74a:: with SMTP id h71mr18380016iof.212.1579527569452; Mon, 20 Jan 2020 05:39:29 -0800 (PST) MIME-Version: 1.0 References: <20200120121310.17601-1-cengiz@kernel.wtf> In-Reply-To: <20200120121310.17601-1-cengiz@kernel.wtf> From: Miklos Szeredi Date: Mon, 20 Jan 2020 14:39:18 +0100 Message-ID: Subject: Re: [PATCH] fs: fuse: check return value of fuse_simple_request To: Cengiz Can Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 20, 2020 at 1:13 PM Cengiz Can wrote: > > In `fs/fuse/file.c` `fuse_simple_request` is used in multiple places, > with its return value properly checked for possible errors. > > However the usage on `fuse_file_put` ignores its return value. And the > following `fuse_release_end` call used hard-coded error value of `0`. > > This triggers a warning in static analyzers and such. > > I've added a variable to capture `fuse_simple_request` result and passed > that to `fuse_release_end` instead. Which then goes on to ignore the error, so we are exactly where we were with some added obscurity, which will be noticed by the next generation of static analyzer, when you'd come up with an even more obscure way to ignore the error, etc... This leads to nowhere. If this matters (not sure) then we'll need a notation to ignore the return value. Does casting to (void) work? Thanks, Miklos