Results 1 to 1 of 1
Hi,
In a module i've open a socket...I open my device with minicom the send is ok...but if i use ppp i crash linux on sock_sendmsg (no crash if i ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-05-2007 #1Just Joined!
- Join Date
- Jul 2007
- Location
- France
- Posts
- 1
system crash with sock_sendmsg
Hi,
In a module i've open a socket...I open my device with minicom the send is ok...but if i use ppp i crash linux on sock_sendmsg (no crash if i put sock_sendmsg in commentary).
This is my code :
int sendmsg(struct socket *sock, unsigned char *buf, int len)
{
struct msghdr msg;
struct iovec iov;
mm_segment_t oldfs;
int size=0;
iov.iov_base = (char *) buf;
iov.iov_len = (__kernel_size_t) len;
msg.msg_name = 0;
msg.msg_name_len = 0;
msg.msg_iov = &iov;
msg.msg_iov_len = 1;
msg.msg_control = NULL;
msg.msg_controllen = 0;
msg.msg_flags = MSG_NOSIGNAL;
oldfs = get_fs();
set_fs(KERNEL_DS);
size=sock_sendmsg(sock, &msg, len);
set_fs(oldfs);
return size;
}
Someone see my error ? or someone have an idea ??
Thank's


Reply With Quote
