mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
[CIFS] Fix oops in cifs_readpages caused by not checking buf_type in an
error path of new cifs_readpages code. Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
parent
d65177c1ae
commit
47c886b312
1 changed files with 4 additions and 1 deletions
|
@ -1754,7 +1754,10 @@ static int cifs_readpages(struct file *file, struct address_space *mapping,
|
|||
|
||||
/* need to free smb_read_data buf before exit */
|
||||
if (smb_read_data) {
|
||||
cifs_buf_release(smb_read_data);
|
||||
if(buf_type == CIFS_SMALL_BUFFER)
|
||||
cifs_small_buf_release(smb_read_data);
|
||||
else if(buf_type == CIFS_LARGE_BUFFER)
|
||||
cifs_buf_release(smb_read_data);
|
||||
smb_read_data = NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue