diff options
| author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2025-11-13 10:53:43 +0100 |
|---|---|---|
| committer | Jonathan Corbet <corbet@lwn.net> | 2025-11-13 09:16:15 -0700 |
| commit | f64c7e113dc937e0987c83ef51a3cd52a2c277c7 (patch) | |
| tree | 97bd3d1e49725ff3e4795a85cb734a6183987458 /tools/lib/python | |
| parent | 77cbf5fbe572f199f401a4740b9fc38707770a30 (diff) | |
scripts: docs: kdoc_files.py: don't consider symlinks as directories
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@infradead.org>
Closes: https://lore.kernel.org/linux-doc/80701524-09fd-4d68-8715-331f47c969f2@infradead.org/
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <73c3450f34e2a4b42ef2ef279d7487c47d22e3bd.1763027622.git.mchehab+huawei@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
