linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* re: NFS: Add a client-side function to display NFS file handles
@ 2012-03-06 10:51 Dan Carpenter
  2012-03-06 16:14 ` Fwd: " Chuck Lever
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2012-03-06 10:51 UTC (permalink / raw)
  To: chuck.lever; +Cc: linux-nfs

Hello Chuck Lever,

This is a semi-automatic email about new static checker warnings.

The patch 20d27e929fb4: "NFS: Add a client-side function to display 
NFS file handles" from Mar 1, 2012, leads to the following Smatch 
complaint:

fs/nfs/inode.c:1061 _nfs_display_fhandle()
	 warn: variable dereferenced before check 'fh' (see line 1061)

fs/nfs/inode.c
  1060	
  1061		if (fh->size == 0 || fh == NULL) {
                    ^^^^^^^^         ^^^^^^^^^^
                   dereference          check

  1062			printk(KERN_DEFAULT "%s at %p is empty\n", caption, fh);
  1063			return;

regards,
dan carpenter


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

* Fwd: NFS: Add a client-side function to display NFS file handles
  2012-03-06 10:51 NFS: Add a client-side function to display NFS file handles Dan Carpenter
@ 2012-03-06 16:14 ` Chuck Lever
  2012-03-06 16:18   ` Myklebust, Trond
  0 siblings, 1 reply; 3+ messages in thread
From: Chuck Lever @ 2012-03-06 16:14 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: Linux NFS Mailing List

Trond-

Can you please reverse these checks in your version of the commit?

Begin forwarded message:

> From: Dan Carpenter <dan.carpenter@oracle.com>
> Subject: re: NFS: Add a client-side function to display NFS file handles
> Date: March 6, 2012 5:51:35 AM EST
> To: chuck.lever@oracle.com
> Cc: linux-nfs@vger.kernel.org
> 
> Hello Chuck Lever,
> 
> This is a semi-automatic email about new static checker warnings.
> 
> The patch 20d27e929fb4: "NFS: Add a client-side function to display 
> NFS file handles" from Mar 1, 2012, leads to the following Smatch 
> complaint:
> 
> fs/nfs/inode.c:1061 _nfs_display_fhandle()
> 	 warn: variable dereferenced before check 'fh' (see line 1061)
> 
> fs/nfs/inode.c
>  1060	
>  1061		if (fh->size == 0 || fh == NULL) {
>                    ^^^^^^^^         ^^^^^^^^^^
>                   dereference          check
> 
>  1062			printk(KERN_DEFAULT "%s at %p is empty\n", caption, fh);
>  1063			return;
> 
> regards,
> dan carpenter
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Chuck Lever
chuck[dot]lever[at]oracle[dot]com





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

* Re: Fwd: NFS: Add a client-side function to display NFS file handles
  2012-03-06 16:14 ` Fwd: " Chuck Lever
@ 2012-03-06 16:18   ` Myklebust, Trond
  0 siblings, 0 replies; 3+ messages in thread
From: Myklebust, Trond @ 2012-03-06 16:18 UTC (permalink / raw)
  To: Chuck Lever; +Cc: Linux NFS Mailing List

T24gVHVlLCAyMDEyLTAzLTA2IGF0IDExOjE0IC0wNTAwLCBDaHVjayBMZXZlciB3cm90ZToNCj4g
VHJvbmQtDQo+IA0KPiBDYW4geW91IHBsZWFzZSByZXZlcnNlIHRoZXNlIGNoZWNrcyBpbiB5b3Vy
IHZlcnNpb24gb2YgdGhlIGNvbW1pdD8NCg0KVGhhdCBjb21taXQgaGFzIGFscmVhZHkgZ29uZSBp
bnRvIG5mcy1mb3ItbmV4dCwgd2hpY2ggaXMgY29uc2lkZXJlZA0Kc3RhYmxlLCBzbyBJIGhhdmUg
Y3JlYXRlZCBhIHNlcGFyYXRlIG9uZS1saW5lIGNvbW1pdCB0byBmaXggaXQuIEl0IGhhcw0KYmVl
biBhcHBsaWVkIGluIHRoZSAnZGV2ZWwnIGJyYW5jaCwgd2hpY2ggd2lsbCBzb29uIGJlIG1lcmdl
ZCBpbnRvDQpuZnMtZm9yLW5leHQuDQoNCg0KLS0gDQpUcm9uZCBNeWtsZWJ1c3QNCkxpbnV4IE5G
UyBjbGllbnQgbWFpbnRhaW5lcg0KDQpOZXRBcHANClRyb25kLk15a2xlYnVzdEBuZXRhcHAuY29t
DQp3d3cubmV0YXBwLmNvbQ0KDQo=

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

end of thread, other threads:[~2012-03-06 16:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-06 10:51 NFS: Add a client-side function to display NFS file handles Dan Carpenter
2012-03-06 16:14 ` Fwd: " Chuck Lever
2012-03-06 16:18   ` Myklebust, Trond

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).