lvs-devel
|
To: | horms@xxxxxxxxxxxx, ja@xxxxxx |
---|---|
Subject: | Race over table->data in proc_do_sync_threshold() |
Cc: | Linux Kernel Network Developers <netdev@xxxxxxxxxxxxxxx>, lvs-devel@xxxxxxxxxxxxxxx |
From: | Sishuai Gong <sishuai.system@xxxxxxxxx> |
Date: | Wed, 9 Aug 2023 20:30:37 -0400 |
Hi, We observed races over (struct ctl_table *) table->data when two threads are running proc_do_sync_threshold() in parallel, as shown below: Thread-1 Thread-2 memcpy(val, valp, sizeof(val)); memcpy(valp, val, sizeof(val)); This race probably would mess up table->data. Is it better to add a lock? Thanks |
<Prev in Thread] | Current Thread | [Next in Thread> |
---|---|---|
|
Previous by Date: | [PATCH v3 14/14] sysctl: Use ctl_table_size as stopping criteria for list macro, Joel Granados |
---|---|
Next by Date: | Re: Race over table->data in proc_do_sync_threshold(), Kuniyuki Iwashima |
Previous by Thread: | [PATCH v3 00/14] sysctl: Add a size argument to register functions in sysctl, Joel Granados |
Next by Thread: | Re: Race over table->data in proc_do_sync_threshold(), Kuniyuki Iwashima |
Indexes: | [Date] [Thread] [Top] [All Lists] |