Re: [PATCH V1] um: Fix compilation warnings

From: Johannes Berg
Date: Wed Feb 15 2023 - 03:14:53 EST


On Tue, 2023-02-14 at 22:57 +0100, Richard Weinberger wrote:
> ----- Ursprüngliche Mail -----
> > Von: "Srinivasarao Pathipati" <quic_c_spathi@xxxxxxxxxxx>
> > static void sig_handler_common(int sig, struct siginfo *si, mcontext_t *mc)
> > {
> > - struct uml_pt_regs r;
> > + struct uml_pt_regs *r;
> > int save_errno = errno;
> >
> > - r.is_user = 0;
> > + r = malloc(sizeof(struct uml_pt_regs));
>
> I fear this is not correct since malloc() is not async-signal safe.

It would probably also be a non-trivial performance regression for
'interrupt' handling.

We _could_ use a static if this really was a problem, but that'd be just
one more thing to undo for SMP, and see my other mail, it's really not
needed to worry about htis.

johannes