mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: net/ipv4/fib_frontend.c
This commit is contained in:
commit
17f7f4d9fc
1401 changed files with 22675 additions and 12035 deletions
|
|
@ -45,7 +45,6 @@
|
|||
#include <linux/capability.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/socket.h>
|
||||
#include <linux/sockios.h>
|
||||
#include <linux/slab.h>
|
||||
|
|
@ -2281,6 +2280,16 @@ static int irda_getsockopt(struct socket *sock, int level, int optname,
|
|||
|
||||
switch (optname) {
|
||||
case IRLMP_ENUMDEVICES:
|
||||
|
||||
/* Offset to first device entry */
|
||||
offset = sizeof(struct irda_device_list) -
|
||||
sizeof(struct irda_device_info);
|
||||
|
||||
if (len < offset) {
|
||||
err = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Ask lmp for the current discovery log */
|
||||
discoveries = irlmp_get_discoveries(&list.len, self->mask.word,
|
||||
self->nslots);
|
||||
|
|
@ -2291,15 +2300,9 @@ static int irda_getsockopt(struct socket *sock, int level, int optname,
|
|||
}
|
||||
|
||||
/* Write total list length back to client */
|
||||
if (copy_to_user(optval, &list,
|
||||
sizeof(struct irda_device_list) -
|
||||
sizeof(struct irda_device_info)))
|
||||
if (copy_to_user(optval, &list, offset))
|
||||
err = -EFAULT;
|
||||
|
||||
/* Offset to first device entry */
|
||||
offset = sizeof(struct irda_device_list) -
|
||||
sizeof(struct irda_device_info);
|
||||
|
||||
/* Copy the list itself - watch for overflow */
|
||||
if (list.len > 2048) {
|
||||
err = -EINVAL;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
|
||||
#include <linux/sched.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include "irnet_ppp.h" /* Private header */
|
||||
/* Please put other headers in irnet.h - Thanks */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue