Re: [bug report] mm: Convert collapse_shmem to XArray

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

 



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().




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

  Powered by Linux