Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2632629pxk; Sun, 27 Sep 2020 15:56:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzTKoeYEf/ZRMq/UL0EAsgwYIZSlIiPFiirrkp0kwCWxOeLXn4tkb9eLibNHeJ2ewF3kcl X-Received: by 2002:aa7:ca4f:: with SMTP id j15mr12809388edt.233.1601247400191; Sun, 27 Sep 2020 15:56:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601247400; cv=none; d=google.com; s=arc-20160816; b=s0ikkUgjEwqjUSKmIqb7V0stXhaK6cOyk02Z4Nc2hpACtxZHCSzcPAzieX4dowt83N iXtyaALg9TyPzNVdDLnpdBWz6sGGDcP+aI0e9VqZFXtUV0fQz5SDBplpkYg6PlYSiD1j 8R2lCNMbiY6ZXKfTLz/Eco1qHMjE8ywEEqIOe870xFQizReR1z0bWm8CYUPwdkcKakdS yFj1MQaOM/A6ejqUI78vZkHcah90WUPWlQBEs6aueSazl6R+DjRowXY/JU4hO6NXUPCv b1Eph9jH81uZpNbWw5gA5s3oTRyhy7FKX2FsOrFycjiP77tOwxjcAZa+WEpNUAv7rcrj Ratw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=dZEAWH40wyXTE3UOii3+/sRujYT6ubIb7i3XFgR2CP8=; b=RzdDIg8KHYqdgw+Ex7Mkh2mhoT2QzFe6lUuoayEHTx7bVL3/9gmSZ1BBBE8Ov0CogR lXKEGnMPr2Pjx8WWsVnr87Lqeek9i9IN2BMaTvs/7kveC0xomQZH/u7gabEFNAKvd3xT 02HwhpubKNKXvUBBoP8dCpf74yjPhHG1bbgvSIE2WqQz7AwODSx1frKf0w6EwJBlhP9P 3pZsE2k2t+NxKv6hQKOpWkwpS0Wj+2x5DWWkLHh+EKHSWXfHxis/Q//hf4irhh7deVHe XLv6ikZ5m9UKO32qywxCrYwB4aRaXKZMtJlDev3CyipEDXAzW75FxccafpbsL7h5O/uC ihWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=ivDpjZXA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cx17si6834901edb.409.2020.09.27.15.56.15; Sun, 27 Sep 2020 15:56:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=ivDpjZXA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726420AbgI0WzW (ORCPT + 99 others); Sun, 27 Sep 2020 18:55:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726335AbgI0WzV (ORCPT ); Sun, 27 Sep 2020 18:55:21 -0400 Received: from mail-qv1-xf42.google.com (mail-qv1-xf42.google.com [IPv6:2607:f8b0:4864:20::f42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE8DAC0613CE for ; Sun, 27 Sep 2020 15:55:21 -0700 (PDT) Received: by mail-qv1-xf42.google.com with SMTP id b13so4520748qvl.2 for ; Sun, 27 Sep 2020 15:55:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=dZEAWH40wyXTE3UOii3+/sRujYT6ubIb7i3XFgR2CP8=; b=ivDpjZXAEdfBKlKqV57ib13VDAWPON6jERKmGEPClKawcTLknEtylg6HITs+h39ij/ yqDOmIw8HPGTPu4/H1bGe6lOGJBmWm/4v4IZ5/AeqoTWoMqi0wIRnnRA/8mxNjT3ZUXG KXAq93lP0dNneFHZ4uWQcyMvfj2lx2Wa3OTWg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=dZEAWH40wyXTE3UOii3+/sRujYT6ubIb7i3XFgR2CP8=; b=C6nX0C4dkY0JT4lAsOXsgFg3mWoFY5s/VWg29OF6gcitGcEDBxQtgn4yHb5PhJkNWj yzt6if3LFK9Y39SFvmjg8UhP+nwDd9FDe7lxoOl+cSkRp3QUGBjGYiiRbNjHcHHN7vVF dzQ1iG1kmeydXe08uCnLZWuue+i9AsKA7uPuOh1FMmAXeBdB/5UaEYJDF3nDOPQQKEE0 q4xMxaQAFY8ijNRnesVr1fnnBRrGikiUYYSmHMsKsuj8pc39ScmGzXI9XGdf0MbmyKTJ GSyOYg90apmRoEfr1ZpX8R6U1WWzPkamRfo0/XtZvGSY0e9tRWvk3IWzbOkeUE48j/71 TbdA== X-Gm-Message-State: AOAM5318haUuGxgfaopGVhuNsgAvjmS+zbmOZB8LTzy6tqTRUmgvTRDt 0u647kJks7fx+0aj33TF7zFZxw== X-Received: by 2002:a05:6214:929:: with SMTP id dk9mr9315766qvb.60.1601247320780; Sun, 27 Sep 2020 15:55:20 -0700 (PDT) Received: from localhost ([2620:15c:6:12:cad3:ffff:feb3:bd59]) by smtp.gmail.com with ESMTPSA id l5sm8651388qtc.28.2020.09.27.15.55.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 15:55:20 -0700 (PDT) Date: Sun, 27 Sep 2020 18:55:19 -0400 From: Joel Fernandes To: Julia Lawall Cc: "Paul E. McKenney" , kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Josh Triplett , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , rcu@vger.kernel.org Subject: Re: [PATCH] kvfree_rcu(): fix ifnullfree.cocci warnings Message-ID: <20200927225519.GB2800828@google.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Sep 27, 2020 at 03:00:29PM +0200, Julia Lawall wrote: > From: kernel test robot > > NULL check before kfree is not needed. > > Generated by: scripts/coccinelle/free/ifnullfree.cocci > > Fixes: e9bed2a1239b ("kvfree_rcu(): Switch to kmalloc() and kfree() for allocations") > Signed-off-by: kernel test robot > Signed-off-by: Julia Lawall > --- > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git urezki-pcount.2020.09.26a > head: 1a8eee1cc5b0e59c17f5d94c5871e6c70c4a43a1 > commit: e9bed2a1239b017d78cec5de66adce0560f6d077 [17/18] kvfree_rcu(): Switch to kmalloc() and kfree() for allocations > :::::: branch date: 4 hours ago > :::::: commit date: 15 hours ago > > tree.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > --- a/kernel/rcu/tree.c > +++ b/kernel/rcu/tree.c > @@ -3165,8 +3165,7 @@ static void kfree_rcu_work(struct work_s > bkvhead[i] = NULL; > krc_this_cpu_unlock(krcp, flags); > > - if (bkvhead[i]) > - kfree(bkvhead[i]); > + kfree(bkvhead[i]); > Acked-by: Joel Fernandes (Google) thanks, - Joel > cond_resched_tasks_rcu_qs(); > }