From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933166AbeAHT2H (ORCPT + 1 other); Mon, 8 Jan 2018 14:28:07 -0500 Received: from mail-qk0-f195.google.com ([209.85.220.195]:44245 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932155AbeAHT2F (ORCPT ); Mon, 8 Jan 2018 14:28:05 -0500 X-Google-Smtp-Source: ACJfBoskS2FbhE9ZXlvfBVub6rcW5M0P+x+sHNkDskCVI/3PNP5lKTLUmSU1SedA8JcNU4hxMpWYlA== Date: Mon, 8 Jan 2018 11:28:01 -0800 From: Tejun Heo To: Linus Torvalds Cc: Linux Kernel Mailing List , Li Zefan , Johannes Weiner , cgroups Subject: Re: [GIT PULL] cgroup fixes for v4.15-rc7 Message-ID: <20180108192801.GZ3668920@devbig577.frc2.facebook.com> References: <20180108145223.GS3668920@devbig577.frc2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Return-Path: On Mon, Jan 08, 2018 at 11:23:03AM -0800, Linus Torvalds wrote: > On Mon, Jan 8, 2018 at 11:20 AM, Linus Torvalds > wrote: > > > > Use "strscpy()", which got this _right_. > > Oh Christ. > > It actually did that initially. And then it was changed to the broken > code due to some idiotic broken warning by tools that don't do the > right thing. Dang, I was reading the different str*cpy() functions and suggested strscpy() and then forgot about it and blindly applied strlcpy() blindly after the build warning report. It'd be great to weed out the useless ones. These are places where truncation is fine. Would the right thing to do be adding (void) in front, which is kinda ugly? Thanks. -- tejun