mbox series

[net,V2,0/5] net/smc: fixes 2018-11-12

Message ID 20181115121120.98440-1-ubraun@linux.ibm.com
Headers show
Series net/smc: fixes 2018-11-12 | expand

Message

Ursula Braun Nov. 15, 2018, 12:11 p.m. UTC
From: Ursula Braun <ursula.braun@linux.ibm.com>

Dave,

here is V2 of some net/smc fixes in different areas for the net tree.

v1->v2:
   do not define 8-byte alignment for union smcd_cdc_cursor in
   patch 4/5 "net/smc: atomic SMCD cursor handling"

Thanks, Ursula

Hans Wippel (2):
  net/smc: abort CLC connection in smc_release
  net/smc: add SMC-D shutdown signal

Karsten Graul (1):
  net/smc: use queue pair number when matching link group

Ursula Braun (2):
  net/smc: atomic SMCD cursor handling
  net/smc: use after free fix in smc_wr_tx_put_slot()

 net/smc/af_smc.c   | 11 +++++++----
 net/smc/smc_cdc.c  | 24 +++++++++++++----------
 net/smc/smc_cdc.h  | 56 +++++++++++++++++++++++++++++++++++++++++-------------
 net/smc/smc_core.c | 20 +++++++++++++------
 net/smc/smc_core.h |  5 +++--
 net/smc/smc_ism.c  | 43 ++++++++++++++++++++++++++++++-----------
 net/smc/smc_ism.h  |  1 +
 net/smc/smc_wr.c   |  4 +++-
 8 files changed, 117 insertions(+), 47 deletions(-)

Comments

David Miller Nov. 15, 2018, 5:54 p.m. UTC | #1
From: Ursula Braun <ubraun@linux.ibm.com>
Date: Thu, 15 Nov 2018 13:11:15 +0100

> v1->v2:
>    do not define 8-byte alignment for union smcd_cdc_cursor in
>    patch 4/5 "net/smc: atomic SMCD cursor handling"

This is even worse.

The atomic64_t must be properly 8 byte aligned, else it will
crash the kernel when an atomic operation is attempted on it.

You have a situation where your struct attributes are entirely
incompatible.  If the parent struct is __packed, you absolutely
cannot align the atomic64_t in the child structure properly.

One more time, __packed makes correctness here impossible.

I've warned strongly in the past to avoid __packed.

Now you have to untangle this mess somehow.