aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/dst/dcore.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/staging/dst/dcore.c b/drivers/staging/dst/dcore.c
index 3943c91e6c96..ee1601026fb0 100644
--- a/drivers/staging/dst/dcore.c
+++ b/drivers/staging/dst/dcore.c
@@ -855,6 +855,11 @@ static void cn_dst_callback(struct cn_msg *msg, struct netlink_skb_parms *nsp)
855 struct dst_node *n = NULL, *tmp; 855 struct dst_node *n = NULL, *tmp;
856 unsigned int hash; 856 unsigned int hash;
857 857
858 if (!cap_raised(nsp->eff_cap, CAP_SYS_ADMIN)) {
859 err = -EPERM;
860 goto out;
861 }
862
858 if (msg->len < sizeof(struct dst_ctl)) { 863 if (msg->len < sizeof(struct dst_ctl)) {
859 err = -EBADMSG; 864 err = -EBADMSG;
860 goto out; 865 goto out;