--- a/drivers/media/v4l2-core/Kconfig
+++ b/drivers/media/v4l2-core/Kconfig
-@@ -67,7 +67,7 @@ config VIDEOBUF_DVB
+@@ -68,7 +68,7 @@ config VIDEOBUF_DVB
# Used by drivers that need Videobuf2 modules
config VIDEOBUF2_CORE
tristate
config VIDEOBUF2_MEMOPS
-@@ -78,13 +78,13 @@ config VIDEOBUF2_DMA_CONTIG
+@@ -79,13 +79,13 @@ config VIDEOBUF2_DMA_CONTIG
depends on HAS_DMA
select VIDEOBUF2_CORE
select VIDEOBUF2_MEMOPS
/*
* Place the busy tests at the end: -EBUSY can be ignored when
-@@ -1452,6 +1460,7 @@ err:
+@@ -1451,6 +1459,7 @@ err:
return ret;
}
/**
* __qbuf_dmabuf() - handle qbuf of a DMABUF buffer
*/
-@@ -1569,6 +1578,7 @@ err:
+@@ -1568,6 +1577,7 @@ err:
return ret;
}
/**
* __enqueue_in_driver() - enqueue a vb2_buffer in driver for processing
-@@ -1629,9 +1639,11 @@ static int __buf_prepare(struct vb2_buff
- case V4L2_MEMORY_USERPTR:
+@@ -1630,9 +1640,11 @@ static int __buf_prepare(struct vb2_buff
ret = __qbuf_userptr(vb, b);
+ up_read(¤t->mm->mmap_sem);
break;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
case V4L2_MEMORY_DMABUF:
default:
WARN(1, "Invalid queue type\n");
ret = -EINVAL;
-@@ -2004,8 +2016,10 @@ EXPORT_SYMBOL_GPL(vb2_wait_for_all_buffe
+@@ -2018,8 +2030,10 @@ EXPORT_SYMBOL_GPL(vb2_wait_for_all_buffe
*/
static void __vb2_dqbuf(struct vb2_buffer *vb)
{
/* nothing to do if the buffer is already dequeued */
if (vb->state == VB2_BUF_STATE_DEQUEUED)
-@@ -2013,6 +2027,7 @@ static void __vb2_dqbuf(struct vb2_buffe
+@@ -2027,6 +2041,7 @@ static void __vb2_dqbuf(struct vb2_buffe
vb->state = VB2_BUF_STATE_DEQUEUED;
/* unmap DMABUF buffer */
if (q->memory == V4L2_MEMORY_DMABUF)
for (i = 0; i < vb->num_planes; ++i) {
-@@ -2021,6 +2036,7 @@ static void __vb2_dqbuf(struct vb2_buffe
+@@ -2035,6 +2050,7 @@ static void __vb2_dqbuf(struct vb2_buffe
call_void_memop(vb, unmap_dmabuf, vb->planes[i].mem_priv);
vb->planes[i].dbuf_mapped = 0;
}
}
static int vb2_internal_dqbuf(struct vb2_queue *q, struct v4l2_buffer *b, bool nonblocking)
-@@ -2320,6 +2336,7 @@ static int __find_plane_by_offset(struct
+@@ -2341,6 +2357,7 @@ static int __find_plane_by_offset(struct
return -EINVAL;
}
/**
* vb2_expbuf() - Export a buffer as a file descriptor
* @q: videobuf2 queue
-@@ -2397,6 +2414,7 @@ int vb2_expbuf(struct vb2_queue *q, stru
+@@ -2418,6 +2435,7 @@ int vb2_expbuf(struct vb2_queue *q, stru
return 0;
}
EXPORT_SYMBOL_GPL(vb2_expbuf);
/**
* vb2_mmap() - map video buffers into application address space
-@@ -3333,6 +3351,7 @@ int vb2_ioctl_streamoff(struct file *fil
+@@ -3361,6 +3379,7 @@ int vb2_ioctl_streamoff(struct file *fil
}
EXPORT_SYMBOL_GPL(vb2_ioctl_streamoff);
int vb2_ioctl_expbuf(struct file *file, void *priv, struct v4l2_exportbuffer *p)
{
struct video_device *vdev = video_devdata(file);
-@@ -3342,6 +3361,7 @@ int vb2_ioctl_expbuf(struct file *file,
+@@ -3370,6 +3389,7 @@ int vb2_ioctl_expbuf(struct file *file,
return vb2_expbuf(vdev->queue, p);
}
EXPORT_SYMBOL_GPL(vb2_ioctl_expbuf);
void *(*vaddr)(void *buf_priv);
void *(*cookie)(void *buf_priv);
-@@ -455,7 +459,9 @@ void vb2_queue_release(struct vb2_queue
+@@ -459,7 +463,9 @@ void vb2_queue_release(struct vb2_queue
void vb2_queue_error(struct vb2_queue *q);
int vb2_qbuf(struct vb2_queue *q, struct v4l2_buffer *b);
int vb2_dqbuf(struct vb2_queue *q, struct v4l2_buffer *b, bool nonblocking);
int vb2_streamon(struct vb2_queue *q, enum v4l2_buf_type type);
-@@ -611,8 +617,10 @@ int vb2_ioctl_qbuf(struct file *file, vo
+@@ -624,8 +630,10 @@ int vb2_ioctl_qbuf(struct file *file, vo
int vb2_ioctl_dqbuf(struct file *file, void *priv, struct v4l2_buffer *p);
int vb2_ioctl_streamon(struct file *file, void *priv, enum v4l2_buf_type i);
int vb2_ioctl_streamoff(struct file *file, void *priv, enum v4l2_buf_type i);
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
-@@ -1231,6 +1231,7 @@ EXPORT_SYMBOL_GPL(usbnet_tx_timeout);
+@@ -1233,6 +1233,7 @@ EXPORT_SYMBOL_GPL(usbnet_tx_timeout);
/*-------------------------------------------------------------------------*/
static int build_dma_sg(const struct sk_buff *skb, struct urb *urb)
{
unsigned num_sgs, total_len = 0;
-@@ -1263,6 +1264,12 @@ static int build_dma_sg(const struct sk_
+@@ -1265,6 +1266,12 @@ static int build_dma_sg(const struct sk_
return 1;
}
netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
struct net_device *net)
-@@ -1319,12 +1326,19 @@ netdev_tx_t usbnet_start_xmit (struct sk
+@@ -1321,12 +1328,19 @@ netdev_tx_t usbnet_start_xmit (struct sk
if (!(info->flags & FLAG_SEND_ZLP)) {
if (!(info->flags & FLAG_MULTI_PACKET)) {
length++;
}
} else
urb->transfer_flags |= URB_ZERO_PACKET;
-@@ -1379,7 +1393,9 @@ not_drop:
+@@ -1381,7 +1395,9 @@ not_drop:
if (skb)
dev_kfree_skb_any (skb);
if (urb) {
usb_free_urb(urb);
}
} else
-@@ -1432,7 +1448,9 @@ static void usbnet_bh (unsigned long par
+@@ -1434,7 +1450,9 @@ static void usbnet_bh (unsigned long par
rx_process (dev, skb);
continue;
case tx_done:
case rx_cleanup:
usb_free_urb (entry->urb);
dev_kfree_skb (skb);
-@@ -1787,7 +1805,9 @@ int usbnet_resume (struct usb_interface
+@@ -1789,7 +1807,9 @@ int usbnet_resume (struct usb_interface
retval = usb_submit_urb(res, GFP_ATOMIC);
if (retval < 0) {
dev_kfree_skb_any(skb);