[LU-6510] mdt_handle_idmap unsafe access to req->rq_export Created: 27/Apr/15 Updated: 07/Jun/17 Resolved: 30/May/17 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Oleg Drokin | Assignee: | WC Triage |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | easy, hackathon2017 | ||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
smatch highlighted this unsafe usage: int mdt_handle_idmap(struct tgt_session_info *tsi)
{
struct ptlrpc_request *req = tgt_ses_req(tsi);
struct mdt_device *mdt = mdt_exp2dev(req->rq_export);
struct mdt_export_data *med;
struct ptlrpc_user_desc *pud = req->rq_user_desc;
struct md_identity *identity;
__u32 opc;
int rc = 0;
ENTRY;
if (!req->rq_export)
RETURN(0);
Probably need to move the mdt variable assignment to after this check. |
| Comments |
| Comment by Gerrit Updater [ 15/Apr/16 ] |
|
Parinay Kondekar (parinay.kondekar@seagate.com) uploaded a new patch: http://review.whamcloud.com/19601 |
| Comment by Sebastien Buisson (Inactive) [ 30/May/17 ] |
|
File containing the faulty code has been removed by patch: So this ticket can be closed. |
| Comment by Peter Jones [ 30/May/17 ] |
|
ok - thanks Sebastien |