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: <CAH2r5mvifDgGoQshsuETUHq5UgqS_Sg7+2V9To7Xcn6t87WZ0g@mail.gmail.com>
Date:   Fri, 12 May 2017 20:11:08 -0500
From:   Steve French <smfrench@...il.com>
To:     Karim Eshapa <karim.eshapa@...il.com>
Cc:     Steve French <sfrench@...ba.org>,
        "linux-cifs@...r.kernel.org" <linux-cifs@...r.kernel.org>,
        samba-technical <samba-technical@...ts.samba.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] fs: cifs: transport: Use time_after for time comparison

merged into cifs-2.6.git for-next

On Thu, May 11, 2017 at 6:53 PM, Karim Eshapa <karim.eshapa@...il.com> wrote:
> Use time_after kernel macro for time comparison
> that has safety check.
>
> Signed-off-by: Karim Eshapa <karim.eshapa@...il.com>
> ---
>  fs/cifs/transport.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
> index 4d64b5b..a7f5168 100644
> --- a/fs/cifs/transport.c
> +++ b/fs/cifs/transport.c
> @@ -94,7 +94,7 @@ DeleteMidQEntry(struct mid_q_entry *midEntry)
>         now = jiffies;
>         /* commands taking longer than one second are indications that
>            something is wrong, unless it is quite a slow link or server */
> -       if ((now - midEntry->when_alloc) > HZ) {
> +       if (time_after(now, midEntry->when_alloc + HZ)) {
>                 if ((cifsFYI & CIFS_TIMER) && (midEntry->command != command)) {
>                         pr_debug(" CIFS slow rsp: cmd %d mid %llu",
>                                midEntry->command, midEntry->mid);
> --
> 2.7.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Thanks,

Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ