login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
April
»
3
Re: [patch] dma-debug: off by one issue
view
thread
Previous message: [thread] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Joerg Roedel
Subject:
Re: [patch] dma-debug: off by one issue
Date: Saturday, April 3, 2010 - 1:47 pm
On Fri, Apr 02, 2010 at 02:28:43PM +0300, Dan Carpenter wrote:
quoted text
> We need to reserve the last character for the NULL terminator.
The character is already reserved by the user-to-kernel copy earlier in the function. Joerg
quoted text
> > Signed-off-by: Dan Carpenter <error27@gmail.com> > > diff --git a/lib/dma-debug.c b/lib/dma-debug.c > index ba8b670..01e6427 100644 > --- a/lib/dma-debug.c > +++ b/lib/dma-debug.c > @@ -570,7 +570,7 @@ static ssize_t filter_write(struct file *file, const char __user *userbuf, > * Now parse out the first token and use it as the name for the > * driver to filter for. > */ > - for (i = 0; i < NAME_MAX_LEN; ++i) { > + for (i = 0; i < NAME_MAX_LEN - 1; ++i) { > current_driver_name[i] = buf[i]; > if (isspace(buf[i]) || buf[i] == ' ' || buf[i] == 0) > break;
--
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [thread] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
Re: [patch] dma-debug: off by one issue
, Joerg Roedel
, (Sat Apr 3, 1:47 pm)
Re: [patch] dma-debug: off by one issue
, Dan Carpenter
, (Mon Apr 5, 5:53 am)
Re: [patch] dma-debug: off by one issue
, Joerg Roedel
, (Mon Apr 5, 7:02 am)
Re: [patch] dma-debug: off by one issue
, Joerg Roedel
, (Mon Apr 5, 7:09 am)
[No subject]
, Dan Carpenter
, (Tue Apr 6, 9:45 am)
Re: [patch v2] dma-debug: cleanup for loop
, Joerg Roedel
, (Wed Apr 7, 3:05 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 17/36] sysdev: detect multiple driver registrations
Greg Kroah-Hartman
[PATCH 22/36] PM: Make wakeup flags available whenever CONFIG_PM is set
Greg Kroah-Hartman
[PATCH 20/36] Driver core: Call device_pm_add() after bus_add_device() in device_a...
Pekka Enberg
Re: BUG in free_block (tainted)
Joerg Roedel
Re: [patch] dma-debug: off by one issue
git
:
Johannes Schindelin
Re: [PATCH 2/2] git-svn: support fetch with autocrlf on
Mark Burton
Re: [PATCH] builtin-branch: highlight current remote branches with an asterisk
Junio C Hamano
Re: git-svnimport
Junio C Hamano
Re: [PATCH 6/6] Teach core object handling functions about gitlinks
Christian Stimming
git-gui: Fix broken revert confirmation.
linux-netdev
:
Frans Pop
[PATCH] ipv4: make default for INET_LRO consistent with help text
Daniel Lezcano
getsockopt(TCP_DEFER_ACCEPT) value change
Patrick McHardy
Re: [PATCH RESEND 1/3] netfilter: xtables: inclusion of xt_condition
Gerrit Renker
[PATCH 37/37] dccp: Debugging functions for feature negotiation
David Miller
Re: 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" trying to ifenslave a seco...
openbsd-misc
:
Conor
Re: RFID Reader
Josh Grosse
ssh/sshd challenge-response seems to have stopped working in -current
Pieter Verberne
File collision while using pkg_add
Stuart Henderson
Re: SquidGuard problem
Henning Brauer
Re: 3ware hardware raid support?
git-commits-head
:
Linux Kernel Mailing List
ath9k_htc: Allocate URBs properly
Linux Kernel Mailing List
ath9k: Added get_survey callback in order to get channel noise
Linux Kernel Mailing List
ALSA: snd-usb-caiaq: Do not expose hardware input mode 0 of A4DJ
Linux Kernel Mailing List
cpumask: make irq_set_affinity() take a const struct cpumask
Linux Kernel Mailing List
V4L/DVB (9041): Add support YUAN High-Tech STK7700D (1164:1f08)
Colocation donated by:
Syndicate