Skip to content
Commit 25cc8f07 authored by Robert Shearman's avatar Robert Shearman Committed by David S. Miller
Browse files

mpls: fix possible use after free of device



The mpls device is used in an RCU read context without a lock being
held. As the memory is freed without waiting for the RCU grace period
to elapse, the freed memory could still be in use.

Address this by using kfree_rcu to free the memory for the mpls device
after the RCU grace period has elapsed.

Fixes: 03c57747 ("mpls: Per-device MPLS state")
Signed-off-by: default avatarRobert Shearman <rshearma@brocade.com>
Acked-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e51000db
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment