lsi: Handle removal of selected devices
This patch:
64d564094cac5f72eeaeb950c442b773a00d3586 is the first bad commit commit 64d564094cac5f72eeaeb950c442b773a00d3586
Author: Jan Kiszka <[email protected]> Date: Tue May 4 14:21:03 2010 +0200
lsi: Handle removal of selected devices
We must not store references to selected devices as they may be hot-removed. Instead, look up the device based on its tag right before using it. If the device disappeared, throw an interrupt and disconnect.
breaks the versatile machine. qemu-system-arm segfaults during the boot.
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net
Quoted 9 lines · Aurelien Jarno
This patch:
64d564094cac5f72eeaeb950c442b773a00d3586is the first bad commit commit64d564094cac5f72eeaeb950c442b773a00d3586Author: Jan Kiszka <[email protected]> Date: Tue May 4 14:21:03 2010 +0200lsi: Handle removal of selected devices
Quoted 8 lines
We must not store references to selected devices as they may be hot-removed. Instead, look up the device based on its tag right before using it. If the device disappeared, throw an interrupt and disconnect.
Signed-off-by Jan Kiszka <[email protected]>Signed-off-by Anthony Liguori <[email protected]>breaks the versatile machie. qemu-system-arm segfaults during the boot.
Do you have an image for me? Or some gdb backtrace?
Thanks,
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux
Quoted 9 lines · Aurelien Jarno
This patch:
64d564094cac5f72eeaeb950c442b773a00d3586is the first bad commit commit64d564094cac5f72eeaeb950c442b773a00d3586Author: Jan Kiszka <[email protected]> Date: Tue May 4 14:21:03 2010 +0200lsi: Handle removal of selected devices
Quoted 8 lines
We must not store references to selected devices as they may be hot-removed. Instead, look up the device based on its tag right before using it. If the device disappeared, throw an interrupt and disconnect.
Signed-off-by Jan Kiszka <[email protected]>Signed-off-by Anthony Liguori <[email protected]>breaks the versatile machine. qemu-system-arm segfaults during the boot.
Actually it only seems to be the case with old kernels. I have put the material to reproduce the bug here:
http://temp.aurel32.net/qemu-versatile/
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net
Quoted 17 lines · Aurelien Jarno
Quoted 16 lines · Aurelien Jarno
This patch:
64d564094cac5f72eeaeb950c442b773a00d3586is the first bad commit commit64d564094cac5f72eeaeb950c442b773a00d3586Author: Jan Kiszka <[email protected]> Date: Tue May 4 14:21:03 2010 +0200lsi: Handle removal of selected devices
We must not store references to selected devices as they may be hot-removed. Instead, look up the device based on its tag right before using it. If the device disappeared, throw an interrupt and disconnect.
Signed-off-by Jan Kiszka <[email protected]>Signed-off-by Anthony Liguori <[email protected]>
Quoted 7 lines
Quoted 1 line
breaks the versatile machine. qemu-system-arm segfaults during the boot.
Actually it only seems to be the case with old kernels. I have put the material to reproduce the bug here:
Ah, perfect. Will have a look.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux
Quoted 18 lines · Jan Kiszka
Quoted 17 lines · Aurelien Jarno
Quoted 16 lines · Aurelien Jarno
This patch:
64d564094cac5f72eeaeb950c442b773a00d3586is the first bad commit commit64d564094cac5f72eeaeb950c442b773a00d3586Author: Jan Kiszka <[email protected]> Date: Tue May 4 14:21:03 2010 +0200lsi: Handle removal of selected devices
We must not store references to selected devices as they may be hot-removed. Instead, look up the device based on its tag right before using it. If the device disappeared, throw an interrupt and disconnect.
Signed-off-by Jan Kiszka <[email protected]>Signed-off-by Anthony Liguori <[email protected]>
Quoted 9 lines
Quoted 6 lines
Quoted 1 line
breaks the versatile machine. qemu-system-arm segfaults during the boot.
Actually it only seems to be the case with old kernels. I have put the material to reproduce the bug here:
Ah, perfect. Will have a look.
Boots fine up to "Waiting for root file system". That's on a 64-bit host. Are you on 32 bits?
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux
Quoted 23 lines · Jan Kiszka
Quoted 22 lines · Jan Kiszka
Quoted 21 lines · Aurelien Jarno
Quoted 9 lines · Aurelien Jarno
This patch:
64d564094cac5f72eeaeb950c442b773a00d3586is the first bad commit commit64d564094cac5f72eeaeb950c442b773a00d3586Author: Jan Kiszka <[email protected]> Date: Tue May 4 14:21:03 2010 +0200lsi: Handle removal of selected devices
Quoted 8 lines
We must not store references to selected devices as they may be hot-removed. Instead, look up the device based on its tag right before using it. If the device disappeared, throw an interrupt and disconnect.
Signed-off-by Jan Kiszka <[email protected]>Signed-off-by Anthony Liguori <[email protected]>breaks the versatile machine. qemu-system-arm segfaults during the boot.
Actually it only seems to be the case with old kernels. I have put the material to reproduce the bug here:
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Ah, perfect. Will have a look.
Boots fine up to "Waiting for root file system". That's on a 64-bit host. Are you on 32 bits?
Forget it - shouldn't blindly run the suggested command line. With the right qemu is crashes properly.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux
Quoted 18 lines · Jan Kiszka
Quoted 17 lines · Aurelien Jarno
Quoted 16 lines · Aurelien Jarno
This patch:
64d564094cac5f72eeaeb950c442b773a00d3586is the first bad commit commit64d564094cac5f72eeaeb950c442b773a00d3586Author: Jan Kiszka <[email protected]> Date: Tue May 4 14:21:03 2010 +0200lsi: Handle removal of selected devices
We must not store references to selected devices as they may be hot-removed. Instead, look up the device based on its tag right before using it. If the device disappeared, throw an interrupt and disconnect.
Signed-off-by Jan Kiszka <[email protected]>Signed-off-by Anthony Liguori <[email protected]>
Quoted 9 lines
Quoted 6 lines
Quoted 1 line
breaks the versatile machine. qemu-system-arm segfaults during the boot.
Actually it only seems to be the case with old kernels. I have put the material to reproduce the bug here:
Ah, perfect. Will have a look.
Thanks.
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net
PATCH 1/1 lsi: Fix value overflow in request tag processing
This fixes a mismerge of 64d564094cac5f72eeaeb950c442b773a00d3586 (wrong patch version): We need to mask the tag value properly to obtain its device ID.
--- hw/lsi53c895a.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
hw/lsi53c895a.c +2 -2
@@ -543,7 +543,7 @@ static void lsi_do_dma(LSIState *s, int out)return ; } - id = s->current->tag >>8 ; + id = (s->current->tag >>8 ) &0xf ; dev = s->bus.devs[id];if (!dev) {lsi_bad_selection (s, id);
@@ -745,7 +745,7 @@ static void lsi_do_command(LSIState *s) s->sfbr = buf[0 ]; s->command_complete =0 ; - id = s->select_tag >>8 ; + id = (s->select_tag >>8 ) &0xf ; dev = s->bus.devs[id];if (!dev) {lsi_bad_selection (s, id);
Signature · 1 line
1.6.0.2
Re: [Qemu-devel] [PATCH] lsi: Fix value overflow in request tag processing
Quoted 5 lines · Jan Kiszka
This fixes a mismerge of
64d564094cac5f72eeaeb950c442b773a00d3586(wrong patch version): We need to mask the tag value properly to obtain its device ID.Signed-off-by Jan Kiszka <[email protected]>
Thanks for the quick patch, I have applied it.
Quoted 30 lines
--- hw/lsi53c895a.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)hw/lsi53c895a.c +2
-2@@ -543,7 +543,7 @@ static void lsi_do_dma(LSIState *s, int out)return ; } - id = s->current->tag >>8 ; + id = (s->current->tag >>8 ) &0xf ; dev = s->bus.devs[id];if (!dev) {lsi_bad_selection (s, id);@@ -745,7 +745,7 @@ static void lsi_do_command(LSIState *s) s->sfbr = buf[0 ]; s->command_complete =0 ; - id = s->select_tag >>8 ; + id = (s->select_tag >>8 ) &0xf ; dev = s->bus.devs[id];if (!dev) {lsi_bad_selection (s, id);Signature · 1 line
1.6.0.2
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net