Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933515AbcJLNGP (ORCPT ); Wed, 12 Oct 2016 09:06:15 -0400 Received: from ex13-edg-ou-002.vmware.com ([208.91.0.190]:14946 "EHLO EX13-EDG-OU-002.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933132AbcJLNGA (ORCPT ); Wed, 12 Oct 2016 09:06:00 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=thellstrom@vmware.com; Subject: Re: [PATCH 3.4 065/125] drm/ttm: Fixed a read/write lock imbalance To: , References: <1476275600-4626-1-git-send-email-lizf@kernel.org> <1476275641-4697-65-git-send-email-lizf@kernel.org> CC: , Zefan Li From: Thomas Hellstrom Message-ID: Date: Wed, 12 Oct 2016 15:04:45 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <1476275641-4697-65-git-send-email-lizf@kernel.org> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [155.4.205.56] X-ClientProxiedBy: DB5PR09CA0011.eurprd09.prod.outlook.com (10.161.191.21) To CY1PR05MB2331.namprd05.prod.outlook.com (10.166.192.153) X-MS-Office365-Filtering-Correlation-Id: 2dd80e84-8c99-46fa-d0a0-08d3f2a05f34 X-Microsoft-Exchange-Diagnostics: 1;CY1PR05MB2331;2:dulLdDtyzHfI6kEHOdObEUXZtas5tmRXK9OReGMtt/LdlC/qRdK2YBJRdW+Lx37DEF1/QGKk/xn08e13DYBFLSDgrXu2ArJM3yElvu2B8Rp/LKtp6Fk6wRoYyCK+oxWVhzYShEqwZajtvn/X3+FAM972rPFvsguhgaI/eP5JKqLdMqYVU6oDqxJ7zixGZ86fNIQythf3geUHFzQJIKB5XQ==;3:8kOHAsDOIKwe80mFNnXmcIsLV3rRdZSj8hyQb5SkmYkbynGyNYIpg4u3lDuxWrdlQg/keRV6Ia0gev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5D++eahCRJTla0ol/N5J1TuP0MaLPMd/aSlhsX1AGDHjr8YI7wZzgztzlATyXeEjaMwW7EnFclTjteKcr6W1hbC91QwJgK462qCwAKF7140vceCBLo;20:X7JZgDaIcow8NOywOhKuYSUL/pNwaRCTJscDmQndn+E3SnuXhrTPeETVzJeLJvqLLa3Ri7mEv4In6/VGGKBE9Rvo4u7yvvNdXLKVNZdAhy2FZPmAmC9mIF5NL2dcsPaQ3uwiFMPLr0uYLZjX3APTZzTQ7vRhoxJo4cDDCELuCAxMX7GEEEPG783w6MHwsrfCmTmPdPzthqVrvCK5lCygwD1lzXy+zCcLtqHcWYSRS8jE3iUjzGHN79U11skEcZvc0IyU9LIeZ/x/ZuV0107uVamKYE+6k/r3eIUoDMtVYubwjCPFpIQoSbhOjs1C4g2Wg8gLVsuNl7exDPn4DbjkaOwb7dEPuW92Fb4drYb9IWPbCDROnYkJKmXFWtpoSCMybKDx1TrZ9EBQD2EGuUcciBQBYmK6VI8ALZhO69khgZ4ot3lsUKesVZfB5lYVLLHJqoOHrDuABU2Mc1BhZ+axiS6gWG+VpRMPVTF5RqDC57P6x14OmXKVwYVXbkjqu41w X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(61668805478150)(50582790962513); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046);SRVR:CY1PR05MB2331;BCL:0;PCL:0;RULEID:;SRVR:CY1PR05MB2331; X-Microsoft-Exchange-Diagnostics: 1;CY1PR05MB2331;4:OA2I5e1xCT7QA8NoyLVtUaFMbZnNtsmEKchnLluRvWyiw3XPTMd02sPxvBYdyc2Wcb0QTajrS61K9AQyVci56KPg15ULtgCEVLM7wDDAmrUGZ5iwr95IE3T//8pVFMd4GJn6n78R9rNoRS5rGFHe9hT6eso+e2wa8RlAHfcGFT7dHCfvVjwHzmY0xmkT3ZdapVvMJpqxZg7VNNoU60790DhkjsiKJXKM58NeQkKLc0ugJ7O7Tj88y/iDbREZZipl0rRrU73vWE+5cPjLOpubXEJbKMibujz0r5p5tunRbCw1UOmuJSoWVCaOTLauU3bqz2LzvQDqRjlmC6b/2dTq+kSwkQmIdE6UqkOcbqprgGewlMlqTrJ147GluBZbxAp0r8chey6eMqOTrZUFligLGmMAuW2906YFpKuUv7yupnQbevCRhDepjo4hgVy5oaL0pRAxLQpbOOYwz9zoWTPeQ9dt+9T37eCNpo081yinjTw= X-Forefront-PRVS: 0093C80C01 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(7916002)(377454003)(24454002)(189002)(199003)(189998001)(92566002)(77096005)(106356001)(31696002)(97736004)(4001350100001)(47776003)(50466002)(33646002)(105586002)(23746002)(42186005)(101416001)(64126003)(31686004)(5001770100001)(2950100002)(66066001)(65806001)(6666003)(65956001)(76176999)(54356999)(50986999)(7736002)(4326007)(83506001)(5660300001)(305945005)(7846002)(65826007)(86362001)(8676002)(19580405001)(230700001)(81166006)(81156014)(19580395003)(36756003)(2906002)(6116002)(3846002)(586003)(68736007);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR05MB2331;H:linlap1.localdomain;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;CY1PR05MB2331;23:9RSOfm64MPvzLIU2q23pFrVFlP6PvRrtcrpPl?= =?Windows-1252?Q?pAdAHxxrLS7SenmY9XQQRbAxofRl4mJaChYiPc4U0FS1xavtbYyVZzca?= =?Windows-1252?Q?IZXeneaXIyUf5gTmFW9achFPqpmpIrutqSsaxrYCq4HlqAS84K6P6SuA?= =?Windows-1252?Q?xIx+saFXS3wtShi5f1gP8mjwFfDIuzoBZpzvvKCkx82PCuMKJ+IFu+E3?= =?Windows-1252?Q?VohwOElLRxnHH1AJ1CvQpSiLY1xci6a5C+Ens+3T2YWw6hYZfbdV3+Kq?= =?Windows-1252?Q?hU5QMpP6SEdN/isfxBcT3N7GQPi0AQ6FKSng5wDsNOPYdFN7enpHQ1bc?= =?Windows-1252?Q?DKLUEZkccVUUHeYV0zHmaVmunvirio+bBXIAaLXkzCb7jI3gK1Awxfz+?= =?Windows-1252?Q?HKJEhtzUMufPT2/8EJUwYIFkQHI7MGT569mZ3YBt7/dRjmg86K8Yhw8A?= =?Windows-1252?Q?DySXVYzFEoJolQu327FW1P6maJHTSNgHBqDEqYEtFnGQGoO9wm3JWgW2?= =?Windows-1252?Q?IAnuxv5o6UZokySRJMLcF1aPfU5zfdIlUH65x1e35j5mLsr+swdALc66?= =?Windows-1252?Q?N/K0Hm5+AmoQos9uFHtycPTnXxk9+A5X3wP4U0xpznK28WXzpBKdphVp?= =?Windows-1252?Q?ZyW+CdnsCNdR/3rTRhXQqJArJa+MHcK5nyzsskCYJU+j+IqC3rj62TDf?= =?Windows-1252?Q?Fs4HniC+eL0lE/lLB1j0nDP1xC2WOxjoZTGke7mzGR8mVGuCPIE89xD5?= =?Windows-1252?Q?ACoVi6vItSbMsZx4t/bE6gS6CcXzY1fhol94XXP4Hjed4DIAl1pOZXp1?= =?Windows-1252?Q?tOZFS90MnwM6IkGfDRUp07XAYicXapBD+M21S8qUkv2k6OR2eh4fPC4s?= =?Windows-1252?Q?OokmW3FEguxGVK8NLq+ikMeihHPstVGsCbJ62Do6LJGQqnYeH1cnEO1t?= =?Windows-1252?Q?7/HpulXoxK53MHFeI48s5vh40RmTNjPgbb4SEIfvt0mR1qaoto01hZ9u?= =?Windows-1252?Q?jWzyiSZmINRuFTsKCzVrja2p58iy5mxNK7KBrsabI3l6kYcLYjeWfiml?= =?Windows-1252?Q?0DLO0/C9/WC5SkDk0Yii4uZKlUg16Qvkwmqyqu+A0dkNXmSfZj0MedL1?= =?Windows-1252?Q?VhIicwu77keRU0BLYvAtir4utiz6EqPsYUdtPZsiHNP3GNf63vDwsN4u?= =?Windows-1252?Q?F2qSr+UgcNTRSKBmOTzNkffS1kGGYMYZXdDPF8c8Iwa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1UO9R0u3NMiwCcs9l7faAUeYT+/m7Pj6wFz3vAbct0Wd9XN+feIAjEBqU8rgXnrkfpyDbsl4lUHxajq5hhKLdf5rDJKe8zd5EgwI 8Y= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY1PR05MB2331;20:TUqVc97XEZ+SS3elawA6WpH/Q2ZuT0SZUhHOzidlueB+SFaUduM3gqCIBAQ6wHclItbwUP8lDXZUH4BiTbPYP7jib4b9o88UZaumvQ1kkezpoavHAJZYDuYnnx651pk+ycArjLIcMQyiRshca6HflSgKdrgZ38mp5CSsRU7zc90= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2016 13:04:58.5309 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR05MB2331 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1354 Lines: 46 Li, IIRC This one goes hand in hand with a vmwgfx (the only user) patch. Please don't apply until I've figured out whether that patch is also in 3.4. Thanks, Thomas On 10/12/2016 02:33 PM, lizf@kernel.org wrote: > From: Thomas Hellstrom > > 3.4.113-rc1 review patch. If anyone has any objections, please let me know. > > ------------------ > > > commit 025af189fb44250206dd8a32fa4a682392af3301 upstream. > > In ttm_write_lock(), the uninterruptible path should call > __ttm_write_lock() not __ttm_read_lock(). This fixes a vmwgfx hang > on F23 start up. > > syeh: Extracted this from one of Thomas' internal patches. > > Signed-off-by: Thomas Hellstrom > Reviewed-by: Sinclair Yeh > Signed-off-by: Zefan Li > --- > drivers/gpu/drm/ttm/ttm_lock.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/ttm/ttm_lock.c b/drivers/gpu/drm/ttm/ttm_lock.c > index 075daf4..9934b4d 100644 > --- a/drivers/gpu/drm/ttm/ttm_lock.c > +++ b/drivers/gpu/drm/ttm/ttm_lock.c > @@ -180,7 +180,7 @@ int ttm_write_lock(struct ttm_lock *lock, bool interruptible) > spin_unlock(&lock->lock); > } > } else > - wait_event(lock->queue, __ttm_read_lock(lock)); > + wait_event(lock->queue, __ttm_write_lock(lock)); > > return ret; > }