Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion drivers/block/drbd/drbd_receiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -2711,7 +2711,17 @@ static int receive_DataRequest(struct drbd_connection *connection, struct packet
break;

case P_OV_REPLY:
case P_CSUM_RS_REQUEST:
case P_CSUM_RS_REQUEST: {
struct crypto_shash *tfm = pi->cmd == P_CSUM_RS_REQUEST ?
peer_device->connection->csums_tfm :
peer_device->connection->verify_tfm;

if (!tfm || pi->size != crypto_shash_digestsize(tfm)) {
drbd_err(device, "%s: unexpected digest size %u\n",
cmdname(pi->cmd), pi->size);
goto out_free_e;
}

di = kmalloc(sizeof(*di) + pi->size, GFP_NOIO);
if (!di)
goto out_free_e;
Expand Down Expand Up @@ -2742,6 +2752,7 @@ static int receive_DataRequest(struct drbd_connection *connection, struct packet
goto submit_for_resync;
}
break;
}

case P_OV_REQUEST:
if (device->ov_start_sector == ~(sector_t)0 &&
Expand Down
Loading