Re: [PATCH 2/2] proc: convert everything to "struct proc_ops"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I delete "	.fops = &qtudev_fops," , xt_qtaguid can work.
but dmesg, qtaguid: qtaguid_untag(): User space forgot to open
/dev/xt_qtaguid? pid=3860 tgid=3235 sk_pid=3235, uid=10159
i don't know it can delete or not.

2021-05-11 1:13 GMT+08:00, Alexey Dobriyan <adobriyan@xxxxxxxxx>:
> On Mon, May 10, 2021 at 09:42:38PM +0800, youling257 wrote:
>> Hi, my xt_qtaguid module need convert to "struct proc_ops",
>> https://github.com/youling257/android-4.9/commit/a6e3cddcceb96eb3edeb0da0951399b75d4f8731
>> https://github.com/youling257/android-4.9/commit/9eb92f5bcdcbc5b54d7dfe4b3050c8b9b8a17999
>>
>> static const struct proc_ops qtudev_proc_ops = {
>> 	.proc_open = qtudev_open,
>> 	.proc_release = qtudev_release,
>> };
>>
>> static struct miscdevice qtu_device = {
>> 	.minor = MISC_DYNAMIC_MINOR,
>> 	.name = QTU_DEV_NAME,
>> 	.fops = &qtudev_proc_ops,
>> 	/* How sad it doesn't allow for defaults: .mode = S_IRUGO | S_IWUSR */
>> };
>>
>> I have problem about ".fops = &qtudev_fops,", convert to ".fops =
>> &qtudev_proc_ops," is right?
>
> No! Those remain file_operations driving your device.
> How is it supposed to work otherwise?
>



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux