diff options
author | Sridhar Samudrala <sri@us.ibm.com> | 2004-07-22 09:18:24 -0700 |
---|---|---|
committer | Sridhar Samudrala <sri@us.ibm.com> | 2004-07-22 09:18:24 -0700 |
commit | a4c4a9bc16328a38c291c2b2a5a2f9015ba0b518 (patch) | |
tree | ece6475f4dc0d5f6b5bda9ae19c4a4db57825c2f /net | |
parent | 63e8857c33c57b17c559d0b6d2ba1fd7ae6e43a5 (diff) | |
download | history-a4c4a9bc16328a38c291c2b2a5a2f9015ba0b518.tar.gz |
[SCTP] Use idr_get_new_above() with a starting id of 1 to avoid returning
an associd of 0.
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sctp/sm_make_chunk.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index bd27e0ee87e8ec..c2ca732595fa02 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c @@ -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; |