Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp320357rwa; Sat, 20 Aug 2022 04:33:56 -0700 (PDT) X-Google-Smtp-Source: AA6agR7lpniMZiBdhQybnh9Ilgvqk9bAYnYUsiypeGVjOie3ZVydwv06xxEf6tKPH4mafZ3KhPD9 X-Received: by 2002:a17:90a:e58a:b0:1e2:fe75:dd5f with SMTP id g10-20020a17090ae58a00b001e2fe75dd5fmr19150385pjz.138.1660995236773; Sat, 20 Aug 2022 04:33:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1660995236; cv=pass; d=google.com; s=arc-20160816; b=v/RdbNt3V3n7V4BEBf6DE2wWNTudZmgAtCj1UAMzHu1zYKnN4p52/XBnyA+pxhBfTQ ocfbJhQJ8CXGJoghqq5bf3HPir22uj39Sz7faVFO9DtmqyYC37G2WkLUH1Ob3yutTYCa WSp+YSvnsjMbIlnfi/3Atxyu1wRvPLbGAzfdAXWbNnNvgKapeFUUagxZ9cpNtMlyOG9A 6N7DQqB9qzChFzdmkY8c0YSVaLOzWjH+AjwwelVcSe9CbPoazQVKpxTHXbmameBIKKu6 6U/5t789hrJGQbo843DPQmp3gyoJ4xql6S2Yw9idLfFf9uSbL12f/KIJzwvgTNF98Q35 7POA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:importance:content-transfer-encoding :mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:dkim-signature; bh=/i1BQuBFaVZtsaNVV0P5lReOS+nc8mcEOK2Ji36Irn8=; b=W4kXwIP3OykCpmtu5k4U+AOAsyUacoVC4RPgG+/JAaTTDKfwHOzI0xCsGMDqSHhCoB s+JlvWcMAoHM39V0mQQXsv8K9i5bZZcHgLLGHEALHDEnEdyugF+5512orET6T1VksVSK 9fwZbcOGvKSn2mgtc6PdES6grpfVxyJqzBh8rWNuA2BE4ddhtTzkS8+5kI8WLB19HsaF LWc2QicufmDspCcA3NJZhW3zBBYPaSLn7XT9+LSk3tncG30XB8gmvphhbRx5u8TufD3E MZGwZmt4sFuDn9e98f5oy5c8yyLxvmRR5nd3vah0tHxmHeGQp3kHcvJeiuYRnWMHtvD+ X/Wg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@siddh.me header.s=zmail header.b=czsdL8kb; arc=pass (i=1 spf=pass spfdomain=siddh.me dkim=pass dkdomain=siddh.me dmarc=pass fromdomain=siddh.me>); 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=REJECT sp=REJECT dis=NONE) header.from=siddh.me Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b4-20020a170902d40400b0016ec9f9453bsi6040936ple.449.2022.08.20.04.33.46; Sat, 20 Aug 2022 04:33:56 -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=@siddh.me header.s=zmail header.b=czsdL8kb; arc=pass (i=1 spf=pass spfdomain=siddh.me dkim=pass dkdomain=siddh.me dmarc=pass fromdomain=siddh.me>); 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=REJECT sp=REJECT dis=NONE) header.from=siddh.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343689AbiHTLaA (ORCPT + 99 others); Sat, 20 Aug 2022 07:30:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231152AbiHTL35 (ORCPT ); Sat, 20 Aug 2022 07:29:57 -0400 Received: from sender-of-o50.zoho.in (sender-of-o50.zoho.in [103.117.158.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DB0E240A7 for ; Sat, 20 Aug 2022 04:29:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660994946; cv=none; d=zohomail.in; s=zohoarc; b=Nqty8JFgrOxBVH4CzVzB+JLvRqKOQ+RaeObPKiZC2L9vPXlSECC8VEXrWnJw1eDvelBhZHz3sOt7EdaITmBT9F/y/hZ3SC3SNxzFENbOuDRRO+2JTZORa3HicaGPBzAZ5iBHq84T39dgAKEFoErCHjzWFyVgVErvbQQBNtVcQDE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.in; s=zohoarc; t=1660994946; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=/i1BQuBFaVZtsaNVV0P5lReOS+nc8mcEOK2Ji36Irn8=; b=X/FuWa0BtbmySalV7QY8s2gAJo7eQWBW6isSBshOwhmYGuNWg5tvCRC+rnyg65AqhDlMd1MI2eGRcKywq14k+vroDXbfImk/kz4oGEs+7Wa3bpZ8T8Yd/pvXjEXj+e7CP3GPLBEETwaowVQKCzfVd1p0rkcgifdq/jpaOOglt74= ARC-Authentication-Results: i=1; mx.zohomail.in; dkim=pass header.i=siddh.me; spf=pass smtp.mailfrom=code@siddh.me; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1660994946; s=zmail; d=siddh.me; i=code@siddh.me; h=Date:Date:From:From:To:To:Cc:Cc:Message-ID:In-Reply-To:References:Subject:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=/i1BQuBFaVZtsaNVV0P5lReOS+nc8mcEOK2Ji36Irn8=; b=czsdL8kbKjKitm2RKCXEdbc0de0vVu2hjz+GQYUzDnZF1A+n72JXfkOwOlx+q3v+ FwaPLRBx4vuNISqNrmXYH3KrMbDd95XqtN0k1zOvkVysxvhvo6iwGVcFnNnkqiw/2aF FWqwxc73EubYj0S/Dsexd+/344zE/Z0X6hBJs5rI= Received: from mail.zoho.in by mx.zoho.in with SMTP id 1660994935866227.9120167406926; Sat, 20 Aug 2022 16:58:55 +0530 (IST) Date: Sat, 20 Aug 2022 16:58:55 +0530 From: Siddh Raman Pant To: "Eric Biggers" , "Jonathan Corbet" , "David Howells" , "Randy Dunlap" , "Mauro Carvalho Chehab" , "Christophe JAILLET" , "Eric Dumazet" Cc: "linux-kernel" , "linux-kernel-mentees" Message-ID: <182bb035c23.6b1246ee44934.6791244868891887905@siddh.me> In-Reply-To: References: Subject: Re: [PATCH v2 0/2] watch_queue: Clean up some code MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_RED 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 Sat, 06 Aug 2022 13:13:40 +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 change renders wqueue->defunct superfluous, as the latter is only used > to check if watch_queue is cleared. With this change, the pipe is NULLed > 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 kerneldoc-styled, so that > I can extend the comment mentioning that the pipe is NULL when watch_queue > is cleared. In the process, I have also hopefully improved documentation > by documenting things which weren't documented before. > > Changes in v2: > - Merged the NULLing and removing defunct patches. > - Removed READ_ONCE barrier in lock_wqueue(). > - Improved and fixed errors in struct docs. > - Better commit messages. > > Siddh Raman Pant (2): > include/linux/watch_queue: Improve documentation > kernel/watch_queue: NULL the dangling *pipe, and use it for clear > check > > include/linux/watch_queue.h | 100 ++++++++++++++++++++++++++---------- > kernel/watch_queue.c | 12 ++--- > 2 files changed, 79 insertions(+), 33 deletions(-) > > -- > 2.35.1 Hello, Maybe the above quoted patch was missed due to the then-ongoing merge window. This can be found on: https://lore.kernel.org/lkml/cover.1659771577.git.code@siddh.me/ This patch was posted 2 weeks ago, with changes as requested. With the merge window closed, may I request for another look at this patch? Thanks, Siddh