[lkml]   [2003]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[BUG] 2.4.21-pre3 hdparm -X violates IDE locking

This bug impacts all versions of the kernel that I have looked at
including 2.4.18 and above. It probably impacts many other versions as

hdparm -X issues a drive command ioctl which eventually issue a command
to the drive bypassing all of the normal locking. The net effect is
that a command can be set to the drive when the drive is not ready.
Some drives lock up when this happens.

The call chain is

ide_ioctl calls

If the command is a set features to change the communications speed,
after the command is complete, ide_cmd_ioctl calls


ide_set_xfer_rate then calls drive->speedproc.

Most speedprocs then call ide_config_drive_speed
ide_config_drive_speed issue a set features command. and busy waits on it.

The easiest fix is to probably modify execute_drive_command to update
drive->current_speed when it issues the appropriate SET FEATURES
command, and then have ide_config_drive_speed do nothing if speed ==

I did a much bigger modification that handles changing drive speed
specially and immediately. I'll make patches for either one, but I
wanted to get some opinions before I did so.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:32    [W:0.034 / U:1.848 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site