Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933826AbdCJVWm (ORCPT ); Fri, 10 Mar 2017 16:22:42 -0500 Received: from mail.ispras.ru ([83.149.199.45]:33060 "EHLO mail.ispras.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755592AbdCJVWX (ORCPT ); Fri, 10 Mar 2017 16:22:23 -0500 From: Alexey Khoroshilov To: Vitaly Wool Cc: Alexey Khoroshilov , Andrew Morton , Dan Streetman , linux-mm@kvack.org, linux-kernel@vger.kernel.org, ldv-project@linuxtesting.org Subject: z3fold: suspicious return with spinlock held Date: Sat, 11 Mar 2017 00:22:12 +0300 Message-Id: <1489180932-13918-1-git-send-email-khoroshilov@ispras.ru> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 487 Lines: 21 Hello! z3fold_reclaim_page() contains the only return that may leave the function with pool->lock spinlock held. 669 spin_lock(&pool->lock); 670 if (kref_put(&zhdr->refcount, release_z3fold_page)) { 671 atomic64_dec(&pool->pages_nr); 672 return 0; 673 } May be we need spin_unlock(&pool->lock); just before return? Found by Linux Driver Verification project (linuxtesting.org). -- Thank you, Alexey Khoroshilov Linux Verification Center, ISPRAS web: http://linuxtesting.org