For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: Test for 6ed94e81a1492fe1d512
Author: syoshida@redhat.com
#syz test
diff --git a/net/9p/client.c b/net/9p/client.c
index f0dcf252af7e..28742f19041e 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -599,7 +599,7 @@ p9_client_rpc(struct p9_client *c, int8_t type, const char *fmt, ...)
smp_rmb();
if (err == -ERESTARTSYS && c->status == Connected &&
- type == P9_TFLUSH) {
+ type == P9_TFLUSH && !fatal_signal_pending(current)) {
sigpending = 1;
clear_thread_flag(TIF_SIGPENDING);
goto again;
@@ -609,7 +609,8 @@ p9_client_rpc(struct p9_client *c, int8_t type, const char *fmt, ...)
p9_debug(P9_DEBUG_ERROR, "req_status error %d\n", req->t_err);
err = req->t_err;
}
- if (err == -ERESTARTSYS && c->status == Connected) {
+ if (err == -ERESTARTSYS && c->status == Connected &&
+ !fatal_signal_pending(current)) {
p9_debug(P9_DEBUG_MUX, "flushing\n");
sigpending = 1;
clear_thread_flag(TIF_SIGPENDING);
@@ -694,7 +695,8 @@ static struct p9_req_t *p9_client_zc_rpc(struct p9_client *c, int8_t type,
p9_debug(P9_DEBUG_ERROR, "req_status error %d\n", req->t_err);
err = req->t_err;
}
- if (err == -ERESTARTSYS && c->status == Connected) {
+ if (err == -ERESTARTSYS && c->status == Connected &&
+ !fatal_signal_pending(current)) {
p9_debug(P9_DEBUG_MUX, "flushing\n");
sigpending = 1;
clear_thread_flag(TIF_SIGPENDING);