cxl/mbox: fix logical vs bitwise typo
Subsystems (2)
PATCH 1/1 cxl/mbox: fix logical vs bitwise typo
This should be bitwise & instead of &&.
Fixes 6179045ccc0c ("cxl/mbox: Block immediate mode in SET_PARTITION_INFO command")
Signed-off-by Dan Carpenter <[email protected]>
--- drivers/cxl/core/mbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cxl/core/mbox.c +1 -1
@@ -243,7 +243,7 @@ static bool cxl_payload_from_user_allowed(u16 opcode, void *payload_in)case CXL_MBOX_OP_SET_PARTITION_INFO : {struct cxl_mbox_set_partition_info *pi = payload_in; -if (pi->flags &&CXL_SET_PARTITION_IMMEDIATE_FLAG ) +if (pi->flags &CXL_SET_PARTITION_IMMEDIATE_FLAG )return false;break ; }
Signature · 1 line
2.35.1
Quoted 5 lines · Dan Carpenter
This should be bitwise & instead of &&.
Fixes 6179045ccc0c ("cxl/mbox: Block immediate mode in SET_PARTITION_INFO command")Signed-off-by Dan Carpenter <[email protected]>
Thanks Dan, good find.
Alison Schofield
maintainerQuoted 1 line · Dan Carpenter
This should be bitwise & instead of &&.
Thanks Dan. How'd you find this?
Quoted 23 lines
Fixes 6179045ccc0c ("cxl/mbox: Block immediate mode in SET_PARTITION_INFO command")Signed-off-by Dan Carpenter <[email protected]>--- drivers/cxl/core/mbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/cxl/core/mbox.c +1
-1@@ -243,7 +243,7 @@ static bool cxl_payload_from_user_allowed(u16 opcode, void *payload_in)case CXL_MBOX_OP_SET_PARTITION_INFO : {struct cxl_mbox_set_partition_info *pi = payload_in; -if (pi->flags &&CXL_SET_PARTITION_IMMEDIATE_FLAG ) +if (pi->flags &CXL_SET_PARTITION_IMMEDIATE_FLAG )return false;break ; }Signature · 1 line
2.35.1
Quoted 5 lines · Alison Schofield
Quoted 1 line · Dan Carpenter
This should be bitwise & instead of &&.
Thanks Dan. How'd you find this?
Sorry for the delayed response. This was from some Smatch work that I hadn't published yet. I've pushed it now.
It doesn't find anything else though.
regards,
dan carpenter
Quoted 23 lines
Quoted 23 lines
Fixes 6179045ccc0c ("cxl/mbox: Block immediate mode in SET_PARTITION_INFO command")Signed-off-by Dan Carpenter <[email protected]>--- drivers/cxl/core/mbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/cxl/core/mbox.c +1
-1@@ -243,7 +243,7 @@ static bool cxl_payload_from_user_allowed(u16 opcode, void *payload_in)case CXL_MBOX_OP_SET_PARTITION_INFO : {struct cxl_mbox_set_partition_info *pi = payload_in; -if (pi->flags &&CXL_SET_PARTITION_IMMEDIATE_FLAG ) +if (pi->flags &CXL_SET_PARTITION_IMMEDIATE_FLAG )return false;break ; }Signature · 1 line
2.35.1