diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-29 17:17:12 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-29 17:17:12 -0400 |
| commit | 1840897ab5d39b2e510c610ee262ded79919e718 (patch) | |
| tree | 0b7fe95e3eda357d35b0d017f2b678b652307827 /net/core/pktgen.c | |
| parent | d56f84e7e317c69adefb2454a3d538a6d7e11e4b (diff) | |
| parent | a4765fa7bfb92d5b9de19a503674b6624f95a7ae (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (34 commits)
b43: Fix warning at drivers/mmc/core/core.c:237 in mmc_wait_for_cmd
mac80211: fix failure to check kmalloc return value in key_key_read
libertas: Fix sd8686 firmware reload
ath9k: Fix incorrect access of rate flags in RC
netfilter: xt_socket: Make tproto signed in socket_mt6_v1().
stmmac: enable/disable rx/tx in the core with a single write.
net: atarilance - flags should be unsigned long
netxen: fix kdump
pktgen: Limit how much data we copy onto the stack.
net: Limit socket I/O iovec total length to INT_MAX.
USB: gadget: fix ethernet gadget crash in gether_setup
fib: Fix fib zone and its hash leak on namespace stop
cxgb3: Fix panic in free_tx_desc()
cxgb3: fix crash due to manipulating queues before registration
8390: Don't oops on starting dev queue
dccp ccid-2: Stop polling
dccp: Refine the wait-for-ccid mechanism
dccp: Extend CCID packet dequeueing interface
dccp: Return-value convention of hc_tx_send_packet()
igbvf: fix panic on load
...
Diffstat (limited to 'net/core/pktgen.c')
| -rw-r--r-- | net/core/pktgen.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 679b797d06b1..fbce4b05a53e 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
| @@ -887,10 +887,11 @@ static ssize_t pktgen_if_write(struct file *file, | |||
| 887 | i += len; | 887 | i += len; |
| 888 | 888 | ||
| 889 | if (debug) { | 889 | if (debug) { |
| 890 | char tb[count + 1]; | 890 | size_t copy = min(count, 1023); |
| 891 | if (copy_from_user(tb, user_buffer, count)) | 891 | char tb[copy + 1]; |
| 892 | if (copy_from_user(tb, user_buffer, copy)) | ||
| 892 | return -EFAULT; | 893 | return -EFAULT; |
| 893 | tb[count] = 0; | 894 | tb[copy] = 0; |
| 894 | printk(KERN_DEBUG "pktgen: %s,%lu buffer -:%s:-\n", name, | 895 | printk(KERN_DEBUG "pktgen: %s,%lu buffer -:%s:-\n", name, |
| 895 | (unsigned long)count, tb); | 896 | (unsigned long)count, tb); |
| 896 | } | 897 | } |
