Re: query about sending udp packets in kernel mode

From: Andi Kleen (ak@suse.de)
Date: Fri Feb 16 2001 - 10:44:17 EST


aprasad@in.ibm.com writes:

> i am getting EFAULT.

Use

mm_segment_t oldseg = get_fs();
set_fs(KERNEL_DS);

... sendmsg

set_fs(oldseg);

-Andi

P.S.: This is really getting a FAQ. If it isn't already please someone add
it to the linux-kernel FAQ.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Feb 23 2001 - 21:00:13 EST