Linux CIFS filesystem development
 help / color / mirror / Atom feed
* re: Send durable handle v2 contexts when use of persistent handles required
@ 2015-11-03 11:47 Dan Carpenter
  2015-11-03 15:56 ` Steve French
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2015-11-03 11:47 UTC (permalink / raw)
  To: smfrench-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA

Hello Steve French,

The patch ea81d9ba9d72: "Send durable handle v2 contexts when use of
persistent handles required" from Oct 3, 2015, leads to the following
static checker warning:

	fs/cifs/smb2pdu.c:1156 create_durable_v2_buf()
	warn: struct type mismatch 'create_durable_v2 vs create_durable'

fs/cifs/smb2pdu.c
  1151  static struct create_durable_v2 *
  1152  create_durable_v2_buf(struct cifs_fid *pfid)
  1153  {
  1154          struct create_durable_v2 *buf;
  1155  
  1156          buf = kzalloc(sizeof(struct create_durable), GFP_KERNEL);

I think this is a problem, isn't create_durable_v2 larger?  Smatch is
bad at calculating the sizes of enums.

  1157          if (!buf)
  1158                  return NULL;
  1159  

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Send durable handle v2 contexts when use of persistent handles required
  2015-11-03 11:47 Send durable handle v2 contexts when use of persistent handles required Dan Carpenter
@ 2015-11-03 15:56 ` Steve French
  0 siblings, 0 replies; 2+ messages in thread
From: Steve French @ 2015-11-03 15:56 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Pavel Shilovsky

Good catch.  Updating patch.

On Tue, Nov 3, 2015 at 5:47 AM, Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> wrote:
> Hello Steve French,
>
> The patch ea81d9ba9d72: "Send durable handle v2 contexts when use of
> persistent handles required" from Oct 3, 2015, leads to the following
> static checker warning:
>
>         fs/cifs/smb2pdu.c:1156 create_durable_v2_buf()
>         warn: struct type mismatch 'create_durable_v2 vs create_durable'
>
> fs/cifs/smb2pdu.c
>   1151  static struct create_durable_v2 *
>   1152  create_durable_v2_buf(struct cifs_fid *pfid)
>   1153  {
>   1154          struct create_durable_v2 *buf;
>   1155
>   1156          buf = kzalloc(sizeof(struct create_durable), GFP_KERNEL);
>
> I think this is a problem, isn't create_durable_v2 larger?  Smatch is
> bad at calculating the sizes of enums.
>
>   1157          if (!buf)
>   1158                  return NULL;
>   1159
>
> regards,
> dan carpenter



-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-03 15:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-03 11:47 Send durable handle v2 contexts when use of persistent handles required Dan Carpenter
2015-11-03 15:56 ` Steve French

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox