Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp5512655imb; Thu, 7 Mar 2019 18:04:49 -0800 (PST) X-Google-Smtp-Source: APXvYqx+/qJItxKPe0yHM9VVebwPT5bfVEqfDtnzbGDq90fSztbG7n4aHEeCNzgEN5tC6GWjJnpJ X-Received: by 2002:aa7:8150:: with SMTP id d16mr16086610pfn.172.1552010689866; Thu, 07 Mar 2019 18:04:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1552010689; cv=none; d=google.com; s=arc-20160816; b=SoRItKwXsOFDyyCTHPjyp6GyY7iOyBX+6NX30KzF6jLRUsGQUtIT6xFnVVTkIOqNMS l+KILAFqSPU17E2oKJHm98fdguvxqyzSCELSj8bMIeUgtdGIj9YmJdKdXAcxmQ3IyL6I nVIVhJX8VQZbnUhhk162qkwX2sr6SAhtNGhd+Zuilc4xJ1ENKi+17tUC9Au44bi9NHyn vR2CQd3nW0zEIBr2iGeJLH2l6MOgZg7rmz6B1S2s3obvoGBwQxtLP2NNG9tVxsGluwqu 6+n23s2bD79JDuR9vE10qxHjtPKQ1AEMKDxKVU98jKU8CjXDdw2oZ7MnY3LYS/Ha4gTB uB1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=NJDrtwiZXTn4OIsDtaE7QsEQrtTpFMi+//Z7aMfIZGE=; b=o0v1RcJWbVR/kuWHIKTo5TbwHKjZzSczPBzDE6+YyhfQHB0zlf75k7aUxQUTJTFRzz iWrpl6Ra6N+zN7zv1LzyCRLEIZFPLncBlEfg6vVHsYn5Prckgwc4ZIvPtbHQ/1SZDUUw hISnfCZx4LTjzg6KaUqSo1W33PL94SVg+Ce8bKgH83uEY4RHL/pVBwxKaQAN99BT5gCw DTrXDejG79CdK2jueDeuBzMzApeQ3x+BSe26sFTelNp1LasC52AOVtvSjnwYW+PWl6Z6 WB/9VxGyA+B0cCqqHfeZMaO2XJcwiWvJaNmrqjJk0E8P8Vwqvr2vrspJFsq7jqWiUSe7 YZEg== 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 b27si5102863pgb.366.2019.03.07.18.04.33; Thu, 07 Mar 2019 18:04:49 -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 S1726298AbfCHCDx (ORCPT + 99 others); Thu, 7 Mar 2019 21:03:53 -0500 Received: from mx23.baidu.com ([61.135.165.120]:46999 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726243AbfCHCDx (ORCPT ); Thu, 7 Mar 2019 21:03:53 -0500 Received: from M1-MAIL-EX11.internal.baidu.com (unknown [10.44.89.51]) by Forcepoint Email with ESMTPS id D55D0FDE19C13; Fri, 8 Mar 2019 10:03:42 +0800 (CST) Received: from BC-Mail-Ex14.internal.baidu.com (172.31.40.50) by M1-MAIL-EX11.internal.baidu.com (10.44.89.51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1531.3; Fri, 8 Mar 2019 10:03:44 +0800 Received: from BC-Mail-Ex13.internal.baidu.com (172.31.40.49) by BC-Mail-Ex14.internal.baidu.com (172.31.40.50) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1531.3; Fri, 8 Mar 2019 10:03:43 +0800 Received: from BC-Mail-Ex13.internal.baidu.com ([172.31.40.49]) by Bc-Mail-Ex13.internal.baidu.com ([172.31.40.49]) with mapi id 15.01.1531.010; Fri, 8 Mar 2019 10:03:43 +0800 From: "Li,Rongqing" To: Andrew Morton CC: "linux-kernel@vger.kernel.org" , "Davidlohr Bueso" , Dominik Brodowski , Manfred Spraul , Arnd Bergmann Subject: =?gb2312?B?tPC4tDogW1BBVENIXSBpcGM6IHByZXZlbnQgbG9ja3VwIG9uIGFsbG9jX21z?= =?gb2312?Q?g_and_free=5Fmsg?= Thread-Topic: [PATCH] ipc: prevent lockup on alloc_msg and free_msg Thread-Index: AQHU1RED+JJ/26G40kaCEpraSHsZDaYA+3zQ Date: Fri, 8 Mar 2019 02:03:43 +0000 Message-ID: References: <1551946222-25470-1-git-send-email-lirongqing@baidu.com> <20190307101010.919d18394ae43ecf9d2a2212@linux-foundation.org> In-Reply-To: <20190307101010.919d18394ae43ecf9d2a2212@linux-foundation.org> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.24.148.75] Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org DQoNCj4gLS0tLS3Tyrz+1K28/i0tLS0tDQo+ILeivP7IyzogbGludXgta2VybmVsLW93bmVyQHZn ZXIua2VybmVsLm9yZw0KPiBbbWFpbHRvOmxpbnV4LWtlcm5lbC1vd25lckB2Z2VyLmtlcm5lbC5v cmddILT6se0gQW5kcmV3IE1vcnRvbg0KPiC3osvNyrG85DogMjAxOcTqM9TCOMjVIDI6MTANCj4g ytW8/sjLOiBMaSxSb25ncWluZyA8bGlyb25ncWluZ0BiYWlkdS5jb20+DQo+ILOty806IGxpbnV4 LWtlc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