Linux filesystem development
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Joel Granados <joel.granados@kernel.org>,
	linux-fsdevel@vger.kernel.org, Al Viro <viro@zeniv.linux.org.uk>,
	Kees Cook <kees@kernel.org>, Luis Chamberlain <mcgrof@kernel.org>
Cc: Joel Granados <j.granados@samsung.com>,
	LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org
Subject: Re: sysctl: Reduce dput(child) calls in proc_sys_fill_cache()
Date: Wed, 23 Oct 2024 14:10:57 +0200	[thread overview]
Message-ID: <3a94a3cb-1beb-4e48-ab78-4f24b18d9077@web.de> (raw)
In-Reply-To: <y27xv53nb5rqg4ozske4efdoh2omzryrmflkg6lhg2sx3ka3lf@gmqinxx5ta62>

>> A dput(child) call was immediately used after an error pointer check
>> for a d_splice_alias() call in this function implementation.
>> Thus call such a function instead directly before the check.
> This message reads funny, please re-write for your v2. Here is how I would write
> it.
>
> "
> Replace two dput(child) calls with one that occurs immediately before the IS_ERR
> evaluation. This is ok because dput gets called regardless of the value returned
> by IS_ERR(res).
> "

Do you prefer the mentioned macro name over the wording “error pointer check”?


>> This issue was transformed by using the Coccinelle software.
> How long is the coccinelle script? …

A related script for the semantic patch language was presented already according to
the clarification approach “Generalising a transformation with SmPL?”.
https://lore.kernel.org/kernel-janitors/300b5d1a-ab88-4548-91d2-0792bc15e15e@web.de/
https://lkml.org/lkml/2024/9/14/464
https://sympa.inria.fr/sympa/arc/cocci/2024-09/msg00004.html

Will further development ideas evolve accordingly?

Regards,
Markus

  reply	other threads:[~2024-10-23 12:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-26  8:20 [PATCH] sysctl: Reduce dput(child) calls in proc_sys_fill_cache() Markus Elfring
2024-10-23 11:11 ` Joel Granados
2024-10-23 12:10   ` Markus Elfring [this message]
2024-10-23 13:20     ` Joel Granados
2024-10-23 15:27       ` [PATCH v2] " Markus Elfring
2024-10-28  9:23         ` Joel Granados
2024-10-28 12:56           ` [v2] " Markus Elfring
2024-10-31 10:19         ` [PATCH v2] " Joel Granados

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3a94a3cb-1beb-4e48-ab78-4f24b18d9077@web.de \
    --to=markus.elfring@web.de \
    --cc=j.granados@samsung.com \
    --cc=joel.granados@kernel.org \
    --cc=kees@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox