mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
To: David Rientjes <rientjes@google.com>
Cc: Konrad Rzeszutek Wilk <konrad@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Dave Jones <davej@redhat.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>,
	Suzuki Poulose <suzuki@in.ibm.com>
Subject: Re: 3.6rc6 slab corruption.
Date: Thu, 20 Sep 2012 08:25:01 +0530	[thread overview]
Message-ID: <505A8585.6030901@linux.vnet.ibm.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1209191938490.10953@chino.kir.corp.google.com>

On 09/20/2012 08:16 AM, David Rientjes wrote:
> On Thu, 20 Sep 2012, Raghavendra K T wrote:
>
>> Only problem, I find is histogram data expands dynamically (because it
>> changes). I think having static allocation of 352 bytes as suggested
>> Linus is a good idea.
>>
>
> Certainly, but it's a different topic and would be a subsequent patch to
> either my patch or Konrad's patch.  Before that's done, I think we should
> fix the race condition that currently exists either by:
>
>   - merging my patch (which I can sign-off and write a changelog for if
>     Konrad agrees), or
>
>   - merging Konrad's patch and introducing a mutex so that it's possible to
>     do many reads to collect statistics after opening the file a single
>     time with a single fd.
>
> Since these files are incapable of doing lseek, it would seem that my
> patch would be best and you'd simply want to close() + open() to read new
> data, which also guarantees that all readers get the same information.
> The only reason I hesitate on that and will defer to Konrad's opinion is
> because the way the code is currently written looks like it was intended
> to copy the data are read() rather than open(); in other words, it almost
> seems as if they were made to be non-seekable after the u32_array_read()
> implementation was complete and it was at one time possible to do an
> lseek(SEEK_SET).

Yes. common use case is just open once,read and close.
i.e. cat /sys/kernel/debug/../histoblocked

I also don't see why we have to keep fd open to read it.
But yes let Konrad comment on that.


> After that's fixed, and to address your concern, we can simply do the
> allocation of file->private_data for the maximum size possible when the
> file is created as a follow-up patch.

I agree, missed that once we do a open and then read it we are done.


  reply	other threads:[~2012-09-20  2:58 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-18 14:35 Dave Jones
2012-09-18 18:38 ` Linus Torvalds
2012-09-18 18:53   ` Dave Jones
2012-09-19 14:00     ` Raghavendra K T
2012-09-19 17:09       ` Linus Torvalds
2012-09-19 21:27         ` David Rientjes
2012-09-19 21:41           ` Dave Jones
2012-09-18 19:23   ` Konrad Rzeszutek Wilk
2012-09-18 20:24     ` David Rientjes
2012-09-18 20:31       ` Konrad Rzeszutek Wilk
2012-09-18 20:36       ` Linus Torvalds
2012-09-19  0:57       ` Raghavendra K T
2012-09-18 20:35     ` Linus Torvalds
2012-09-18 20:37       ` Konrad Rzeszutek Wilk
2012-09-18 20:49         ` Linus Torvalds
2012-09-19  1:16           ` Raghavendra K T
2012-09-19 19:16           ` Konrad Rzeszutek Wilk
2012-09-19 21:29             ` David Rientjes
2012-09-19 21:49               ` David Rientjes
2012-09-19 23:01                 ` Linus Torvalds
2012-09-19 23:20                   ` David Rientjes
2012-09-20 21:14                     ` Konrad Rzeszutek Wilk
2012-09-20  2:29                 ` Raghavendra K T
2012-09-20  2:46                   ` David Rientjes
2012-09-20  2:55                     ` Raghavendra K T [this message]
2012-09-20 21:18                     ` Konrad Rzeszutek Wilk
2012-09-21  9:16                       ` [patch for-3.6] fs, debugfs: fix race in u32_array_read and allocate array at open David Rientjes
2012-09-21 10:22                         ` Raghavendra K T
2012-09-24 22:26                           ` David Rientjes
2012-09-25  2:54                             ` Raghavendra K T
2012-09-20 12:57                 ` 3.6rc6 slab corruption Raghavendra K T
2012-09-20 21:18                   ` Konrad Rzeszutek Wilk
2012-09-20 12:55             ` Raghavendra K T

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=505A8585.6030901@linux.vnet.ibm.com \
    --to=raghavendra.kt@linux.vnet.ibm.com \
    --cc=davej@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=konrad.wilk@oracle.com \
    --cc=konrad@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rientjes@google.com \
    --cc=suzuki@in.ibm.com \
    --cc=torvalds@linux-foundation.org \
    --cc=vatsa@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome