From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755222AbcLZKjl (ORCPT ); Mon, 26 Dec 2016 05:39:41 -0500 Received: from bh-25.webhostbox.net ([208.91.199.152]:49302 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753368AbcLZKji (ORCPT ); Mon, 26 Dec 2016 05:39:38 -0500 Subject: Re: [PATCH] drivers: watchdog: pika_wdt: add __ro_after_init to ident To: Bhumika Goyal , julia.lawall@lip6.fr, wim@iguana.be, linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org References: <1482652824-8648-1-git-send-email-bhumirks@gmail.com> Cc: keescook@chromium.org From: Guenter Roeck Message-ID: <182d4c22-53d1-5b93-5eb5-2763005a94be@roeck-us.net> Date: Mon, 26 Dec 2016 02:39:35 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1482652824-8648-1-git-send-email-bhumirks@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: linux@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: linux@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/25/2016 12:00 AM, Bhumika Goyal wrote: > The object ident of type watchdog_info structure is not > modified after getting initialized by pikawdt_init. Apart from getting > referenced in init it is also passed as an argument to the function > copy_to_user but this argument is of type const void *. Therefore add > __ro_after_init to its declaration. > > Signed-off-by: Bhumika Goyal Reviewed-by: Guenter Roeck > --- > drivers/watchdog/pika_wdt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/watchdog/pika_wdt.c b/drivers/watchdog/pika_wdt.c > index 0cdfee2..e35cf5e 100644 > --- a/drivers/watchdog/pika_wdt.c > +++ b/drivers/watchdog/pika_wdt.c > @@ -54,7 +54,7 @@ > struct timer_list timer; /* The timer that pings the watchdog */ > } pikawdt_private; > > -static struct watchdog_info ident = { > +static struct watchdog_info ident __ro_after_init = { > .identity = DRV_NAME, > .options = WDIOF_CARDRESET | > WDIOF_SETTIMEOUT | >