On Fri, Sep 30, 2016 at 03:56:45PM +0300, Sergei Shtylyov wrote:
> Hello.
>
> On 9/30/2016 3:11 PM, Johannes Thumshirn wrote:
>
> > The call to krealloc() in wsm_buf_reserve() directly assigns the newly
> > returned memory to buf->begin. This is all fine except when krealloc()
> > failes we loose
Hello.
On 9/30/2016 3:11 PM, Johannes Thumshirn wrote:
The call to krealloc() in wsm_buf_reserve() directly assigns the newly
returned memory to buf->begin. This is all fine except when krealloc()
failes we loose the ability to free the old memory pointed to by
Fails.
buf->begin. If we j
On Fri, Sep 30, 2016 at 02:29:39PM +0200, Johannes Berg wrote:
>
> > + tmp = krealloc(buf->begin, size, GFP_KERNEL | GFP_DMA);
> > + if (tmp) {
> >
> I think that check is inverted?
>
> johannes
Fu.. you're right, of cause it's !tmp.
I'll resend.
Thanks,
Johannes
--
Johannes Thu
> + tmp = krealloc(buf->begin, size, GFP_KERNEL | GFP_DMA);
> + if (tmp) {
>
I think that check is inverted?
johannes
The call to krealloc() in wsm_buf_reserve() directly assigns the newly
returned memory to buf->begin. This is all fine except when krealloc()
failes we loose the ability to free the old memory pointed to by
buf->begin. If we just create a temporary variable to assign memory to
and assign the memory