mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
Merge "usb: f_fs: Avoid use-after-free of epfile"
This commit is contained in:
commit
83857705fd
1 changed files with 6 additions and 3 deletions
|
|
@ -2152,16 +2152,19 @@ static void ffs_epfiles_destroy(struct ffs_epfile *epfiles, unsigned count)
|
|||
|
||||
static void ffs_func_eps_disable(struct ffs_function *func)
|
||||
{
|
||||
struct ffs_ep *ep = func->eps;
|
||||
struct ffs_data *ffs = func->ffs;
|
||||
struct ffs_epfile *epfile = func->ffs->epfiles;
|
||||
unsigned count = func->ffs->eps_count;
|
||||
struct ffs_ep *ep;
|
||||
struct ffs_epfile *epfile;
|
||||
unsigned short count;
|
||||
unsigned long flags;
|
||||
|
||||
ffs_log("enter: state %d setup_state %d flag %lu", func->ffs->state,
|
||||
func->ffs->setup_state, func->ffs->flags);
|
||||
|
||||
spin_lock_irqsave(&func->ffs->eps_lock, flags);
|
||||
count = func->ffs->eps_count;
|
||||
epfile = func->ffs->epfiles;
|
||||
ep = func->eps;
|
||||
while (count--) {
|
||||
/* pending requests get nuked */
|
||||
if (likely(ep->ep))
|
||||
|
|
|
|||
Loading…
Reference in a new issue