Skip to contentSkip to conversation

fault-inject: don't convert unsigned type value as signed int

PATCH New Akinobu Mita 1 participant 1 message Apr 17, 2017 Proc filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fault-inject: don't convert unsigned type value as signed int

This fixes fault-inject-simplify-access-check-for-fail-nth.patch in -mm tree which by mistake partially reverts the change by fault-inject- parse-as-natural-1-based-value-for-fail-nth-write-interface.patch.

---
 fs/proc/base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/proc/base.c +1 -1
index ea1039d..1f5139e 100644
@@ -1366,7 +1366,7 @@ static ssize_t proc_fail_nth_write(struct file *file, const char __user *buf,
 	int err;
 	unsigned int n;
 
-	err = kstrtoint_from_user(buf, count, 0, &n);
+	err = kstrtouint_from_user(buf, count, 0, &n);
 	if (err)
 		return err;
 
Signature · 1 line
2.7.4