Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp289426pxb; Thu, 21 Jan 2021 07:12:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJzOCcu5YHyDMVl73mLITmadH5WLzbt7Wv+cgRdVp9fy4XJtXMyHHVrMEgTMoZCtSr8vPPSc X-Received: by 2002:a17:906:5290:: with SMTP id c16mr9538558ejm.403.1611241975916; Thu, 21 Jan 2021 07:12:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611241975; cv=none; d=google.com; s=arc-20160816; b=0zx+8O847tyMTml+dWi1deGRIQ5FBsrBV+Ov0f9pl6yfSzj/2iD1ukTBup+EGAke+o H8FHJjOLrrn9RaM8F9otRf1XRMYJJnBJDjiu7OTzE5yXuNvc0/jkomeFnPh3rTIVck1l +rS2mvbD24EXCiFJ0i8E9DkX8jHT0o41efOEaevFTj9BBvTk40l/+bAo74oMYd3zUqPr EUM/o3joS3+B6I8jyEt+QcSge1aHx2IHbobELtVRLWoacgVJVw/7JE4zZnFqv56ytk9M pUBhyA4IOWSwmUpEKL8lljoF7BZT235FilUp/hw9Bg7J/YTA6Dw/WvIrLkwFhs3asPMD duGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=QYBYjLbDYpycL6fpR7aDNJYpqgLBi9k8n4g9lty92Vc=; b=iAlU9kKO4C5ycLnhCdKKjL3/+TX7mgwmPalZjDivjh4VJnGZNZPHKCxmf2vn34Eg4t Y86+kLO/desYwn6LJfIZUgZW3z+KVa9HEgfvrdIw/OVJ/FhbywPGi91tmCkSmSZ0hRIq fuG+neeWq5bKS5XbYNkm7QBy7zovFQvec81c3KyMJbBibnub/UTHHsJYiG99uS+bFVf7 yU0Ih0HxCGTNfWSA19UQdwEQrHc5vAKkR7FesOIikPnWs4H0BP3XKt/lDUDSi1WTHiA8 io8oCCq+wjzrc0fc26Bl0nBMsrfNWzhNB2xyOn2SuqrO29vTvOcqVCKvNzQFZ3V0bV9n SiIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uWwiMQ8W; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id eb8si967237edb.6.2021.01.21.07.12.29; Thu, 21 Jan 2021 07:12:55 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uWwiMQ8W; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732433AbhAUPKL (ORCPT + 99 others); Thu, 21 Jan 2021 10:10:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:39804 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732421AbhAUPGq (ORCPT ); Thu, 21 Jan 2021 10:06:46 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 712DC235FF; Thu, 21 Jan 2021 15:05:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611241556; bh=qRBq4u7IBFJWAXc+l6+Z4BWGpd3fk5F9IR1G/OirCzw=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=uWwiMQ8WxDMfmMeAE+vYHFkePF5KTk6uBeasfNO/dnCJ7nvQE0ZBnK78g/OkrtQES gVP8X9klIuBGtZDmQOXMrLFqMh7ELL7k+IeSomNgF6Kcfyv6doEdJUrhs+iOIVpDTH i1GaGf4AUQa8zDlDuOFnugysBdrKExBWhI5CASF1r2mxORZWaPaP8vIZuE6/j0jfqg JNl1y/cL69uo0eVohMe3AQJp4yYs34Cj2ZrR356csQzmiJWZrcRMxEvtt6kpAT+La9 H/PFRYZrN6hpe4jXhjuYKWSXNvbmYclNg6SM/5MIo/wKchuW2idSUsWZk/qtEa2/BH XLMvIUG4nI5aA== Date: Thu, 21 Jan 2021 16:05:52 +0100 (CET) From: Jiri Kosina To: Denis Efremov cc: Jens Axboe , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Wim Osterholt Subject: Re: [PATCH RESEND] floppy: fix open(O_ACCMODE) for ioctl-only open In-Reply-To: Message-ID: References: <20160610230255.GA27770@djo.tudelft.nl> <20160614184308.GA6188@djo.tudelft.nl> <20160615132040.GZ14480@ZenIV.linux.org.uk> <20160615224722.GA9545@djo.tudelft.nl> <9c713fa8-9da1-47b5-0d5d-92f4cd13493a@kernel.dk> <5cb57175-7f0b-5536-925d-337241bcda93@linux.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 21 Jan 2021, Denis Efremov wrote: > > From: Jiri Kosina > > Subject: [PATCH v2] floppy: reintroduce O_NDELAY fix > > > > Originally fixed in 09954bad4 ("floppy: refactor open() flags handling") > > then reverted for unknown reason in f2791e7eadf437 instead of taking > > the open(O_ACCMODE) for ioctl-only open fix, which had the changelog below > > > > ==== > > Commit 09954bad4 ("floppy: refactor open() flags handling"), as a > > side-effect, causes open(/dev/fdX, O_ACCMODE) to fail. It turns out that > > this is being used setfdprm userspace for ioctl-only open(). > > > > Reintroduce back the original behavior wrt !(FMODE_READ|FMODE_WRITE) > > modes, while still keeping the original O_NDELAY bug fixed. > > > > Cc: stable@vger.kernel.org # v4.5+ > > Are you sure that it's not worth to backport it to LTS v4.4? Because > f2791e7ead is just a revert and 09954bad4 is not presented in v4.4 I'm > not sure what fixes tag is better to use in this case. You are right; I'll drop the '4.5+' indicator and will backport it once/if it hits Linus' tree. > > + if (mode & (FMODE_READ|FMODE_WRITE)) { > > + UDRS->last_checked = 0; > > UDRS will still break the compilation here. Doh, forgot to refresh before sending, sorry for the noise. I'll send the final version once I get confirmation from the reporter that it's fixing the issue properly, add his Reported-by: etc. Thanks, -- Jiri Kosina SUSE Labs