Re: [PATCH v2] mm: cma: fix CMA aligned offset calculation

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

 



On Fri, 27 Feb 2015 17:07:28 -0800 Danesh Petigara <dpetigara@xxxxxxxxxxxx> wrote:

> On 2/27/2015 3:54 PM, Andrew Morton wrote:
> > On Fri, 27 Feb 2015 15:52:56 -0800 Danesh Petigara <dpetigara@xxxxxxxxxxxx> wrote:
> > 
> >> On 2/27/2015 1:24 PM, Andrew Morton wrote:
> >>> On Tue, 24 Feb 2015 15:39:45 -0800 Danesh Petigara <dpetigara@xxxxxxxxxxxx> wrote:
> >>>
> >>>> The CMA aligned offset calculation is incorrect for
> >>>> non-zero order_per_bit values.
> >>>>
> >>>> For example, if cma->order_per_bit=1, cma->base_pfn=
> >>>> 0x2f800000 and align_order=12, the function returns
> >>>> a value of 0x17c00 instead of 0x400.
> >>>>
> >>>> This patch fixes the CMA aligned offset calculation.
> >>>
> >>> When fixing a bug please always describe the end-user visible effects
> >>> of that bug.
> >>>
> >>> Without that information others are unable to understand why you are
> >>> recommending a -stable backport.
> >>>
> >>
> >> Thank you for the feedback. I had no crash logs to show, nevertheless, I
> >> agree that a sentence describing potential effects of the bug would've
> >> helped.
> > 
> > What was the reason for adding a cc:stable?
> > 
> 
> It was added since the commit that introduced the incorrect logic
> (b5be83e) was already picked up by v3.19.

argh.

afaict the bug will, under some conditions cause cma_alloc() to report
that no suitable free area is available in the arena when in fact such
regions *are* available.  So it's effectively a bogus ENOMEM.

Correct?  If so, what are the conditions under which this will occur?

This isn't hard - I want to know what the patch *does*!

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]