[LU-5439] Function lustre_msg_buflen() can return -EINVAL but it's never checked Created: 31/Jul/14 Updated: 31/Jan/22 Resolved: 31/Jan/22 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Dmitry Eremin (Inactive) | Assignee: | WC Triage |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Severity: | 3 | ||||||||||||
| Rank (Obsolete): | 15140 | ||||||||||||
| Description |
/** * lustre_msg_buflen - return the length of buffer \a n in message \a m * \param m lustre_msg (request or reply) to look at * \param n message index (base 0) * * returns zero for non-existent message indices */ int lustre_msg_buflen(struct lustre_msg *m, int n) { switch (m->lm_magic) { case LUSTRE_MSG_MAGIC_V2: return lustre_msg_buflen_v2(m, n); default: CERROR("incorrect message magic: %08x\n", m->lm_magic); return -EINVAL; } } According comments it should return zero but actually it return -EINVAL. |