From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932796AbbIYRuE (ORCPT ); Fri, 25 Sep 2015 13:50:04 -0400 Received: from mail.skyhub.de ([78.46.96.112]:32789 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932766AbbIYRuC (ORCPT ); Fri, 25 Sep 2015 13:50:02 -0400 Date: Fri, 25 Sep 2015 19:49:56 +0200 From: Borislav Petkov To: Toshi Kani Cc: mchehab@osg.samsung.com, dougthompson@xmission.com, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, elliott@hpe.com, tony.luck@intel.com Subject: Re: [PATCH v2 2/2] EDAC: Fix sysfs dimm_label store operation Message-ID: <20150925174956.GF3568@pd.tnic> References: <1442933883-21587-1-git-send-email-toshi.kani@hpe.com> <1442933883-21587-3-git-send-email-toshi.kani@hpe.com> <20150924164830.GF3774@pd.tnic> <1443121564.25474.160.camel@hpe.com> <20150924191551.GK3774@pd.tnic> <1443124767.25474.172.camel@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1443124767.25474.172.camel@hpe.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 24, 2015 at 01:59:27PM -0600, Toshi Kani wrote: > On Thu, 2015-09-24 at 21:15 +0200, Borislav Petkov wrote: > > On Thu, Sep 24, 2015 at 01:06:04PM -0600, Toshi Kani wrote: > > > edac-utils(1) checks empty labels and shows them as "ch%d" [1]. So, > > > I think empty labels are supported today, and using 'echo "" >' seems > > > to be a legitimate way to set them empty if desired. > > > > What would be a sane use case to set a DIMM label to an empty string? > > Well, I guess there isn't a sane use case for it... :-) > > Attached is a patch (on top of patch 2/2) to disallow an empty string. > I prefer to make it as a separate patch in case someone comes up with > a valid use-case for it. > > Thanks, > -Toshi > > ==== > Subject: [PATCH] EDAC: Fail empty string to sysfs dimm_label store > > Updating dimm_label to an empty string does not make much sense. > Change the sysfs dimm_label store option to fail a request when > an input string is empty. > > Suggested-by: Borislav Petkov > Signed-off-by: Toshi Kani > --- > drivers/edac/edac_mc_sysfs.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) All three applied. Thanks. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.