On Sun, 8 Nov 2026 at 20:39, jiputer <[email protected]> wrote: > > Convert malloc to g_try_malloc and free to g_free in > uaccess_lock_user. > Convert free to g_free in uaccess_unlock_user. > > Signed-off-by: jiputer <[email protected]> > --- > > Something to note, when len == 0 in uaccess_lock_user, > it will return a NULL pointer, instead of a non-null > pointer from malloc. Any read or writes on *p will report > EFAULT since it would be considered a bad address.
Do you have any concrete examples of where this is a behaviour change for callers to this function? I don't think we ought to rely on malloc(0) behaviour, but if we do somewhere it might be wise to fix that up first... thanks -- PMM
