Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115947950
D34002.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
698 B
Referenced Files
None
Subscribers
None
D34002.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D34002: LinuxKPI: add kstrtoint_from_user()
Attached
Detach File
Event Timeline
Log In to Comment