net: mcf: limit buffer descriptor count
commit070c4b92b8cd5390889716677a0b92444d6e087a
authorPrasad J Pandit <pjp@fedoraproject.org>
Thu, 22 Sep 2016 10:32:37 +0000 (22 16:02 +0530)
committerJason Wang <jasowang@redhat.com>
Tue, 27 Sep 2016 09:54:22 +0000 (27 17:54 +0800)
treeebdc2121ceaed8049f19175f8c5b9320aa37ee2a
parentb38636b83727d611a354217fa9d17de5872d7da4
net: mcf: limit buffer descriptor count

ColdFire Fast Ethernet Controller uses buffer descriptors to manage
data flow to/fro receive & transmit queues. While transmitting
packets, it could continue to read buffer descriptors if a buffer
descriptor has length of zero and has crafted values in bd.flags.
Set upper limit to number of buffer descriptors.

Reported-by: Li Qiang <liqiang6-s@360.cn>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/mcf_fec.c