[Linux-cluster] [PATCH] Properly close file descriptors in qdiskd

Sean E. Millichamp sean at bruenor.org
Fri Aug 29 04:22:34 UTC 2008


While testing qdiskd with a ping heuristic on a cluster system with
SELinux in enforcing mode I noticed some odd AVC denial messages.  It
eventually led me to discover that the qdisk_open function wasn't
properly closing open file descriptors to some of my block devices
before returning on certain errors.  The end result was that the ping
heuristic inherited these open FDs which were in violation of the ping
SELinux policy.

In my specific case the lseek() call was failing for the partitions
corresponding to my extended partition container on my boot drives.

I scanned the rest of the function and noticed a couple of other calls
where it seemed like closing the file descriptor before returning was
also appropriate.

With this patch I haven't been able to reproduce the SELinux denial
messages.

This patch is against the RHEL52 code, but seems to also be applicable
on Fedora 9 and the git master branch.

What is the proper way to submit patches?  Should I open a bug report
somewhere?

Thanks,
Sean

-------------- next part --------------
A non-text attachment was scrubbed...
Name: qdisk-close-fd.patch
Type: text/x-patch
Size: 725 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/linux-cluster/attachments/20080829/f60a843d/attachment.bin>


More information about the Linux-cluster mailing list