mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-01 11:26:42 +07:00
[SCSI] fcoe: precedence bug in fcoe_filter_frames()
Negate has higher precedence than bitwise AND. FCPHF_CRC_UNCHECKED is 0x1 so the original code is equivalent to: if (!fr_flags(fp)) { ... Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
parent
70be6344ea
commit
f2f96d2070
@ -1548,7 +1548,7 @@ static inline int fcoe_filter_frames(struct fc_lport *lport,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!fr_flags(fp) & FCPHF_CRC_UNCHECKED ||
|
||||
if (!(fr_flags(fp) & FCPHF_CRC_UNCHECKED) ||
|
||||
le32_to_cpu(fr_crc(fp)) == ~crc32(~0, skb->data, skb->len)) {
|
||||
fr_flags(fp) &= ~FCPHF_CRC_UNCHECKED;
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user