linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Liam Howlett <liam.howlett@oracle.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: [bug report] mm/mmap: change do_mas_align_munmap() to avoid preallocations for sidetree
Date: Wed, 22 Jun 2022 12:52:21 +0000	[thread overview]
Message-ID: <20220622125215.3opkqcfbdcziuo5r@revolver> (raw)
In-Reply-To: <YrK9wapd04sXuCQk@kili>

* Dan Carpenter <dan.carpenter@oracle.com> [220622 02:59]:
> Hello Liam Howlett,
> 
> The patch fecd1f7f7502: "mm/mmap: change do_mas_align_munmap() to
> avoid preallocations for sidetree" from Jun 17, 2022, leads to the
> following Smatch static checker warning:
> 
> 	mm/mmap.c:2431 do_mas_align_munmap()
> 	warn: missing error code here? 'munmap_sidetree()' failed. 'error' = '0'
> 
...

>     2423 
>     2424                         error = __split_vma(mm, next, end, 1);
>     2425                         if (error)
>     2426                                 goto end_split_failed;
>     2427 
>     2428                         mas_set(mas, end);
>     2429                         split = mas_prev(mas, 0);
>     2430                         if (munmap_sidetree(split, &mas_detach))
> --> 2431                                 goto munmap_sidetree_failed;
> 
> Need "error = -ENOMEM;"
> 
>     2432 
>     2433                         count++;
>     2434                         if (vma == next)
>     2435                                 vma = split;
>     2436                         break;
>     2437                 }
>     2438                 if (munmap_sidetree(next, &mas_detach))
>     2439                         goto munmap_sidetree_failed;
> 
> Here too.

Yes, you are correct.

Thanks,
Liam

      reply	other threads:[~2022-06-22 12:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-22  6:59 Dan Carpenter
2022-06-22 12:52 ` Liam Howlett [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220622125215.3opkqcfbdcziuo5r@revolver \
    --to=liam.howlett@oracle.com \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox