Received: by 10.223.176.46 with SMTP id f43csp1089151wra; Fri, 26 Jan 2018 11:41:08 -0800 (PST) X-Google-Smtp-Source: AH8x2253D7x4LT/LFwvFhIVSXlygqVhy5kYSXooQvCBABrAoPEmJotS9pFgvFLQKHrADfxqMHaQd X-Received: by 10.98.138.157 with SMTP id o29mr20299164pfk.76.1516995668761; Fri, 26 Jan 2018 11:41:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516995668; cv=none; d=google.com; s=arc-20160816; b=I1i5daT7ULjgkI5Mk7H6d+P1O10GSAAI+u8Ta/sV/YMt/zVeemaJY3HzjG5mVpKu4K /2U/qAMPvGog4h/qxsDe0ZfmPlygK8x8H2UcPVmJHedCReaJXNIG9ADuBnLCwYWTOcbC h6GGynzKqA2MJRMtU9JAXFN4asXee06v86A/78KI07it0sDCKUyA7spA1F2rhiznBFfw 6zI0vCSY+qNJJtOg0zJZPPXmCfHWDrzCDj31ZOiyf4KSkPZPwBUgRMEnY1HLy60jLlf4 R6/dSojWO2k2npOzoFdvfCph0PqIhLw5NPwuqle1KnZloMZZeWGhMyjxH60T8RyyHwNe 6GTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=ZW2TMCUWVHqFwEbXC2C6FtFRu5XjC57/qGPRqsce1+I=; b=FmsD59VqOeVC9NYoU9EfgCTxmXV306FtWYugzGifAyukmYS5x6V3ejarBybv+18tvk kigEcU7ikcwMGI+NMMcvccLnExgR2aPSlzJadbtG3EhpSTPm+jJ45k0HC6gW/ccra97F idRYJqD9KxXwD9bCKuq9yyX6exHRgCHZJtH5CyfUk/jF6PAYqHWPnIUM+HyHJT2Pno6K 8mPt7QvED+aeMImivKDRS0zP/w+sE58V1n1PKO8JmbuuLQXF6ZNorF8e2LGKtxfE2B6Z KJ/ZtshR1P2UHdcQUDX3xId+5i7juPAiR/Ag/ifRtDgJ8xoQh12yRRXW7vqvk44qgRvD onOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u4-v6si4145901plj.501.2018.01.26.11.40.54; Fri, 26 Jan 2018 11:41:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752175AbeAZTj5 (ORCPT + 99 others); Fri, 26 Jan 2018 14:39:57 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:49512 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751666AbeAZTj4 (ORCPT ); Fri, 26 Jan 2018 14:39:56 -0500 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.87 #1 (Red Hat Linux)) id 1ef9qt-0008Gu-24; Fri, 26 Jan 2018 19:39:55 +0000 Date: Fri, 26 Jan 2018 19:39:55 +0000 From: Al Viro To: Joel Fernandes Cc: LKML , Todd Kjos , Arve Hjonnevag , Greg Kroah-Hartman Subject: Re: [PATCH] ashmem: Fix lockdep issue during llseek Message-ID: <20180126193954.GB13338@ZenIV.linux.org.uk> References: <20180126024649.200330-1-joelaf@google.com> <20180126031346.GW13338@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 26, 2018 at 11:23:47AM -0800, Joel Fernandes wrote: > I was just trying to be careful with the least intrusive solution > since I'm not the original author of the driver. Sure, but that needs a proof that it *is* a solution... > But one usecase for the mutex is with concurrent lseeks, you can end > up with a file->f_pos that is different from the latest update to > asma->file->f_pos. A barrier could fix this it too though. Any > thoughts? lseek(2) is serialized against lseek(2) and read(2) on the same struct file - see fdget_pos() for details. ashmem_mutex really does look like an overkill - something much lighter should serve just fine...