From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755168AbaGUMT7 (ORCPT ); Mon, 21 Jul 2014 08:19:59 -0400 Received: from mail-oa0-f50.google.com ([209.85.219.50]:39527 "EHLO mail-oa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755142AbaGUMT5 (ORCPT ); Mon, 21 Jul 2014 08:19:57 -0400 Date: Mon, 21 Jul 2014 07:18:54 -0500 From: Seth Forshee To: Miklos Szeredi Cc: Kernel Mailing List , fuse-devel , lxc-devel@lists.linuxcontainers.org, "Eric W. Biederman" , Serge Hallyn , "Michael H. Warfield" , Seth Forshee Subject: Re: [PATCH 1/3] fuse/dev: Fix unbalanced calls to kunmap_atomic() during splice I/O Message-ID: <20140721121854.GA111224@ubuntu-hedt> Mail-Followup-To: Miklos Szeredi , Kernel Mailing List , fuse-devel , lxc-devel@lists.linuxcontainers.org, "Eric W. Biederman" , Serge Hallyn , "Michael H. Warfield" References: <1405365496-58404-1-git-send-email-seth.forshee@canonical.com> <1405365496-58404-2-git-send-email-seth.forshee@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 18, 2014 at 05:21:55PM +0200, Miklos Szeredi wrote: > On Mon, Jul 14, 2014 at 9:18 PM, Seth Forshee > wrote: > > fuse_copy_finish() assumes that mapaddr in fuse_copy_state refers > > to a valid mapping if currbuf is non-NULL, but this isn't always > > true when moving pages for splice I/O. This results in an > > unbalanced call to kunmap_atomic() and thus an unbalanced > > decrement of the preempt count. Avoid this by checking that > > mapaddr is non-NULL before calling kunmap_atomic(). > > I guess this is obsoleted by: > > c55a01d360af fuse: avoid scheduling while atomic > > which moves the kmap/kunmap closer to the actual use of the mapping. > > Can you please verify? Yes, that commit does seem to fix the problem.