Page MenuHomeFreeBSD

D34002.diff
No OneTemporary

D34002.diff

Index: sys/compat/linuxkpi/common/include/linux/kernel.h
===================================================================
--- sys/compat/linuxkpi/common/include/linux/kernel.h
+++ sys/compat/linuxkpi/common/include/linux/kernel.h
@@ -509,6 +509,21 @@
return (kstrtobool(buf, res));
}
+static inline int
+kstrtoint_from_user(const char __user *s, size_t count, unsigned int base,
+ int *p)
+{
+ char buf[36] = {};
+
+ if (count > (sizeof(buf) - 1))
+ count = (sizeof(buf) - 1);
+
+ if (copy_from_user(buf, s, count))
+ return (-EFAULT);
+
+ return (kstrtoint(buf, base, p));
+}
+
static inline int
kstrtou8_from_user(const char __user *s, size_t count, unsigned int base,
u8 *p)

File Metadata

Mime Type
text/plain
Expires
Thu, May 1, 6:28 PM (11 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17888364
Default Alt Text
D34002.diff (698 B)

Event Timeline