netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Ido Schimmel <idosch@nvidia.com>, netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
	edumazet@google.com, amcohen@nvidia.com
Subject: Re: [PATCH net 2/3] netdevsim: fib: Add debugfs knob to simulate route deletion failure
Date: Thu, 28 Jul 2022 08:51:34 -0600	[thread overview]
Message-ID: <30ce6782-cbb5-e2dd-c845-13e67ec5a571@gmail.com> (raw)
In-Reply-To: <20220728114535.3318119-3-idosch@nvidia.com>

On 7/28/22 5:45 AM, Ido Schimmel wrote:
> The previous patch ("netdevsim: fib: Fix reference count leak on route
> deletion failure") fixed a reference count leak that happens on route
> deletion failure.
> 
> Such failures can only be simulated by injecting slab allocation
> failures, which cannot be surgically injected.

One option is CONFIG_FAULT_INJECTION, labeling functions with
ALLOW_ERROR_INJECTION and writing tests to set the fail_function. Been
very convenient for testing cleanup paths.

That said, I am not against this option.
> 
> In order to be able to specifically test this scenario, add a debugfs
> knob that allows user space to fail route deletion requests when
> enabled.
> 
> Signed-off-by: Ido Schimmel <idosch@nvidia.com>
> Reviewed-by: Amit Cohen <amcohen@nvidia.com>
> ---
>  drivers/net/netdevsim/fib.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 

Reviewed-by: David Ahern <dsahern@kernel.org>


  reply	other threads:[~2022-07-28 14:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-28 11:45 [PATCH net 0/3] netdevsim: fib: Fix reference count leak on route deletion failure Ido Schimmel
2022-07-28 11:45 ` [PATCH net 1/3] " Ido Schimmel
2022-07-28 15:21   ` David Ahern
2022-07-28 11:45 ` [PATCH net 2/3] netdevsim: fib: Add debugfs knob to simulate " Ido Schimmel
2022-07-28 14:51   ` David Ahern [this message]
2022-07-28 11:45 ` [PATCH net 3/3] selftests: netdevsim: Add test cases for " Ido Schimmel
2022-07-28 14:53   ` David Ahern
2022-07-29  5:07 ` [PATCH net 0/3] netdevsim: fib: Fix reference count leak on " Jakub Kicinski
2022-07-29 11:30 ` patchwork-bot+netdevbpf

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=30ce6782-cbb5-e2dd-c845-13e67ec5a571@gmail.com \
    --to=dsahern@gmail.com \
    --cc=amcohen@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).