summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-07-19 12:01:04 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-08-22 08:44:53 +0300
commit349a3ed9b484f8a4e21aaedd5b7c74543732680d (patch)
tree5f487e1b75ee92fc95610edcc0529661efe263fd /tools/perf/scripts/python/stackcollapse.py
parent166c382429f5ba376da3da333641511ae6568ca9 (diff)
downloadlinux-349a3ed9b484f8a4e21aaedd5b7c74543732680d.tar.xz
ALSA: memalloc: Don't exceed over the requested size
commit dfef01e150824b0e6da750cacda8958188d29aea upstream. snd_dma_alloc_pages_fallback() tries to allocate pages again when the allocation fails with reduced size. But the first try actually *increases* the size to power-of-two, which may give back a larger chunk than the requested size. This confuses the callers, e.g. sgbuf assumes that the size is equal or less, and it may result in a bad loop due to the underflow and eventually lead to Oops. The code of this function seems incorrectly assuming the usage of get_order(). We need to decrease at first, then align to power-of-two. Reported-and-tested-by: he, bo <bo.he@intel.com> Reported-by: zhang jun <jun.zhang@intel.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions