Subject: [PATCH 5.4 131/203] compat_ioctl: handle SIOCOUTQNSD

From: Greg Kroah-Hartman <[email-masked]>
Date: Fri, 17 Jan 2020 00:17:28 +0100

From: Arnd Bergmann <[email-masked]>

commit 9d7bf41fafa5b5ddd4c13eb39446b0045f0a8167 upstream.

Unlike the normal SIOCOUTQ, SIOCOUTQNSD was never handled in compat
mode. Add it to the common socket compat handler along with similar
ones.

Fixes: 2f4e1b397097 ("tcp: ioctl type SIOCOUTQNSD returns amount of data not sent")
Cc: Eric Dumazet <[email-masked]>
Cc: [email-masked]
Cc: "David S. Miller" <[email-masked]>
Signed-off-by: Arnd Bergmann <[email-masked]>
Signed-off-by: Greg Kroah-Hartman <[email-masked]>

---
 net/socket.c |    1 +
 1 file changed, 1 insertion(+)

--- a/net/socket.c
+++ b/net/socket.c
@@ -3532,6 +3532,7 @@ static int compat_sock_ioctl_trans(struc
 	case SIOCSARP:
 	case SIOCGARP:
 	case SIOCDARP:
+	case SIOCOUTQNSD:
 	case SIOCATMARK:
 		return sock_do_ioctl(net, sock, cmd, arg);
 	}