brute-force - on a global mutex that isn't nested into anything.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
return 0;
}
+static DEFINE_MUTEX(acct_on_mutex);
+
/**
* sys_acct - enable/disable process accounting
* @name: file name for accounting records or NULL to shutdown accounting
struct filename *tmp = getname(name);
if (IS_ERR(tmp))
return PTR_ERR(tmp);
+ mutex_lock(&acct_on_mutex);
error = acct_on(tmp);
+ mutex_unlock(&acct_on_mutex);
putname(tmp);
} else {
struct bsd_acct_struct *acct;