From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754194AbbFIS5x (ORCPT ); Tue, 9 Jun 2015 14:57:53 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:50731 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752971AbbFIS5o (ORCPT ); Tue, 9 Jun 2015 14:57:44 -0400 Date: Tue, 9 Jun 2015 19:57:36 +0100 From: Mark Brown To: Stefan Wahren Cc: Joe Perches , Liam Girdwood , linux-kernel@vger.kernel.org, stable@vger.kernel.org Message-ID: <20150609185736.GY14071@sirena.org.uk> References: <1433368589-16806-1-git-send-email-stefan.wahren@i2se.com> <20150609180028.GT14071@sirena.org.uk> <489276691.38639.1433875754470.JavaMail.open-xchange@oxbsltgw09.schlund.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="SIhMtSQSYpXpqifs" Content-Disposition: inline In-Reply-To: <489276691.38639.1433875754470.JavaMail.open-xchange@oxbsltgw09.schlund.de> X-Cookie: The end of labor is to gain leisure. User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH V2] regulator: core: fix constraints debug output X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --SIhMtSQSYpXpqifs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jun 09, 2015 at 08:49:14PM +0200, Stefan Wahren wrote: > > Mark Brown hat am 9. Juni 2015 um 20:00 geschrieben: > > If we know how much output we might produce then why not extend the > > buffer so we don't need to cut it off? The defensive programming is > > good but that seems a better fix. > I thought the intension was to keep the output in "one" line. If not i suggest > to increase the size to 160 bytes, which is sufficient for all cases. No, it was just the first number I thought of - we'll scroll off the end of an 80 column line anyway due to the prefixes that get added (time, regulator subsystem name and so on). The bounds checking seems good but it seems like a second patch after bumping the buffer which is a much more focused fix for stable. I've also just done a separate patch for the buffer corruption you reported. --SIhMtSQSYpXpqifs Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVdzcfAAoJECTWi3JdVIfQVS8H/Rr1jDrJwHZxm2sjB0CXG0e+ gDX8faFh5d/0Lqo0sQ3KC0MoR0Mtm/7cuPKJW8Am+QBV2bcZNKxVV87ZwyVfcGmt uA9xlgEldfiiS6s1kSqYbD0VJE5YxaIpkIhzRM4B9Crtg82Og0ifKYacOJ1YMijK Oubq3nPJhA/K/vKD+IKxoMW9oWT27gYMnr5pRsgfEK8GOQfs6b4vb6YSzZJJ1Ma0 Tr3wtWiScENC09wc6/DPGuI0n2q7/BtSB04XWYe3G2ozzHlNtNkHMbzJmp8P937I PQki2c4UGT/lO8LM245zWjnDkqk/XVrgWoW2a5GnOaPtnKfR2YEgs25cynghaWQ= =t7IS -----END PGP SIGNATURE----- --SIhMtSQSYpXpqifs--