Skip to content

Commit 43547d8

Browse files
JasonXingPaolo Abeni
authored andcommitted
netrom: Fix a data-race around sysctl_netrom_transport_busy_delay
We need to protect the reader reading the sysctl value because the value can be changed concurrently. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Jason Xing <kernelxing@tencent.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent 806f462 commit 43547d8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/netrom/af_netrom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ static int nr_create(struct net *net, struct socket *sock, int protocol,
459459
nr->n2 =
460460
msecs_to_jiffies(READ_ONCE(sysctl_netrom_transport_maximum_tries));
461461
nr->t4 =
462-
msecs_to_jiffies(sysctl_netrom_transport_busy_delay);
462+
msecs_to_jiffies(READ_ONCE(sysctl_netrom_transport_busy_delay));
463463
nr->idle =
464464
msecs_to_jiffies(sysctl_netrom_transport_no_activity_timeout);
465465
nr->window = sysctl_netrom_transport_requested_window_size;

0 commit comments

Comments
 (0)