lkml.org 
[lkml]   [2018]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH] pstore: Refactor compression initialization
    On Thu, Oct 18, 2018 at 10:14 AM, Joe Perches <joe@perches.com> wrote:
    > On Wed, 2018-10-17 at 14:41 -0700, Kees Cook wrote:
    >> With compression initialization now separated from pstore_register(),
    >> there is no longer a good reason to do compression method selection
    >> during fs init. Instead, merge everything together into the late init.
    >> Additionally cleans up the reporting to be more clear.
    > []
    >> diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
    > []
    >> @@ -274,36 +274,56 @@ static int pstore_decompress(void *in, void *out,
    > []
    >> - big_oops_buf = kmalloc(big_oops_buf_sz, GFP_KERNEL);
    >> - if (!big_oops_buf) {
    >> - pr_err("allocate compression buffer error!\n");
    >> + buf = kmalloc(size, GFP_KERNEL);
    >> + if (!buf) {
    >> + pr_err("Failed %d byte compression buffer allocation for: %s\n",
    >> + size, zbackend->name);
    >
    > Given that there is a generic OOM message emitted on
    > kmalloc failures, rather than expanding the unnecessary
    > alloc failure message, how about just deleting it instead?

    I prefer including more context (i.e. the desired compression method).

    -Kees

    --
    Kees Cook
    Pixel Security

    \
     
     \ /
      Last update: 2018-10-18 20:12    [W:4.288 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site