fix: file: Rename fcheck lookup_fd_rcu (v5.11)
[lttng-modules.git] / probes / lttng-uprobes.c
index bcdbbd84840259b1a701b39934d6cb3415c1258c..acb2627af029b83337556c9150f6f1133a2f4d00 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* SPDX-License-Identifier: (GPL-2.0 OR LGPL-2.1)
+ *
  * probes/lttng-uprobes.c
  *
  * LTTng uprobes integration module.
@@ -6,22 +7,9 @@
  * Copyright (C) 2013 Yannick Brosseau <yannick.brosseau@gmail.com>
  * Copyright (C) 2009-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; only
- * version 2.1 of the License.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include <linux/fdtable.h>
+#include <wrapper/fdtable.h>
 #include <linux/list.h>
 #include <linux/module.h>
 #include <linux/namei.h>
@@ -52,11 +40,11 @@ int lttng_uprobes_handler_pre(struct uprobe_consumer *uc, struct pt_regs *regs)
                unsigned long ip;
        } payload;
 
-       if (unlikely(!READ_ONCE(chan->session->active)))
+       if (unlikely(!LTTNG_READ_ONCE(chan->session->active)))
                return 0;
-       if (unlikely(!READ_ONCE(chan->enabled)))
+       if (unlikely(!LTTNG_READ_ONCE(chan->enabled)))
                return 0;
-       if (unlikely(!READ_ONCE(event->enabled)))
+       if (unlikely(!LTTNG_READ_ONCE(event->enabled)))
                return 0;
 
        lib_ring_buffer_ctx_init(&ctx, chan->chan, &lttng_probe_ctx,
@@ -138,7 +126,7 @@ static struct inode *get_inode_from_fd(int fd)
         * Returns the file backing the given fd. Needs to be done inside an RCU
         * critical section.
         */
-       file = fcheck(fd);
+       file = lttng_lookup_fd_rcu(fd);
        if (file == NULL) {
                printk(KERN_WARNING "Cannot access file backing the fd(%d)\n", fd);
                inode = NULL;
@@ -173,7 +161,7 @@ int lttng_uprobes_add_callsite(struct lttng_event *event,
        }
 
        /* Ensure the memory we just allocated don't trigger page faults. */
-       wrapper_vmalloc_sync_all();
+       wrapper_vmalloc_sync_mappings();
 
        uprobe_handler->event = event;
        uprobe_handler->up_consumer.handler = lttng_uprobes_handler_pre;
This page took 0.027952 seconds and 4 git commands to generate.