Skip to content

cifs: fix kmap deadlock on CONFIG_HIGHMEM machines with large r/wsizes

Jeff Layton linux-cifs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2cifs: on CONFIG_HIGHMEM machines, limit the rsize/wsize to the kmap spacefs/cifs/connect.c+18 -00 replies
2/2cifs: when CONFIG_HIGHMEM is set, serialize the read/write kmapsfs/cifs/cifssmb.c+29 -12 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] cifs: fix kmap deadlock on CONFIG_HIGHMEM machines with large r/wsizes

The current read/write code in cifs.ko relies on being able to kmap all of the data at once. This is a problem on machines with high memory. kmap addresses are a limited resource and you can easily end up exhausting it if your rsize/wsize is too large.

One such report of this problem is here:

    https://bugzilla.redhat.com/show_bug.cgi?id=832252

This patchset is intended as a temporary workaround on those machines that should help prevent that sort of exhaustion.

The right fix for this is to teach the code how to deal with lists of pages directly instead of relying on being able to kmap them all. I have a patchset in progress that does just that, but it's not complete yet and is pretty invasive. Until that's ready, I think this set is a reasonable workaround.

Jeff Layton (2):
cifs: on CONFIG_HIGHMEM machines, limit the rsize/wsize to the kmap
space
cifs: when CONFIG_HIGHMEM is set, serialize the read/write kmaps

 fs/cifs/cifssmb.c |   30 +++++++++++++++++++++++++++++-
 fs/cifs/connect.c |   18 ++++++++++++++++++
 2 files changed, 47 insertions(+), 1 deletions(-)
Signature · 1 line
1.7.7.6