Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1494974

Re: [PATCH 4.4 022/118] IB/uverbs: Fix race between uverbs_close and remove_one

From Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Newsgroups linux.kernel
Subject Re: [PATCH 4.4 022/118] IB/uverbs: Fix race between uverbs_close and remove_one
Date 2016-10-03 19:10 +0200
Message-ID <soeUx-7Mb-13@gated-at.bofh.it> (permalink)
References <skg8x-Rq-3@gated-at.bofh.it> <skhR0-1Z0-47@gated-at.bofh.it> <soaxz-4S2-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Oct 03, 2016 at 02:28:40PM +0200, Vegard Nossum wrote:

> This lock is literally called "cleanup mutex" and it's not really
> documented what data it protects. Is there a better solution here?

I agree it is very complex and hard to understand. This is why it
needed patching :| The mutex is in fact pretty much locking
code. (ensuring that ib_uverbs_cleanup_ucontext only runs on one
thread during this race)

There are at least three locks involved in this process. I didn't see
any obvious way to extend any of the other locks to handle this case.

The argument against most simple solutions (eg a rw lock rather than
the srcu) has been performance on these paths.

Jason

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH 4.4 022/118] IB/uverbs: Fix race between uverbs_close and remove_one Vegard Nossum <vegard.nossum@gmail.com> - 2016-10-03 14:30 +0200
  Re: [PATCH 4.4 022/118] IB/uverbs: Fix race between uverbs_close and  remove_one Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-10-03 19:10 +0200

csiph-web