Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758324Ab3CUOSk (ORCPT ); Thu, 21 Mar 2013 10:18:40 -0400 Received: from mail-qa0-f49.google.com ([209.85.216.49]:48281 "EHLO mail-qa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755878Ab3CUOSj (ORCPT ); Thu, 21 Mar 2013 10:18:39 -0400 MIME-Version: 1.0 In-Reply-To: References: <20130320165339.GA28307@kroah.com> Date: Thu, 21 Mar 2013 10:18:38 -0400 Message-ID: Subject: Re: [BUG] staging: android: ashmem: Deadlock during ashmem_mmap and ashmem_read From: Robert Love To: Bjorn Bringert Cc: Shankar Brahadeeswaran , Dan Carpenter , Andrew Morton , Konstantin Khlebnikov , devel@driverdev.osuosl.org, LKML , Hugh Dickins , Greg Kroah-Hartman Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 820 Lines: 18 On Thu, Mar 21, 2013 at 10:06 AM, Bjorn Bringert wrote: > I did implement ashmem_read, but I had no idea what I was doing. Calling the > VFS read function seemed like an obvious way to do it, but it might be > wrong. If that needs fixing, then the similar VFS call in ashmem_llseek > probably needs fixing too. You don't want to hold ashmem_mutex across the VFS calls. It is only needed to protect the ashmem-internal structures. FWIW is Android now using ashmem_read()? I left it out of the original ashmem implementation on purpose. Robert -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/