All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] floppy fix
@ 2016-02-01 10:22 Jiri Kosina
  2016-02-01 15:58 ` Jiri Kosina
  2016-02-01 16:09 ` Jens Axboe
  0 siblings, 2 replies; 5+ messages in thread
From: Jiri Kosina @ 2016-02-01 10:22 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel

Jens,

please pull from

  git://git.kernel.org/pub/scm/linux/kernel/git/jikos/linux-block.git for-4.5/for-jens

to receive locking fix for floppy driver (reported by syzkaller tool).
The branch is based on your 'for-linus' branch in linux-block.git.

Thanks!

----------------------------------------------------------------
Jiri Kosina (1):
      floppy: fix lock_fdc() signal handling

 drivers/block/floppy.c | 33 ++++++++++++++++++---------------
 1 file changed, 18 insertions(+), 15 deletions(-)

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [GIT PULL] floppy fix
  2016-02-01 10:22 [GIT PULL] floppy fix Jiri Kosina
@ 2016-02-01 15:58 ` Jiri Kosina
  2016-02-01 16:09 ` Jens Axboe
  1 sibling, 0 replies; 5+ messages in thread
From: Jiri Kosina @ 2016-02-01 15:58 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel

On Mon, 1 Feb 2016, Jiri Kosina wrote:

> Jens,
> 
> please pull from
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/jikos/linux-block.git for-4.5/for-jens
> 
> to receive locking fix for floppy driver (reported by syzkaller tool).
> The branch is based on your 'for-linus' branch in linux-block.git.

Actually the merge base is much older, but that doesn't matter for the 
sake of merge. Sorry for the confusion.

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [GIT PULL] floppy fix
  2016-02-01 10:22 [GIT PULL] floppy fix Jiri Kosina
  2016-02-01 15:58 ` Jiri Kosina
@ 2016-02-01 16:09 ` Jens Axboe
  1 sibling, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2016-02-01 16:09 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: linux-kernel

On 02/01/2016 03:22 AM, Jiri Kosina wrote:
> Jens,
>
> please pull from
>
>    git://git.kernel.org/pub/scm/linux/kernel/git/jikos/linux-block.git for-4.5/for-jens
>
> to receive locking fix for floppy driver (reported by syzkaller tool).
> The branch is based on your 'for-linus' branch in linux-block.git.

Thanks Jiri, pulled.

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [GIT PULL] floppy fix
  2014-05-28 13:02 Jiri Kosina
@ 2014-05-28 14:11 ` Jens Axboe
  0 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2014-05-28 14:11 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: linux-kernel, Stephen Hemminger

On 2014-05-28 07:02, Jiri Kosina wrote:
> Jens,
>
> please pull from
>
>    git://git.kernel.org/pub/scm/linux/kernel/git/jikos/linux-block.git for-jens
>
> to receive fix for bi_flags corruption in floppy driver.
>
> The branch is based on your for-3.16/drivers branch.

Thanks Jiri, pulled.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [GIT PULL] floppy fix
@ 2014-05-28 13:02 Jiri Kosina
  2014-05-28 14:11 ` Jens Axboe
  0 siblings, 1 reply; 5+ messages in thread
From: Jiri Kosina @ 2014-05-28 13:02 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel, Stephen Hemminger

Jens,

please pull from

  git://git.kernel.org/pub/scm/linux/kernel/git/jikos/linux-block.git for-jens

to receive fix for bi_flags corruption in floppy driver.

The branch is based on your for-3.16/drivers branch.

----------------------------------------------------------------
Jiri Kosina (1):
      floppy: do not corrupt bio.bi_flags when reading block 0

 drivers/block/floppy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)





From: Jiri Kosina <jkosina@suse.cz>
Subject: [PATCH] floppy: do not corrupt bio.bi_flags when reading block 0

Commit 41a55b4de39 ("floppy: silence warning during disk test") caused
bio.bi_flags being overwritten, and its initialization to BIO_UPTODATE
in bio_init() to be lost.

This was unnoticed until 7b7b68bba5 ("floppy: bail out in open() if
drive is not responding to block0 read"), because the error value wasn't
checked for in the bio completion callback.

Now we are actually looking at the error, and the loss of BIO_UPTODATE
causes EIO to be wrongly passed to the callback, which confuses the
FD_OPEN_SHOULD_FAIL_BIT logic.

Fix this by not destroying previous value of bi_flags when setting
BIO_QUIET.

Cc: stable@vger.kernel.org
Cc: Stephen Hemminger <shemminger@vyatta.com>
Reported-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
---
 drivers/block/floppy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 5f69c91..8e767bb 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -3809,7 +3809,7 @@ static int __floppy_read_block_0(struct block_device *bdev, int drive)
 	bio.bi_iter.bi_size = size;
 	bio.bi_bdev = bdev;
 	bio.bi_iter.bi_sector = 0;
-	bio.bi_flags = (1 << BIO_QUIET);
+	bio.bi_flags |= (1 << BIO_QUIET);
 	bio.bi_private = &cbdata;
 	bio.bi_end_io = floppy_rb0_cb;
 
-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-02-01 16:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-01 10:22 [GIT PULL] floppy fix Jiri Kosina
2016-02-01 15:58 ` Jiri Kosina
2016-02-01 16:09 ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2014-05-28 13:02 Jiri Kosina
2014-05-28 14:11 ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.