public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* smatch stuff: use after free bug
@ 2011-03-28 10:31 Dan Carpenter
  2011-03-28 12:34 ` Yevgeny Petrilin
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2011-03-28 10:31 UTC (permalink / raw)
  To: Yevgeny Petrilin; +Cc: netdev

Smatch complains about this.  It's not obvious to me how to fix it.  The
bug was introduced in b12d93d63 "mlx4: Add support for promiscuous mode
in the new steering model.".

drivers/net/mlx4/mcg.c +530
	remove_promisc_qp(89) warn: 'pqp' was already freed.

   526  out_mailbox:
   527          mlx4_free_cmd_mailbox(dev, mailbox);
   528  out_list:
   529          if (back_to_list)
   530                  list_add_tail(&pqp->list, &s_steer->promisc_qps[steer]);
                                      ^^^^^^^^^^

This list was deleted and pqp was freed at this point.

   531  out_mutex:
   532          mutex_unlock(&priv->mcg_table.mutex);
   533          return err;
   534  }

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: smatch stuff: use after free bug
  2011-03-28 10:31 smatch stuff: use after free bug Dan Carpenter
@ 2011-03-28 12:34 ` Yevgeny Petrilin
  0 siblings, 0 replies; 2+ messages in thread
From: Yevgeny Petrilin @ 2011-03-28 12:34 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: netdev@vger.kernel.org

> Subject: smatch stuff: use after free bug
> 
> Smatch complains about this.  It's not obvious to me how to fix it.
> The
> bug was introduced in b12d93d63 "mlx4: Add support for promiscuous mode
> in the new steering model.".

Thanks,
Will send a fix.

Yevgeny

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-28 12:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-28 10:31 smatch stuff: use after free bug Dan Carpenter
2011-03-28 12:34 ` Yevgeny Petrilin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox