The patch titled IB/mthca: Fix FMR breakage caused by kmemdup() conversion has been added to the -mm tree. Its filename is ib-mthca-fix-fmr-breakage-caused-by-kmemdup-conversion.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: IB/mthca: Fix FMR breakage caused by kmemdup() conversion From: Michael S. Tsirkin <mst@xxxxxxxxxxxxxx> Commit bed8bdfd ("IB: kmemdup() cleanup") introduced one bad conversion to kmemdup() in mthca_alloc_fmr(), where the structure allocated and the structure copied are not the same size. Revert this back to the original kmalloc()/memcpy() code. Reported-by: Dotan Barak <dotanb@xxxxxxxxxxxxxx>. Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxxxxxx> Signed-off-by: Roland Dreier <roland@xxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/infiniband/hw/mthca/mthca_provider.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -puN drivers/infiniband/hw/mthca/mthca_provider.c~ib-mthca-fix-fmr-breakage-caused-by-kmemdup-conversion drivers/infiniband/hw/mthca/mthca_provider.c --- a/drivers/infiniband/hw/mthca/mthca_provider.c~ib-mthca-fix-fmr-breakage-caused-by-kmemdup-conversion +++ a/drivers/infiniband/hw/mthca/mthca_provider.c @@ -1100,10 +1100,11 @@ static struct ib_fmr *mthca_alloc_fmr(st struct mthca_fmr *fmr; int err; - fmr = kmemdup(fmr_attr, sizeof *fmr, GFP_KERNEL); + fmr = kmalloc(sizeof *fmr, GFP_KERNEL); if (!fmr) return ERR_PTR(-ENOMEM); + memcpy(&fmr->attr, fmr_attr, sizeof *fmr_attr); err = mthca_fmr_alloc(to_mdev(pd->device), to_mpd(pd)->pd_num, convert_access(mr_access_flags), fmr); _ Patches currently in -mm which might be from mst@xxxxxxxxxxxxxx are ib-mthca-fix-fmr-breakage-caused-by-kmemdup-conversion.patch git-infiniband.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html