qio: Do not kick when calling qdiscard()
authorBarret Rhoden <brho@cs.berkeley.edu>
Fri, 2 Sep 2016 17:20:42 +0000 (13:20 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 6 Sep 2016 13:26:23 +0000 (09:26 -0400)
commit24193e85dd377faa848527822555df18dfd8f113
tree1295386553edfb1aebc40ecda6f88b78d541b093
parent411b3c477cd08f14d82d5c2abc71d62be07bc2b0
qio: Do not kick when calling qdiscard()

The TCP stack will deadlock if you kick from a qdiscard.  This was probably
an unwritten assumption from Plan 9's original qio code.  Here's the
backtrace:

#01 [<0xffffffffc20193b5>] in sem_down
#02 [<0xffffffffc203829c>] in tcpkick  locks
#03 [<0xffffffffc2043cf5>] in __qbread
#04 [<0xffffffffc20452f2>] in qdiscard
#05 [<0xffffffffc2038b57>] in update
#06 [<0xffffffffc203a652>] in tcpiput  locks
#07 [<0xffffffffc202b372>] in ipiput4
#08 [<0xffffffffc202781c>] in etherread4
#09 [<0xffffffffc2018880>] in __ktask_wrapper
#10 [<0xffffffffc205e71f>] in process_routine_kmsg
#11 [<0xffffffffc2052875>] in proc_restartcore
#12 [<0xffffffffc2126d3c>] in sysenter_spin

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/src/ns/qio.c