From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761524AbaGRPV6 (ORCPT ); Fri, 18 Jul 2014 11:21:58 -0400 Received: from mail-qg0-f43.google.com ([209.85.192.43]:47315 "EHLO mail-qg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756009AbaGRPV5 (ORCPT ); Fri, 18 Jul 2014 11:21:57 -0400 MIME-Version: 1.0 X-Originating-IP: [46.139.80.5] In-Reply-To: <1405365496-58404-2-git-send-email-seth.forshee@canonical.com> References: <1405365496-58404-1-git-send-email-seth.forshee@canonical.com> <1405365496-58404-2-git-send-email-seth.forshee@canonical.com> Date: Fri, 18 Jul 2014 17:21:55 +0200 Message-ID: Subject: Re: [PATCH 1/3] fuse/dev: Fix unbalanced calls to kunmap_atomic() during splice I/O From: Miklos Szeredi To: Seth Forshee Cc: Kernel Mailing List , fuse-devel , lxc-devel@lists.linuxcontainers.org, "Eric W. Biederman" , Serge Hallyn , "Michael H. Warfield" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Thanks, Miklos