From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753007AbdLMBCf (ORCPT ); Tue, 12 Dec 2017 20:02:35 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:7709 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752859AbdLMBCd (ORCPT ); Tue, 12 Dec 2017 20:02:33 -0500 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="31341592" Subject: Re: [PATCH] drivers/staging/irda: fix max dup length for kstrndup To: Stephen Hemminger CC: , , References: <20171212085444.15901-1-mashimiao.fnst@cn.fujitsu.com> <20171212102712.40e7a652@xeon-e3> From: Ma Shimiao Message-ID: Date: Wed, 13 Dec 2017 09:03:35 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171212102712.40e7a652@xeon-e3> Content-Type: text/plain; charset="utf-8" Content-Language: en-MW Content-Transfer-Encoding: 7bit X-Originating-IP: [10.167.225.93] X-yoursite-MailScanner-ID: BADF548AE82A.AD3D6 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: mashimiao.fnst@cn.fujitsu.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/13/2017 02:27 AM, Stephen Hemminger wrote: > On Tue, 12 Dec 2017 16:54:44 +0800 > Ma Shimiao wrote: > >> If source string longer than max, kstrndup will alloc max+1 space. >> So, we should make sure the result will not over limit. >> >> Signed-off-by: Ma Shimiao > > Did you read the TODO file in drivers/staging/irda? > > The irda code will be removed soon from the kernel tree as it is old and > obsolete and broken. > > Don't worry about fixing up anything here, it's not needed. Ah.. OK. Did not enter into the directory and notice it. > > > -- Ma Shimiao Development Dept.I Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)