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] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090623.234929.32348223.davem@davemloft.net>
Date:	Tue, 23 Jun 2009 23:49:29 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	bzolnier@...il.com
Cc:	linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org,
	petkovbb@...il.com, htejun@...il.com
Subject: Re: [patch 2/6] ide: fix ide_kill_rq() for special
 ide-{floppy,tape} driver requests

From: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
Date: Tue, 23 Jun 2009 23:26:06 +0200

> @@ -152,7 +152,7 @@ void ide_kill_rq(ide_drive_t *drive, str
>  
>  	if ((media == ide_floppy || media == ide_tape) && drv_req) {
>  		rq->errors = 0;
> -		ide_complete_rq(drive, 0, blk_rq_bytes(rq));
> +		ide_complete_rq(drive, -EIO, blk_rq_bytes(rq));
>  	} else {
>  		if (media == ide_tape)
>  			rq->errors = IDE_DRV_ERROR_GENERAL;

I've done some research and this logic of returning "0" appears to be
intentional.

It keeps the block layer from printing the "I/O error" kernel log
message during completion of the request.

IDE tape as one example, seems to have it's own system of passing
errors back up to the special command completion, via rq->errors
and IDE_DRV_ERROR_GENERAL.

See idetape_queue_rw_tail() and ide_tape_callback() for example.

IDE floppy has similar pieces of logic, and possibly similar desires
wrt. emission of the block layer I/O error log message during
special requests.

When something sticks out like an eyesore (as this -EIO thing does)
and seems to make no sense at all, there often is some obscure
reason.
--
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