Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
这个提交包含在:
@@ -110,10 +110,12 @@ bool should_fail(struct fault_attr *attr, ssize_t size)
|
||||
if (in_task()) {
|
||||
unsigned int fail_nth = READ_ONCE(current->fail_nth);
|
||||
|
||||
if (fail_nth && !WRITE_ONCE(current->fail_nth, fail_nth - 1))
|
||||
goto fail;
|
||||
if (fail_nth) {
|
||||
if (!WRITE_ONCE(current->fail_nth, fail_nth - 1))
|
||||
goto fail;
|
||||
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* No need to check any other properties if the probability is 0 */
|
||||
|
@@ -485,7 +485,7 @@ static ssize_t config_show(struct device *dev,
|
||||
config->test_driver);
|
||||
else
|
||||
len += snprintf(buf+len, PAGE_SIZE - len,
|
||||
"driver:\tEMTPY\n");
|
||||
"driver:\tEMPTY\n");
|
||||
|
||||
if (config->test_fs)
|
||||
len += snprintf(buf+len, PAGE_SIZE - len,
|
||||
@@ -493,7 +493,7 @@ static ssize_t config_show(struct device *dev,
|
||||
config->test_fs);
|
||||
else
|
||||
len += snprintf(buf+len, PAGE_SIZE - len,
|
||||
"fs:\tEMTPY\n");
|
||||
"fs:\tEMPTY\n");
|
||||
|
||||
mutex_unlock(&test_dev->config_mutex);
|
||||
|
||||
@@ -746,11 +746,11 @@ static int trigger_config_run_type(struct kmod_test_device *test_dev,
|
||||
strlen(test_str));
|
||||
break;
|
||||
case TEST_KMOD_FS_TYPE:
|
||||
break;
|
||||
kfree_const(config->test_fs);
|
||||
config->test_driver = NULL;
|
||||
copied = config_copy_test_fs(config, test_str,
|
||||
strlen(test_str));
|
||||
break;
|
||||
default:
|
||||
mutex_unlock(&test_dev->config_mutex);
|
||||
return -EINVAL;
|
||||
@@ -880,10 +880,10 @@ static int test_dev_config_update_uint_sync(struct kmod_test_device *test_dev,
|
||||
int (*test_sync)(struct kmod_test_device *test_dev))
|
||||
{
|
||||
int ret;
|
||||
long new;
|
||||
unsigned long new;
|
||||
unsigned int old_val;
|
||||
|
||||
ret = kstrtol(buf, 10, &new);
|
||||
ret = kstrtoul(buf, 10, &new);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -918,9 +918,9 @@ static int test_dev_config_update_uint_range(struct kmod_test_device *test_dev,
|
||||
unsigned int max)
|
||||
{
|
||||
int ret;
|
||||
long new;
|
||||
unsigned long new;
|
||||
|
||||
ret = kstrtol(buf, 10, &new);
|
||||
ret = kstrtoul(buf, 10, &new);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -1146,7 +1146,7 @@ static struct kmod_test_device *register_test_dev_kmod(void)
|
||||
struct kmod_test_device *test_dev = NULL;
|
||||
int ret;
|
||||
|
||||
mutex_unlock(®_dev_mutex);
|
||||
mutex_lock(®_dev_mutex);
|
||||
|
||||
/* int should suffice for number of devices, test for wrap */
|
||||
if (unlikely(num_test_devs + 1) < 0) {
|
||||
|
在新工单中引用
屏蔽一个用户