diff options
author | Julian Wiedmann <jwi@linux.vnet.ibm.com> | 2018-02-27 18:58:14 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-02-28 11:13:12 -0500 |
commit | 14d066c3531a87f727968cacd85bd95c75f59843 (patch) | |
tree | 890b77aed6e064e297bcb2d773ad8532e1cf0746 /scripts/gdb/linux/utils.py | |
parent | 98d823ab1fbdcb13abc25b420f9bb71bade42056 (diff) |
s390/qeth: fix double-free on IP add/remove race
Registering an IPv4 address with the HW takes quite a while, so we
temporarily drop the ip_htable lock. Any concurrent add/remove of the
same IP adjusts the IP's use count, and (on remove) is then blocked by
addr->in_progress.
After the register call has completed, we check the use count for
concurrently attempted add/remove calls - and possibly straight-away
deregister the IP again. This happens via l3_delete_ip(), which
1) looks up the queried IP in the htable (getting a reference to the
*same* queried object),
2) deregisters the IP from the HW, and
3) frees the IP object.
The caller in l3_add_ip() then does a second free on the same object.
For this case, skip all the extra checks and lookups in l3_delete_ip()
and just deregister & free the IP object ourselves.
Fixes: 5f78e29ceebf ("qeth: optimize IP handling in rx_mode callback")
Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions