From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by dpdk.org (Postfix) with ESMTP id B81A21B88C for ; Tue, 15 May 2018 15:53:45 +0200 (CEST) Received: by mail-wr0-f193.google.com with SMTP id v5-v6so228777wrf.9 for ; Tue, 15 May 2018 06:53:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8HvyCmzsMKK/j7LEYMKdhEJhvDp6/IgUb66bF7bSg3s=; b=Jma1TSA3zZLSf6x/F1I5AcQdbq13ZWgmAgLK1TumS4yRrPIJQfNNZyZhmj37oFsoUN VYJGOAqIzgLDBojXU3qq5E7UuZLPgRtlifOAyJpX0/fZ70fl4/HQRIj37pDsmU15IAZf ENbCVdg8vYyJTC3VuM4brVni5t+BmcOO5UBIY5DPJQTin4Ao001OvgZ6jUlnm82JKgHB xWGFFjzKYXc4AvHv1slWj88We/Mtlk20ibHqDLPD57v1bEcXL65wz0wIsdYKOct3bHZb jJPzCJthsvH+uJGuVMBxeWkij8O3sCs/KW5I8cKLV5yeBPmsBSwH4zTMXnlKyVWCmj3G fUKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8HvyCmzsMKK/j7LEYMKdhEJhvDp6/IgUb66bF7bSg3s=; b=c4+WmPRJw/h42CmbtIXZ/drLBTriTFRzhSyZZSoGo4Q3pQhGDA65MdCnAXZ8U7yXvc kctv2NxsgTESNmQMvxX69pWMu9I9T4K4rS2HQxhxFB8H6hyLQ5zR0/kXYzyw/c1H3zjd zcuALfiMpMYm5SVd32JgWvHdTv0ABqjbPuebUIc/phUSMaUOaKXGxrse4Y5+BFyn/VI1 woVg3BdNMotN4ZgunIOXWHEj+GAqAm8kgrO1rcItgpZYGdWNP3xm5BAj8yBLPDemYfYU 9G9UuOb8+MbRfszfMTzfRzDqbjgGNoqv1a1s9HJ3d9ME/kLG6QnbssDHrfVYi/nYA0m/ xCjQ== X-Gm-Message-State: ALKqPwdHgao7/QTxUHgtZTw/N+10aKcNFr/pm3d0pwQBeBLOLr3gwatt rWR0OeI8xfqjoJM0unxyGhk= X-Google-Smtp-Source: AB8JxZqBZivJMEL186EFyybC0ehG23+ViOPRYpDd8S8rvRFyeV/jrJmsQJR2wj0dcZi4AgFiM/6j6w== X-Received: by 2002:adf:cc8c:: with SMTP id p12-v6mr10173255wrj.280.1526392425368; Tue, 15 May 2018 06:53:45 -0700 (PDT) Received: from localhost (slip139-92-244-193.lon.uk.prserv.net. [139.92.244.193]) by smtp.gmail.com with ESMTPSA id 33-v6sm175644wrs.5.2018.05.15.06.53.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 May 2018 06:53:44 -0700 (PDT) From: luca.boccassi@gmail.com To: Andy Green Cc: Pablo de Lara , dpdk stable Date: Tue, 15 May 2018 14:53:32 +0100 Message-Id: <20180515135335.10459-5-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180515135335.10459-1-luca.boccassi@gmail.com> References: <20180515134731.9337-72-luca.boccassi@gmail.com> <20180515135335.10459-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net/vdev_netvsc: readlink inputs cannot be aliased' has been queued to stable release 18.02.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2018 13:53:45 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/16/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 66662328204491df9f99bc21ad6b6d32cdae1c6e Mon Sep 17 00:00:00 2001 From: Andy Green Date: Mon, 14 May 2018 13:00:52 +0800 Subject: [PATCH] net/vdev_netvsc: readlink inputs cannot be aliased [ upstream commit 2e4d2e563f23930b06c24b7bc543bf04321d81f7 ] drivers/net/vdev_netvsc/vdev_netvsc.c:335:2:error: passing argument 2 to restrict-qualified parameter aliases with argument 1 ret = readlink(buf, buf, size); ^~~ Fixes: e7dc5d7becc5 ("net/vdev_netvsc: implement core functionality") Signed-off-by: Andy Green Acked-by: Pablo de Lara --- drivers/net/vdev_netvsc/vdev_netvsc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c index 75aec8980..f746433b5 100644 --- a/drivers/net/vdev_netvsc/vdev_netvsc.c +++ b/drivers/net/vdev_netvsc/vdev_netvsc.c @@ -327,12 +327,15 @@ static int vdev_netvsc_sysfs_readlink(char *buf, size_t size, const char *if_name, const char *relpath) { + struct vdev_netvsc_ctx *ctx; + char in[RTE_MAX(sizeof(ctx->yield), 256u)]; int ret; - ret = snprintf(buf, size, "/sys/class/net/%s/%s", if_name, relpath); - if (ret == -1 || (size_t)ret >= size) + ret = snprintf(in, sizeof(in) - 1, "/sys/class/net/%s/%s", + if_name, relpath); + if (ret == -1 || (size_t)ret >= sizeof(in)) return -ENOBUFS; - ret = readlink(buf, buf, size); + ret = readlink(in, buf, size); if (ret == -1) return -errno; if ((size_t)ret >= size - 1) -- 2.14.2