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
net: convert BUG_TRAP to generic WARN_ON
[firefly-linux-kernel-4.4.55.git]
/
net
/
core
/
user_dma.c
diff --git
a/net/core/user_dma.c
b/net/core/user_dma.c
index c77aff9c6eb3cc76fab911cdca097cc5add01d8c..53c6b67b28770f80f01f1154c96899c529c12c6c 100644
(file)
--- a/
net/core/user_dma.c
+++ b/
net/core/user_dma.c
@@
-27,7
+27,6
@@
#include <linux/dmaengine.h>
#include <linux/socket.h>
#include <linux/dmaengine.h>
#include <linux/socket.h>
-#include <linux/rtnetlink.h> /* for BUG_TRAP */
#include <net/tcp.h>
#include <net/netdma.h>
#include <net/tcp.h>
#include <net/netdma.h>
@@
-71,7
+70,7
@@
int dma_skb_copy_datagram_iovec(struct dma_chan *chan,
for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
int end;
for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
int end;
-
BUG_TRAP(start <=
offset + len);
+
WARN_ON(start >
offset + len);
end = start + skb_shinfo(skb)->frags[i].size;
copy = end - offset;
end = start + skb_shinfo(skb)->frags[i].size;
copy = end - offset;
@@
-100,7
+99,7
@@
int dma_skb_copy_datagram_iovec(struct dma_chan *chan,
for (; list; list = list->next) {
int end;
for (; list; list = list->next) {
int end;
-
BUG_TRAP(start <=
offset + len);
+
WARN_ON(start >
offset + len);
end = start + list->len;
copy = end - offset;
end = start + list->len;
copy = end - offset;