linux/Documentation/sphinx
Vegard Nossum 2930f57c0e docs: kernel_feat.py: fix build error for missing files
commit c23de7ceae upstream.

If the directory passed to the '.. kernel-feat::' directive does not
exist or the get_feat.pl script does not find any files to extract
features from, Sphinx will report the following error:

    Sphinx parallel build error:
    UnboundLocalError: local variable 'fname' referenced before assignment
    make[2]: *** [Documentation/Makefile:102: htmldocs] Error 2

This is due to how I changed the script in c48a7c44a1 ("docs:
kernel_feat.py: fix potential command injection"). Before that, the
filename passed along to self.nestedParse() in this case was weirdly
just the whole get_feat.pl invocation.

We can fix it by doing what kernel_abi.py does -- just pass
self.arguments[0] as 'fname'.

Fixes: c48a7c44a1 ("docs: kernel_feat.py: fix potential command injection")
Cc: Justin Forbes <jforbes@fedoraproject.org>
Cc: Salvatore Bonaccorso <carnil@debian.org>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Link: https://lore.kernel.org/r/20240205175133.774271-2-vegard.nossum@oracle.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-02-23 09:51:57 +01:00
..
templates docs: Use HTML comments for the kernel-toc SPDX line 2023-02-16 16:06:44 -07:00
automarkup.py
cdomain.py Documentation/sphinx: Remove the repeated word "the" in comments. 2023-10-22 20:33:38 -06:00
kernel_abi.py docs: kernel_abi.py: fix command injection 2024-01-31 16:21:00 -08:00
kernel_feat.py docs: kernel_feat.py: fix build error for missing files 2024-02-23 09:51:57 +01:00
kernel_include.py
kerneldoc-preamble.sty docs: kerneldoc-preamble: Test xeCJK.sty before loading 2022-08-18 11:27:55 -06:00
kerneldoc.py docs/sphinx: Explicitly convert Sphinx paths to str 2023-10-10 13:35:54 -06:00
kernellog.py
kfigure.py docs/sphinx: Explicitly convert Sphinx paths to str 2023-10-10 13:35:54 -06:00
load_config.py docs: Fix the docs build with Sphinx 6.0 2023-01-06 13:04:00 -07:00
maintainers_include.py Documentation/sphinx: fix Python string escapes 2023-09-12 14:27:45 -06:00
parallel-wrapper.sh
parse-headers.pl
requirements.txt docs: sphinx-pre-install: don't require the RTD theme 2022-10-13 11:14:43 -06:00
rstFlatTable.py