[PATCH V1] um: Fix compilation warnings
Johannes Berg
johannes at sipsolutions.net
Wed Feb 15 00:14:39 PST 2023
On Tue, 2023-02-14 at 22:57 +0100, Richard Weinberger wrote:
> ----- Ursprüngliche Mail -----
> > Von: "Srinivasarao Pathipati" <quic_c_spathi at quicinc.com>
> > 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
More information about the linux-um
mailing list