projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: out of memory error handling
[lttng-modules.git]
/
lib
/
ringbuffer
/
ring_buffer_frontend.c
diff --git
a/lib/ringbuffer/ring_buffer_frontend.c
b/lib/ringbuffer/ring_buffer_frontend.c
index 27e871e42a2ef13956412b3cecd6c69e9faed607..4a8919b354ea1599ce9299d6b8f184d10d9f8dd9 100644
(file)
--- a/
lib/ringbuffer/ring_buffer_frontend.c
+++ b/
lib/ringbuffer/ring_buffer_frontend.c
@@
-983,7
+983,7
@@
void *channel_destroy(struct channel *chan)
* Perform flush before writing to finalized.
*/
smp_wmb();
* Perform flush before writing to finalized.
*/
smp_wmb();
-
ACCESS_ONCE(buf->finalized) = 1
;
+
WRITE_ONCE(buf->finalized, 1)
;
wake_up_interruptible(&buf->read_wait);
}
} else {
wake_up_interruptible(&buf->read_wait);
}
} else {
@@
-997,10
+997,10
@@
void *channel_destroy(struct channel *chan)
* Perform flush before writing to finalized.
*/
smp_wmb();
* Perform flush before writing to finalized.
*/
smp_wmb();
-
ACCESS_ONCE(buf->finalized) = 1
;
+
WRITE_ONCE(buf->finalized, 1)
;
wake_up_interruptible(&buf->read_wait);
}
wake_up_interruptible(&buf->read_wait);
}
-
ACCESS_ONCE(chan->finalized) = 1
;
+
WRITE_ONCE(chan->finalized, 1)
;
wake_up_interruptible(&chan->hp_wait);
wake_up_interruptible(&chan->read_wait);
priv = chan->backend.priv;
wake_up_interruptible(&chan->hp_wait);
wake_up_interruptible(&chan->read_wait);
priv = chan->backend.priv;
@@
-1077,7
+1077,7
@@
int lib_ring_buffer_snapshot(struct lib_ring_buffer *buf,
int finalized;
retry:
int finalized;
retry:
- finalized =
ACCESS
_ONCE(buf->finalized);
+ finalized =
READ
_ONCE(buf->finalized);
/*
* Read finalized before counters.
*/
/*
* Read finalized before counters.
*/
@@
-1248,7
+1248,7
@@
int lib_ring_buffer_get_subbuf(struct lib_ring_buffer *buf,
return -EBUSY;
}
retry:
return -EBUSY;
}
retry:
- finalized =
ACCESS
_ONCE(buf->finalized);
+ finalized =
READ
_ONCE(buf->finalized);
/*
* Read finalized before counters.
*/
/*
* Read finalized before counters.
*/
This page took
0.023906 seconds
and
4
git commands to generate.