Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754753AbdCGGFx (ORCPT ); Tue, 7 Mar 2017 01:05:53 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:38316 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754209AbdCGGF1 (ORCPT ); Tue, 7 Mar 2017 01:05:27 -0500 X-AuditID: b6c32a58-f79f16d00000132c-85-58be3bf186ec MIME-version: 1.0 Subject: Re: Subject: [PATCH v4] USB:Core: BugFix: Proper handling of Race Condition when two USB class drivers try to call init_usb_class simultaneously Reply-to: ajay.kaher@samsung.com From: Ajay Kaher To: Alan Stern , "gregkh@linuxfoundation.org" Cc: "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , AMAN DEEP , HEMANSHU SRIVASTAVA X-Priority: 3 X-Content-Kind-Code: NORMAL In-reply-to: X-Drm-Type: Y,confirm X-EPLocale: en_US.EUC-KR X-EPWebmail-Msg-Type: personal X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Illegal-Object: Syntax error in X-Sender: address found on vger.kernel.org: X-Sender: =?utf-8?B?7IK87ISx7KCE7J6QG1NSSS1EZWxoaS1TeXN0ZW0g?= ^-Extraneous program text X-Sender-IP: 107.109.226.47 X-Local-Sender: =?UTF-8?B?QWpheSBLYWhlchtTUkktRGVsaGktU3lzdGVtIFMvVyBUZWFtG+yCvOyEsQ==?= =?UTF-8?B?7KCE7J6QG0xlYWQgRW5naW5lZXI=?= X-Global-Sender: =?UTF-8?B?QWpheSBLYWhlchtTUkktRGVsaGktU3lzdGVtIFMvVyBUZWFtG1NhbXN1?= =?UTF-8?B?bmcgRWxlY3Ryb25pY3MbTGVhZCBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwGxtDMTBJRDAySUQwMjgxMTI=?= Message-id: <20170307043537epcms5p7e4fcfc351c4f193e454c9ea2e271e562@epcms5p7> Date: Tue, 07 Mar 2017 04:35:37 +0000 X-CMS-MailID: 20170307043537epcms5p7e4fcfc351c4f193e454c9ea2e271e562 Content-type: multipart/related; boundary="----=_Part_160987_1321752228.1488861337912" X-MTR: 20170307043537epcms5p7e4fcfc351c4f193e454c9ea2e271e562 X-EPHeader: Mail X-ConfirmMail: Y,confirm CMS-TYPE: 105P X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprIJsWRmVeSWpSXmKPExsWy7bCmhu5H630RBruOSVvsf7+FxaJ58Xo2 i1fn3zBbXN41h81i0bJWZosJvy+wObB57J+7ht1j9t0fjB59W1YxenzeJBfAEpVqk5GamJJa pJCal5yfkpmXbqvkHRzvHG9qZmCoa2hpYa6kkJeYm2qr5OIToOuWmQO0XEmhLDGnFCgUkFhc rKRvZ1OUX1qSqpCRX1xiqxRtaGikZ2hgrmdkZKRnYhprZWQKVJKQmnHmwV6mgjfyFetPWzQw /pTrYuTkkBAwkdj5qI8ZwhaTuHBvPVsXIxeHkMBSRolzd/cxdTFycPAKCEr83SEMEhcWmMso sXDZHTaQBiEBBYnO9vUsILawgLbEr57XrCA2m4CmxM7urWBxEYF0iafXPzGCNDMLnGeUWHpo ChvENl6JGe1PWSBsaYnty7cygticAr4S7dtPsELERSX+NMDUSEisXvgcqldOYtrXNcwwNe+P zWeEsEUkWu+dhYoLSjz4uRsqnivR9f8bO8yuy+smMoMcJCHQzCjRc/kmI4TTwyjx4tRtqM3m EvuPf2UCsXmBLvr0rA+sm0VAVeJtywImiBoXieOzp4KDiFkgQqL/nAFE2Fbi1PsDUIsFJNac mMMM88CFc4fAbGYBPone30+YJjCqzkIE8CyEQbPAihQlpnQ/ZIcIa0qs36W/gJFlFaNYakFx bnpqsWmBiV5xYm5xaV66XnJ+7iZGcHLUitjB+G9G0CFGAQ5GJR5eh6d7I4RYE8uKK3MPMUpw MCuJ8C44CBTiTUmsrEotyo8vKs1JLT7EaAr02kRmKdHkfGDiziuJNzQxMzQxsjQ2NTM3sFAS 540ymBghJJCeWJKanZpakFoE08fEwSnVwKjSn9TD8tB02eFXBzdmv/xS+rfoaqI36+wy9qzT sV8OZKTorL3NvNf88a7U/X8qsk5mpNjNcfx6toL/ygMPTxWH2IolXLv3uQkvO3Fs6YeIdcuN o0/1v8ioUZ/a07vTrsJc8ezjD8eMc+0MOo5+5y9oXP1iuqPkOb3AeW5xmlYzdh9z3rjh9Skl luKMREMt5qLiRADzy0EbpAMAAA== DLP-Filter: Pass X-CFilter-Loop: Reflected X-Auth-Email: ajay.kaher@samsung.com X-HopCount: 6 X-CMS-RootMailID: 20170303165352epcas5p2c408a284100b5053daf458a4ad4d9337 X-RootMTR: 20170303165352epcas5p2c408a284100b5053daf458a4ad4d9337 References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4020 Lines: 56 ------=_Part_160987_1321752228.1488861337912 Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8" wqANCsKgDQrCoA0KPiBPbsKgRnJpLMKgM8KgTWFywqAyMDE3LMKgQWphecKgS2FoZXLCoHdyb3Rl Og0KPsKgDQo+ID7CoD7CoHVzYl9jbGFzcy0+a3JlZsKgaXPCoG5vdMKgYWNjZXNzaWJsZcKgb3V0 c2lkZcKgdGhlwqBmaWxlLmMNCj4gPsKgPsKgYXPCoHVzYl9jbGFzc8KgaXPCoF9zdGF0aWNfwqBp bnNpZGXCoHRoZcKgZmlsZS5jwqBhbmQNCj4gPsKgPsKgcG9pbnRlcsKgb2bCoHVzYl9jbGFzcy0+ a3JlZsKgaXPCoG5vdMKgcGFzc2VkwqBhbnl3aGVyZS4NCj4gPsKgPsKgDQo+ID7CoD7CoEhlbmNl wqBhc8KgeW91wqB3YW50ZWQswqB0aGVyZcKgYXJlwqBub8KgcmVmZXJlbmNlc8Kgb2bCoHVzYl9j bGFzcy0+a3JlZg0KPiA+wqA+wqBvdGhlcsKgdGhhbsKgdGFrZW7CoGJ5wqBpbml0X3VzYl9jbGFz cygpwqBhbmTCoHJlb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JldHZhbCkNCiAgICAgICAgICAgICAgICByZXR1cm4gcmV0dmFsOw0K ------=_Part_160987_1321752228.1488861337912--