Re: [PATCHv2 net] vhost: fix total length when packets are too short

2014-03-28 Thread David Miller
From: "Michael S. Tsirkin" Date: Thu, 27 Mar 2014 12:00:26 +0200 > When mergeable buffers are disabled, and the > incoming packet is too large for the rx buffer, > get_rx_bufs returns success. > > This was intentional in order for make recvmsg > truncate the packet and then handle_rx would > det

[PATCHv2 net] vhost: fix total length when packets are too short

2014-03-27 Thread Michael S. Tsirkin
When mergeable buffers are disabled, and the incoming packet is too large for the rx buffer, get_rx_bufs returns success. This was intentional in order for make recvmsg truncate the packet and then handle_rx would detect err != sock_len and drop it. Unfortunately we pass the original sock_len to