[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260124184239.GO215800@killaraus>
Date: Sat, 24 Jan 2026 20:42:39 +0200
From: Laurent Pinchart <laurent.pinchart@...asonboard.com>
To: Johan Hovold <johan@...nel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J . Wysocki" <rafael@...nel.org>,
Danilo Krummrich <dakr@...nel.org>,
Tzung-Bi Shih <tzungbi@...nel.org>,
Bartosz Golaszewski <bartosz.golaszewski@....qualcomm.com>,
Linus Walleij <linusw@...nel.org>, Jonathan Corbet <corbet@....net>,
Shuah Khan <shuah@...nel.org>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Simona Vetter <simona.vetter@...ll.ch>,
Dan Williams <dan.j.williams@...el.com>,
Jason Gunthorpe <jgg@...dia.com>, linux-doc@...r.kernel.org,
linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/3] Revert "revocable: Revocable resource management"
On Sat, Jan 24, 2026 at 06:05:32PM +0100, Johan Hovold wrote:
> I was surprised to learn that the revocable functionality was merged last week
> given the community feedback on list and at LPC, but not least since there are
> no users of it, which we are supposed to require to be able to evaluate it
> properly.
>
> The chromeos ec driver issue which motivated this work turned out not to need
> it as was found during review. And the example gpiolib conversion was posted
> the very same morning that this was merged which hardly provides enough time
> for evaluation (even if Bartosz quickly reported a performance regression).
>
> Turns out there are correctness issues with both the gpiolib conversion and
> the revocable design itself that can lead to use-after-free and hung tasks (see
> [1] and patch 3/3).
>
> And as was pointed out repeatedly during review, and again at the day of the
> merge, this does not look like the right interface for the chardev unplug
> issue.
>
> Revert the revocable implementation until a redesign has been proposed and
> evaluated properly.
I have voiced some of the concerns listed above. This was merge way too
quickly, without proper review and evaluation of the API as a solution
for the problem at hand. I don't want to see this API spreading through
drivers the same way devm_kzalloc() did without developers understanding
the limitations, it's just another recipe for disaster. I trust that we
have enough knowledge and wisdom in the community to implement correct
solutions to the producer-consumer races.
Acked-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
> [1] https://lore.kernel.org/all/aXT45B6vLf9R3Pbf@hovoldconsulting.com/
>
>
> Johan Hovold (3):
> Revert "selftests: revocable: Add kselftest cases"
> Revert "revocable: Add Kunit test cases"
> Revert "revocable: Revocable resource management"
>
> .../driver-api/driver-model/index.rst | 1 -
> .../driver-api/driver-model/revocable.rst | 152 -----------
> MAINTAINERS | 9 -
> drivers/base/Kconfig | 8 -
> drivers/base/Makefile | 5 +-
> drivers/base/revocable.c | 241 ------------------
> drivers/base/revocable_test.c | 142 -----------
> include/linux/revocable.h | 69 -----
> tools/testing/selftests/Makefile | 1 -
> .../selftests/drivers/base/revocable/Makefile | 7 -
> .../drivers/base/revocable/revocable_test.c | 136 ----------
> .../drivers/base/revocable/test-revocable.sh | 39 ---
> .../base/revocable/test_modules/Makefile | 10 -
> .../revocable/test_modules/revocable_test.c | 195 --------------
> 14 files changed, 1 insertion(+), 1014 deletions(-)
> delete mode 100644 Documentation/driver-api/driver-model/revocable.rst
> delete mode 100644 drivers/base/revocable.c
> delete mode 100644 drivers/base/revocable_test.c
> delete mode 100644 include/linux/revocable.h
> delete mode 100644 tools/testing/selftests/drivers/base/revocable/Makefile
> delete mode 100644 tools/testing/selftests/drivers/base/revocable/revocable_test.c
> delete mode 100755 tools/testing/selftests/drivers/base/revocable/test-revocable.sh
> delete mode 100644 tools/testing/selftests/drivers/base/revocable/test_modules/Makefile
> delete mode 100644 tools/testing/selftests/drivers/base/revocable/test_modules/revocable_test.c
--
Regards,
Laurent Pinchart
Powered by blists - more mailing lists