Closed zhangtianchao closed 4 years ago
__ATTR(sync_owner , 0664, udmabuf_show_sync_owner , NULL ),
__ATTR(sync_owner , 0444, udmabuf_show_sync_owner , NULL ),
Linux localhost.localdomain 3.10.0-1062.el7.x86_64 #1 SMP Wed Aug 7 18:08:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
[52380.158706] ------------[ cut here ]------------ [52380.158710] WARNING: CPU: 13 PID: 8088 at drivers/base/core.c:634 device_create_file+0x8d/0xa0 [52380.158711] Attribute sync_owner: write permission without 'store' [52380.158712] Modules linked in: u_dma_buf(OE+) vfio_pci vfio_iommu_type1 vfio tcp_lp fuse xt_CHECKSUM ipt_MASQUERADE nf_nat_masquerade_ipv4 tun bridge stp llc devlink ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 ipt_REJECT nf_reject_ipv4 xt_conntrack ebtable_nat ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat iptable_mangle iptable_security iptable_raw nf_conntrack ip_set nfnetlink ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter sunrpc dm_mirror dm_region_hash dm_log dm_mod snd_hda_codec_hdmi vfat fat edac_mce_amd snd_hda_codec_realtek snd_hda_codec_generic kvm snd_hda_intel snd_hda_codec irqbypass crc32_pclmul ghash_clmulni_intel snd_hda_core snd_hwdep snd_seq eeepc_wmi [52380.158742] aesni_intel asus_wmi sparse_keymap snd_seq_device lrw gf128mul glue_helper rfkill ablk_helper cryptd snd_pcm pcspkr i2c_piix4 snd_timer snd soundcore pinctrl_amd i2c_designware_platform i2c_designware_core pcc_cpufreq acpi_cpufreq ip_tables xfs libcrc32c nouveau video drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm ahci drm libahci crct10dif_pclmul igb crct10dif_common libata crc32c_intel nvme mxm_wmi serio_raw ptp sdhci_acpi pps_core nvme_core iosf_mbi dca sdhci i2c_algo_bit drm_panel_orientation_quirks mmc_core wmi [last unloaded: u_dma_buf] [52380.158768] CPU: 13 PID: 8088 Comm: insmod Kdump: loaded Tainted: G W OE ------------ 3.10.0-1062.el7.x86_64 #1 [52380.158770] Hardware name: System manufacturer System Product Name/PRIME X570-PRO, BIOS 0411 06/15/2019 [52380.158771] Call Trace: [52380.158775] [<ffffffff91379262>] dump_stack+0x19/0x1b [52380.158779] [<ffffffff90c9a878>] __warn+0xd8/0x100 [52380.158782] [<ffffffff90c9a8ff>] warn_slowpath_fmt+0x5f/0x80 [52380.158786] [<ffffffff910ae56d>] device_create_file+0x8d/0xa0 [52380.158788] [<ffffffff910b0c13>] device_add+0x5f3/0x7b0 [52380.158792] [<ffffffff910b0fe0>] device_create_groups_vargs+0xe0/0x110 [52380.158795] [<ffffffff910b1081>] device_create+0x51/0x70 [52380.158799] [<ffffffffc0c37891>] ? udmabuf_platform_driver_probe+0x211/0x850 [u_dma_buf] [52380.158802] [<ffffffffc0c37cf5>] udmabuf_platform_driver_probe+0x675/0x850 [u_dma_buf] [52380.158805] [<ffffffff910b65d7>] platform_drv_probe+0x47/0x120 [52380.158808] [<ffffffff910b4205>] driver_probe_device+0xc5/0x3e0 [52380.158810] [<ffffffff910b4520>] ? driver_probe_device+0x3e0/0x3e0 [52380.158812] [<ffffffff910b4563>] __device_attach+0x43/0x50 [52380.158816] [<ffffffff910b1e85>] bus_for_each_drv+0x75/0xc0 [52380.158819] [<ffffffff910b4040>] device_attach+0x90/0xb0 [52380.158821] [<ffffffff910b3268>] bus_probe_device+0x98/0xd0 [52380.158824] [<ffffffff910b0b0f>] device_add+0x4ef/0x7b0 [52380.158827] [<ffffffff910b6071>] platform_device_add+0xd1/0x2d0 [52380.158831] [<ffffffffc0c36efd>] udmabuf_platform_device_create+0xdd/0x1c0 [u_dma_buf] [52380.158835] [<ffffffffc0d10000>] ? 0xffffffffc0d0ffff [52380.158839] [<ffffffffc0d102b3>] u_dma_buf_init+0x2b3/0x1000 [u_dma_buf] [52380.158842] [<ffffffff90c0210a>] do_one_initcall+0xba/0x240 [52380.158845] [<ffffffff90d1c90a>] load_module+0x271a/0x2bb0 [52380.158849] [<ffffffff90fad740>] ? ddebug_proc_write+0x100/0x100 [52380.158852] [<ffffffff90d184a3>] ? copy_module_from_fd.isra.44+0x53/0x150 [52380.158855] [<ffffffff90d1cf86>] SyS_finit_module+0xa6/0xd0 [52380.158858] [<ffffffff9138bede>] system_call_fastpath+0x25/0x2a [52380.158860] ---[ end trace f634d7728939c9c3 ]--- [52380.158960] u-dma-buf udmabuf1: driver version = 2.1.2 [52380.158962] u-dma-buf udmabuf1: major number = 234 [52380.158965] u-dma-buf udmabuf1: minor number = 1 [52380.158967] u-dma-buf udmabuf1: phys address = 0x00000000c6400000 [52380.158969] u-dma-buf udmabuf1: buffer size = 1048576 [52380.158971] u-dma-buf udmabuf1: dma device = u-dma-buf.1 [52380.158973] u-dma-buf u-dma-buf.1: driver installed.
Thank you for the issue.
I have released udmabuf v1.4.6 and u-dma-buf v2.1.3, modified as you indicated.
I look forward to working with you.
ATTR sync_owner 0644 will make kernel warning message
Change ATTR sync_owner 0644 to 0444 to fix the issue
Kernel Version (CentOS)
Kernel Output