On Sun, Dec 09, 2018 at 10:38:11AM -0800, Linus Torvalds wrote: > On Sun, Dec 9, 2018 at 6:29 AM Luc Van Oostenryck > <luc.vanoostenryck@xxxxxxxxx> wrote: > > > > The result is not very pretty but do the job. > > Looks fine to me. > > I do wonder if the "combine two address spaces to a bad AS" case might > merit a warning, but we didn't use to do that before (just silently > created a nonsensical end result), so I guess it's not a big deal. Yes, I suppose it should. It would, of course, make combine_address-space() a bit more heavy (like needding a struct position in argument for the warning). I've checked and happily the kernel doesn't contains a case where it happen (defconfig & allyesconfig on x86-64). In fact, it's surprinsing hard the create such cases (mainly because typeof() drop the address spaces and most modifiers). For the moment, I've just added an obvious check at parsing time for cases like: int __user __iomem *ptr; -- Luc