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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 EE653C43460 for ; Thu, 8 Apr 2021 13:32:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D122361151 for ; Thu, 8 Apr 2021 13:32:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231676AbhDHNcU (ORCPT ); Thu, 8 Apr 2021 09:32:20 -0400 Received: from mx2.suse.de ([195.135.220.15]:46774 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231665AbhDHNcT (ORCPT ); Thu, 8 Apr 2021 09:32:19 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1617888726; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=e/BYXAqs9v2XgoT7DwNh0sQcjNscDAkBH9BXsk3qfmc=; b=kHWNJHVI19TVIsXv2WQ6wnWrCWEVevm2PBRwT+VCTZ960Cm+Pkkl3H00brUVI6b0GkvbGe tnonQXzeXOCeUp43BNt+V7E3LB8IdPeZDPCgcDTrw/UXU40cocZpxh3dz2PyA18ya22jK1 RgEqA/yO4j/Drs0uuerH4X85o/PfNzE= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 5CBC6B13B; Thu, 8 Apr 2021 13:32:06 +0000 (UTC) Message-ID: <177fba4f41526ef97aadddc9c4d7abf71c1cf77b.camel@suse.com> Subject: Re: [PATCH v2 1/3] Revert "USB: cdc-acm: fix rounding error in TIOCSSERIAL" From: Oliver Neukum To: Johan Hovold , Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Anthony Mallet , stable@vger.kernel.org Date: Thu, 08 Apr 2021 15:31:49 +0200 In-Reply-To: <20210408131602.27956-2-johan@kernel.org> References: <20210408131602.27956-1-johan@kernel.org> <20210408131602.27956-2-johan@kernel.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.4 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Am Donnerstag, den 08.04.2021, 15:16 +0200 schrieb Johan Hovold: > This reverts commit b401f8c4f492cbf74f3f59c9141e5be3071071bb. > > The offending commit claimed that trying to set the values reported back > by TIOCGSERIAL as a regular user could result in an -EPERM error when HZ > is 250, but that was never the case. > > 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, even if that was the > case before an earlier fix). > > Comparing the internal current and new jiffies values is just fine to > determine if the value is about to change so drop the bogus workaround > (which was also backported to stable). > > 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. > > Cc: Anthony Mallet > Cc: stable@vger.kernel.org > Signed-off-by: Johan Hovold Acked-by: Oliver Neukum