File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -1608,6 +1608,21 @@ static int isotp_init(struct sock *sk)
1608
1608
return 0 ;
1609
1609
}
1610
1610
1611
+ static __poll_t isotp_poll (struct file * file , struct socket * sock , poll_table * wait )
1612
+ {
1613
+ struct sock * sk = sock -> sk ;
1614
+ struct isotp_sock * so = isotp_sk (sk );
1615
+
1616
+ __poll_t mask = datagram_poll (file , sock , wait );
1617
+ poll_wait (file , & so -> wait , wait );
1618
+
1619
+ /* Check for false positives due to TX state */
1620
+ if ((mask & EPOLLWRNORM ) && (so -> tx .state != ISOTP_IDLE ))
1621
+ mask &= ~(EPOLLOUT | EPOLLWRNORM );
1622
+
1623
+ return mask ;
1624
+ }
1625
+
1611
1626
static int isotp_sock_no_ioctlcmd (struct socket * sock , unsigned int cmd ,
1612
1627
unsigned long arg )
1613
1628
{
@@ -1623,7 +1638,7 @@ static const struct proto_ops isotp_ops = {
1623
1638
.socketpair = sock_no_socketpair ,
1624
1639
.accept = sock_no_accept ,
1625
1640
.getname = isotp_getname ,
1626
- .poll = datagram_poll ,
1641
+ .poll = isotp_poll ,
1627
1642
.ioctl = isotp_sock_no_ioctlcmd ,
1628
1643
.gettstamp = sock_gettstamp ,
1629
1644
.listen = sock_no_listen ,
You can’t perform that action at this time.
0 commit comments