From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Date: Fri, 07 Dec 2012 12:53:50 +0000 Subject: Re: [PATCH 2/5] OMAPFB: simplify locking Message-Id: <20121207125350.GE32230@intel.com> List-Id: References: <1354881309-17625-1-git-send-email-tomi.valkeinen@ti.com> <1354881309-17625-2-git-send-email-tomi.valkeinen@ti.com> In-Reply-To: <1354881309-17625-2-git-send-email-tomi.valkeinen@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: Tomi Valkeinen Cc: Archit Taneja , linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org On Fri, Dec 07, 2012 at 01:55:06PM +0200, Tomi Valkeinen wrote: > Kernel lock verification code has lately detected possible circular > locking in omapfb. The exact problem is unclear, but omapfb's current > locking seems to be overly complex. >=20 > This patch simplifies the locking in the following ways: >=20 > - Remove explicit omapfb mem region locking. I couldn't figure out the > need for this, as long as we take care to take omapfb lock. I suppose the idea with that was that you wouldn't need the global omapfb lock, and also it was an rwsem so it allowed parallel access to the mem regions, unless the region size was being changed, in which case it took the write lock. I can't really remember what the reason for using an rwsem was, but I suppose there was one at the time. I think the only correctness issue with your patch is that you're opening up a race between omapfb_mmap and omapfb_setup_mem/store_size. --=20 Ville Syrj=E4l=E4 Intel OTC From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH 2/5] OMAPFB: simplify locking Date: Fri, 7 Dec 2012 14:53:50 +0200 Message-ID: <20121207125350.GE32230@intel.com> References: <1354881309-17625-1-git-send-email-tomi.valkeinen@ti.com> <1354881309-17625-2-git-send-email-tomi.valkeinen@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from mga01.intel.com ([192.55.52.88]:10420 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964963Ab2LGMyI (ORCPT ); Fri, 7 Dec 2012 07:54:08 -0500 Content-Disposition: inline In-Reply-To: <1354881309-17625-2-git-send-email-tomi.valkeinen@ti.com> Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: Tomi Valkeinen Cc: Archit Taneja , linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org On Fri, Dec 07, 2012 at 01:55:06PM +0200, Tomi Valkeinen wrote: > Kernel lock verification code has lately detected possible circular > locking in omapfb. The exact problem is unclear, but omapfb's current > locking seems to be overly complex. >=20 > This patch simplifies the locking in the following ways: >=20 > - Remove explicit omapfb mem region locking. I couldn't figure out th= e > need for this, as long as we take care to take omapfb lock. I suppose the idea with that was that you wouldn't need the global omapfb lock, and also it was an rwsem so it allowed parallel access to the mem regions, unless the region size was being changed, in which case it took the write lock. I can't really remember what the reason for using an rwsem was, but I suppose there was one at the time. I think the only correctness issue with your patch is that you're opening up a race between omapfb_mmap and omapfb_setup_mem/store_size. --=20 Ville Syrj=E4l=E4 Intel OTC -- To unsubscribe from this list: send the line "unsubscribe linux-omap" i= n the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html