osaf/libs/core/mds/mds_dt_tipc.c | 2 +-
osaf/libs/core/mds/mds_dt_trans.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
The result from poll() was incorrectly stored in an unsigned integer, which
means that if poll() returns -1 we would interpret the result as a very large
number. Subsequently, we read the possibly undefined values of pollfd.revents,
and may perform a blocking read.
diff --git a/osaf/libs/core/mds/mds_dt_tipc.c b/osaf/libs/core/mds/mds_dt_tipc.c
--- a/osaf/libs/core/mds/mds_dt_tipc.c
+++ b/osaf/libs/core/mds/mds_dt_tipc.c
@@ -659,7 +659,7 @@ static uint32_t mdtm_process_recv_events
*/
while (1) {
- unsigned int pollres;
+ int pollres;
struct pollfd pfd[3];
struct tipc_event event;
diff --git a/osaf/libs/core/mds/mds_dt_trans.c
b/osaf/libs/core/mds/mds_dt_trans.c
--- a/osaf/libs/core/mds/mds_dt_trans.c
+++ b/osaf/libs/core/mds/mds_dt_trans.c
@@ -781,7 +781,7 @@ uint32_t mdtm_process_recv_events_tcp(vo
if discovery events are received , process the discovery events
*/
while (1) {
- unsigned int pollres;
+ int pollres;
pfd[0].events = POLLIN;
pfd[1].events = POLLIN;
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel