[ovs-dev] [PATCH] netdev-linux: avoid negative value cast to non-negative in comparison
Ben Pfaff
blp at nicira.com
Thu Jul 18 18:25:51 UTC 2013
On Thu, Jul 18, 2013 at 04:08:06PM +0800, ZhengLingyun wrote:
> I am using a userspace OVS, there is a constant ERR message in log:
> "dpif_netdev|ERR|error receiving data from ovs-netdev: Message too long"
> Check the code and find there is a comparison between ssize_t and size_t type in
> netdev_rx_linux_recv(). It makes the negative "retval" greater than the "size".
>
>
>
>
> Change the sequence of comparison to avoid negative return value cast to
> a positive and become greater then a non-negative value.
>
>
> Signed-off-by: ZhengLingyun <konghuarukhr at 163.com>
Thanks, I applied this to master. The bug wasn't present in any
release branches.
More information about the dev
mailing list