The memset which is performed if access_ok() fails got lost in the
copy_*_user() rework. Put it back.
Bloats the kernel by 8k :(
Also contains a few related #includes and whitespace fixlets from
Joshua Kwan <joshk@triplehelix.org>
*/
#include <linux/sched.h>
#include <linux/mm.h>
+#include <linux/string.h>
+
#include <asm/segment.h>
#define VERIFY_READ 0
clear_user(void *to, unsigned long n)
{
memset(to, 0, n);
- return(0);
+ return 0;
}
#endif /* _H8300_UACCESS_H */
#include <linux/errno.h>
#include <linux/thread_info.h>
#include <linux/prefetch.h>
+#include <linux/string.h>
#include <asm/page.h>
#define VERIFY_READ 0
{
if (access_ok(VERIFY_READ, from, n))
n = __copy_from_user(to, from, n);
+ else
+ memset(to, 0, n);
return n;
}
*/
#include <linux/sched.h>
#include <linux/mm.h>
+#include <linux/string.h>
+
#include <asm/segment.h>
#define VERIFY_READ 0
clear_user(void *to, unsigned long n)
{
memset(to, 0, n);
- return(0);
+ return 0;
}
#endif /* _M68KNOMMU_UACCESS_H */