+ mm-cma_debugc-fix-the-break-condition-in-cma_maxchunk_get.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm/cma_debug.c: fix the break condition in cma_maxchunk_get()
has been added to the -mm tree.  Its filename is
     mm-cma_debugc-fix-the-break-condition-in-cma_maxchunk_get.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-cma_debugc-fix-the-break-condition-in-cma_maxchunk_get.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-cma_debugc-fix-the-break-condition-in-cma_maxchunk_get.patch

Before 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.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Yue Hu <huyue2@xxxxxxxxxx>
Subject: mm/cma_debug.c: fix the break condition in cma_maxchunk_get()

If not find zero bit in find_next_zero_bit(), it will return the size
parameter passed in, so the start bit should be compared with bitmap_maxno
rather than cma->count.  Although getting maxchunk is working fine due to
zero value of order_per_bit currently, the operation will be stuck if
order_per_bit is set as non-zero.

Link: http://lkml.kernel.org/r/20190319092734.276-1-zbestahu@xxxxxxxxx
Signed-off-by: Yue Hu <huyue2@xxxxxxxxxx>
Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxx>
Cc: Joe Perches <joe@xxxxxxxxxxx>
Cc: David Rientjes <rientjes@xxxxxxxxxx>
Cc: Dmitry Safonov <d.safonov@xxxxxxxxxxxxxxxxxxx>
Cc: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/cma_debug.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/cma_debug.c~mm-cma_debugc-fix-the-break-condition-in-cma_maxchunk_get
+++ a/mm/cma_debug.c
@@ -56,7 +56,7 @@ static int cma_maxchunk_get(void *data,
 	mutex_lock(&cma->lock);
 	for (;;) {
 		start = find_next_zero_bit(cma->bitmap, bitmap_maxno, end);
-		if (start >= cma->count)
+		if (start >= bitmap_maxno)
 			break;
 		end = find_next_bit(cma->bitmap, bitmap_maxno, start);
 		maxchunk = max(end - start, maxchunk);
_

Patches currently in -mm which might be from huyue2@xxxxxxxxxx are

mm-cma_debugc-fix-the-break-condition-in-cma_maxchunk_get.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux