Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp138819iol; Thu, 9 Jun 2022 00:13:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZedrkTLM21nHMvGvjhjzxIw5acqgYOc29MOvDdoSsL7wbU+8UBaai7kZN8oitGOBTNwip X-Received: by 2002:aa7:d582:0:b0:42d:ce84:7e07 with SMTP id r2-20020aa7d582000000b0042dce847e07mr43434536edq.297.1654758781735; Thu, 09 Jun 2022 00:13:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654758781; cv=none; d=google.com; s=arc-20160816; b=U6lHQXm5O+kY1UIlZ7UKKusYtvhb2GpIK2Qfd1bG2LpDB0lb/H0tunjO4VbE0DeduN ua5FlJGFNHokfFS9QtyqoZ3xLdJV4oYdcmDAhZzqtWsOTRKNxeJZVFHikl9u7D+94Gbg LSO29yPjb+7x0VsWEovzvWjL12im+UQneTe71cvwY2GUlupECsTqBK+PA4Uf/TXFWzrl eOxYPh7I6G0lfMmpsi4ujjlgm+fiPolPJDl16BQ8vyLHqEhQM0+BO1n+GpedlB+GZvOv ZYf/U51lTsLf8XnjZoOuWcJhkf+jiOBfUbjVJ2sXhos1KAucmS5CLxzrg51+wrB0ttmv mc2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YS2i7Iwmt6bjy2CZg6saJgLmibzQmK3qHVln4Hin7so=; b=GAAXmSKzIN8s9+x1HYcnzjoi1GiS7tWao/6VTsZH2eZkDSrnlfkLOgLSeW0rfj7Kz7 RIQBJwCLq0F8gh4ANil9G0784zqs7rwiwuog1zqAwllzrFh0rLEfLumomyOa14lQB3rR Xd/xbEh5o8b9FsUxKLE0WdGUNh7mWwdF83iLSX9UanFopadL/efG5HPJUursAdRh2qj5 Pic8XWhHON7GAwLIMMTom4KrlbxMRirbt8dD9MhaGAPKQIhiNoYO1MnTbUAGy1LAZ4XA 1CiZEdkEXbERFeJZDSG7zE4aINrTUU7FFIgAk2PzsDop1HQ/8PcIdqgt18+bRu7BAwuH Y7sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aAmj7NnN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dz8-20020a0564021d4800b0042dbcfce884si2967130edb.390.2022.06.09.00.12.36; Thu, 09 Jun 2022 00:13:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aAmj7NnN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238567AbiFIG3F (ORCPT + 99 others); Thu, 9 Jun 2022 02:29:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238893AbiFIG3D (ORCPT ); Thu, 9 Jun 2022 02:29:03 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 24208FD38 for ; Wed, 8 Jun 2022 23:29:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654756140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YS2i7Iwmt6bjy2CZg6saJgLmibzQmK3qHVln4Hin7so=; b=aAmj7NnNxS/El++S4RptIK0V296N/OzoppNrjlRXbqYUJP5hcnFis9VQNXep0BeWMUdzot PIYyF5/lC9nwoxz/hiTMFuX3YYZSFGWwXxC6dSKF15Wq0oeFRRsSE9Strryttq/PDM6xaf 1m7yAmP8lvl6U8pifb+4reDIo0m2UPY= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-614-eUOpVjpfMGuIHV8AKBHRtg-1; Thu, 09 Jun 2022 02:28:58 -0400 X-MC-Unique: eUOpVjpfMGuIHV8AKBHRtg-1 Received: by mail-wm1-f71.google.com with SMTP id p18-20020a05600c23d200b0039c40c05687so4773431wmb.2 for ; Wed, 08 Jun 2022 23:28:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=YS2i7Iwmt6bjy2CZg6saJgLmibzQmK3qHVln4Hin7so=; b=FCfieUA3JLTKv7u+hTyrNfuXFQvx/VnEvPP/2LLvvhhh1SqRf3sss17iV7Q57acV9l ujV44UKYQcqDfXpca3RM4eSm36rDhlmtE9FQx0M82qSNb/i733LWGKnkKUafAmZarH4S yZrlmF3d4Ac4h0WgXkOdXkVtTmtIl1cWOn2Wyb/nSTUq4WmkJXpkCtY0ABM5rPEycLvx APfpInLRsow0QBsbMydvHu1I3hrpY7EQATl1qmTrrYmLfqQHOTxlfL1cGLm5r4LU7Dxm T6MMFZ/X/ljANGwgKUg0o92wzNpZhUcsbi6qz/3JC732h8ba8YmVzlX/RKCSUEXb1b65 JcEg== X-Gm-Message-State: AOAM532T4+1/qFIwkC4WqAhICjOYCtfIF2bYR1phZ8bPCZQeQDNpmPzd GFLC366I79czLggYlmANWM5588dLPio3Jt0/CAvIII4UKWu7bdtAtUduVQpYhRU8VYqF5AO11wO bDrfwDrQJPIZ2xBzQa06xT/cY X-Received: by 2002:adf:f6d2:0:b0:211:f0bf:3d14 with SMTP id y18-20020adff6d2000000b00211f0bf3d14mr37377349wrp.264.1654756137227; Wed, 08 Jun 2022 23:28:57 -0700 (PDT) X-Received: by 2002:adf:f6d2:0:b0:211:f0bf:3d14 with SMTP id y18-20020adff6d2000000b00211f0bf3d14mr37377324wrp.264.1654756136871; Wed, 08 Jun 2022 23:28:56 -0700 (PDT) Received: from localhost.localdomain ([151.29.54.194]) by smtp.gmail.com with ESMTPSA id j7-20020a05600c190700b0039c4ba160absm2530749wmq.2.2022.06.08.23.28.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 23:28:56 -0700 (PDT) Date: Thu, 9 Jun 2022 08:28:54 +0200 From: Juri Lelli To: Yajun Deng Cc: mingo@redhat.com, peterz@infradead.org, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] sched/deadline: Use proc_douintvec_minmax() limit minimum value Message-ID: References: <20220607101807.249965-1-yajun.deng@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220607101807.249965-1-yajun.deng@linux.dev> X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 07/06/22 18:18, Yajun Deng wrote: > sysctl_sched_dl_period_max and sysctl_sched_dl_period_min are unsigned > integer, but proc_dointvec() wouldn't return error even if we set a > negative number. > > Use proc_douintvec_minmax() instead of proc_dointvec(). Add extra1 for > sysctl_sched_dl_period_max and extra2 for sysctl_sched_dl_period_min. > > It's just an optimization for match data and proc_handler in struct > ctl_table. The 'if (period < min || period > max)' in __checkparam_dl() > will work fine even if there hasn't this patch. > > v2: > - update the log message. > > Signed-off-by: Yajun Deng > --- Guess I'm not opposed to the change, even if, as the changelog also says, we should be already checking for sane values. That said, Acked-by: Juri Lelli Thanks, Juri