Patch "tipc: Fix recognition of trial period" has been added to the 5.15-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

    tipc: Fix recognition of trial period

to the 5.15-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:
     tipc-fix-recognition-of-trial-period.patch
and it can be found in the queue-5.15 subdirectory.

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



commit 8e2f0cef7c38c4779d7af2d5dd4c77588a13c4c6
Author: Mark Tomlinson <mark.tomlinson@xxxxxxxxxxxxxxxxxxx>
Date:   Mon Oct 10 15:46:13 2022 +1300

    tipc: Fix recognition of trial period
    
    [ Upstream commit 28be7ca4fcfd69a2d52aaa331adbf9dbe91f9e6e ]
    
    The trial period exists until jiffies is after addr_trial_end. But as
    jiffies will eventually overflow, just using time_after will eventually
    give incorrect results. As the node address is set once the trial period
    ends, this can be used to know that we are not in the trial period.
    
    Fixes: e415577f57f4 ("tipc: correct discovery message handling during address trial period")
    Signed-off-by: Mark Tomlinson <mark.tomlinson@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/tipc/discover.c b/net/tipc/discover.c
index da69e1abf68f..e8630707901e 100644
--- a/net/tipc/discover.c
+++ b/net/tipc/discover.c
@@ -148,8 +148,8 @@ static bool tipc_disc_addr_trial_msg(struct tipc_discoverer *d,
 {
 	struct net *net = d->net;
 	struct tipc_net *tn = tipc_net(net);
-	bool trial = time_before(jiffies, tn->addr_trial_end);
 	u32 self = tipc_own_addr(net);
+	bool trial = time_before(jiffies, tn->addr_trial_end) && !self;
 
 	if (mtyp == DSC_TRIAL_FAIL_MSG) {
 		if (!trial)



[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