summaryrefslogtreecommitdiffstats
path: root/net/strparser
diff options
context:
space:
mode:
authorTom Herbert <tom@herbertland.com>2016-08-23 14:55:30 -0400
committerDavid S. Miller <davem@davemloft.net>2016-08-23 19:23:12 -0400
commitcff6a334e63420e95ec40dc7fcdc0b8258615760 (patch)
tree0c63de6d61d8228c38e6ada5d7c7d131eaf10aff /net/strparser
parent3c90a941eda4836b0492b7f44e596a2700c1d0d6 (diff)
strparser: Queue work when being unpaused
When the upper layer unpauses a stream parser connection we need to queue rx_work to make sure no events are missed. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/strparser')
-rw-r--r--net/strparser/strparser.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/strparser/strparser.c b/net/strparser/strparser.c
index 68334b56db1e..4ecfc10cbe6d 100644
--- a/net/strparser/strparser.c
+++ b/net/strparser/strparser.c
@@ -445,6 +445,17 @@ int strp_init(struct strparser *strp, struct sock *csk,
445} 445}
446EXPORT_SYMBOL_GPL(strp_init); 446EXPORT_SYMBOL_GPL(strp_init);
447 447
448void strp_unpause(struct strparser *strp)
449{
450 strp->rx_paused = 0;
451
452 /* Sync setting rx_paused with RX work */
453 smp_mb();
454
455 queue_work(strp_wq, &strp->rx_work);
456}
457EXPORT_SYMBOL_GPL(strp_unpause);
458
448/* strp must already be stopped so that strp_tcp_recv will no longer be called. 459/* strp must already be stopped so that strp_tcp_recv will no longer be called.
449 * Note that strp_done is not called with the lower socket held. 460 * Note that strp_done is not called with the lower socket held.
450 */ 461 */