2011-03-10 10:40:31

by Torsten Hilbrich

[permalink] [raw]
Subject: Re: [PATCH] fs-writeback: fix NULL pointer dereference in, __mark_inode_dirty

I ran into the same problem and successfully applied your fix.

I was able to reproduce this panic and bisected it to the following commit:

commit aaead25b954879e1a708ff2f3602f494c18d20b5
Author: Christoph Hellwig <[email protected]>
Date: Mon Oct 4 14:25:33 2010 +0200

writeback: always use sb->s_bdi for writeback purposes

The steps to reproduce it on my test system (T60p with Intel Core Duo) were.

- /dev/sdb is an USB stick with partition sdb1 formatted as ext2
- mount /dev/sdb1 /mnt
- cat > /mnt/foo
- now press return some times
- remove stick
- press return, panic takes place

Hope this helps fixing the problem,

Torsten


2011-03-15 10:18:51

by Torsten Hilbrich

[permalink] [raw]
Subject: Re: [PATCH] fs-writeback: fix NULL pointer dereference in, __mark_inode_dirty

On 10.03.2011 11:39, Torsten Hilbrich wrote:
> I ran into the same problem and successfully applied your fix.
>
> I was able to reproduce this panic and bisected it to the following commit:
>
> commit aaead25b954879e1a708ff2f3602f494c18d20b5
> Author: Christoph Hellwig <[email protected]>
> Date: Mon Oct 4 14:25:33 2010 +0200
>
> writeback: always use sb->s_bdi for writeback purposes
>
> The steps to reproduce it on my test system (T60p with Intel Core Duo) were.

Added Christoph to CC. I also open a bug report at
https://bugzilla.kernel.org/show_bug.cgi?id=31112

Torsten

2011-03-15 12:11:54

by Anton Altaparmakov

[permalink] [raw]
Subject: Re: [PATCH] fs-writeback: fix NULL pointer dereference in, __mark_inode_dirty

Hi,

On 15 Mar 2011, at 10:17, Torsten Hilbrich wrote:
> On 10.03.2011 11:39, Torsten Hilbrich wrote:
>> I ran into the same problem and successfully applied your fix.
>>
>> I was able to reproduce this panic and bisected it to the following commit:
>>
>> commit aaead25b954879e1a708ff2f3602f494c18d20b5
>> Author: Christoph Hellwig <[email protected]>
>> Date: Mon Oct 4 14:25:33 2010 +0200
>>
>> writeback: always use sb->s_bdi for writeback purposes
>>
>> The steps to reproduce it on my test system (T60p with Intel Core Duo) were.
>
> Added Christoph to CC. I also open a bug report at https://bugzilla.kernel.org/show_bug.cgi?id=31112

This is already being handled. It is the same as other bug reports, i.e. the fact that sb->s_bdi is made NULL on device removal and if it happens at the wrong time you then get a NULL pointer dereference.

Jens Axboe just only yesterday posted an initial patch for this. Can you please test it and report back if it does indeed cure the problem?

The patch can be found here for example:

https://lkml.org/lkml/2011/3/14/25

Best regards,

Anton
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer, http://www.linux-ntfs.org/

2011-03-15 12:35:13

by Jens Axboe

[permalink] [raw]
Subject: Re: [PATCH] fs-writeback: fix NULL pointer dereference in, __mark_inode_dirty

On 2011-03-15 13:11, Anton Altaparmakov wrote:
> Hi,
>
> On 15 Mar 2011, at 10:17, Torsten Hilbrich wrote:
>> On 10.03.2011 11:39, Torsten Hilbrich wrote:
>>> I ran into the same problem and successfully applied your fix.
>>>
>>> I was able to reproduce this panic and bisected it to the following commit:
>>>
>>> commit aaead25b954879e1a708ff2f3602f494c18d20b5
>>> Author: Christoph Hellwig <[email protected]>
>>> Date: Mon Oct 4 14:25:33 2010 +0200
>>>
>>> writeback: always use sb->s_bdi for writeback purposes
>>>
>>> The steps to reproduce it on my test system (T60p with Intel Core Duo) were.
>>
>> Added Christoph to CC. I also open a bug report at https://bugzilla.kernel.org/show_bug.cgi?id=31112
>
> This is already being handled. It is the same as other bug reports,
> i.e. the fact that sb->s_bdi is made NULL on device removal and if it
> happens at the wrong time you then get a NULL pointer dereference.
>
> Jens Axboe just only yesterday posted an initial patch for this. Can
> you please test it and report back if it does indeed cure the problem?
>
> The patch can be found here for example:
>
> https://lkml.org/lkml/2011/3/14/25

Yes, any testing of that patch would be greatly appreciated.

--
Jens Axboe

2011-03-15 12:41:03

by Torsten Hilbrich

[permalink] [raw]
Subject: Re: [PATCH] fs-writeback: fix NULL pointer dereference in, __mark_inode_dirty

On 15.03.2011 13:11, Anton Altaparmakov wrote:

> This is already being handled. It is the same as other bug reports, i.e. the fact that sb->s_bdi is made NULL on device removal and if it happens at the wrong time you then get a NULL pointer dereference.
>
> Jens Axboe just only yesterday posted an initial patch for this. Can you please test it and report back if it does indeed cure the problem?
>
> The patch can be found here for example:
>
> https://lkml.org/lkml/2011/3/14/25
>

This patch fixes the problem for my test szenario.

Torsten