projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
arm64: dts: rockchip: update isp-flash gpio for rk3399-android-6.0
[firefly-linux-kernel-4.4.55.git]
/
lib
/
nlattr.c
diff --git
a/lib/nlattr.c
b/lib/nlattr.c
index 10ad042d01be3a43b24500525127c1bbba7a7724..f5907d23272d48562c69b911e5a0a619e3f4c180 100644
(file)
--- a/
lib/nlattr.c
+++ b/
lib/nlattr.c
@@
-9,7
+9,6
@@
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/jiffies.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/jiffies.h>
-#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <linux/string.h>
#include <linux/types.h>
#include <linux/skbuff.h>
#include <linux/string.h>
#include <linux/types.h>
@@
-136,6
+135,7
@@
int nla_validate(const struct nlattr *head, int len, int maxtype,
errout:
return err;
}
errout:
return err;
}
+EXPORT_SYMBOL(nla_validate);
/**
* nla_policy_len - Determin the max. length of a policy
/**
* nla_policy_len - Determin the max. length of a policy
@@
-162,6
+162,7
@@
nla_policy_len(const struct nla_policy *p, int n)
return len;
}
return len;
}
+EXPORT_SYMBOL(nla_policy_len);
/**
* nla_parse - Parse a stream of attributes into a tb buffer
/**
* nla_parse - Parse a stream of attributes into a tb buffer
@@
-208,6
+209,7
@@
int nla_parse(struct nlattr **tb, int maxtype, const struct nlattr *head,
errout:
return err;
}
errout:
return err;
}
+EXPORT_SYMBOL(nla_parse);
/**
* nla_find - Find a specific attribute in a stream of attributes
/**
* nla_find - Find a specific attribute in a stream of attributes
@@
-228,6
+230,7
@@
struct nlattr *nla_find(const struct nlattr *head, int len, int attrtype)
return NULL;
}
return NULL;
}
+EXPORT_SYMBOL(nla_find);
/**
* nla_strlcpy - Copy string attribute payload into a sized buffer
/**
* nla_strlcpy - Copy string attribute payload into a sized buffer
@@
-258,6
+261,7
@@
size_t nla_strlcpy(char *dst, const struct nlattr *nla, size_t dstsize)
return srclen;
}
return srclen;
}
+EXPORT_SYMBOL(nla_strlcpy);
/**
* nla_memcpy - Copy a netlink attribute into another memory area
/**
* nla_memcpy - Copy a netlink attribute into another memory area
@@
-275,9
+279,12
@@
int nla_memcpy(void *dest, const struct nlattr *src, int count)
int minlen = min_t(int, count, nla_len(src));
memcpy(dest, nla_data(src), minlen);
int minlen = min_t(int, count, nla_len(src));
memcpy(dest, nla_data(src), minlen);
+ if (count > minlen)
+ memset(dest + minlen, 0, count - minlen);
return minlen;
}
return minlen;
}
+EXPORT_SYMBOL(nla_memcpy);
/**
* nla_memcmp - Compare an attribute with sized memory area
/**
* nla_memcmp - Compare an attribute with sized memory area
@@
-295,6
+302,7
@@
int nla_memcmp(const struct nlattr *nla, const void *data,
return d;
}
return d;
}
+EXPORT_SYMBOL(nla_memcmp);
/**
* nla_strcmp - Compare a string attribute against a string
/**
* nla_strcmp - Compare a string attribute against a string
@@
-317,6
+325,7
@@
int nla_strcmp(const struct nlattr *nla, const char *str)
return d;
}
return d;
}
+EXPORT_SYMBOL(nla_strcmp);
#ifdef CONFIG_NET
/**
#ifdef CONFIG_NET
/**
@@
-502,12
+511,3
@@
int nla_append(struct sk_buff *skb, int attrlen, const void *data)
}
EXPORT_SYMBOL(nla_append);
#endif
}
EXPORT_SYMBOL(nla_append);
#endif
-
-EXPORT_SYMBOL(nla_validate);
-EXPORT_SYMBOL(nla_policy_len);
-EXPORT_SYMBOL(nla_parse);
-EXPORT_SYMBOL(nla_find);
-EXPORT_SYMBOL(nla_strlcpy);
-EXPORT_SYMBOL(nla_memcpy);
-EXPORT_SYMBOL(nla_memcmp);
-EXPORT_SYMBOL(nla_strcmp);