[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20100927.155414.43043854.davem@davemloft.net>
Date: Mon, 27 Sep 2010 15:54:14 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: sven.eckelmann@....de
Cc: ericvh@...il.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net/9p: Mount only matching virtio channels
From: Sven Eckelmann <sven.eckelmann@....de>
Date: Sun, 26 Sep 2010 17:28:13 +0200
> p9_virtio_create will only compare the the channel's tag characters
> against the device name till the end of the channel's tag but not till
> the end of the device name. This means that if a user defines channels
> with the tags foo and foobar then he would mount foo when he requested
> foonot and may mount foo when he requested foobar.
>
> Thus it is necessary to check both string lengths against each other in
> case of a successful partial string match.
>
> Signed-off-by: Sven Eckelmann <sven.eckelmann@....de>
I'll apply this, but this code would be so much simpler and this bug
would have never happened if these tags were NULL terminated when they
were pulled in from virtio.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists