lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADLLry4fgoj5CVeZ8M+QmzzvQ=GTj2AheBJA3eMeSTZT47scNA@mail.gmail.com>
Date:   Wed, 3 Nov 2021 17:15:13 +0900
From:   Austin Kim <austindh.kim@...il.com>
To:     dhowells@...hat.com
Cc:     linux-cachefs@...hat.com,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        김동현 <austin.kim@....com>
Subject: Re: [PATCH] cachefiles: remove always false 'datalen < 0' expression

2021년 8월 24일 (화) 오후 12:18, Austin Kim <austindh.kim@...il.com>님이 작성:
>
> From: Austin Kim <austin.kim@....com>
>
> Since 'datalen' is declared as size_t, the 'datalen < 0' expression
> is always false. Where size_t is defined as below;
>
>    typedef unsigned long __kernel_ulong_t;
>    typedef __kernel_ulong_t __kernel_size_t;
>    typedef __kernel_size_t size_t;
>
> So it had better remove unnecessary 'always false' expression.
>
> Signed-off-by: Austin Kim <austin.kim@....com>
> ---
>  fs/cachefiles/daemon.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/cachefiles/daemon.c b/fs/cachefiles/daemon.c
> index 752c1e43416f..1cfed9e0812a 100644
> --- a/fs/cachefiles/daemon.c
> +++ b/fs/cachefiles/daemon.c
> @@ -225,7 +225,7 @@ static ssize_t cachefiles_daemon_write(struct file *file,
>         if (test_bit(CACHEFILES_DEAD, &cache->flags))
>                 return -EIO;
>
> -       if (datalen < 0 || datalen > PAGE_SIZE - 1)
> +       if (datalen > PAGE_SIZE - 1)
>                 return -EOPNOTSUPP;
>
>         /* drag the command string into the kernel so we can parse it */
> --
> 2.20.1
>

If you are available, would you please review this patch?
It will not take long.

BR,
Austin Kim

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ