Skip to content

Commit

Permalink
oprofile: make event buffer nonseekable
Browse files Browse the repository at this point in the history
The event buffer cannot deal with seeks, so
we should forbid that outright.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Robert Richter <robert.richter@amd.com>
Cc: oprofile-list@lists.sf.net
Signed-off-by: Robert Richter <robert.richter@amd.com>
  • Loading branch information
Arnd Bergmann authored and Robert Richter committed Jul 26, 2010
1 parent b12eab1 commit 729419f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/oprofile/event_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ static int event_buffer_open(struct inode *inode, struct file *file)
* echo 1 >/dev/oprofile/enable
*/

return 0;
return nonseekable_open(inode, file);

fail:
dcookie_unregister(file->private_data);
Expand Down Expand Up @@ -205,4 +205,5 @@ const struct file_operations event_buffer_fops = {
.open = event_buffer_open,
.release = event_buffer_release,
.read = event_buffer_read,
.llseek = no_llseek,
};

0 comments on commit 729419f

Please sign in to comment.