fix: net: udp: add IP/port data to the tracepoint udp/udp_fail_queue_rcv_skb (v6.10)
[lttng-modules.git] / src / lttng-statedump-impl.c
index 0b09027adf29a9f856c0410ad4154eff8a32311c..e06649e701a03dbd9673ddc132db6dd155e4725a 100644 (file)
 
 #include <lttng/events.h>
 #include <lttng/tracer.h>
 
 #include <lttng/events.h>
 #include <lttng/tracer.h>
+#include <lttng/events-internal.h>
 #include <wrapper/cpu.h>
 #include <wrapper/irqdesc.h>
 #include <wrapper/fdtable.h>
 #include <wrapper/tracepoint.h>
 #include <wrapper/blkdev.h>
 #include <wrapper/cpu.h>
 #include <wrapper/irqdesc.h>
 #include <wrapper/fdtable.h>
 #include <wrapper/tracepoint.h>
 #include <wrapper/blkdev.h>
-#include <wrapper/fdtable.h>
 #include <wrapper/sched.h>
 
 /* Define the tracepoints, but do not build the probes */
 #include <wrapper/sched.h>
 
 /* Define the tracepoints, but do not build the probes */
@@ -386,6 +386,20 @@ void lttng_enumerate_device(struct lttng_kernel_session *session,
        }
 }
 
        }
 }
 
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,9,0))
+static
+int lttng_enumerate_network_ip_interface(struct lttng_kernel_session *session)
+{
+       struct net_device *dev;
+
+       rtnl_lock();
+       for_each_netdev(&init_net, dev)
+               lttng_enumerate_device(session, dev);
+       rtnl_unlock();
+
+       return 0;
+}
+#else
 static
 int lttng_enumerate_network_ip_interface(struct lttng_kernel_session *session)
 {
 static
 int lttng_enumerate_network_ip_interface(struct lttng_kernel_session *session)
 {
@@ -398,6 +412,7 @@ int lttng_enumerate_network_ip_interface(struct lttng_kernel_session *session)
 
        return 0;
 }
 
        return 0;
 }
+#endif /* (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,9,0)) */
 #else /* CONFIG_INET */
 static inline
 int lttng_enumerate_network_ip_interface(struct lttng_kernel_session *session)
 #else /* CONFIG_INET */
 static inline
 int lttng_enumerate_network_ip_interface(struct lttng_kernel_session *session)
@@ -429,7 +444,7 @@ int lttng_dump_one_fd(const void *p, struct file *file, unsigned int fd)
         * the lock is taken, but we are not aware whether this is
         * guaranteed or not, so play safe.
         */
         * the lock is taken, but we are not aware whether this is
         * guaranteed or not, so play safe.
         */
-       if (fd < fdt->max_fds && close_on_exec(fd, fdt))
+       if (fd < fdt->max_fds && lttng_close_on_exec(fd, ctx->files))
                flags |= O_CLOEXEC;
        if (IS_ERR(s)) {
                struct dentry *dentry = file->f_path.dentry;
                flags |= O_CLOEXEC;
        if (IS_ERR(s)) {
                struct dentry *dentry = file->f_path.dentry;
This page took 0.023537 seconds and 4 git commands to generate.