Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1476678 > unrolled thread

[PATCH 4.7 114/143] Revert "floppy: fix open(O_ACCMODE) for ioctl-only open"

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2016-09-05 19:00 +0200
Last post2016-09-09 13:40 +0200
Articles 5 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.7 114/143] Revert "floppy: fix open(O_ACCMODE) for ioctl-only open" Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-09-05 19:00 +0200
    Re: [PATCH 4.7 114/143] Revert "floppy: fix open(O_ACCMODE) for  ioctl-only open" Mark Hounschell <markh@compro.net> - 2016-09-07 19:00 +0200
      Re: [PATCH 4.7 114/143] Revert "floppy: fix open(O_ACCMODE) for  ioctl-only open" Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-09-08 09:00 +0200
        Re: [PATCH 4.7 114/143] Revert "floppy: fix open(O_ACCMODE) for  ioctl-only open" Jiri Kosina <jikos@kernel.org> - 2016-09-08 10:10 +0200
          Re: [PATCH 4.7 114/143] Revert "floppy: fix open(O_ACCMODE) for  ioctl-only open" Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-09-09 13:40 +0200

#1476678 — [PATCH 4.7 114/143] Revert "floppy: fix open(O_ACCMODE) for ioctl-only open"

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-09-05 19:00 +0200
Subject[PATCH 4.7 114/143] Revert "floppy: fix open(O_ACCMODE) for ioctl-only open"
Message-ID<se5pC-6lQ-71@gated-at.bofh.it>
4.7-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jens Axboe <axboe@fb.com>

commit 468c298ad3ed3f0d94a65f8ca00f6bfc6c2b4e33 upstream.

This reverts commit ff06db1efb2ad6db06eb5b99b88a0c15a9cc9b0e.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/block/floppy.c |   21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -3663,6 +3663,11 @@ static int floppy_open(struct block_devi
 
 	opened_bdev[drive] = bdev;
 
+	if (!(mode & (FMODE_READ|FMODE_WRITE))) {
+		res = -EINVAL;
+		goto out;
+	}
+
 	res = -ENXIO;
 
 	if (!floppy_track_buffer) {
@@ -3706,15 +3711,13 @@ static int floppy_open(struct block_devi
 	if (UFDCS->rawcmd == 1)
 		UFDCS->rawcmd = 2;
 
-	if (mode & (FMODE_READ|FMODE_WRITE)) {
-		UDRS->last_checked = 0;
-		clear_bit(FD_OPEN_SHOULD_FAIL_BIT, &UDRS->flags);
-		check_disk_change(bdev);
-		if (test_bit(FD_DISK_CHANGED_BIT, &UDRS->flags))
-			goto out;
-		if (test_bit(FD_OPEN_SHOULD_FAIL_BIT, &UDRS->flags))
-			goto out;
-	}
+	UDRS->last_checked = 0;
+	clear_bit(FD_OPEN_SHOULD_FAIL_BIT, &UDRS->flags);
+	check_disk_change(bdev);
+	if (test_bit(FD_DISK_CHANGED_BIT, &UDRS->flags))
+		goto out;
+	if (test_bit(FD_OPEN_SHOULD_FAIL_BIT, &UDRS->flags))
+		goto out;
 
 	res = -EROFS;
 

[toc] | [next] | [standalone]


#1478507 — Re: [PATCH 4.7 114/143] Revert "floppy: fix open(O_ACCMODE) for ioctl-only open"

FromMark Hounschell <markh@compro.net>
Date2016-09-07 19:00 +0200
SubjectRe: [PATCH 4.7 114/143] Revert "floppy: fix open(O_ACCMODE) for ioctl-only open"
Message-ID<seOmC-2g5-13@gated-at.bofh.it>
In reply to#1476678
On 09/05/2016 12:44 PM, Greg Kroah-Hartman wrote:
> 4.7-stable review patch.  If anyone has any objections, please let me know.
>
> ------------------
>
> From: Jens Axboe <axboe@fb.com>
>
> commit 468c298ad3ed3f0d94a65f8ca00f6bfc6c2b4e33 upstream.
>
> This reverts commit ff06db1efb2ad6db06eb5b99b88a0c15a9cc9b0e.
>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>
> ---
>  drivers/block/floppy.c |   21 ++++++++++++---------
>  1 file changed, 12 insertions(+), 9 deletions(-)
>
> --- a/drivers/block/floppy.c
> +++ b/drivers/block/floppy.c
> @@ -3663,6 +3663,11 @@ static int floppy_open(struct block_devi
>
>  	opened_bdev[drive] = bdev;
>
> +	if (!(mode & (FMODE_READ|FMODE_WRITE))) {
> +		res = -EINVAL;
> +		goto out;
> +	}
> +
>  	res = -ENXIO;
>
>  	if (!floppy_track_buffer) {
> @@ -3706,15 +3711,13 @@ static int floppy_open(struct block_devi
>  	if (UFDCS->rawcmd == 1)
>  		UFDCS->rawcmd = 2;
>
> -	if (mode & (FMODE_READ|FMODE_WRITE)) {
> -		UDRS->last_checked = 0;
> -		clear_bit(FD_OPEN_SHOULD_FAIL_BIT, &UDRS->flags);
> -		check_disk_change(bdev);
> -		if (test_bit(FD_DISK_CHANGED_BIT, &UDRS->flags))
> -			goto out;
> -		if (test_bit(FD_OPEN_SHOULD_FAIL_BIT, &UDRS->flags))
> -			goto out;
> -	}
> +	UDRS->last_checked = 0;
> +	clear_bit(FD_OPEN_SHOULD_FAIL_BIT, &UDRS->flags);
> +	check_disk_change(bdev);
> +	if (test_bit(FD_DISK_CHANGED_BIT, &UDRS->flags))
> +		goto out;
> +	if (test_bit(FD_OPEN_SHOULD_FAIL_BIT, &UDRS->flags))
> +		goto out;
>
>  	res = -EROFS;
>
>
>
>

Can I assume the one to revert 09954bad448791ef01202351d437abdd9497a804 
will be a separate one?

Thanks
Mark

[toc] | [prev] | [next] | [standalone]


#1478812 — Re: [PATCH 4.7 114/143] Revert "floppy: fix open(O_ACCMODE) for ioctl-only open"

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-09-08 09:00 +0200
SubjectRe: [PATCH 4.7 114/143] Revert "floppy: fix open(O_ACCMODE) for ioctl-only open"
Message-ID<sf1tv-2mB-1@gated-at.bofh.it>
In reply to#1478507
On Wed, Sep 07, 2016 at 12:53:51PM -0400, Mark Hounschell wrote:
> On 09/05/2016 12:44 PM, Greg Kroah-Hartman wrote:
> > 4.7-stable review patch.  If anyone has any objections, please let me know.
> > 
> > ------------------
> > 
> > From: Jens Axboe <axboe@fb.com>
> > 
> > commit 468c298ad3ed3f0d94a65f8ca00f6bfc6c2b4e33 upstream.
> > 
> > This reverts commit ff06db1efb2ad6db06eb5b99b88a0c15a9cc9b0e.
> > 
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > 
> > ---
> >  drivers/block/floppy.c |   21 ++++++++++++---------
> >  1 file changed, 12 insertions(+), 9 deletions(-)
> > 
> > --- a/drivers/block/floppy.c
> > +++ b/drivers/block/floppy.c
> > @@ -3663,6 +3663,11 @@ static int floppy_open(struct block_devi
> > 
> >  	opened_bdev[drive] = bdev;
> > 
> > +	if (!(mode & (FMODE_READ|FMODE_WRITE))) {
> > +		res = -EINVAL;
> > +		goto out;
> > +	}
> > +
> >  	res = -ENXIO;
> > 
> >  	if (!floppy_track_buffer) {
> > @@ -3706,15 +3711,13 @@ static int floppy_open(struct block_devi
> >  	if (UFDCS->rawcmd == 1)
> >  		UFDCS->rawcmd = 2;
> > 
> > -	if (mode & (FMODE_READ|FMODE_WRITE)) {
> > -		UDRS->last_checked = 0;
> > -		clear_bit(FD_OPEN_SHOULD_FAIL_BIT, &UDRS->flags);
> > -		check_disk_change(bdev);
> > -		if (test_bit(FD_DISK_CHANGED_BIT, &UDRS->flags))
> > -			goto out;
> > -		if (test_bit(FD_OPEN_SHOULD_FAIL_BIT, &UDRS->flags))
> > -			goto out;
> > -	}
> > +	UDRS->last_checked = 0;
> > +	clear_bit(FD_OPEN_SHOULD_FAIL_BIT, &UDRS->flags);
> > +	check_disk_change(bdev);
> > +	if (test_bit(FD_DISK_CHANGED_BIT, &UDRS->flags))
> > +		goto out;
> > +	if (test_bit(FD_OPEN_SHOULD_FAIL_BIT, &UDRS->flags))
> > +		goto out;
> > 
> >  	res = -EROFS;
> > 
> > 
> > 
> > 
> 
> Can I assume the one to revert 09954bad448791ef01202351d437abdd9497a804 will
> be a separate one?

Hm, I didn't think I needed that here.  What is the git commit id of
that patch in Linus's tree?

sorry about this,

greg k-h

[toc] | [prev] | [next] | [standalone]


#1478888 — Re: [PATCH 4.7 114/143] Revert "floppy: fix open(O_ACCMODE) for ioctl-only open"

FromJiri Kosina <jikos@kernel.org>
Date2016-09-08 10:10 +0200
SubjectRe: [PATCH 4.7 114/143] Revert "floppy: fix open(O_ACCMODE) for ioctl-only open"
Message-ID<sf2zf-3eC-11@gated-at.bofh.it>
In reply to#1478812
On Thu, 8 Sep 2016, Greg Kroah-Hartman wrote:

> Hm, I didn't think I needed that here.  What is the git commit id of 
> that patch in Linus's tree?

It's f2791e7ea. Thanks,

-- 
Jiri Kosina
SUSE Labs

[toc] | [prev] | [next] | [standalone]


#1479905 — Re: [PATCH 4.7 114/143] Revert "floppy: fix open(O_ACCMODE) for ioctl-only open"

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-09-09 13:40 +0200
SubjectRe: [PATCH 4.7 114/143] Revert "floppy: fix open(O_ACCMODE) for ioctl-only open"
Message-ID<sfsk2-2dK-27@gated-at.bofh.it>
In reply to#1478888
On Thu, Sep 08, 2016 at 10:05:09AM +0200, Jiri Kosina wrote:
> On Thu, 8 Sep 2016, Greg Kroah-Hartman wrote:
> 
> > Hm, I didn't think I needed that here.  What is the git commit id of 
> > that patch in Linus's tree?
> 
> It's f2791e7ea. Thanks,

Thanks, now queued up.

greg k-h

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web