+ mm-slabc-remove-duplicated-check-of-colour_next.patch added to -mm tree
A message that is not in the archive (sent off-list or not yet received): 20180312221333.aYPvPxhxp%[email protected]
Quoted 48 lines · On Mon, Mar 12, 2018 at 03:13:33PM -0700, [email protected] wrote:
The patch titled
Subject:mm/slab.c: remove duplicated check ofcolour_next
has been added to the -mm tree. Its filename is
mm-slabc-remove-duplicated-check-of-colour_next.patchThis patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-slabc-remove-duplicated-check-of-colour_next.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-slabc-remove-duplicated-check-of-colour_next.patchBefore you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's*** Remember to use
Documentation/process/submit-checklist.rstwhen testing your code ***The -mm tree is included into linux-next and is updated there every 3-4 working days
------------------------------------------------------
From: Roman Lakeev <[email protected]>
Subject:mm/slab.c: remove duplicated check ofcolour_nextRemove check that offset greater than
cachep->colourbacause this is already checked in previous lines.Signed-off-by Roman Lakeev <[email protected]>Acked-by David Rientjes <[email protected]>Reviewed-by Andrew Morton <[email protected]>Cc Pekka Enberg <[email protected]>Cc Joonsoo Kim <[email protected]>Signed-off-by Andrew Morton <[email protected]>---
mm/slab.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)diff -puN
mm/slab.c~mm-slabc-remove-duplicated-check-of-colour_nextmm/slab.cmm/slab.c renamed from mm/slab.c~mm-slabc-remove-duplicated-check-of-colour_next +0
-0@@ -2674,11 +2674,7 @@ static struct page *cache_grow_begin(strif (n->colour_next >= cachep->colour) n->colour_next =0 ;
mm/slab.c static struct page *cache_grow_begin(str · line 2680
Quoted 10 lines
mm/slab.c renamed from mm/slab.c~mm-slabc-remove-duplicated-check-of-colour_next +1
-5- offset = n->colour_next; -if (offset >= cachep->colour) - offset =0 ; - - offset *= cachep->colour_off; + offset = n->colour_next * cachep->colour_off;/* Get slab management. */ freelist = alloc_slabmgmt(cachep, page, offset,
Hello, all.
This n->colour_next can be update at the other cpu since there is no lock to protect it. So, removing this one another check can make the offset overflow.
Andrew, could you drop this patch?
Thanks.