[PATCH v4 0/2] char: misc: improve test and dynamic allocation

Thadeu Lima de Souza Cascardo posted 2 patches 8 months ago
drivers/char/misc.c             |  28 +-
drivers/misc/misc_minor_kunit.c | 589 +++++++++++++++++++++++++++++++++++++++-
2 files changed, 592 insertions(+), 25 deletions(-)
[PATCH v4 0/2] char: misc: improve test and dynamic allocation
Posted by Thadeu Lima de Souza Cascardo 8 months ago
This includes a change that prevents dynamic allocation from using a minor
number that belongs to the historically static reserved range, which is
still used by some drivers.

It also improves the test, including a lot of corner cases, specially ones
that would fail before past fixes.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
---
Changes in v4:
- mark some tests as init-only, since they use init-only symbols
- Link to v3: https://lore.kernel.org/r/20250318-misc-dynrange-v3-0-5c6507cbc2e2@igalia.com

Changes in v3:
- remove code around DYNAMIC_MINORS and the backwards allocation
- try to open devices in tests by using init_mknod plus filp_open
- Link to v2: https://lore.kernel.org/r/20250307-misc-dynrange-v2-0-6fe19032ef76@igalia.com

---
Thadeu Lima de Souza Cascardo (2):
      char: misc: restrict the dynamic range to exclude reserved minors
      char: misc: add test cases

 drivers/char/misc.c             |  28 +-
 drivers/misc/misc_minor_kunit.c | 589 +++++++++++++++++++++++++++++++++++++++-
 2 files changed, 592 insertions(+), 25 deletions(-)
---
base-commit: 4d239f447f96bd2cb646f89431e9db186c1ccfd4
change-id: 20250307-misc-dynrange-d54c92a5e319

Best regards,
-- 
Thadeu Lima de Souza Cascardo <cascardo@igalia.com>