Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128220
b: refs/heads/master
c: 465634a
h: refs/heads/master
v: v3
  • Loading branch information
Robert Richter committed Jan 7, 2009
1 parent 9d458ce commit 5c6c8aa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1acda878e20ea0cd3708ba66dca67d52eaafdd2b
refs/heads/master: 465634adc1d09b490c8ee31885575be39d375d53
8 changes: 7 additions & 1 deletion trunk/kernel/trace/ring_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,13 @@ rb_event_length(struct ring_buffer_event *event)
*/
unsigned ring_buffer_event_length(struct ring_buffer_event *event)
{
return rb_event_length(event);
unsigned length = rb_event_length(event);
if (event->type != RINGBUF_TYPE_DATA)
return length;
length -= RB_EVNT_HDR_SIZE;
if (length > RB_MAX_SMALL_DATA + sizeof(event->array[0]))
length -= sizeof(event->array[0]);
return length;
}
EXPORT_SYMBOL_GPL(ring_buffer_event_length);

Expand Down

0 comments on commit 5c6c8aa

Please sign in to comment.