Linux wireless drivers development
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Benjamin Berg <benjamin@sipsolutions.net>,
	Johannes Berg <johannes@sipsolutions.net>,
	linux-wireless <linux-wireless@vger.kernel.org>
Cc: Nicolai Stange <nicstange@gmail.com>
Subject: Re: 6.7.0-rc1 + hacks deadlock bug, wifi netdev delete + cat of debugfs file.
Date: Wed, 8 Nov 2023 09:46:12 -0800	[thread overview]
Message-ID: <20503f3f-7764-b043-baaa-fbc3c3c4039f@candelatech.com> (raw)
In-Reply-To: <2c079a7405e81715e6ded79cd5fe1d990b458418.camel@sipsolutions.net>

On 11/8/23 09:39, Benjamin Berg wrote:
> On Wed, 2023-11-08 at 17:07 +0100, Johannes Berg wrote:
>>>   From the backtrace in the removal logic, it seems that something waits
>>> for a debugfs file to be closed.
>>
>> Yes, debugfs remove waits for it to no longer have active users, but
>> that cannot succeed because the users are blocked on acquiring the
>> mutex.
>>
>>> Maybe the logic attempting to get the
>>> mutex in debugfs can check if file is waiting to be deleted,
>>> combined with a try-mutex-lock logic, and bail out that way?
>>
>> I don't know if there's a way to check that, but I'm also not sure how
>> you'd even implement that?
> 
> Is it likely that we have lock contention for debugfs operations?
> 
> If it is relatively unlikely, then maybe just doing a mutex_trylock()
> and immediately failing the operation with -EAGAIN could be a solution?
> Obviously userspace would need some retry logic, but that is simple and
> it could solve the delete problem.

That is pretty nasty to expect each and every user-space app anywhere to suddenly
know that file operations are randomly unreliable...

I think we can do this where we only return no useful file data when we are actually
in teardown phase...

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



  reply	other threads:[~2023-11-08 17:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-07 22:08 6.7.0-rc1 + hacks deadlock bug, wifi netdev delete + cat of debugfs file Ben Greear
2023-11-08 10:31 ` Johannes Berg
2023-11-08 15:07   ` Ben Greear
2023-11-08 15:44     ` Johannes Berg
2023-11-08 15:55       ` Ben Greear
2023-11-08 16:07         ` Johannes Berg
2023-11-08 17:39           ` Benjamin Berg
2023-11-08 17:46             ` Ben Greear [this message]
2023-11-08 17:44           ` Ben Greear
2023-11-08 18:43             ` Johannes Berg
2023-11-08 20:04               ` Ben Greear
2023-11-08 20:06                 ` Johannes Berg
2023-11-08 16:21       ` Johannes Berg

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=20503f3f-7764-b043-baaa-fbc3c3c4039f@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=benjamin@sipsolutions.net \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nicstange@gmail.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