Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp875519pxf; Wed, 7 Apr 2021 13:54:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzL+xigxd/Jrjiu7g+QntNzbCR5ovP3HDr4N6V+UPDRTU2nr5S2XJdk/7Ta6Q8OF/2gm0UJ X-Received: by 2002:a17:90b:3704:: with SMTP id mg4mr5003671pjb.156.1617828861652; Wed, 07 Apr 2021 13:54:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617828861; cv=none; d=google.com; s=arc-20160816; b=yEE9JqSMI0B+Zzp5+vHJz3rs/9jpqEmHvYTy3EiIEqXO18SqRp1GBy3Jz9+OFWavew o6fEpVBRrQ0C3DWvDcvFuBLsKvl8aD65hWuez+Q2D5Vw3dt8OIx+VGy8aDD5fffqgJ2p XVxle8WgY5TLBZVI/GLqyM7ljxjOZHCHwA278QB+NlA1+lUXLqRGIhcFmzEs5+VI5UC6 VEKTRoLIVyk1PrH6ltF/GQ3I4QNm6MJ+hpLt/st1RVjYiKhEOVYxW2uanqOD3k/N7vpQ OnM78O9DRJBeMPXqtpB87Sh+k8Tk69e6FToMabINQpaPNxilVV9nWCCEd61lGcVkV/Lx P8Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:references:in-reply-to:subject:cc :to:from:date:message-id:content-transfer-encoding:mime-version; bh=hjqSy48AgaLt5Jc+uMqo12d8XC4zrk7AJENI17Jof40=; b=KHHY6KVp7kUeW8d4p5fCwjHbpBzk1pIDdbnosvc4dbamV+kuJ4Q5h2SUsrqb06KWuc G2DvszLnBzYghmO3uQJ0WJ2LezUiX6YE5kfQ8UrASUqtkIF38/J1mmODgjGMAZQ72vDA WqjHcmJn1YC1DCVnU3JysDOkK8u6A1YxxZ7kP/H0beyr+tkfqc81i+Zvteqqw79XvxR4 fgnK0N7wJ7CoAavL890a4s7JHv9+YZIaYBJJyHIzMUEQCH/WB48XYwZRfzopiEd+/Rca RlaKJ+WRew3fnLoDxPgBS7GD2mLLAK9WAhBD5iNfltck76vsf98epnW2zgpaRim1Zkpc lAGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 5si18052442pgg.361.2021.04.07.13.54.09; Wed, 07 Apr 2021 13:54:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241839AbhDGLUg (ORCPT + 99 others); Wed, 7 Apr 2021 07:20:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236366AbhDGLUf (ORCPT ); Wed, 7 Apr 2021 07:20:35 -0400 X-Greylist: delayed 924 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 07 Apr 2021 04:20:25 PDT Received: from laas.laas.fr (laas.laas.fr [IPv6:2001:660:6602:4::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BBB5C061756; Wed, 7 Apr 2021 04:20:19 -0700 (PDT) Received: from cactus.useless-ficus.net (useless-ficus.net [IPv6:2001:470:7ffe:0:0:0:0:cafe]) (authenticated bits=0) by laas.laas.fr (8.16.0.45/8.16.0.29) with ESMTPSA id 137B4YJO028770 (version=TLSv1.3 cipher=AEAD-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 7 Apr 2021 13:04:40 +0200 (CEST) Received: from ficus.useless-ficus.net (ficus.useless-ficus.net [IPv6:2001:470:7ffe:1::1]) by cactus.useless-ficus.net (Postfix) with ESMTP id EAA6A9F; Wed, 7 Apr 2021 13:04:31 +0200 (CEST) (envelope-from anthony.mallet@laas.fr) Received: by ficus.useless-ficus.net (Postfix, from userid 1001) id C6DF3605557; Wed, 7 Apr 2021 13:04:31 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <24685.37311.759816.776098@gargle.gargle.HOWL> Date: Wed, 7 Apr 2021 13:04:31 +0200 From: Anthony Mallet To: Johan Hovold Cc: Greg Kroah-Hartman , Oliver Neukum , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH 1/3] Revert "USB: cdc-acm: fix rounding error in TIOCSSERIAL" In-Reply-To: <20210407102845.32720-2-johan@kernel.org> References: <20210407102845.32720-1-johan@kernel.org> <20210407102845.32720-2-johan@kernel.org> X-Mailer: VM 8.2.0b under 26.3 (x86_64--netbsd) Organization: LAAS/CNRS - Toulouse - France Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 7 Apr 2021, at 12:28, Johan Hovold wrote: > With HZ=250, the default 0.5 second value of close_delay is converted to > 125 jiffies when set and is converted back to 50 centiseconds by > TIOCGSERIAL as expected (not 12 cs as was claimed). It was "12" (instead of 50) because the conversion gor TIOCGSERIAL was initially broken, and that was fixed in the previous commit 633e2b2ded739a34bd0fb1d8b5b871f7e489ea29 > For completeness: With different default values for these parameters or > with a HZ value not divisible by two, the lack of rounding when setting > the default values in tty_port_init() could result in an -EPERM being > returned, but this is hardly something we need to worry about. The -EPERM is harmful when a regular user wants to update other members of serial_struct without changing the close delays, e.g. ASYNC_LOW_LATENCY, which is granted to regular users. Best, Anthony