lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 19 Oct 2010 20:54:44 +0200
From:	Kay Sievers <kay.sievers@...y.org>
To:	Jonathan Corbet <corbet@....net>
Cc:	linux-kernel <linux-kernel@...r.kernel.org>,
	Greg KH <greg@...ah.com>
Subject: Re: [PATCH] support polling of /proc/swaps

On Tue, Oct 19, 2010 at 18:11, Jonathan Corbet <corbet@....net> wrote:
> Here we have this:
>
>> +static unsigned swaps_poll(struct file *file, poll_table *wait)
>> +{
>> +     struct proc_swaps *s = file->private_data;
>
> But here I see:
>
>>  static int swaps_open(struct inode *inode, struct file *file)
>>  {
>> -     return seq_open(file, &swaps_op);
>> +     struct proc_swaps *s;
>> +     int ret;
>> +
>> +     s = kmalloc(sizeof(struct proc_swaps), GFP_KERNEL);
>> +     if (!s)
>> +             return -ENOMEM;
>> +
>> +     file->private_data = &s->seq;
>
> It sure looks to me like private_data is a struct seq_file pointer, not a
> struct proc_swaps pointer.  What am I missing?

Right, that looks weird. It's the same pointer though, because it's
the first element. I'll correct that.

Thanks a lot for the sharp eyes,
Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ