Commit a4c4a9bc authored by Sridhar Samudrala's avatar Sridhar Samudrala

[SCTP] Use idr_get_new_above() with a starting id of 1 to avoid returning

an associd of 0.
Signed-off-by: default avatarSridhar Samudrala <sri@us.ibm.com>
parent 63e8857c
......@@ -1846,9 +1846,8 @@ int sctp_process_init(struct sctp_association *asoc, sctp_cid_t cid,
if (unlikely(!idr_pre_get(&sctp_assocs_id, gfp)))
goto clean_up;
spin_lock_bh(&sctp_assocs_id_lock);
error = idr_get_new(&sctp_assocs_id,
(void *)asoc,
&assoc_id);
error = idr_get_new_above(&sctp_assocs_id, (void *)asoc, 1,
&assoc_id);
spin_unlock_bh(&sctp_assocs_id_lock);
if (error == -EAGAIN)
goto retry;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment