Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0908fa1
)
* Apply Nikita's patch from portals tree to lnet
author
pjkirner
<pjkirner>
Fri, 16 Sep 2005 13:21:26 +0000
(13:21 +0000)
committer
pjkirner
<pjkirner>
Fri, 16 Sep 2005 13:21:26 +0000
(13:21 +0000)
lnet/libcfs/tracefile.c
patch
|
blob
|
history
diff --git
a/lnet/libcfs/tracefile.c
b/lnet/libcfs/tracefile.c
index
ff3bf22
..
12ce183
100644
(file)
--- a/
lnet/libcfs/tracefile.c
+++ b/
lnet/libcfs/tracefile.c
@@
-201,7
+201,13
@@
void libcfs_debug_msg(int subsys, int mask, char *file, const char *fn,
debug_buf = cfs_page_address(tage->page) + tage->used + known_size;
max_nob = CFS_PAGE_SIZE - tage->used - known_size;
- LASSERT(max_nob > 0);
+ if (max_nob <= 0) {
+ printk(KERN_EMERG "negative max_nob: %i\n", max_nob);
+ debug_buf = format;
+ needed = strlen(format);
+ mask |= D_ERROR;
+ goto out;
+ }
va_start(ap, format);
needed = vsnprintf(debug_buf, max_nob, format, ap);
va_end(ap);