On Tue, Aug 22, 2017 at 01:47:18PM -0600, Jeff Inman wrote: > Hi folks, > > I’m new to this. Please let me know, if you need a different format, etc. Yes, 1. Please send them with git send-email command, so they will be threaded together. 2. The commit messages should include description and you already have it here, just copy/paste to the commit message itself. 3. Fixes lines should be in the kernel format and not hand-made as it is now. The following git alias in your .gitconfig can create the proper Fixes line for the specific hash. [alias] fixes = log --abbrev=12 -1 --format='Fixes: %h (\"%s\")' For example: git fixes ac3a949fb2f in the kernel will produce: Fixes: ac3a949fb2ff ("IB/CM: Set appropriate slid and dlid when handling CM request") 4. No extra space between Fixes and your Signed-off-by signature. 5. Don't forget to add Sean's acked-by. Hope to see it merged. Thanks > > Of the two of these, 0001 is the one I care about. > > > 0001: The patch comment explains the details of the fix, but here’s some context: > > Access to entries in the rsocket index 'idm' is effectively serialized by creation/destruction of file-descriptors for /dev/infiniband/rdma_cm. New fds are created in rsocket -> rdma_create_id, and released in rclose -> rs_free -> rdma_destroy_id. rs_free() was releasing the index with rs_remove() *after* calling rdma_destroy_id(). But closing the file-descriptor in rdma_destroy_id() yields to the scheduler, making it easy for another thread to get into rsocket() during the break. This thread can get its own fd (because the first thread’s close has succeed) and store its own rs into the index, before the first thread has gotten around to calling rs_remove(). After the first thread does call rs_remove(), the second thread will segfault in most rsocket-related functions. > > Note that I’m not assuming an rsocket can be simultaneously operated by different threads. I just have separate threads that open/operate/close their own rsockets. This seems to be working fine, except for this patched problem. Am I mistaken that this is reasonable? > > > 0002: Removing the potential for segfaults when a legitimate rs is not found in the index. This should never happen unless there is a bug like the one fixed in 0001 (or someone stupidly makes a call with a closed rsocket …), so the tests should almost always be wasted. Made this a separate patch, so you could ignore it, if you want. > > > Thanks, > Jeff > > -- > Jeff Inman > High-Performance Computing (HPC-ENV) > MS-B295, Los Alamos National Laboratory > Los Alamos, NM 87545 > > > > > > > > Jeff Inman (2): > rsocket: fix a race-condition in rs_free() > rsocket: fix segfaults when rs is not found in the index > > librdmacm/rsocket.c | 22 +++++++++++++++++++--- > 1 files changed, 19 insertions(+), 3 deletions(-) > > >