Re: [PATCH 1/2] staging: android: ion: Do not BUG on handle client mismatch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 22, 2016 at 09:58:40AM -0700, Laura Abbott wrote:
> The validate and BUG_ON are checking two slightly different things.
> The BUG_ON is trying to catch blatantly wrong kernel users while the
> validate is designed to catch races.

I still think BUG is a fairly harsh way to "catch" blatantly wrong kernel users. Is the worry about kernel users modifying the handle? Can't they modify the client as well in that case?
I was perhaps overzealous in removing the check altogether. Could we settle for a WARN_ON() and skipping the ref decrement? I think warning and leaking memory is preferrable to crashing the kernel.

Best Regards,
Johanna Abrahamsson
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux