All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.ibm.com>
To: Nikolay Borisov <nborisov@suse.com>, zohar@linux.vnet.ibm.com
Cc: jmorris@namei.org, linux-integrity@vger.kernel.org,
	linux-security-module@vger.kernel.org
Subject: Re: [PATCH] ima: Use inode_is_open_for_write
Date: Tue, 11 Dec 2018 08:23:23 -0500	[thread overview]
Message-ID: <1544534603.4028.1.camel@linux.ibm.com> (raw)
In-Reply-To: <20181211083140.21430-1-nborisov@suse.com>

On Tue, 2018-12-11 at 10:31 +0200, Nikolay Borisov wrote:
> Use the aptly named function rather than open coding the check. No
> functional changes.
> 
> Signed-off-by: Nikolay Borisov <nborisov@suse.com>

Thanks.  This patch is now in the #next-integrity branch.

Mimi

> ---
>  security/integrity/ima/ima_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
> index 1b88d58e1325..05fbf8a2fa42 100644
> --- a/security/integrity/ima/ima_main.c
> +++ b/security/integrity/ima/ima_main.c
> @@ -103,7 +103,7 @@ static void ima_rdwr_violation_check(struct file *file,
>  	} else {
>  		if (must_measure)
>  			set_bit(IMA_MUST_MEASURE, &iint->atomic_flags);
> -		if ((atomic_read(&inode->i_writecount) > 0) && must_measure)
> +		if (inode_is_open_for_write(inode) && must_measure)
>  			send_writers = true;
>  	}
> 


      reply	other threads:[~2018-12-11 13:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-11  8:31 [PATCH] ima: Use inode_is_open_for_write Nikolay Borisov
2018-12-11 13:23 ` Mimi Zohar [this message]

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=1544534603.4028.1.camel@linux.ibm.com \
    --to=zohar@linux.ibm.com \
    --cc=jmorris@namei.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=nborisov@suse.com \
    --cc=zohar@linux.vnet.ibm.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.