lkml.org 
[lkml]   [2022]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RT BUG] Mismatched get_uid/free_uid usage in signals in some rts (2nd try)
On Fri, Jun 24, 2022 at 02:44:31PM -0400, Joe Korty wrote:
> [ Fixed incorrect linux-rt-users email address in CC ]
>
> On Fri, Jun 24, 2022 at 09:58:07AM -0700, Mark Gross wrote:
> > On Tue, Jun 21, 2022 at 03:16:39PM +0000, Joe Korty wrote:
> > > Mismatched get_uid/free_uid usage in signals in 4.9.312-rt193
> > >
> > > [ First attempt using mutt did not show up on the mailing lists.
> > > Trying again with office365 Outlook. Also added the 4.9-rt
> > > maintainers. ]
> > >
> > > The 4.19-rt patch,
> > >
> > > 0329-signal-Prevent-double-free-of-user-struct.patch
> > >
> > > needs to be ported to LAG 4.9-rt, as that release now has the Linus commit,
> > What does LAG stand for?
>
> Hi Mark,
> LAG = Latest and Greatest
>
>
>
> > FWIW the cherry-pick within the RT-stable tree worked without conflict.
> > (cherry picked from commit a99e09659e6cd4b633c3689f2c3aa5f8a816fe5b)
> > It compiles.
> > See 58a584ee59b2 signal: Prevent double-free of user struct in
> > linux-stable-rt.git/v4.9-rt-next


Hi Mark,
Absent an actual test of your port of a99e09659e6c to 4.9-rt, I just
eye-verified that the change it makes to sigqueue_free_current looks
correct. In detail,

matches the same change the Linus patch makes to __sigqueue_free (ie,
to the routine that sigqueue_free_current is a copy of).

That the new variable 'up', in sigqueue_free_current, is being used
in the patch (some variants of this fix do not have 'up'), and that
variable is present in 4.9's version of sigqueue_free_current.

That atomic_dec_and_test, rather than the refcounting version of that
some function, is being used (some versions of this patch are refcounted
instead).

Regards,
Joe

\
 
 \ /
  Last update: 2022-06-26 14:31    [W:0.079 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site