All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: mst@redhat.com
Cc: linux-mm@kvack.org
Subject: re: balloon: fix page list locking
Date: Tue, 12 Jan 2016 12:33:56 +0300	[thread overview]
Message-ID: <20160112093356.GC29804@mwanda> (raw)

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@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

                 reply	other threads:[~2016-01-12  9:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20160112093356.GC29804@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=linux-mm@kvack.org \
    --cc=mst@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.