From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 400FC3857C73; Wed, 4 Aug 2021 02:47:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 400FC3857C73 From: "lijunlong at openresty dot com" To: systemtap@sourceware.org Subject: [Bug tapsets/28184] New: task_fd_lookup failed on linux 5.11 Date: Wed, 04 Aug 2021 02:47:11 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: tapsets X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: lijunlong at openresty dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: systemtap@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Systemtap mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Aug 2021 02:47:11 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28184 Bug ID: 28184 Summary: task_fd_lookup failed on linux 5.11 Product: systemtap Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: tapsets Assignee: systemtap at sourceware dot org Reporter: lijunlong at openresty dot com Target Milestone: --- Created attachment 13589 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D13589&action=3Ded= it fcheck_files linux 5.11, fcheck_files was removed and replace by the following functions. the patch in the attachment solve this problem. ``` c /* * The caller must ensure that fd table isn't shared or hold rcu or file lo= ck */ static inline struct file *files_lookup_fd_raw(struct files_struct *files, unsigned int fd) { struct fdtable *fdt =3D rcu_dereference_raw(files->fdt); if (fd < fdt->max_fds) { fd =3D array_index_nospec(fd, fdt->max_fds); return rcu_dereference_raw(fdt->fd[fd]); } return NULL; } static inline struct file *files_lookup_fd_locked(struct files_struct *file= s, unsigned int fd) { RCU_LOCKDEP_WARN(!lockdep_is_held(&files->file_lock), "suspicious rcu_dereference_check() usage"); return files_lookup_fd_raw(files, fd); } static inline struct file *files_lookup_fd_rcu(struct files_struct *files, unsigned int fd) { RCU_LOCKDEP_WARN(!rcu_read_lock_held(), "suspicious rcu_dereference_check() usage"); return files_lookup_fd_raw(files, fd); } ``` --=20 You are receiving this mail because: You are the assignee for the bug.=