[PATCH] staging: erofs: fix race of initializing xattrs of a inode at the same time

2019-02-17 Thread Gao Xiang
In real scenario, there could be several threads accessing xattrs of the same xattr-uninitialized inode, and init_inode_xattrs() almost at the same time. That's actually an unexpected behavior, this patch closes the race. Fixes: b17500a0fdba ("staging: erofs: introduce xattr & acl support") Cc:

Re: [PATCH v2] staging: erofs: keep corrupted fs from crashing kernel in erofs_namei()

2019-02-17 Thread Dan Carpenter
On Mon, Feb 18, 2019 at 10:41:36AM +0800, Chao Yu wrote: > On 2019/2/15 17:35, Dan Carpenter wrote: > > On Fri, Feb 15, 2019 at 05:32:33PM +0800, Chao Yu wrote: > >> On 2019/2/15 15:57, Dan Carpenter wrote: > >>> On Fri, Feb 15, 2019 at 03:02:25PM +0800, Chao Yu wrote: > On 2019/2/1 20:16,

Re: [PATCH v2] staging: erofs: keep corrupted fs from crashing kernel in erofs_namei()

2019-02-17 Thread Chao Yu
Hi Xiang, On 2019/2/18 10:17, Gao Xiang wrote: > Hi Chao, > > On 2019/2/18 9:39, Chao Yu wrote: >> If the image is corrupted, qn->name[i] may be anything, as you commented >> above DBG_BUGON(), we really don't need to go through any later codes, it >> can avoid potentially encoutnering wrong

Re: [PATCH v2] staging: erofs: keep corrupted fs from crashing kernel in erofs_namei()

2019-02-17 Thread Chao Yu
On 2019/2/15 17:35, Dan Carpenter wrote: > On Fri, Feb 15, 2019 at 05:32:33PM +0800, Chao Yu wrote: >> On 2019/2/15 15:57, Dan Carpenter wrote: >>> On Fri, Feb 15, 2019 at 03:02:25PM +0800, Chao Yu wrote: On 2019/2/1 20:16, Gao Xiang wrote: > + /* > + * on-disk error, let's only

Re: [PATCH v2] staging: erofs: keep corrupted fs from crashing kernel in erofs_namei()

2019-02-17 Thread Gao Xiang
Hi Chao, On 2019/2/18 9:39, Chao Yu wrote: > If the image is corrupted, qn->name[i] may be anything, as you commented > above DBG_BUGON(), we really don't need to go through any later codes, it > can avoid potentially encoutnering wrong condition. > > * otherwise, it will return 1 to just skip

Re: [PATCH v2] staging: erofs: keep corrupted fs from crashing kernel in erofs_namei()

2019-02-17 Thread Chao Yu
Hi xiang, On 2019/2/15 16:58, Gao Xiang wrote: > Hi Chao, > > On 2019/2/15 15:02, Chao Yu wrote: >> On 2019/2/1 20:16, Gao Xiang wrote: >>> As Al pointed out, " >>> ... and while we are at it, what happens to >>> unsigned int nameoff = le16_to_cpu(de[mid].nameoff); >>> unsigned int

[PATCH] staging: rtlwifi: fix spelling mistake: "Hightest" -> "Highest"

2019-02-17 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in ODM_RT_TRACE message text, fix it. Signed-off-by: Colin Ian King --- drivers/staging/rtlwifi/phydm/phydm_rainfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtlwifi/phydm/phydm_rainfo.c