Re: [PATCH] scripts: docs: kdoc_files.py: don't consider symlinks as directories
From: Mauro Carvalho Chehab
Date: Thu Nov 13 2025 - 12:08:24 EST
On Thu, Nov 13, 2025 at 09:21:26AM -0700, Jonathan Corbet wrote:
> Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx> writes:
>
> > As reported by Randy, currently kdoc_files can go into endless
> > looks when symlinks are used:
> >
> > $ ln -s . Documentation/peci/foo
> > $ ./scripts/kernel-doc Documentation/peci/
> > ...
> > File "/new_devel/docs/scripts/lib/kdoc/kdoc_files.py", line 52, in _parse_dir
> > if entry.is_dir():
> > ~~~~~~~~~~~~^^
> > OSError: [Errno 40] Too many levels of symbolic links: 'Documentation/peci/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo'
> >
> > Prevent that by not considering symlinks as directories.
> >
> > Reported-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
> > Closes: https://lore.kernel.org/linux-doc/80701524-09fd-4d68-8715-331f47c969f2@xxxxxxxxxxxxx/
> > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>
>
> This looks the same as yesterday's version?
I haven't changed it (but I was assuming yesterday's version was not sent). I had some bugs related to smtp proxy at the office....
>
> Applied, anyway, thanks.
Thanks!
>
> jon
--
Thanks,
Mauro