From: Marco Munderloh <munderl@tnt.uni-hannover.de>
To: Matthew Wilcox <willy@linux.intel.com>
Subject: Re: [PATCH V2] catch acl==NULL in __jfs_set_acl (fixed null pointer dereference)
Date: Tue, 29 Apr 2014 20:30:54 +0200 [thread overview]
Message-ID: <535FEFDE.405@tnt.uni-hannover.de> (raw)
In-Reply-To: <20140429182602.GD5929@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 704 bytes --]
> You don't need to initialise rc here.
Yes, you are true. I missed the __jfs_setxattr before the set_cached_acl.
But why not, more simply:
>
> +++ b/fs/jfs/acl.c
> @@ -83,6 +83,8 @@ static int __jfs_set_acl(tid_t tid, struct inode *inode, int t
> switch (type) {
> case ACL_TYPE_ACCESS:
> ea_name = POSIX_ACL_XATTR_ACCESS;
> + if (!acl)
> + break;
> rc = posix_acl_equiv_mode(acl, &inode->i_mode);
> if (rc < 0)
> return rc;
I could have done it like this, but I copied the way it was done in btrfs/acl.c, where the jfs implementation seems to come from.
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4700 bytes --]
prev parent reply other threads:[~2014-04-29 18:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-29 17:59 [PATCH V2] catch acl==NULL in __jfs_set_acl (fixed null pointer dereference) Marco Munderloh
2014-04-29 18:26 ` Matthew Wilcox
2014-04-29 18:28 ` Christoph Hellwig
2014-04-29 18:33 ` Marco Munderloh
2014-04-29 18:30 ` Marco Munderloh [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=535FEFDE.405@tnt.uni-hannover.de \
--to=munderl@tnt.uni-hannover.de \
--cc=willy@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).