All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Price <anprice@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH RHEL6] libgfs2: Use a matching context mount	option in mount_gfs2_meta
Date: Fri, 27 Feb 2015 18:04:23 +0000	[thread overview]
Message-ID: <54F0B1A7.5020304@redhat.com> (raw)
In-Reply-To: <2110513356.21305623.1425057426687.JavaMail.zimbra@redhat.com>

On 27/02/15 17:17, Bob Peterson wrote:
> ----- Original Message -----
>> On a system with SELinux enabled, if a gfs2 file system is mounted with
>> a context= option, the tools gfs2_quota, gfs2_tool, gfs2_grow and
>> gfs2_jadd will fail with "Device or resource busy". This is due to
>> SELinux failing the mount due to a mismatched context ("SELinux: mount
>> invalid.  Same superblock, different security settings").
>>
>> In order to work around this, parse the context option of the gfs2 mount
>> point in is_pathname_mounted() and use it in mount_gfs2_meta().

> Hi,
>
> Is this a memory leak (albeit a small one) or did I miss something?
> I don't see where the memory allocate by strndup is ever freed.

Well spotted. It is a tiny leak, but it couldn't hurt to plug it. I've 
checked that it isn't present in the upstream version of the patch so 
it's just this version which needs to be fixed. I'll send a follow-up 
patch shortly.

Thanks,
Andy



  reply	other threads:[~2015-02-27 18:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-23 18:44 [Cluster-devel] [PATCH RHEL6] libgfs2: Use a matching context mount option in mount_gfs2_meta Andrew Price
2015-02-27 17:17 ` Bob Peterson
2015-02-27 18:04   ` Andrew Price [this message]
2015-03-02 15:30   ` [Cluster-devel] [PATCH] libgfs2: Make sure secontext gets freed Andrew Price

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54F0B1A7.5020304@redhat.com \
    --to=anprice@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.