RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1522994 - depmod does not find kernel modules specified through override
Summary: depmod does not find kernel modules specified through override
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: kmod
Version: 7.4
Hardware: All
OS: Linux
urgent
high
Target Milestone: rc
: ---
Assignee: Yauheni Kaliuta
QA Contact: Ziqian SUN (Zamir)
URL:
Whiteboard:
: 1525370 (view as bug list)
Depends On:
Blocks: 1525364
TreeView+ depends on / blocked
 
Reported: 2017-12-06 23:10 UTC by Kyle Smith
Modified: 2023-03-24 13:55 UTC (History)
14 users (show)

Fixed In Version: kmod-20-21.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1525364 (view as bug list)
Environment:
Last Closed: 2018-04-10 13:50:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0799 0 None None None 2018-04-10 13:51:03 UTC

Description Kyle Smith 2017-12-06 23:10:32 UTC
Description of problem:
When attempting to depmod a kernel module using an "override" in a configuration file in /etc/depmod.d, the original module is selected as a higher priority, making it impossible to ever load an external module.

Version-Release number of selected component (if applicable):
kmod-20-15.el7_4.6
https://access.redhat.com/errata/RHBA-2017:3326

How reproducible:
Every time

Steps to Reproduce:
1. Create kernel module to use with override directive
2. echo "override <kmod-name> 3.10.0-* <kmod-name>" > /etc/depmod.d.<kmod-name>.conf
3. depmod
4. check /usr/lib/`uname -r`/modules.dep for <kmod-name>

Installing a kmod package should also cover steps 1-3

Actual results:
modules.dep contains original kernel module

Expected results:
modules.dep contains new module

Additional info:
Looking at depmod.c, and the function depmod_module_is_higher_priority in particular, there seems to have been a bug introduced when moving from el7_4.4 to el7_4.6.

newlen (and oldlen) were -= to cfg->dirnamelen + 1 in el7_4.4. However, in el7_4.6 they were expanded into new variables relnewlen and reloldlen which were made equal to {new,old}len - cfg->dirnamelen + 1. I believe these variables should be set equal to {new,old}len - (cfg->dirnamelen + 1) if we were to maintain the original arithmetic. Initial testing seems to prove that adding the parentheses should resolve the issue.

Comment 2 Yauheni Kaliuta 2017-12-08 09:54:35 UTC
Thank you a lot for the the report, the fix has been accepted by the upstream at the moment https://github.com/lucasdemarchi/kmod/commit/bb83f6ac68fe66c6e17afcab2cd6c2712e5c570e

Comment 7 Radosław Piliszek 2017-12-12 12:40:39 UTC
This is blocker for Mellanox OFED as its kmod packages use overrides.

Comment 9 Akemi Yagi 2018-01-02 18:16:37 UTC
Just a note to add that the issue affects ELRepo's kmod packages that require the override function.

Comment 10 Alaa Hleihel 2018-01-09 15:43:23 UTC
Hi,

This issue exist also in RHEL 7.5 Beta.
Please include the fix in the next RHEL 7.5 Beta/RC.

Thanks,
Alaa

Comment 13 Stanislav Kozina 2018-01-29 08:33:29 UTC
*** Bug 1525370 has been marked as a duplicate of this bug. ***

Comment 16 errata-xmlrpc 2018-04-10 13:50:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0799


Note You need to log in before you can comment on or make changes to this bug.