Skip to content

Commit d7cf4a3

Browse files
Ursula Braundavem330
authored andcommitted
net/smc: fix smc_poll in SMC_INIT state
smc_poll() returns with mask bit EPOLLPRI if the connection urg_state is SMC_URG_VALID. Since SMC_URG_VALID is zero, smc_poll signals EPOLLPRI errorneously if called in state SMC_INIT before the connection is created, for instance in a non-blocking connect scenario. This patch switches to non-zero values for the urg states. Reviewed-by: Karsten Graul <[email protected]> Fixes: de8474e ("net/smc: urgent data support") Signed-off-by: Ursula Braun <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 64cc41e commit d7cf4a3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

net/smc/smc.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ struct smc_host_cdc_msg { /* Connection Data Control message */
113113
} __aligned(8);
114114

115115
enum smc_urg_state {
116-
SMC_URG_VALID, /* data present */
117-
SMC_URG_NOTYET, /* data pending */
118-
SMC_URG_READ /* data was already read */
116+
SMC_URG_VALID = 1, /* data present */
117+
SMC_URG_NOTYET = 2, /* data pending */
118+
SMC_URG_READ = 3, /* data was already read */
119119
};
120120

121121
struct smc_connection {

0 commit comments

Comments
 (0)