From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [patch 2/3] splice: implement default splice_read method Date: Tue, 12 May 2009 22:35:00 -0700 Message-ID: <20090512223500.d7ef4648.akpm@linux-foundation.org> References: <20090507133734.450612199@szeredi.hu> <20090507133748.161689790@szeredi.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: jens.axboe@oracle.com, Max Kellermann , torvalds@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Miklos Szeredi Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:40940 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751436AbZEMFi7 (ORCPT ); Wed, 13 May 2009 01:38:59 -0400 In-Reply-To: <20090507133748.161689790@szeredi.hu> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, 07 May 2009 15:37:36 +0200 Miklos Szeredi wrote: > + for (i = 0; i < spd.nr_pages; i++) { > + kunmap(pages[i]); It is deadlockable if any thread of control holds more than a single kmap at a time. Because there are a finite number of kmaps available, and if one is unavailable, kmap() waits for one to become free. If the number of waiting threads equals the number of available slots, nobody makes any progress.