Re: [PATCH v2 08/31] gpu: nova-core: add optional ucodes firmware loading

M Henning <[email protected]>
Newsgroups dev.linux.lists.nova-gpu,org.kernel.vger.linux-kernel
Message-ID <CAAgWFh1vEGzyFHDWUpH19VYZVa98siwV3sm2Yf5x5jW2uP+d9g@mail.gmail.com>
On Fri, Aug 21, 2026 at 9:58 PM John Hubbard <[email protected]> wrote:
> +        // FILE is a basename relative to the TLV's directory, not an arbitrary firmware path.
> +        if file.is_empty() || matches!(file, "." | "..") || file.contains('/') {
> +            return Err(EINVAL);
> +        }

This isn't a sane way to check if a path includes a directory
component or not. You really want to use path-handling apis, rather
than open-coding this in a way that rejects a few special cases.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.