Patch "netfilter: nf_tables: elements with timeout below CONFIG_HZ never expire" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    netfilter: nf_tables: elements with timeout below CONFIG_HZ never expire

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     netfilter-nf_tables-elements-with-timeout-below-conf.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit fb51c9d86c6eb9fc52c12153a5fb30391b1fbe6a
Author: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
Date:   Tue Sep 3 01:06:41 2024 +0200

    netfilter: nf_tables: elements with timeout below CONFIG_HZ never expire
    
    [ Upstream commit e0c47281723f301894c14e6f5cd5884fdfb813f9 ]
    
    Element timeout that is below CONFIG_HZ never expires because the
    timeout extension is not allocated given that nf_msecs_to_jiffies64()
    returns 0. Set timeout to the minimum value to honor timeout.
    
    Fixes: 8e1102d5a159 ("netfilter: nf_tables: support timeouts larger than 23 days")
    Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 87c572ba69acb..5c937c5564b3f 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -4026,7 +4026,7 @@ int nf_msecs_to_jiffies64(const struct nlattr *nla, u64 *result)
 		return -ERANGE;
 
 	ms *= NSEC_PER_MSEC;
-	*result = nsecs_to_jiffies64(ms);
+	*result = nsecs_to_jiffies64(ms) ? : !!ms;
 	return 0;
 }
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux