Commit 05258a0
committed
SUNRPC: Fix a slow server-side memory leak with RPC-over-TCP
Jan Schunk reports that his small NFS servers suffer from memory
exhaustion after just a few days. A bisect shows that commit
e18e157 ("SUNRPC: Send RPC message on TCP with a single
sock_sendmsg() call") is the first bad commit.
That commit assumed that sock_sendmsg() releases all the pages in
the underlying bio_vec array, but the reality is that it doesn't.
svc_xprt_release() releases the rqst's response pages, but the
record marker page fragment isn't one of those, so it is never
released.
This is a narrow fix that can be applied to stable kernels. A
more extensive fix is in the works.
Reported-by: Jan Schunk <[email protected]>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218671
Fixes: e18e157 ("SUNRPC: Send RPC message on TCP with a single sock_sendmsg() call")
Cc: Alexander Duyck <[email protected]>
Cc: Jakub Kacinski <[email protected]>
Cc: David Howells <[email protected]>
Reviewed-by: David Howells <[email protected]>
Signed-off-by: Chuck Lever <[email protected]>1 parent 99dc2ef commit 05258a0
1 file changed
+1
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1206 | 1206 | | |
1207 | 1207 | | |
1208 | 1208 | | |
1209 | | - | |
1210 | | - | |
1211 | | - | |
1212 | | - | |
1213 | | - | |
1214 | | - | |
1215 | | - | |
1216 | | - | |
1217 | | - | |
1218 | 1209 | | |
1219 | 1210 | | |
1220 | 1211 | | |
| |||
1244 | 1235 | | |
1245 | 1236 | | |
1246 | 1237 | | |
| 1238 | + | |
1247 | 1239 | | |
1248 | 1240 | | |
1249 | 1241 | | |
| |||
0 commit comments