lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20071027175641.GA19917@Chamillionaire.breakpoint.cc>
Date:	Sat, 27 Oct 2007 19:56:41 +0200
From:	Sebastian Siewior <lkml@...breakpoint.cc>
To:	Jens Axboe <jens.axboe@...cle.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [BUG] panic after umount (biscted)

* Jens Axboe | 2007-10-27 13:39:16 [+0200]:

>> [1] http://download.breakpoint.cc/bug/bug_patch2.jpeg 134 KiB
>
>OK, can you see what this produces?
>
>diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
>index 61fdaf0..4042269 100644
>--- a/drivers/scsi/scsi_lib.c
>+++ b/drivers/scsi/scsi_lib.c
>@@ -1115,6 +1115,8 @@ static int scsi_init_io(struct scsi_cmnd *cmd)
> 	 * kmapping pages)
> 	 */
> 	cmd->use_sg = req->nr_phys_segments;
>+	if (!cmd->use_sg)
>+		return 0;
> 
> 	/*
> 	 * If sg table allocation fails, requeue request later.
>@@ -1191,7 +1193,7 @@ int scsi_setup_blk_pc_cmnd(struct scsi_device *sdev, struct request *req)
> 	if (req->bio) {
> 		int ret;
> 
>-		BUG_ON(!req->nr_phys_segments);
>+		BUG_ON(!req->nr_phys_segments && req->bio->bi_size);
> 
> 		ret = scsi_init_io(cmd);
> 		if (unlikely(ret))
>@@ -1236,9 +1238,11 @@ int scsi_setup_fs_cmnd(struct scsi_device *sdev, struct request *req)
> 	if (ret != BLKPREP_OK)
> 		return ret;
> 	/*
>-	 * Filesystem requests must transfer data.
>+	 * Filesystem requests must transfer data, unless it's an empty
>+	 * barrier.
> 	 */
>-	BUG_ON(!req->nr_phys_segments);
>+	if (!req->nr_phys_segments && !bio_empty_barrier(req->bio))
>+		blk_dump_rq_flags(req, "scsi");
> 
> 	cmd = scsi_get_cmd_from_req(sdev, req);
> 	if (unlikely(!cmd))

Good, [1] has the dmesg output after umount. 

[1] http://download.breakpoint.cc/bug/bug_patch3.jpeg 36 KiB
>-- 
>Jens Axboe

Sebastian
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ