Padding byte in cifs readx response

Volker Lendecke Volker.Lendecke at SerNet.DE
Fri Aug 15 11:27:21 MDT 2014


On Fri, Aug 15, 2014 at 10:24:22AM -0700, Jeremy Allison wrote:
> On Fri, Aug 15, 2014 at 07:22:16PM +0200, Volker Lendecke wrote:
> > On Fri, Aug 15, 2014 at 10:17:15AM -0700, Jeremy Allison wrote:
> > > On Thu, Aug 14, 2014 at 10:30:52PM -0700, Christof Schmitt wrote:
> > > > On Wed, Aug 13, 2014 at 04:10:34PM +0200, Volker Lendecke wrote:
> > > > > We just overflowed the 16MB nbss packet. I've attached one
> > > > > question, a few R-Bs and a possible fix.
> > > > 
> > > > Thanks. The fix looks good, i included it in the patch series, see
> > > > attachment.
> > > > > 
> > > > > VL: I think at least in the aio case the padding byte is left uninitialized.
> > > > > Can you check that? Thanks!
> > > > 
> > > > Yes, i missed that. struct aio_extra is allocated and zeroed, but not
> > > > the following data buffer. I added the explicit initialization of the
> > > > padding byte.
> > > 
> > > LGTM Christof thanks ! Pushed.
> > 
> > Wait please!
> > 
> > I'm still dubious about the new_size += 1 in
> > smb_splice_chain. Can you explain that? I'm really nervous
> > about that piece of the code, &x is really from hell.
> 
> Ok, will hold off on that :-).
> 
> andX is indeed from the darkest pits of hades. But
> I thought you'd looked at that already - my mistake,
> sorry !

I would have thought that read&x already has that byte in
smb_buf, so that new_size will automatically have it. The
offset calculation -- sure. But the size increment?

If you can explain why that's necessary, please do so! I did
not see it immediately.

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de


More information about the samba-technical mailing list