numam-dpdk/lib
Cunming Liang 246750eb96 eal/linux: fix Rx interrupt read error management
In eal_intr_proc_rxtx_intr, negative value may be used as argument to
a function expecting a positive value. If 'read' returns EAGAIN as
example, the bytes_read updates to a negative value which continue
be passed as argument for the next 'read'.

Coverity issue: 107115

Function read(fd, &buf, bytes_read) returns a negative number.
Assigning: signed variable bytes_read = read.
CID 107115 (#1 of 1): Argument cannot be negative
(NEGATIVE_RETURNS) bytes_read is passed to a parameter
that cannot be negative.
    bytes_read = read(fd, &buf, bytes_read);

Fixes: c9f3ec1a0f ("eal/linux: add Rx interrupt control function")

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: David Marchand <david.marchand@6wind.com>
2015-12-12 22:34:43 +01:00
..
librte_acl acl/arm: enable acl for ARMv7 2015-12-08 03:00:42 +01:00
librte_cfgfile
librte_cmdline
librte_compat
librte_cryptodev mbuf_offload: mark experimental state 2015-12-12 00:34:57 +01:00
librte_distributor
librte_eal eal/linux: fix Rx interrupt read error management 2015-12-12 22:34:43 +01:00
librte_ether ethdev: fix reset of Rx mbuf allocation failures 2015-12-07 04:55:31 +01:00
librte_hash hash: fix build on IBM POWER and ARM 2015-12-09 22:02:33 +01:00
librte_ip_frag
librte_ivshmem
librte_jobstats
librte_kni
librte_kvargs
librte_lpm
librte_mbuf mbuf_offload: introduce library to attach offloads to mbuf 2015-11-25 19:18:04 +01:00
librte_mbuf_offload mbuf_offload: mark experimental state 2015-12-12 00:34:57 +01:00
librte_mempool mempool: fix mlx driver loading 2015-12-06 01:02:51 +01:00
librte_meter
librte_net net: fix build with gcc 4.4.7 and strict aliasing 2015-11-25 22:11:37 +01:00
librte_pipeline remove blank lines at end-of-file 2015-12-07 04:57:16 +01:00
librte_port port: fix sink port statistics 2015-12-07 01:03:13 +01:00
librte_power power: remove duplicate definition 2015-12-07 04:57:16 +01:00
librte_reorder
librte_ring
librte_sched sched: fix build without SSE4 2015-12-06 01:02:51 +01:00
librte_table table: improve lookup performance with prefetch offset 2015-11-26 00:45:50 +01:00
librte_timer
librte_vhost vhost: do not stall if guest is slow 2015-12-09 22:02:33 +01:00
Makefile mbuf_offload: introduce library to attach offloads to mbuf 2015-11-25 19:18:04 +01:00