mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
This commit is contained in:
commit
941742f497
140 changed files with 1112 additions and 716 deletions
|
|
@ -26,6 +26,7 @@
|
|||
#include <linux/random.h>
|
||||
#include <linux/rhashtable.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/export.h>
|
||||
|
||||
#define HASH_DEFAULT_SIZE 64UL
|
||||
#define HASH_MIN_SIZE 4U
|
||||
|
|
|
|||
|
|
@ -57,7 +57,8 @@ static inline long do_strnlen_user(const char __user *src, unsigned long count,
|
|||
return res + find_zero(data) + 1 - align;
|
||||
}
|
||||
res += sizeof(unsigned long);
|
||||
if (unlikely(max < sizeof(unsigned long)))
|
||||
/* We already handled 'unsigned long' bytes. Did we do it all ? */
|
||||
if (unlikely(max <= sizeof(unsigned long)))
|
||||
break;
|
||||
max -= sizeof(unsigned long);
|
||||
if (unlikely(__get_user(c,(unsigned long __user *)(src+res))))
|
||||
|
|
@ -89,8 +90,15 @@ static inline long do_strnlen_user(const char __user *src, unsigned long count,
|
|||
* Get the size of a NUL-terminated string in user space.
|
||||
*
|
||||
* Returns the size of the string INCLUDING the terminating NUL.
|
||||
* If the string is too long, returns 'count+1'.
|
||||
* If the string is too long, returns a number larger than @count. User
|
||||
* has to check the return value against "> count".
|
||||
* On exception (or invalid count), returns 0.
|
||||
*
|
||||
* NOTE! You should basically never use this function. There is
|
||||
* almost never any valid case for using the length of a user space
|
||||
* string, since the string can be changed at any time by other
|
||||
* threads. Use "strncpy_from_user()" instead to get a stable copy
|
||||
* of the string.
|
||||
*/
|
||||
long strnlen_user(const char __user *str, long count)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -537,8 +537,9 @@ EXPORT_SYMBOL_GPL(swiotlb_tbl_map_single);
|
|||
* Allocates bounce buffer and returns its kernel virtual address.
|
||||
*/
|
||||
|
||||
phys_addr_t map_single(struct device *hwdev, phys_addr_t phys, size_t size,
|
||||
enum dma_data_direction dir)
|
||||
static phys_addr_t
|
||||
map_single(struct device *hwdev, phys_addr_t phys, size_t size,
|
||||
enum dma_data_direction dir)
|
||||
{
|
||||
dma_addr_t start_dma_addr = phys_to_dma(hwdev, io_tlb_start);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue