Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752421Ab3DVOW3 (ORCPT ); Mon, 22 Apr 2013 10:22:29 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:21098 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751837Ab3DVOW2 (ORCPT ); Mon, 22 Apr 2013 10:22:28 -0400 Date: Mon, 22 Apr 2013 17:22:18 +0300 From: Dan Carpenter To: Shankar Brahadeeswaran Cc: Robert Love , LKML , Bjorn Bringert , Al Viro , devel@driverdev.osuosl.org, Hugh Dickins , Greg Kroah-Hartman , anjanavk12@gmail.com Subject: Re: [BUG] staging: android: ashmem: Deadlock during ashmem_shrink Message-ID: <20130422142218.GA26760@mwanda> References: 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) X-Source-IP: acsinet22.oracle.com [141.146.126.238] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 700 Lines: 19 Read Al's email again: https://lkml.org/lkml/2013/3/20/458 I don't know much about VFS locking, but the ashmem locking seems pretty bogus to me. Why can't multiple threads read() at the same time? One thing is that it should probably be broken into different locks instead of a mini-BKL. Instead of taking a bad design and trying to hack it until it doesn't crash I think it would be better to redo the locking from scratch. regards, dan carpenter -- 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/