Re: + drivers-acpi-apei-erst-dbgc-get_useru64-doesnt-work-on-i386.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/11/2010 11:03 PM, Andrew Morton wrote:
<I suspect you can do get_user() on a 4-byte or 8-byte struct right now
and it'll work>

Not so:

/home/hpa/kernel/linux-2.6-tip.urgent/arch/x86/lib/testuser.c:12: error: conversion to non-scalar type requested

	-hpa
#include <linux/types.h>
#include <linux/uaccess.h>

struct foo {
	u16 a, b;
};

int bluttan(struct foo *foo)
{
	struct foo bar;

	if (get_user(bar, foo))
		return -1;

	return bar.a + bar.b;
}

[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux