I have incorporated your patch, built successfully and have booted my
test machine with this kernel. I have also run my manual test that
previously exposed this problem. It runs successfully now.
I checked-in the kernel file ipc/shm.c just now.
This should have checked-in much earlier. Sorry for the delay.
I had checked-in the f_mapping fix quite early on, and all instances
of those were fixed as well along with that check-in.
[ Laura Ramirez wrote ... ]
+ Hi Kishore,
+ I looked at your patch...you are right about the locking, i mistakenly
+ added the shm_ids locks in the wrong place last august...since its
+ only in the error case path, i would imagine the LTP tests would hit it
+ if there was any contention for the lock.
+ I'm attaching a patch that fixes the locking. In the new patch, the checks
+ are done under the lock and only releases the lock if the it needs
+ to get the shm_ids lock for the destroy. This patch doesnt include your
+ f_mapping fix, but it should. There are several places where f_op
+ gets assigned to cfs_shm_file_operations, please make sure that the
+ f_mapping gets assigned as well.
+ > Hi John,
+ > While working on one of the hangs related to shared memory during some
+ > ad-hoc testing I did (this is a differnt hang from the one corresponding
+ > to the test program you sent), I was not able to conclude definitively,
+ > but, I believe the attached patch contains the fix.
+ > Can you look through this patch and let me know if this is a good fix?
+ > I was convinced the problem that the patch tries is fix is indeed a
+ > serious problem. However, I did not want to jump ahead and conclude. So,
+ > I wanted to know, do you think it is useful to "definitively" reproduce
+ > this problem via a test case? If so, I'll try do that.
+ > NOTE: I'll send the fix for the shm hang that can be reproduced by the
+ > test program you sent.
+ > Regards,
+ > - Kishore
+ Content-Description: shm_kishore.patch
+ [ Attachment, skipping... ]
Get latest updates about Open Source Projects, Conferences and News.