mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-14 09:25:12 +00:00
target: Add missing parentheses
Code like " &= ~CMD_T_BUSY | ..." only clears CMD_T_BUSY but not the other flag. Modify these statements such that both flags are cleared. (Fix fuzz for target_write_prot_action code in mainline - nab) Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
parent
63509c60bb
commit
6c2faeaa0e
@ -1770,7 +1770,7 @@ static int target_write_prot_action(struct se_cmd *cmd)
|
||||
sectors, 0, NULL, 0);
|
||||
if (unlikely(cmd->pi_err)) {
|
||||
spin_lock_irq(&cmd->t_state_lock);
|
||||
cmd->transport_state &= ~CMD_T_BUSY|CMD_T_SENT;
|
||||
cmd->transport_state &= ~(CMD_T_BUSY|CMD_T_SENT);
|
||||
spin_unlock_irq(&cmd->t_state_lock);
|
||||
transport_generic_request_failure(cmd, cmd->pi_err);
|
||||
return -1;
|
||||
@ -1868,7 +1868,7 @@ void target_execute_cmd(struct se_cmd *cmd)
|
||||
|
||||
if (target_handle_task_attr(cmd)) {
|
||||
spin_lock_irq(&cmd->t_state_lock);
|
||||
cmd->transport_state &= ~CMD_T_BUSY|CMD_T_SENT;
|
||||
cmd->transport_state &= ~(CMD_T_BUSY | CMD_T_SENT);
|
||||
spin_unlock_irq(&cmd->t_state_lock);
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user