[LU-6888] osp_update_request_create() should check return value Created: 21/Jul/15 Updated: 06/Dec/16 Resolved: 27/Jul/16 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.9.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Niu Yawei (Inactive) | Assignee: | Niu Yawei (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
struct osp_update_request *osp_update_request_create(struct dt_device *dt)
{
struct osp_update_request *our;
OBD_ALLOC_PTR(our);
if (our == NULL)
return ERR_PTR(-ENOMEM);
INIT_LIST_HEAD(&our->our_req_list);
INIT_LIST_HEAD(&our->our_cb_items);
INIT_LIST_HEAD(&our->our_list);
osp_object_update_request_create(our, OUT_UPDATE_INIT_BUFFER_SIZE);
return our;
}
osp_update_request_create() doesn't check the return value of osp_object_update_request_create(), so it could return a 'our' without 'ours_request' attached if memory allocation failed in osp_object_update_request_create(). But all the callers of osp_update_request_create() assumes the 'our' must have 'ours_request' attached. See osp_insert_async_request() or osp_update_rpc_pack(). |
| Comments |
| Comment by Di Wang [ 14/Aug/15 ] |
|
Niu: could you please help here? thanks |
| Comment by Gerrit Updater [ 23/Jun/16 ] |
|
Niu Yawei (yawei.niu@intel.com) uploaded a new patch: http://review.whamcloud.com/20941 |
| Comment by Gerrit Updater [ 27/Jul/16 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/20941/ |
| Comment by Niu Yawei (Inactive) [ 27/Jul/16 ] |
|
patch landed for 2.9 |