Re: [PATCH v1 1/1] string: Export strnchrnul()
From: Andy Shevchenko
Date: Tue Nov 10 2026 - 14:35:10 EST
On Tue, Nov 10, 2026 at 08:29:58PM +0200, Ilpo Järvinen wrote:
> On Tue, 10 Nov 2026, Andy Shevchenko wrote:
>
> > Export strnchrnul() for users that may be compiled as modules.
> >
> > Reported-by: Armin Wolf <W_Armin@xxxxxx>
> > Closes: https://lore.kernel.org/r/1969fb5a-38ef-4b4b-9d2f-cb9a4348b968@xxxxxx
> > Fixes: 0bee0cece2a6 ("lib/string: add strnchrnul()")
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> > ---
> >
> > Assumed to go via PDx86 where the first (wow!) module user wants to use it.
>
> Thanks guys,
>
> I'm so surprised by this, sashiko did warn about this so I even checked
> myself and saw an export after the closing brace so thought sashiko was
> just wrong... Maybe I was looking that the strrchr's export, can't think
> of anything else to explain it.
The strchrnul is exported, I believe you missed 'n' which may explain the
course of what happened. Compare:
EXPORT_SYMBOL(strchrnul);
EXPORT_SYMBOL(strnchrnul);
If you don't stare on this, you won't notice the difference at a glance.
(I caught myself on the same, but it was after this report, so I spend
a few more seconds to get it.)
--
With Best Regards,
Andy Shevchenko