projects
/
kernel
/
kernel-generic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
02ac326
)
Phonet: do not set POLLOUT in case of send buffer overflow
author
Rémi Denis-Courmont
<remi.denis-courmont@nokia.com>
Mon, 30 Aug 2010 12:57:05 +0000
(12:57 +0000)
committer
David S. Miller
<davem@davemloft.net>
Tue, 31 Aug 2010 20:04:33 +0000
(13:04 -0700)
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/phonet/socket.c
patch
|
blob
|
history
diff --git
a/net/phonet/socket.c
b/net/phonet/socket.c
index
6e9848b
..
7c91f73
100644
(file)
--- a/
net/phonet/socket.c
+++ b/
net/phonet/socket.c
@@
-281,7
+281,9
@@
static unsigned int pn_socket_poll(struct file *file, struct socket *sock,
if (!mask && sk->sk_state == TCP_CLOSE_WAIT)
return POLLHUP;
- if (sk->sk_state == TCP_ESTABLISHED && atomic_read(&pn->tx_credits))
+ if (sk->sk_state == TCP_ESTABLISHED &&
+ atomic_read(&sk->sk_wmem_alloc) < sk->sk_sndbuf &&
+ atomic_read(&pn->tx_credits))
mask |= POLLOUT | POLLWRNORM | POLLWRBAND;
return mask;