From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752436AbdLKPF6 (ORCPT ); Mon, 11 Dec 2017 10:05:58 -0500 Received: from mail-qt0-f194.google.com ([209.85.216.194]:45430 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750707AbdLKPFy (ORCPT ); Mon, 11 Dec 2017 10:05:54 -0500 X-Google-Smtp-Source: ACJfBovoTJiOarySU1bDcUdJcLspo22mK1sA/YyDT4Hce1/WzmA5CkBtyzoJH80AUQEWqOZ3mRAbVA== Date: Mon, 11 Dec 2017 07:05:51 -0800 From: Tejun Heo To: Ma Shimiao Cc: lizefan@huawei.com, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] cgroup: limit max copied char length for cgroup file name Message-ID: <20171211150551.GC2421075@devbig577.frc2.facebook.com> References: <20171209054758.13870-1-mashimiao.fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171209054758.13870-1-mashimiao.fnst@cn.fujitsu.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Dec 09, 2017 at 01:47:58PM +0800, Ma Shimiao wrote: > the result of cgroup_file_name will be used by kernfs_remove_name, > and then by kernfs_remove_by_name_ns(). > If reached the max length, may have problem printed by WARN() in > kernfs_remove_by_name_ns(). > > Signed-off-by: Ma Shimiao Can we use strscpy() instead? Thanks. -- tejun