hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abhiraj Butala (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-6582) Missing null check in RpcProgramNfs3#read(XDR, SecurityHandler)
Date Wed, 06 Aug 2014 09:31:12 GMT

     [ https://issues.apache.org/jira/browse/HDFS-6582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Abhiraj Butala updated HDFS-6582:
---------------------------------

    Attachment: HDFS-6582.patch

Attaching a patch which checks fis and returns NFS3ERR_ACCES if its null. Also updated the
corresponding unit test. 

Though I am not sure if there are any other conditions (apart from user not having permission)
that can cause FSDataInputStream to be null. How did you hit this issue [~tedyu]?

Let me know what you guys think. Thanks!

> Missing null check in RpcProgramNfs3#read(XDR, SecurityHandler)
> ---------------------------------------------------------------
>
>                 Key: HDFS-6582
>                 URL: https://issues.apache.org/jira/browse/HDFS-6582
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: nfs
>            Reporter: Ted Yu
>            Priority: Minor
>         Attachments: HDFS-6582.patch
>
>
> Around line 691:
> {code}
>         FSDataInputStream fis = clientCache.getDfsInputStream(userName,
>             Nfs3Utils.getFileIdPath(handle));
>         try {
>           readCount = fis.read(offset, readbuffer, 0, count);
> {code}
> fis may be null, leading to NullPointerException



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message