linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-mm@kvack.org
Subject: Re: [bug report] mm: Convert collapse_shmem to XArray
Date: Tue, 19 Jun 2018 07:05:57 -0700	[thread overview]
Message-ID: <20180619140557.GB1438@bombadil.infradead.org> (raw)
In-Reply-To: <20180619112944.f2fokthjunzavgcw@kili.mountain>

On Tue, Jun 19, 2018 at 02:29:44PM +0300, Dan Carpenter wrote:
> Hello Matthew Wilcox,
> 
> The patch d31429cb560d: "mm: Convert collapse_shmem to XArray" from
> Dec 4, 2017, leads to the following static checker warning:
> 
> 	mm/khugepaged.c:1435 collapse_shmem()
> 	error: double unlock 'irq:'
> 
> mm/khugepaged.c
>   1398                  xas_unlock_irq(&xas);
>   1399  
>   1400                  if (isolate_lru_page(page)) {
>   1401                          result = SCAN_DEL_PAGE_LRU;
>   1402                          goto out_isolate_failed;
>   1403                  }
>   1404  
>   1405                  if (page_mapped(page))
>   1406                          unmap_mapping_pages(mapping, index, 1, false);
>   1407  
>   1408                  xas_lock(&xas);
>                         ^^^^^^^^^^^^^^
> This used to disable IRQs.

*headdesk*.  Thanks, fix pushed.

>   1434  out_lru:
>   1435                  xas_unlock_irq(&xas);
>                         ^^^^^^^^^^^^^^^^^^^
> So I guess we should change this to xas_unlock(&xas);?

Nah, other way around.  No idea why I had xas_lock() there instead of
xas_lock_irq().

      reply	other threads:[~2018-06-19 14:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-19 11:29 Dan Carpenter
2018-06-19 14:05 ` Matthew Wilcox [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=20180619140557.GB1438@bombadil.infradead.org \
    --to=willy@infradead.org \
    --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