Skip to contentSkip to conversation

vb2_plane 'mapped' signed bit field

DISCUSSION Dr. David Alan Gilbert 2 participants 3 messages Apr 3, 2011 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

Hi Pawel,
'sparse' spotted that vb2_plane's mapped field is a signed
bitfield:

include/media/videobuf2-core.h:78:41 1 bit signed int

struct vb2_plane {
       void                    *mem_priv;
       int                     mapped:1;
};

that probably should be an unsigned int (I can see code that assigns 1 to it that just won't fit).

(Introduced by e23ccc0ad9258634e6d52cedf473b35dc34416c7 , spotted in 2.6.39-rc1 )

Dave

Signature · 4 lines
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\ gro.gilbert @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/
#1 lore raw

(Originally sent to Pawel's Samsung address that bounced)

Quoted 23 lines · * Dr. David Alan Gilbert ([email protected]) wrote:

Hi Pawel,
'sparse' spotted that vb2_plane's mapped field is a signed
bitfield:

include/media/videobuf2-core.h:78:41 1 bit signed int

struct vb2_plane {
       void                    *mem_priv;
       int                     mapped:1;
};

that probably should be an unsigned int (I can see code that assigns 1 to it that just won't fit).

(Introduced by e23ccc0ad9258634e6d52cedf473b35dc34416c7 , spotted in 2.6.39-rc1 )

Dave

Signature · 4 lines
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\ gro.gilbert @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/
Signature · 4 lines
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\ gro.gilbert @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/
#2 lore raw
In reply to Dr. David Alan Gilbert
Quoted 6 lines · Dr. David Alan Gilbert

Hi Pawel,
 'sparse' spotted that vb2_plane's mapped field is a signed bitfield:

include/media/videobuf2-core.h:78:41 1 bit signed int

Quoted 7 lines

struct vb2_plane {
      void                    *mem_priv;
      int                     mapped:1;
};

that probably should be an unsigned int (I can see code that assigns 1 to it that just won't fit).

Hi David,
Thanks for the report, will fix soon.

Signature · 2 lines
Best regards,
Pawel Osciak