From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Nicholas A. Bellinger" Subject: Re: [PATCH 8/9] ib_srpt: Convert srp_max_rsp_size into per port configfs attribute Date: Mon, 24 Oct 2011 12:49:12 -0700 Message-ID: <1319485752.17450.57.camel@haakon2.linux-iscsi.org> References: <1319434422-15354-1-git-send-email-nab@linux-iscsi.org> <1319434422-15354-9-git-send-email-nab@linux-iscsi.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Bart Van Assche Cc: linux-rdma , Roland Dreier , Christoph Hellwig , target-devel , linux-scsi List-Id: linux-rdma@vger.kernel.org On Mon, 2011-10-24 at 21:44 +0200, Bart Van Assche wrote: > On Mon, Oct 24, 2011 at 7:33 AM, Nicholas A. Bellinger > wrote: > > +static ssize_t srpt_tpg_attrib_store_srp_max_rsp_size( > > + struct se_portal_group *se_tpg, > > + const char *page, > > + size_t count) > > +{ > > + struct srpt_port *sport = container_of(se_tpg, struct srpt_port, port_tpg_1); > > + unsigned long val; > > + int ret; > > + > > + ret = strict_strtoul(page, 0, &val); > > If the data "page" points at only consists of digits, the above > strict_strtoul() call will trigger a past-end-of-buffer read. I don't understand what you mean here. Can you provide a test case to demonstrate please..? > Also, isn't kstrto*() preferred over strict_strto*() ? > Not AFAIK. --nab -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html