Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp1378682rwb; Fri, 5 Aug 2022 00:20:29 -0700 (PDT) X-Google-Smtp-Source: AA6agR7+v2LTcH8/U8KNPQdr6nSh8Dc5ZztrzNjhWp5sqhJMBW7cjwDT9/S6+27Capu25Fo78JLM X-Received: by 2002:a17:903:300c:b0:16d:cb87:8ed5 with SMTP id o12-20020a170903300c00b0016dcb878ed5mr5630282pla.159.1659684029106; Fri, 05 Aug 2022 00:20:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659684029; cv=none; d=google.com; s=arc-20160816; b=uwU0ykYZm7mI7r+BVdlLwsXNcJSHy3f1e9ikkPC5o7Ftcm6cmPO1S6qjOug8bpYcV3 n3wkHnXzzDSUGVtCzlcAwYPwNPvlcI/zCEoTQBPyuhDw4oG+m4Np1JpcU3a4iGo4DT0a +kP+qMMPt1mnBDx785+1xSYyz+Fb01ar3rtEGG/PRu16lsOiUqIWwLFpCcXVyKCZx0d2 FjQXFPzCLSrbfJsEzS79ql8VP5Tvu1vN9FYqFGKWsTLQQtXL1AkgpKO0epIhIYheo6ls 7MPFUGmeGcrjSxvEDvX6tKcBmYLeyw4KTu5iALCEn/SIIHGU60zChcXeudJVhZheMDED QCfA== 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=JniUM+DlKrgbu9tKgtWfSrsHoVKDHqV95bg8cR0wDgE=; b=R5dkzMV0hQCmIS0AsSlMy9GGPyfPFwmYPIntTeRneOhhZBt1q38kYXtGrCR+ZFcaMA knTGa/pC6SI6LZeJvG0U5tCSjDQbceWUcqNZQ0U00YgB1XFynHygoeACeffngoW9p0c6 rFgWM8lBF6aqPdoZcALfy4JT7YMHHlOGnK3s3RgH9kFyP+kqgCFzncdzQBrGQcipQ6U8 sG7CBZLkTjJhsFaBpsDKHmd8w6qvherw9VkaIrWiVHuGq5ZwlqT5WTkqD6Yb7RHkUj3I UdaQm3Q138nbJ//jViOMhto0SxcrMjf+hKTrqqBlZiDUiXEAqqEiwgkzRPg30Bc3Hioj R+gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jZENF4Pl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j35-20020a632323000000b00419928621besi2198012pgj.320.2022.08.05.00.20.15; Fri, 05 Aug 2022 00:20:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jZENF4Pl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240223AbiHEHQ3 (ORCPT + 99 others); Fri, 5 Aug 2022 03:16:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230441AbiHEHQX (ORCPT ); Fri, 5 Aug 2022 03:16:23 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA9E0F35 for ; Fri, 5 Aug 2022 00:16:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A35DEB827E6 for ; Fri, 5 Aug 2022 07:16:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03770C433C1; Fri, 5 Aug 2022 07:16:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659683779; bh=pVVmulI7yI4CK6aTV3QyaslBwmz+G2X9eavrx06cU6Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jZENF4PlyknV8Xq4eLRWpsaLD7k9DL03M0OnEm0ZgeJCG2e+C6c2FmQkRpGxfhaKN QcI4O9H6v/VteiJjXbPcgf8ZUteF1Qv0r6/R5Y8iJ+y+IxUacyCYxpM4L6pEdheJyU 9xq0FzrcSo8SvSLiEMdcNqpkII2iIX6Y+A6H0vW7mZ9EB/s2rTNECqbaGxsat4r4uF nk2wbd0UxQjqcD+TsL7Jswa/J7rucfCM4L5MNzCtvnB9E/RnyLU1p9FISFrhhF7S9F GiICqKj0QHURF7momLdJtgg3inVCOKbmN7GNhVNHhBWnCAv/sg/ef4t4RuDkLU7Msf m6lC29AsLlR5Q== Date: Fri, 5 Aug 2022 00:16:17 -0700 From: Eric Biggers To: Siddh Raman Pant Cc: Jonathan Corbet , David Howells , Randy Dunlap , Mauro Carvalho Chehab , Christophe JAILLET , Eric Dumazet , linux-kernel , linux-kernel-mentees Subject: Re: [PATCH 0/3] kernel/watch_queue: Clean up some code Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 04, 2022 at 07:00:21PM +0530, Siddh Raman Pant wrote: > There is a dangling reference to pipe in a watch_queue after clearing it. > Thus, NULL that pointer while clearing. This can be thought of as a v4 of > the patches I had sent earlier. > > This change renders wqueue->defunct superfluous, as the latter is only used > to check if watch_queue is cleared. With this change, the pipe is NULL'd > while clearing, so we can just check if the pipe is NULL. > > Extending comment for watch_queue->pipe in the definition of watch_queue > made the comment conventionally too long (it was already past 80 chars), > so I have changed the struct annotations to be doxygen-styled, so that > I can extend the comment mentioning that the pipe is NULL when watch_queue > is cleared. > > Siddh Raman Pant (3): > kernel/watch_queue: Remove dangling pipe reference while clearing > watch_queue > kernel/watch_queue: Improve struct annotation formatting > kernel/watch_queue: Remove wqueue->defunct and use pipe for clear > check > > include/linux/watch_queue.h | 95 +++++++++++++++++++++++++++---------- > kernel/watch_queue.c | 11 ++--- > 2 files changed, 75 insertions(+), 31 deletions(-) I think patches 1 and 3 should be merged together. Also, please use a consistent version number for all patches in the series. You have a version 1, version 2, and version 4 patch all in the same series, which is very confusing. - Eric