Skip to content

Commit

Permalink
Synchronize codes for OnePlus 8T Oxygen OS 11.0.13.13.KB05AA and OneP…
Browse files Browse the repository at this point in the history
…lus8 Oxygen OS 11.0.11.11.IN21AA and OnePlus 8 Pro Oxygen OS 11.0.11.11.IN11AA 1.Update security patches.

Change-Id: Id398be08de4f351049eb30210a2585b3959a5d3d
Signed-off-by: engstk <eng.stk@sapo.pt>
  • Loading branch information
huangyu4 authored and engstk committed Mar 29, 2022
1 parent d08ddde commit 68c5177
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
38 changes: 19 additions & 19 deletions fs/eventpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -1451,6 +1451,22 @@ static int ep_insert(struct eventpoll *ep, const struct epoll_event *event,
RCU_INIT_POINTER(epi->ws, NULL);
}

/* Add the current item to the list of active epoll hook for this file */
spin_lock(&tfile->f_lock);
list_add_tail_rcu(&epi->fllink, &tfile->f_ep_links);
spin_unlock(&tfile->f_lock);

/*
* Add the current item to the RB tree. All RB tree operations are
* protected by "mtx", and ep_insert() is called with "mtx" held.
*/
ep_rbtree_insert(ep, epi);

/* now check if we've created too many backpaths */
error = -EINVAL;
if (full_check && reverse_path_check())
goto error_remove_epi;

/* Initialize the poll table using the queue callback */
epq.epi = epi;
init_poll_funcptr(&epq.pt, ep_ptable_queue_proc);
Expand All @@ -1473,22 +1489,6 @@ static int ep_insert(struct eventpoll *ep, const struct epoll_event *event,
if (epi->nwait < 0)
goto error_unregister;

/* Add the current item to the list of active epoll hook for this file */
spin_lock(&tfile->f_lock);
list_add_tail_rcu(&epi->fllink, &tfile->f_ep_links);
spin_unlock(&tfile->f_lock);

/*
* Add the current item to the RB tree. All RB tree operations are
* protected by "mtx", and ep_insert() is called with "mtx" held.
*/
ep_rbtree_insert(ep, epi);

/* now check if we've created too many backpaths */
error = -EINVAL;
if (full_check && reverse_path_check())
goto error_remove_epi;

/* We have to drop the new item inside our item list to keep track of it */
spin_lock_irq(&ep->wq.lock);

Expand Down Expand Up @@ -1517,16 +1517,16 @@ static int ep_insert(struct eventpoll *ep, const struct epoll_event *event,

return 0;

error_unregister:
ep_unregister_pollwait(ep, epi);

error_remove_epi:
spin_lock(&tfile->f_lock);
list_del_rcu(&epi->fllink);
spin_unlock(&tfile->f_lock);

rb_erase_cached(&epi->rbn, &ep->rbr);

error_unregister:
ep_unregister_pollwait(ep, epi);

/*
* We need to do this because an event could have been arrived on some
* allocated wait queue. Note that we don't care about the ep->ovflist
Expand Down
2 changes: 2 additions & 0 deletions net/ipv4/ip_gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,8 @@ static void __gre_xmit(struct sk_buff *skb, struct net_device *dev,

static int gre_handle_offloads(struct sk_buff *skb, bool csum)
{
if (csum && skb_checksum_start(skb) < skb->data)
return -EINVAL;
return iptunnel_handle_offloads(skb, csum ? SKB_GSO_GRE_CSUM : SKB_GSO_GRE);
}

Expand Down

0 comments on commit 68c5177

Please sign in to comment.