re: balloon: fix page list locking

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

 



Hello Michael S. Tsirkin,

The patch 0b5ffdb4f7c6: "balloon: fix page list locking" from Jan 1,
2016, leads to the following static checker warning:

	mm/balloon_compaction.c:116 balloon_page_dequeue()
	error: double unlock 'spin_lock:&b_dev_info->pages_lock'

mm/balloon_compaction.c
   101                          spin_lock_irqsave(&b_dev_info->pages_lock, flags);
   102                          balloon_page_delete(page);
   103                          __count_vm_event(BALLOON_DEFLATE);
   104                          spin_unlock_irqrestore(&b_dev_info->pages_lock, flags);
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Unlock.

   105                          unlock_page(page);
   106                          put_page(page);
   107                          dequeued_page = true;
   108                          break;
   109                  }
   110                  put_page(page);
   111                  spin_lock_irqsave(&b_dev_info->pages_lock, flags);
   112          }
   113  
   114          /* re-add remaining entries */
   115          list_splice(&processed, &b_dev_info->pages);
   116          spin_unlock_irqrestore(&b_dev_info->pages_lock, flags);
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Second unlock.

   117  
   118          if (!dequeued_page) {

regards,
dan carpenter

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



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