mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-07 05:05:12 +02:00
xt_condition: use non-interruptible check routine
Patrick McHardy let's it be known: "No need for interruptible locking, the section is very short and usually there's only a single iptables process running at a time."
This commit is contained in:
@@ -56,7 +56,7 @@ struct condition_variable {
|
||||
|
||||
/* proc_lock is a user context only semaphore used for write access */
|
||||
/* to the conditions' list. */
|
||||
static struct mutex proc_lock;
|
||||
static DEFINE_MUTEX(proc_lock);
|
||||
|
||||
static LIST_HEAD(conditions_list);
|
||||
static struct proc_dir_entry *proc_net_condition;
|
||||
@@ -122,9 +122,7 @@ static int condition_mt_check(const struct xt_mtchk_param *par)
|
||||
* Let's acquire the lock, check for the condition and add it
|
||||
* or increase the reference counter.
|
||||
*/
|
||||
if (mutex_lock_interruptible(&proc_lock) != 0)
|
||||
return -EINTR;
|
||||
|
||||
mutex_lock(&proc_lock);
|
||||
list_for_each_entry(var, &conditions_list, list) {
|
||||
if (strcmp(info->name, var->status_proc->name) == 0) {
|
||||
var->refcount++;
|
||||
|
Reference in New Issue
Block a user