Skip to content

Commit

Permalink
pstore/ram: Mark ramoops_pstore_write_buf() as notrace
Browse files Browse the repository at this point in the history
write_buf() should be marked as notrace, otherwise it is prone to
recursion.

Though, yet the issue is never triggered in real life, because we run
inside the function tracer, where ftrace does its own recurse protection.

But it's still no good, plus soon we might switch to our own tracer ops,
and then the issue will be fatal. So, let's fix it.

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
  • Loading branch information
Anton Vorontsov committed Aug 4, 2012
1 parent 0427193 commit 2420303
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions fs/pstore/ram.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <linux/ioport.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/compiler.h>
#include <linux/pstore_ram.h>

#define RAMOOPS_KERNMSG_HDR "===="
Expand Down Expand Up @@ -181,12 +182,11 @@ static size_t ramoops_write_kmsg_hdr(struct persistent_ram_zone *prz)
return len;
}


static int ramoops_pstore_write_buf(enum pstore_type_id type,
enum kmsg_dump_reason reason,
u64 *id, unsigned int part,
const char *buf, size_t size,
struct pstore_info *psi)
static int notrace ramoops_pstore_write_buf(enum pstore_type_id type,
enum kmsg_dump_reason reason,
u64 *id, unsigned int part,
const char *buf, size_t size,
struct pstore_info *psi)
{
struct ramoops_context *cxt = psi->data;
struct persistent_ram_zone *prz = cxt->przs[cxt->dump_write_cnt];
Expand Down

0 comments on commit 2420303

Please sign in to comment.