mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
9p: trans_fd, bail out if recv fcall if missing
req->rc is pre-allocated early on with p9_tag_alloc and shouldn't be missing Signed-off-by: Dominique Martinet <[email protected]> Signed-off-by: Eric Van Hensbergen <[email protected]>
This commit is contained in:
parent
947867aa19
commit
3053600ed4
1 changed files with 6 additions and 7 deletions
|
|
@ -356,13 +356,12 @@ static void p9_read_work(struct work_struct *work)
|
|||
}
|
||||
|
||||
if (m->req->rc == NULL) {
|
||||
m->req->rc = kmalloc(sizeof(struct p9_fcall) +
|
||||
m->client->msize, GFP_NOFS);
|
||||
if (!m->req->rc) {
|
||||
m->req = NULL;
|
||||
err = -ENOMEM;
|
||||
goto error;
|
||||
}
|
||||
p9_debug(P9_DEBUG_ERROR,
|
||||
"No recv fcall for tag %d (req %p), disconnecting!\n",
|
||||
m->rc.tag, m->req);
|
||||
m->req = NULL;
|
||||
err = -EIO;
|
||||
goto error;
|
||||
}
|
||||
m->rc.sdata = (char *)m->req->rc + sizeof(struct p9_fcall);
|
||||
memcpy(m->rc.sdata, m->tmp_buf, m->rc.capacity);
|
||||
|
|
|
|||
Loading…
Reference in a new issue