Skip to contentSkip to conversation

cmd: host: fix seg fault at "host info"

PATCH New AKASHI Takahiro 4 participants 6 messages Aug 22, 2019 – Oct 6, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched to be placed in platdata rather than priv. The command "host info" must be aligned with this change. Otherwise, we will see "Segmentation Fault."

Fixes 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
---
 cmd/host.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
cmd/host.c +1 -1
index f7d3eae5b1ad..98c4d2a099e9 100644
@@ -89,7 +89,7 @@ static int do_host_info(cmd_tbl_t *cmdtp, int flag, int argc,
 		struct host_block_dev *host_dev;
 
 #ifdef CONFIG_BLK
-		host_dev = dev_get_priv(blk_dev->bdev);
+		host_dev = dev_get_platdata(blk_dev->bdev);
 #else
 		host_dev = blk_dev->priv;
 #endif
Signature · 1 line
2.21.0
#1 lore raw

PATCH 1/1 cmd: host: fix seg fault at "host info"

Quoted 6 lines · AKASHI Takahiro

With the patch below applied, host_block_dev structure was switched to be placed in platdata rather than priv. The command "host info" must be aligned with this change. Otherwise, we will see "Segmentation Fault."

Quoted 6 lines
Fixes 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
---
 cmd/host.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
#2 lore raw

PATCH 1/1 cmd: host: fix seg fault at "host info"

In reply to AKASHI Takahiro
Quoted 7 lines · AKASHI Takahiro

With the patch below applied, host_block_dev structure was switched to be placed in platdata rather than priv. The command "host info" must be aligned with this change. Otherwise, we will see "Segmentation Fault."

Fixes 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Quoted 18 lines
---
  cmd/host.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
cmd/host.c +1 -1
index f7d3eae5b1ad..98c4d2a099e9 100644
@@ -89,7 +89,7 @@ static int do_host_info(cmd_tbl_t *cmdtp, int flag, int argc,
  		struct host_block_dev *host_dev;
 
  #ifdef CONFIG_BLK
-		host_dev = dev_get_priv(blk_dev->bdev);
+		host_dev = dev_get_platdata(blk_dev->bdev);
  #else
  		host_dev = blk_dev->priv;
  #endif
#3 lore raw

PATCH 1/1 cmd: host: fix seg fault at "host info"

In reply to AKASHI Takahiro

Ping,

This patch has not been merged yet.

-Takahiro Akashi

Quoted 27 lines · AKASHI Takahiro

With the patch below applied, host_block_dev structure was switched to be placed in platdata rather than priv. The command "host info" must be aligned with this change. Otherwise, we will see "Segmentation Fault."

Fixes 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
---
 cmd/host.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
cmd/host.c +1 -1
index f7d3eae5b1ad..98c4d2a099e9 100644
@@ -89,7 +89,7 @@ static int do_host_info(cmd_tbl_t *cmdtp, int flag, int argc,
 		struct host_block_dev *host_dev;
 
 #ifdef CONFIG_BLK
-		host_dev = dev_get_priv(blk_dev->bdev);
+		host_dev = dev_get_platdata(blk_dev->bdev);
 #else
 		host_dev = blk_dev->priv;
 #endif
Signature · 1 line
2.21.0
#4 lore raw

PATCH 1/1 cmd: host: fix seg fault at "host info"

+Tom

Quoted 5 lines · AKASHI Takahiro

Ping,

This patch has not been merged yet.

Simon is on vacation.

Tom, could you please take this patch directly? This needs to be in v2019.10.

Regards,
Bin

#5 lore raw

PATCH 1/1 cmd: host: fix seg fault at "host info"

In reply to AKASHI Takahiro
Quoted 10 lines · AKASHI Takahiro

With the patch below applied, host_block_dev structure was switched to be placed in platdata rather than priv. The command "host info" must be aligned with this change. Otherwise, we will see "Segmentation Fault."

Fixes 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191006/411e10fd/attachment.sig>