Message ID | 1413731942-3317-1-git-send-email-sagig@mellanox.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
On 10/19/14 17:19, Sagi Grimberg wrote: > In case last argument of the connection string is > processed as a string (destination gid for example). > > Signed-off-by: Sagi Grimberg <sagig@mellanox.com> > --- > drivers/infiniband/ulp/srp/ib_srp.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c > index 62d2a18..5f590cf 100644 > --- a/drivers/infiniband/ulp/srp/ib_srp.c > +++ b/drivers/infiniband/ulp/srp/ib_srp.c > @@ -2760,7 +2760,7 @@ static int srp_parse_options(const char *buf, struct srp_target_port *target) > return -ENOMEM; > > sep_opt = options; > - while ((p = strsep(&sep_opt, ",")) != NULL) { > + while ((p = strsep(&sep_opt, ",\n")) != NULL) { > if (!*p) > continue; Hello Sagi, It has already happened that users were confused by a write into the "add_target" sysfs attribute that failed because of a newline not being accepted as a separator. This patch will avoid such confusion so I think it's an improvement. Hence, Acked-by: Bart Van Assche <bvanassche@acm.org> Roland, can you queue this patch for kernel 3.19 ? Thanks, Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 10/20/2014 6:08 PM, Bart Van Assche wrote: > On 10/19/14 17:19, Sagi Grimberg wrote: >> In case last argument of the connection string is >> processed as a string (destination gid for example). >> >> Signed-off-by: Sagi Grimberg <sagig@mellanox.com> >> --- >> drivers/infiniband/ulp/srp/ib_srp.c | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/drivers/infiniband/ulp/srp/ib_srp.c >> b/drivers/infiniband/ulp/srp/ib_srp.c >> index 62d2a18..5f590cf 100644 >> --- a/drivers/infiniband/ulp/srp/ib_srp.c >> +++ b/drivers/infiniband/ulp/srp/ib_srp.c >> @@ -2760,7 +2760,7 @@ static int srp_parse_options(const char *buf, >> struct srp_target_port *target) >> return -ENOMEM; >> >> sep_opt = options; >> - while ((p = strsep(&sep_opt, ",")) != NULL) { >> + while ((p = strsep(&sep_opt, ",\n")) != NULL) { >> if (!*p) >> continue; > > Hello Sagi, > > It has already happened that users were confused by a write into the > "add_target" sysfs attribute that failed because of a newline not being > accepted as a separator. This patch will avoid such confusion so I think > it's an improvement. Hence, > I would consider it a minor bug fix (and CC it to stable). Sagi. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 62d2a18..5f590cf 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -2760,7 +2760,7 @@ static int srp_parse_options(const char *buf, struct srp_target_port *target) return -ENOMEM; sep_opt = options; - while ((p = strsep(&sep_opt, ",")) != NULL) { + while ((p = strsep(&sep_opt, ",\n")) != NULL) { if (!*p) continue;
In case last argument of the connection string is processed as a string (destination gid for example). Signed-off-by: Sagi Grimberg <sagig@mellanox.com> --- drivers/infiniband/ulp/srp/ib_srp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)