summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-06-04 15:16:12 -0700
committerDavid S. Miller <davem@davemloft.net>2008-06-04 15:16:12 -0700
commit22dd485022f3d0b162ceb5e67d85de7c3806aa20 (patch)
treeb96ff526ef0e7fe161eecdaa9edf999e3c3a4791 /drivers/usb
parent199f7d24ae59894243687a234a909f44a8724506 (diff)
raw: Raw socket leak.
The program below just leaks the raw kernel socket int main() { int fd = socket(PF_INET, SOCK_RAW, IPPROTO_UDP); struct sockaddr_in addr; memset(&addr, 0, sizeof(addr)); inet_aton("127.0.0.1", &addr.sin_addr); addr.sin_family = AF_INET; addr.sin_port = htons(2048); sendto(fd, "a", 1, MSG_MORE, &addr, sizeof(addr)); return 0; } Corked packet is allocated via sock_wmalloc which holds the owner socket, so one should uncork it and flush all pending data on close. Do this in the same way as in UDP. Signed-off-by: Denis V. Lunev <den@openvz.org> Acked-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/usb')
0 files changed, 0 insertions, 0 deletions