From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DAFDC43381 for ; Mon, 18 Mar 2019 11:26:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 252C620857 for ; Mon, 18 Mar 2019 11:26:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727173AbfCRL0R (ORCPT ); Mon, 18 Mar 2019 07:26:17 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:60551 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725973AbfCRL0R (ORCPT ); Mon, 18 Mar 2019 07:26:17 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id A196280733; Mon, 18 Mar 2019 12:26:07 +0100 (CET) Date: Mon, 18 Mar 2019 12:26:14 +0100 From: Pavel Machek To: Rasmus Villemoes Cc: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Jacek Anaszewski , LKML , linux-leds@vger.kernel.org Subject: Re: [PATCH v2 4/6] leds: netdev trigger: move name length checking to netdev_trig_set_device Message-ID: <20190318112614.GD6101@amd> References: <20190313202615.22883-1-linux@rasmusvillemoes.dk> <20190314140619.3309-1-linux@rasmusvillemoes.dk> <20190314140619.3309-5-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9UV9rz0O2dU/yYYn" Content-Disposition: inline In-Reply-To: <20190314140619.3309-5-linux@rasmusvillemoes.dk> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --9UV9rz0O2dU/yYYn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu 2019-03-14 15:06:17, Rasmus Villemoes wrote: > It's better to check that size is sane in the function that does the > memcpy'ing and 0-termination to the IFNAMSIZ-sized buffer instead of > relying on callers getting it right. Not rejecting size upfront does > mean we would do the cancel_delayed_work_sync(), but that gets fixed > up by the set_baseline_state() call. >=20 > Signed-off-by: Rasmus Villemoes Exactly. 2,4: Acked-by: Pavel Machek --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --9UV9rz0O2dU/yYYn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlyPgFYACgkQMOfwapXb+vJHowCeMH7W7PGfHHfcMCmYt6AUt7HL xxUAoIyD0WjFwmL2KmYJtVhen8/AmiOi =vaYf -----END PGP SIGNATURE----- --9UV9rz0O2dU/yYYn--