Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp472597pxv; Thu, 22 Jul 2021 04:54:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzb/DtmfkJz/oJH+pkRVVcmzKBVrbARl0QT6OA+fhR3FcFHFXmsOUAfiyCv3bXSL0NS87JV X-Received: by 2002:a92:b74d:: with SMTP id c13mr27207978ilm.176.1626954892588; Thu, 22 Jul 2021 04:54:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626954892; cv=none; d=google.com; s=arc-20160816; b=tR50Uz1Q8s0TGJxYITfxdy/OvKZlUSZVMQO+LX/x51YKq1xYPGZKTLLJWTxibPjDgv mxRtDaAng/rHl6Z1dvaJdmCTo9rHtb7OVDZK5dd6xnD/5uWg291Lj7Is6QwdwIdxcHcj Va0vbf+4WbftDmD9jS6oukpANxwYVUBNsiL6O32gtl+rVqLS1XsiZ7o5Fy0esalHseUL 6cB5b1W3+pAu+c0XiBHNTZbsaSb28Gho8izRNxoAu2hxXyCdTdA12YQSRtF91Ho5BuGd nIUOr8f1AEPLwEJE5qw0WAmPeY+e8pTho3ZPrNmY6uaZASwEFgnmWqt6voSuAVDUQwEn mgVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=HI+e/xvoUOH4i2trhO8dcOHc+LQTOalKpiniQMNVN5I=; b=lvShU3qbyQKzg2vMUUvNl4RKZL5UXctF38efto9I3BlnGzYt0C5XtK4e0PHZKo5z7H 2R1bXAWnokMy8uj+KH84ECwuM5iDqeTTS/k3QBOjVkIH/EaZL4gfe38Uw1X5wm7qu2Y8 kPo6C3TsAYJbdpDKJOjMKvh47oDB6j1rAevs1VvO3tm4b2ucaMAnuPVNqw7g8h8pdyna nN7InxgRNmKY1j+D4XsEoQ4zohQ/XEWG4TpMttkse68L0GAwUJgLq6MW5a0wt0NpHy9Z dNmU6Q1/npwcqSoKMJit47dUm2lH70fjJwin+evBYb83Lt9YWOp2uN8S/LinvcWQs46Q +IKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=jB2RGs9D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n21si21337856jaj.97.2021.07.22.04.54.41; Thu, 22 Jul 2021 04:54:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=jB2RGs9D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231856AbhGVLMe (ORCPT + 99 others); Thu, 22 Jul 2021 07:12:34 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:34576 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S231828AbhGVLM0 (ORCPT ); Thu, 22 Jul 2021 07:12:26 -0400 X-UUID: 1ffb8b2efa404a4baea454d1499d56c5-20210722 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=HI+e/xvoUOH4i2trhO8dcOHc+LQTOalKpiniQMNVN5I=; b=jB2RGs9DabERlVdkoje6zFj040j2iY7Xjhrw91klEjI9h3I+neZxnAVdRE9QecDFv0i7oD+wvac41HTeba9p5V5hpcFy6itdDIKv3p1DGobWh4KEDOtvFjYmtUxGXNQGPA4SVDph8hKC9hwoudRv8LqYw39sfNKA+fZnJoxz7YQ=; X-UUID: 1ffb8b2efa404a4baea454d1499d56c5-20210722 Received: from mtkcas35.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1036131041; Thu, 22 Jul 2021 19:52:57 +0800 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by MTKMBS32N1.mediatek.inc (172.27.4.71) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 22 Jul 2021 19:52:51 +0800 Received: from [10.17.3.153] (10.17.3.153) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 22 Jul 2021 19:52:50 +0800 Message-ID: <1626954770.29611.55.camel@mhfsdcap03> Subject: Re: [PATCH] uart: mediatek: fix memory corruption issue From: zhiyong tao To: Greg KH CC: , , , , , , , , , , , , , , , Date: Thu, 22 Jul 2021 19:52:50 +0800 In-Reply-To: References: <20210710090103.2643-1-zhiyong.tao@mediatek.com> <20210710090103.2643-2-zhiyong.tao@mediatek.com> <1626948212.29611.47.camel@mhfsdcap03> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: EA5696D511CFA7729DB6F188DE337549E8F4B85D9D40B97435D180AAF18AFE812000:8 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gVGh1LCAyMDIxLTA3LTIyIGF0IDEyOjEyICswMjAwLCBHcmVnIEtIIHdyb3RlOg0KPiBPbiBU aHUsIEp1bCAyMiwgMjAyMSBhdCAwNjowMzozMlBNICswODAwLCB6aGl5b25nIH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