stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* kintegrityd workqueue fix backported, but only to some LTS
@ 2022-03-14 11:50 Niklas Cassel
  2022-03-14 12:28 ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: Niklas Cassel @ 2022-03-14 11:50 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: stable, kbusch, martin.petersen

Hello Christoph, stable,

I recently saw a crash caused by the kintegrityd workqueue that could only
be reproduced on older kernels.
A null pointer dereference in function bio_integrity_verify_fn.

The fix in Linus's tree for this:
3df49967f6f1 ("block: flush the integrity workqueue in blk_integrity_unregister")
was first merged in v5.15.

The fix has been backported to v5.10 LTS branch in:
1ef68b84bc11 ("block: flush the integrity workqueue in blk_integrity_unregister")

The fix doesn't have a fixes tag, but from inspecting the code,
I don't understand why this was only backported to v5.10, AFAICT it should
at least have been backported to v5.4, v4.19 and v4.14 LTS as well.

Original series:
https://lore.kernel.org/all/20210914070657.87677-3-hch@lst.de/

The blk_flush_integrity() call that actually fixes the crash should be
trivial to backport/add before clearing the flag and doing the memset.


Kind regards,
Niklas

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: kintegrityd workqueue fix backported, but only to some LTS
  2022-03-14 11:50 kintegrityd workqueue fix backported, but only to some LTS Niklas Cassel
@ 2022-03-14 12:28 ` Greg KH
  2022-03-14 13:08   ` Niklas Cassel
  0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2022-03-14 12:28 UTC (permalink / raw)
  To: Niklas Cassel; +Cc: Christoph Hellwig, stable, kbusch, martin.petersen

On Mon, Mar 14, 2022 at 11:50:18AM +0000, Niklas Cassel wrote:
> Hello Christoph, stable,
> 
> I recently saw a crash caused by the kintegrityd workqueue that could only
> be reproduced on older kernels.
> A null pointer dereference in function bio_integrity_verify_fn.
> 
> The fix in Linus's tree for this:
> 3df49967f6f1 ("block: flush the integrity workqueue in blk_integrity_unregister")
> was first merged in v5.15.
> 
> The fix has been backported to v5.10 LTS branch in:
> 1ef68b84bc11 ("block: flush the integrity workqueue in blk_integrity_unregister")
> 
> The fix doesn't have a fixes tag, but from inspecting the code,
> I don't understand why this was only backported to v5.10, AFAICT it should
> at least have been backported to v5.4, v4.19 and v4.14 LTS as well.
> 
> Original series:
> https://lore.kernel.org/all/20210914070657.87677-3-hch@lst.de/
> 
> The blk_flush_integrity() call that actually fixes the crash should be
> trivial to backport/add before clearing the flag and doing the memset.

A backported patch series would be great to have, to show that you have
tested that it works properly.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: kintegrityd workqueue fix backported, but only to some LTS
  2022-03-14 12:28 ` Greg KH
@ 2022-03-14 13:08   ` Niklas Cassel
  2022-03-14 13:54     ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: Niklas Cassel @ 2022-03-14 13:08 UTC (permalink / raw)
  To: Greg KH; +Cc: Christoph Hellwig, stable, kbusch, martin.petersen

On Mon, Mar 14, 2022 at 01:28:38PM +0100, Greg KH wrote:
> On Mon, Mar 14, 2022 at 11:50:18AM +0000, Niklas Cassel wrote:
> > Hello Christoph, stable,
> > 
> > I recently saw a crash caused by the kintegrityd workqueue that could only
> > be reproduced on older kernels.
> > A null pointer dereference in function bio_integrity_verify_fn.
> > 
> > The fix in Linus's tree for this:
> > 3df49967f6f1 ("block: flush the integrity workqueue in blk_integrity_unregister")
> > was first merged in v5.15.
> > 
> > The fix has been backported to v5.10 LTS branch in:
> > 1ef68b84bc11 ("block: flush the integrity workqueue in blk_integrity_unregister")
> > 
> > The fix doesn't have a fixes tag, but from inspecting the code,
> > I don't understand why this was only backported to v5.10, AFAICT it should
> > at least have been backported to v5.4, v4.19 and v4.14 LTS as well.
> > 
> > Original series:
> > https://lore.kernel.org/all/20210914070657.87677-3-hch@lst.de/
> > 
> > The blk_flush_integrity() call that actually fixes the crash should be
> > trivial to backport/add before clearing the flag and doing the memset.
> 
> A backported patch series would be great to have, to show that you have
> tested that it works properly.

Hello Greg,

Unfortunately, I don't have access to the machine. I was only provided
a kernel crash dump to diagnose the crash.

I guess I was hoping for someone more familiar with the integrity stuff
to backport it. Both patch 1 and 3 are unrelated to the NULL pointer crash,
and because of various refactoring, I'm not sure if patch 1 and 3 are even
applicable for older kernel versions.


Kind regards,
Niklas

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: kintegrityd workqueue fix backported, but only to some LTS
  2022-03-14 13:08   ` Niklas Cassel
@ 2022-03-14 13:54     ` Greg KH
  2022-03-14 15:48       ` Niklas Cassel
  0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2022-03-14 13:54 UTC (permalink / raw)
  To: Niklas Cassel; +Cc: Christoph Hellwig, stable, kbusch, martin.petersen

On Mon, Mar 14, 2022 at 01:08:57PM +0000, Niklas Cassel wrote:
> On Mon, Mar 14, 2022 at 01:28:38PM +0100, Greg KH wrote:
> > On Mon, Mar 14, 2022 at 11:50:18AM +0000, Niklas Cassel wrote:
> > > Hello Christoph, stable,
> > > 
> > > I recently saw a crash caused by the kintegrityd workqueue that could only
> > > be reproduced on older kernels.
> > > A null pointer dereference in function bio_integrity_verify_fn.
> > > 
> > > The fix in Linus's tree for this:
> > > 3df49967f6f1 ("block: flush the integrity workqueue in blk_integrity_unregister")
> > > was first merged in v5.15.
> > > 
> > > The fix has been backported to v5.10 LTS branch in:
> > > 1ef68b84bc11 ("block: flush the integrity workqueue in blk_integrity_unregister")
> > > 
> > > The fix doesn't have a fixes tag, but from inspecting the code,
> > > I don't understand why this was only backported to v5.10, AFAICT it should
> > > at least have been backported to v5.4, v4.19 and v4.14 LTS as well.
> > > 
> > > Original series:
> > > https://lore.kernel.org/all/20210914070657.87677-3-hch@lst.de/
> > > 
> > > The blk_flush_integrity() call that actually fixes the crash should be
> > > trivial to backport/add before clearing the flag and doing the memset.
> > 
> > A backported patch series would be great to have, to show that you have
> > tested that it works properly.
> 
> Hello Greg,
> 
> Unfortunately, I don't have access to the machine. I was only provided
> a kernel crash dump to diagnose the crash.
> 
> I guess I was hoping for someone more familiar with the integrity stuff
> to backport it. Both patch 1 and 3 are unrelated to the NULL pointer crash,
> and because of various refactoring, I'm not sure if patch 1 and 3 are even
> applicable for older kernel versions.

I do not know what patch 1 and 3 refer to here, sorry :(

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: kintegrityd workqueue fix backported, but only to some LTS
  2022-03-14 13:54     ` Greg KH
@ 2022-03-14 15:48       ` Niklas Cassel
  2022-03-16 14:14         ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: Niklas Cassel @ 2022-03-14 15:48 UTC (permalink / raw)
  To: Greg KH; +Cc: Christoph Hellwig, stable, kbusch, martin.petersen

On Mon, Mar 14, 2022 at 02:54:50PM +0100, Greg KH wrote:
> On Mon, Mar 14, 2022 at 01:08:57PM +0000, Niklas Cassel wrote:
> > On Mon, Mar 14, 2022 at 01:28:38PM +0100, Greg KH wrote:
> > > On Mon, Mar 14, 2022 at 11:50:18AM +0000, Niklas Cassel wrote:
> > > > Hello Christoph, stable,
> > > > 
> > > > I recently saw a crash caused by the kintegrityd workqueue that could only
> > > > be reproduced on older kernels.
> > > > A null pointer dereference in function bio_integrity_verify_fn.
> > > > 
> > > > The fix in Linus's tree for this:
> > > > 3df49967f6f1 ("block: flush the integrity workqueue in blk_integrity_unregister")
> > > > was first merged in v5.15.
> > > > 
> > > > The fix has been backported to v5.10 LTS branch in:
> > > > 1ef68b84bc11 ("block: flush the integrity workqueue in blk_integrity_unregister")
> > > > 
> > > > The fix doesn't have a fixes tag, but from inspecting the code,
> > > > I don't understand why this was only backported to v5.10, AFAICT it should
> > > > at least have been backported to v5.4, v4.19 and v4.14 LTS as well.
> > > > 
> > > > Original series:
> > > > https://lore.kernel.org/all/20210914070657.87677-3-hch@lst.de/
> > > > 
> > > > The blk_flush_integrity() call that actually fixes the crash should be
> > > > trivial to backport/add before clearing the flag and doing the memset.
> > > 
> > > A backported patch series would be great to have, to show that you have
> > > tested that it works properly.
> > 
> > Hello Greg,
> > 
> > Unfortunately, I don't have access to the machine. I was only provided
> > a kernel crash dump to diagnose the crash.
> > 
> > I guess I was hoping for someone more familiar with the integrity stuff
> > to backport it. Both patch 1 and 3 are unrelated to the NULL pointer crash,
> > and because of various refactoring, I'm not sure if patch 1 and 3 are even
> > applicable for older kernel versions.
> 
> I do not know what patch 1 and 3 refer to here, sorry :(

Sorry, I was referring to patch 1/3 and 3/3 in the series:
https://lore.kernel.org/all/20210914070657.87677-1-hch@lst.de/

Looking at it again, patch 1/2 and 2/2 are both required.

Patch 3/3, I don't know, since the flag used to be in bdi, but is now in
request_queue.

But even then, since this doesn't have a Fixes tag, I'm not sure how far
this has to be backported. Christoph, thoughts?

I'm assuming that it was the machine learning scripts that backported it to
5.10, but considering that I've seen a crash dump with this in 4.18, it
definitely should have been backported to 4.19+ (but probably even further
back).


Kind regards,
Niklas

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: kintegrityd workqueue fix backported, but only to some LTS
  2022-03-14 15:48       ` Niklas Cassel
@ 2022-03-16 14:14         ` Greg KH
  0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2022-03-16 14:14 UTC (permalink / raw)
  To: Niklas Cassel; +Cc: Christoph Hellwig, stable, kbusch, martin.petersen

On Mon, Mar 14, 2022 at 03:48:59PM +0000, Niklas Cassel wrote:
> On Mon, Mar 14, 2022 at 02:54:50PM +0100, Greg KH wrote:
> > On Mon, Mar 14, 2022 at 01:08:57PM +0000, Niklas Cassel wrote:
> > > On Mon, Mar 14, 2022 at 01:28:38PM +0100, Greg KH wrote:
> > > > On Mon, Mar 14, 2022 at 11:50:18AM +0000, Niklas Cassel wrote:
> > > > > Hello Christoph, stable,
> > > > > 
> > > > > I recently saw a crash caused by the kintegrityd workqueue that could only
> > > > > be reproduced on older kernels.
> > > > > A null pointer dereference in function bio_integrity_verify_fn.
> > > > > 
> > > > > The fix in Linus's tree for this:
> > > > > 3df49967f6f1 ("block: flush the integrity workqueue in blk_integrity_unregister")
> > > > > was first merged in v5.15.
> > > > > 
> > > > > The fix has been backported to v5.10 LTS branch in:
> > > > > 1ef68b84bc11 ("block: flush the integrity workqueue in blk_integrity_unregister")
> > > > > 
> > > > > The fix doesn't have a fixes tag, but from inspecting the code,
> > > > > I don't understand why this was only backported to v5.10, AFAICT it should
> > > > > at least have been backported to v5.4, v4.19 and v4.14 LTS as well.
> > > > > 
> > > > > Original series:
> > > > > https://lore.kernel.org/all/20210914070657.87677-3-hch@lst.de/
> > > > > 
> > > > > The blk_flush_integrity() call that actually fixes the crash should be
> > > > > trivial to backport/add before clearing the flag and doing the memset.
> > > > 
> > > > A backported patch series would be great to have, to show that you have
> > > > tested that it works properly.
> > > 
> > > Hello Greg,
> > > 
> > > Unfortunately, I don't have access to the machine. I was only provided
> > > a kernel crash dump to diagnose the crash.
> > > 
> > > I guess I was hoping for someone more familiar with the integrity stuff
> > > to backport it. Both patch 1 and 3 are unrelated to the NULL pointer crash,
> > > and because of various refactoring, I'm not sure if patch 1 and 3 are even
> > > applicable for older kernel versions.
> > 
> > I do not know what patch 1 and 3 refer to here, sorry :(
> 
> Sorry, I was referring to patch 1/3 and 3/3 in the series:
> https://lore.kernel.org/all/20210914070657.87677-1-hch@lst.de/
> 
> Looking at it again, patch 1/2 and 2/2 are both required.
> 
> Patch 3/3, I don't know, since the flag used to be in bdi, but is now in
> request_queue.
> 
> But even then, since this doesn't have a Fixes tag, I'm not sure how far
> this has to be backported. Christoph, thoughts?
> 
> I'm assuming that it was the machine learning scripts that backported it to
> 5.10, but considering that I've seen a crash dump with this in 4.18, it
> definitely should have been backported to 4.19+ (but probably even further
> back).

Please test and if it works for you, provide a backported series and I
will be glad to consider it.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-03-16 14:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-14 11:50 kintegrityd workqueue fix backported, but only to some LTS Niklas Cassel
2022-03-14 12:28 ` Greg KH
2022-03-14 13:08   ` Niklas Cassel
2022-03-14 13:54     ` Greg KH
2022-03-14 15:48       ` Niklas Cassel
2022-03-16 14:14         ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).