From 913759ac90a727b86da72efcfb70931f497d1cb7 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Tue, 3 Oct 2006 01:14:33 -0700 Subject: [PATCH] ide: Fix crash on repeated reset Michal Miroslaw reported a problem (bugzilla #7023) where a user initiated reset while the IDE layer was already resetting the channel caused a crash, and provided a rough fix. This is a slightly cleaner version of the fix which tracks the reset state and blocks further reset requests while a reset is in progress. Note this is not a security issue - random end users can't access the ioctl in question anyway. Signed-off-by: Alan Cox Cc: Michal Miroslaw Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/ide.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/linux/ide.h') diff --git a/include/linux/ide.h b/include/linux/ide.h index a9a9e33e448f..07d8d725541f 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -825,6 +825,9 @@ typedef struct hwgroup_s { unsigned int sleeping : 1; /* BOOL: polling active & poll_timeout field valid */ unsigned int polling : 1; + /* BOOL: in a polling reset situation. Must not trigger another reset yet */ + unsigned int resetting : 1; + /* current drive */ ide_drive_t *drive; /* ptr to current hwif in linked-list */ -- cgit v1.2.2