* [PULL] bcache: fix cache_set_flush() NULL pointer dereference on OOM
@ 2016-03-07 23:36 Eric Wheeler
2016-03-08 16:20 ` Jens Axboe
0 siblings, 1 reply; 4+ messages in thread
From: Eric Wheeler @ 2016-03-07 23:36 UTC (permalink / raw)
To: axboe; +Cc: linux-bcache, kent.overstreet
Hi Jens,
Here is another OOM fix for bcache. Please pull:
git pull https://bitbucket.org/ewheelerinc/linux.git v4.5-rc7-bcache-fixes
# git diff --stat v4.5-rc7
drivers/md/bcache/super.c | 3 +++
1 file changed, 3 insertions(+)
-Eric
commit 87264e96886f785922d741750a8a1794e71af1e7
Author: Eric Wheeler <git@linux.ewheeler.net>
Date: Mon Mar 7 15:17:50 2016 -0800
bcache: fix cache_set_flush() NULL pointer dereference on OOM
When bch_cache_set_alloc() fails to kzalloc the cache_set, the
asyncronous closure handling tries to dereference a cache_set that
hadn't yet been allocated inside of cache_set_flush() which is called
by __cache_set_unregister() during cleanup. This appears to happen only
during an OOM condition on bcache_register.
Signed-off-by: Eric Wheeler <bcache@linux.ewheeler.net>
Cc: stable@vger.kernel.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PULL] bcache: fix cache_set_flush() NULL pointer dereference on OOM
2016-03-07 23:36 [PULL] bcache: fix cache_set_flush() NULL pointer dereference on OOM Eric Wheeler
@ 2016-03-08 16:20 ` Jens Axboe
2016-03-09 3:36 ` Eric Wheeler
0 siblings, 1 reply; 4+ messages in thread
From: Jens Axboe @ 2016-03-08 16:20 UTC (permalink / raw)
To: Eric Wheeler; +Cc: linux-bcache, kent.overstreet
On 03/07/2016 04:36 PM, Eric Wheeler wrote:
> Hi Jens,
>
> Here is another OOM fix for bcache. Please pull:
>
> git pull https://bitbucket.org/ewheelerinc/linux.git v4.5-rc7-bcache-fixes
>
> # git diff --stat v4.5-rc7
> drivers/md/bcache/super.c | 3 +++
> 1 file changed, 3 insertions(+)
I pulled this and the previous, but for 4.6. They are all marked stable,
so that should be fine.
Note that your 2nd patch in the -rc6 branch, this one:
bcache: cleaned up error handling around register_cache()
had a 4 cases of trailing white space. Please ensure that future patches
are cleaned up, I fixed that one up.
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PULL] bcache: fix cache_set_flush() NULL pointer dereference on OOM
2016-03-08 16:20 ` Jens Axboe
@ 2016-03-09 3:36 ` Eric Wheeler
2016-03-09 16:23 ` Jens Axboe
0 siblings, 1 reply; 4+ messages in thread
From: Eric Wheeler @ 2016-03-09 3:36 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-bcache
On Tue, 8 Mar 2016, Jens Axboe wrote:
> On 03/07/2016 04:36 PM, Eric Wheeler wrote:
> > Hi Jens,
> >
> > Here is another OOM fix for bcache. Please pull:
> >
> > git pull https://bitbucket.org/ewheelerinc/linux.git
> > v4.5-rc7-bcache-fixes
> >
> > # git diff --stat v4.5-rc7
> > drivers/md/bcache/super.c | 3 +++
> > 1 file changed, 3 insertions(+)
>
> I pulled this and the previous, but for 4.6. They are all marked stable, so
> that should be fine.
>
> Note that your 2nd patch in the -rc6 branch, this one:
>
> bcache: cleaned up error handling around register_cache()
>
> had a 4 cases of trailing white space. Please ensure that future patches are
> cleaned up, I fixed that one up.
Interesting, do you mean whitespace at the end of a line with code or
empty lines containing whitespace or both? Something matched by [ ]+$ ?
Is it acceptable to have empty likes whith whitespace leading up to the
indent level? eg:
if (1) {
foo
<<whitespace-to-here but line is blank
bar
}
-Eric
>
> --
> Jens Axboe
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PULL] bcache: fix cache_set_flush() NULL pointer dereference on OOM
2016-03-09 3:36 ` Eric Wheeler
@ 2016-03-09 16:23 ` Jens Axboe
0 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2016-03-09 16:23 UTC (permalink / raw)
To: Eric Wheeler; +Cc: linux-bcache
On 03/08/2016 08:36 PM, Eric Wheeler wrote:
> On Tue, 8 Mar 2016, Jens Axboe wrote:
>
>> On 03/07/2016 04:36 PM, Eric Wheeler wrote:
>>> Hi Jens,
>>>
>>> Here is another OOM fix for bcache. Please pull:
>>>
>>> git pull https://bitbucket.org/ewheelerinc/linux.git
>>> v4.5-rc7-bcache-fixes
>>>
>>> # git diff --stat v4.5-rc7
>>> drivers/md/bcache/super.c | 3 +++
>>> 1 file changed, 3 insertions(+)
>>
>> I pulled this and the previous, but for 4.6. They are all marked stable, so
>> that should be fine.
>>
>> Note that your 2nd patch in the -rc6 branch, this one:
>>
>> bcache: cleaned up error handling around register_cache()
>>
>> had a 4 cases of trailing white space. Please ensure that future patches are
>> cleaned up, I fixed that one up.
>
> Interesting, do you mean whitespace at the end of a line with code or
> empty lines containing whitespace or both? Something matched by [ ]+$ ?
Both. You had both trailing white space at the end of a line, and a
space at the start of a new line.
> Is it acceptable to have empty likes whith whitespace leading up to the
> indent level? eg:
> if (1) {
> foo
> <<whitespace-to-here but line is blank
> bar
> }
Nope
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-03-09 16:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-07 23:36 [PULL] bcache: fix cache_set_flush() NULL pointer dereference on OOM Eric Wheeler
2016-03-08 16:20 ` Jens Axboe
2016-03-09 3:36 ` Eric Wheeler
2016-03-09 16:23 ` Jens Axboe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.