Re: [PATCH] gpiolib: fix possible use after free on label

2018-10-31 Thread Muchun Song
Hi Linus, Thanks for your review. Linus Walleij 于2018年10月31日周三 下午6:32写道: > > Hi Muchun, > > thanks for your patch! > > On Wed, Oct 24, 2018 at 3:41 PM Muchun Song wrote: > > > gpiod_request_commit() copies the pointer to the label > > passed as an argument only to be used later. But there's a >

Re: [PATCH] gpiolib: fix possible use after free on label

2018-10-31 Thread Linus Walleij
Hi Muchun, thanks for your patch! On Wed, Oct 24, 2018 at 3:41 PM Muchun Song wrote: > gpiod_request_commit() copies the pointer to the label > passed as an argument only to be used later. But there's a > chance the caller could immediately free the passed string > (e.g., local variable). This

[PATCH] gpiolib: fix possible use after free on label

2018-10-24 Thread Muchun Song
gpiod_request_commit() copies the pointer to the label passed as an argument only to be used later. But there's a chance the caller could immediately free the passed string (e.g., local variable). This could trigger a use after free when we use gpio label(e.g., gpiochip_unlock_as_irq(), gpiochip_is