* [Ocfs2-devel] [PATCH] ocfs2: fix SGID not inherited issue
@ 2015-12-07 4:09 Junxiao Bi
2015-12-08 1:07 ` Srinivas Eeda
2015-12-08 21:22 ` Andrew Morton
0 siblings, 2 replies; 5+ messages in thread
From: Junxiao Bi @ 2015-12-07 4:09 UTC (permalink / raw)
To: ocfs2-devel
commit 8f1eb48758aa ("ocfs2: fix umask ignored issue") introduced an issue,
SGID of sub dir was not inherited from its parents dir. It is because SGID
is set into "inode->i_mode" in ocfs2_get_init_inode(), but is overwritten
by "mode" which don't have SGID set later.
Fixes: 8f1eb48758aa ("ocfs2: fix umask ignored issue")
Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
Cc: <stable@vger.kernel.org>
---
fs/ocfs2/namei.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
index a03f6f4..3123408 100644
--- a/fs/ocfs2/namei.c
+++ b/fs/ocfs2/namei.c
@@ -367,13 +367,11 @@ static int ocfs2_mknod(struct inode *dir,
goto leave;
}
- status = posix_acl_create(dir, &mode, &default_acl, &acl);
+ status = posix_acl_create(dir, &inode->i_mode, &default_acl, &acl);
if (status) {
mlog_errno(status);
goto leave;
}
- /* update inode->i_mode after mask with "umask". */
- inode->i_mode = mode;
handle = ocfs2_start_trans(osb, ocfs2_mknod_credits(osb->sb,
S_ISDIR(mode),
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Ocfs2-devel] [PATCH] ocfs2: fix SGID not inherited issue
2015-12-07 4:09 [Ocfs2-devel] [PATCH] ocfs2: fix SGID not inherited issue Junxiao Bi
@ 2015-12-08 1:07 ` Srinivas Eeda
2015-12-08 21:22 ` Andrew Morton
1 sibling, 0 replies; 5+ messages in thread
From: Srinivas Eeda @ 2015-12-08 1:07 UTC (permalink / raw)
To: ocfs2-devel
Thanks Junxiao!
Acked-by: Srinivas Eeda <srinivas.eeda@oracle.com>
On 12/06/2015 08:09 PM, Junxiao Bi wrote:
> commit 8f1eb48758aa ("ocfs2: fix umask ignored issue") introduced an issue,
> SGID of sub dir was not inherited from its parents dir. It is because SGID
> is set into "inode->i_mode" in ocfs2_get_init_inode(), but is overwritten
> by "mode" which don't have SGID set later.
>
> Fixes: 8f1eb48758aa ("ocfs2: fix umask ignored issue")
> Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
> Cc: <stable@vger.kernel.org>
> ---
> fs/ocfs2/namei.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
> index a03f6f4..3123408 100644
> --- a/fs/ocfs2/namei.c
> +++ b/fs/ocfs2/namei.c
> @@ -367,13 +367,11 @@ static int ocfs2_mknod(struct inode *dir,
> goto leave;
> }
>
> - status = posix_acl_create(dir, &mode, &default_acl, &acl);
> + status = posix_acl_create(dir, &inode->i_mode, &default_acl, &acl);
> if (status) {
> mlog_errno(status);
> goto leave;
> }
> - /* update inode->i_mode after mask with "umask". */
> - inode->i_mode = mode;
>
> handle = ocfs2_start_trans(osb, ocfs2_mknod_credits(osb->sb,
> S_ISDIR(mode),
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Ocfs2-devel] [PATCH] ocfs2: fix SGID not inherited issue
2015-12-07 4:09 [Ocfs2-devel] [PATCH] ocfs2: fix SGID not inherited issue Junxiao Bi
2015-12-08 1:07 ` Srinivas Eeda
@ 2015-12-08 21:22 ` Andrew Morton
2015-12-09 2:28 ` Junxiao Bi
1 sibling, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2015-12-08 21:22 UTC (permalink / raw)
To: ocfs2-devel
On Mon, 7 Dec 2015 12:09:06 +0800 Junxiao Bi <junxiao.bi@oracle.com> wrote:
> commit 8f1eb48758aa ("ocfs2: fix umask ignored issue") introduced an issue,
> SGID of sub dir was not inherited from its parents dir. It is because SGID
> is set into "inode->i_mode" in ocfs2_get_init_inode(), but is overwritten
> by "mode" which don't have SGID set later.
>
> Fixes: 8f1eb48758aa ("ocfs2: fix umask ignored issue")
> Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
> Cc: <stable@vger.kernel.org>
8f1eb48758aa is only in 4.4-rcX so I removed the cc:stable.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Ocfs2-devel] [PATCH] ocfs2: fix SGID not inherited issue
2015-12-08 21:22 ` Andrew Morton
@ 2015-12-09 2:28 ` Junxiao Bi
2015-12-10 22:02 ` Andrew Morton
0 siblings, 1 reply; 5+ messages in thread
From: Junxiao Bi @ 2015-12-09 2:28 UTC (permalink / raw)
To: ocfs2-devel
Hi Andrew,
On 12/09/2015 05:22 AM, Andrew Morton wrote:
> On Mon, 7 Dec 2015 12:09:06 +0800 Junxiao Bi <junxiao.bi@oracle.com> wrote:
>
>> commit 8f1eb48758aa ("ocfs2: fix umask ignored issue") introduced an issue,
>> SGID of sub dir was not inherited from its parents dir. It is because SGID
>> is set into "inode->i_mode" in ocfs2_get_init_inode(), but is overwritten
>> by "mode" which don't have SGID set later.
>>
>> Fixes: 8f1eb48758aa ("ocfs2: fix umask ignored issue")
>> Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
>> Cc: <stable@vger.kernel.org>
>
> 8f1eb48758aa is only in 4.4-rcX so I removed the cc:stable.
If 8f1eb48758aa is merged into stable, but this patch not, there will be
a regression issue in stable branch?
Thanks,
Junxiao.
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Ocfs2-devel] [PATCH] ocfs2: fix SGID not inherited issue
2015-12-09 2:28 ` Junxiao Bi
@ 2015-12-10 22:02 ` Andrew Morton
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Morton @ 2015-12-10 22:02 UTC (permalink / raw)
To: ocfs2-devel
On Wed, 9 Dec 2015 10:28:17 +0800 Junxiao Bi <junxiao.bi@oracle.com> wrote:
> Hi Andrew,
>
> On 12/09/2015 05:22 AM, Andrew Morton wrote:
> > On Mon, 7 Dec 2015 12:09:06 +0800 Junxiao Bi <junxiao.bi@oracle.com> wrote:
> >
> >> commit 8f1eb48758aa ("ocfs2: fix umask ignored issue") introduced an issue,
> >> SGID of sub dir was not inherited from its parents dir. It is because SGID
> >> is set into "inode->i_mode" in ocfs2_get_init_inode(), but is overwritten
> >> by "mode" which don't have SGID set later.
> >>
> >> Fixes: 8f1eb48758aa ("ocfs2: fix umask ignored issue")
> >> Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
> >> Cc: <stable@vger.kernel.org>
> >
> > 8f1eb48758aa is only in 4.4-rcX so I removed the cc:stable.
> If 8f1eb48758aa is merged into stable, but this patch not, there will be
> a regression issue in stable branch?
Ah, yes, right you are, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-12-10 22:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-07 4:09 [Ocfs2-devel] [PATCH] ocfs2: fix SGID not inherited issue Junxiao Bi
2015-12-08 1:07 ` Srinivas Eeda
2015-12-08 21:22 ` Andrew Morton
2015-12-09 2:28 ` Junxiao Bi
2015-12-10 22:02 ` Andrew Morton
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.